/* GYIK Widget Styles */

.gyik-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Prevent layout-induced scroll jumps when answers expand */
.gyik-wrapper,
.gyik-container,
.gyik-item,
.gyik-answer {
	overflow-anchor: none;
}

.gyik-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 15px !important;
    width: 100% !important;
    background-color: transparent;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* Elementor-specific override to ensure two columns */
.elementor-widget-zeusweb_gyik_widget .gyik-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 15px !important;
}

.gyik-item {
    box-sizing: border-box !important;
    border: 1px solid #ffffff;
    border-radius: 14px;
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transition: all 0.3s ease;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure items fill columns in Elementor */
.elementor-widget-zeusweb_gyik_widget .gyik-item {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.gyik-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gyik-item.active {
    /* Active state styling - no margin needed with relative positioning */
}

.gyik-question-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    min-height: 50px;
    padding: 0;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.gyik-question {
    flex: 1;
    padding: 10px 12px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s ease;
    text-align: left;
    line-height: 1.35;
    width: 100%;
}

/* Kérdés szövegének kitöltése a rendelkezésre álló helyet */
.gyik-question {
    flex: 1;
    min-width: 0; /* Fontos a flex-grow működéséhez */
    text-align: left;
}

/* A kérdés szövege kitölti a rendelkezésre álló helyet */
.gyik-question-text {
    flex: 1;
    margin-left: 10px;
}

.gyik-question:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.gyik-toggle {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-right: 10px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    flex-grow: 0;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gyik-question.active .gyik-toggle {
    transform: rotate(45deg);
    color: #ffffff;
}

.gyik-button-wrapper {
    flex-shrink: 0;
    padding: 8px 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.08);
}

.gyik-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    white-space: nowrap;
}

.gyik-button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gyik-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    position: relative;
    z-index: 10;
    display: block;
}

.gyik-answer.active {
    max-height: 1000px;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    position: relative;
    z-index: 10;
    display: block;
    background-color: rgba(255, 255, 255, 0.08);
}

.gyik-answer-content {
    color: #ffffff;
    line-height: 1.6;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.gyik-answer-content p {
    margin: 0 0 15px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.gyik-answer-content p:last-child {
    margin-bottom: 0;
}

.gyik-answer-content * {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Force all content to respect container width */
.gyik-answer-content img,
.gyik-answer-content table,
.gyik-answer-content pre,
.gyik-answer-content code {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Prevent answer from expanding the item width */
.gyik-answer,
.gyik-answer.active {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

.gyik-answer-content {
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gyik-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }
    
    .gyik-item {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .gyik-question-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gyik-question {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .gyik-button-wrapper {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.3);
        padding: 10px 15px;
        text-align: center;
    }
    
    .gyik-button {
        width: 100%;
        max-width: 200px;
    }
    
    .gyik-answer.active {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .gyik-container {
        padding: 0;
    }
    
    .gyik-question {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .gyik-answer.active {
        padding: 12px;
    }
    
    .gyik-answer-content {
        font-size: 14px;
    }
}

/* Animation for smooth transitions */
.gyik-item {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus states for accessibility */
.gyik-question:focus {
    outline: none;
}

.gyik-button:focus {
    outline: none;
}

/* Print styles */
@media print {
    .gyik-question-wrapper {
        background-color: #ffffff !important;
        border-bottom: 1px solid #000000 !important;
    }
    
    .gyik-answer {
        max-height: none !important;
        padding: 15px !important;
        display: block !important;
    }
    
    .gyik-toggle {
        display: none !important;
    }
    
    .gyik-button-wrapper {
        display: none !important;
    }
} 