/* ===== BOOTSTRAP-BASED SIMPLIFIED DESIGN ===== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

/* ===== CSS VARIABLES - COLORS PRESERVED ===== */
:root {
    /* Chart Colors (Preserved from original) */
    --chart-color-1: hsl(204, 50%, 50%);  /* Blue - Önerő */
    --chart-color-2: hsl(4, 50%, 50%);    /* Red - Piaci Lakáshitel */
    --chart-color-3: hsl(71, 60%, 40%);   /* Yellow - Babaváró */
    --chart-color-4: hsl(121, 50%, 35%);  /* Green - Támogatott Hitel */
    --chart-color-5: hsl(295, 50%, 40%);  /* Purple - Egyéb Költségek */
    --chart-color-6: hsl(36, 50%, 40%);   /* Orange - Szabadfelhasználású */
    
    /* Chart Color Aliases */
    --color-onero: var(--chart-color-1);
    --color-piaci-hitel: var(--chart-color-2);
    --color-babavaro: var(--chart-color-3);
    --color-tamogatott-hitel: var(--chart-color-4);
    --color-egyeb-koltsegek: var(--chart-color-5);
    --color-szabadfelhasznalasu: var(--chart-color-6);
    
    /* Base Colors */
    --primary: hsl(221, 30%, 21%);
    --primary-50: color-mix(in srgb, var(--primary) 50%, transparent);
    --secondary: hsl(160 100% 13%);
    --bg-dark: hsl(0 0% 85%);
    --bg: hsl(300 0% 90%);
    --bg-light: hsl(300 0% 95%);
    --bg-dark-forcards: hsl(0, 0%, 80%);
    --text: hsl(300 0% 4%);
    --text-muted: hsl(0 0% 28%);
    --text-white: hsl(0, 0%, 90%);
    --error: hsl(8, 100%, 35%);
    --warning: hsl(51, 100%, 36%);
    --success: hsl(147 19% 36%);
}

/* ===== BASE STYLES ===== */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Mobile touch optimization */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button, .btn, input[type="checkbox"], input[type="range"] {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary);
    opacity: 0.9;
    border-color: var(--primary);
}

.form-range {
    accent-color: var(--primary);
    height: 0.5rem;
    background: transparent;
    -webkit-appearance: none;
    appearance: none;
}

/* ===== SLIDER TRACK STYLING ===== */
/* Style the slider track with primary color at 50% opacity */
.form-range::-webkit-slider-runnable-track {
    background: var(--primary-50);
    height: 0.5rem;
    border-radius: 0.25rem;
    border: none;
}

.form-range::-moz-range-track {
    background: var(--primary-50);
    height: 0.5rem;
    border-radius: 0.25rem;
    border: none;
}

.form-range::-ms-track {
    background: var(--primary-50);
    height: 0.5rem;
    border-radius: 0.25rem;
    border: none;
    color: transparent;
    border-color: transparent;
}

.form-range::-ms-fill-lower {
    background: var(--primary-50);
    border-radius: 0.25rem;
}

.form-range::-ms-fill-upper {
    background: var(--primary-50);
    border-radius: 0.25rem;
}

/* ===== SLIDER THUMB STYLING ===== */
/* Properly centered slider thumbs */
.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: -0.375rem; /* (thumb height - track height) / 2 = (1.25rem - 0.5rem) / 2 */
}

.form-range::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.form-range::-ms-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 50%;
    cursor: pointer;
    margin-top: 0;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-select {
    background-color: var(--bg-light);
    border-color: rgba(0,0,0,0.1);
    color: var(--text);
}

/* ===== REMOVE FOCUS BORDERS ===== */
/* Remove focus borders from Bootstrap form elements */
.form-range:focus,
.btn:focus,
.form-check-input:focus,
.purchase-price-input:focus {
    outline: none;
}

/* ===== CUSTOM COMPONENTS ===== */
.header-title {
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    line-height: 0.7;
    gap:3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    text-shadow: 
    0 0 5px rgba(255, 255, 255, 0.5),
    0 0 10px rgba(255, 255, 255, 0.4),
    0 0 20px rgba(255, 255, 255, 0.3),
    0 0 40px rgba(255, 255, 255, 0.2);
}

.badge-modern {
    background: transparent;
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.purchase-price-input {
    background: var(--bg-light);
    color: var(--text);
    font-weight: 700;
    text-align: right;
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    max-width: 120px;
    width: auto;
    font-size: 1rem;
}

.text-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* ===== BUTTONS ===== */
.btn-uniform {
    background: var(--primary);
    color: var(--text-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-uniform:hover {
    background: var(--primary);
    opacity: 0.9;
    transform: translateY(-0.125rem);
}

.btn-modern {
    background: var(--primary);
    color: var(--text-white);
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.btn-modern:hover {
    opacity: 0.9;
}

.btn-modern svg {
    flex-shrink: 0;
}

#addFinancingOption {
    background: var(--primary);
    color: var(--text-white);
}

/* ===== CARDS ===== */
.glass-card {
    background: var(--bg);
    padding-bottom: 1.25rem;
    padding-top: 1.25rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.glass-card-secondary {
    background: var(--bg-dark-forcards);
    padding-bottom: 1.25rem;
    padding-top: 1.25rem;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    border-radius: 1rem;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 1.5rem;
}

.glass-card-accent {
    background: var(--bg-dark-forcards);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
    margin-bottom: 1.5rem;
}


.glass-card-accent-no-shadow {
    padding: 2.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: none;
    background: transparent;
}

.glass-card-accent .border-bottom,
.glass-card-accent .border-top {
    border-color: rgba(0, 0, 0, 1);
}

/* ===== MONTHLY PAYMENTS BOLD STYLING ===== */
#summaryMonthlyPaymentsSection .d-flex {
    font-weight: bold;
}

#summaryTotalMonthlyPayments {
    font-weight: bold;
}

#summarySelfFundWrapper .d-flex {
    font-weight: bold;
}

/* ===== FINANCING OPTIONS ===== */
.financing-option-card {
    margin-bottom: 1rem;
}

.financing-option-card.disabled-opacity {
    opacity: 0.5;
}

.financing-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.financing-option-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    transition: color 0.3s ease;
}


.delete-financing-btn {
    background: transparent !important;
    color: var(--error) !important;
    border: 1px solid var(--error) !important;
    padding: 0.25rem 0.75rem !important;
}

.delete-financing-btn:hover {
    background: var(--error) !important;
    color: var(--text-white) !important;
}

/* ===== PROPERTY TYPE TOGGLE ===== */
.property-type-toggle-container {
    margin: 1rem 0;
    text-align: center;
}

.property-type-toggle {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.property-type-track {
    position: relative;
    width: 7.5rem;
    height: 2rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    overflow: hidden;
}

.property-type-knob {
    position: absolute;
    top: 0.1875rem;
    left: 0.1875rem;
    width: 3.5rem;
    height: 1.625rem;
    background: var(--chart-color-4);
    border-radius: 0.375rem;
    transition: transform 0.2s;
    z-index: 2;
}

.property-type-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 3;
}

.property-type-label {
    font-weight: 500;
    transition: all 0.2s;
    pointer-events: none;
}

.property-type-input:checked + .property-type-track .property-type-knob {
    transform: translateX(3.625rem);
}

.property-type-input:checked + .property-type-track .property-type-label-right {
    color: var(--text-white);
}

.property-type-input:not(:checked) + .property-type-track .property-type-label-left {
    color: var(--text-white);
}

/* ===== POPUPS ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.popup-overlay.visible {
    display: flex;
}

.popup-content {
    background: var(--bg-light);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.popup-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text);
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-body {
    margin: 1rem 0;
}

.popup-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.popup-disclaimer {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 1rem;
}

.popup-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--text-white);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
}

.popup-success-icon {
    color: var(--success);
}

/* ===== VALIDATION ERROR NOTIFICATION ===== */
.validation-error-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--error);
    color: var(--text-white);
    padding: 1rem;
    z-index: 9999;
    display: none;
    text-align: center;
}

.validation-error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ===== SOCIAL SHARING ===== */
.social-share-container {
    margin-top: 2rem;
    margin-bottom: 2rem ;
}

.copy-success {
    background: var(--success) !important;
    color: var(--text-white) !important;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-light);
}

.social-btn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: var(--bg-light);
}

.social-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ===== CHART CONTAINER ===== */
.financial-chart-container {
    height: 20rem;
    position: relative;
}

/* ===== WARNINGS ===== */
.down-payment-warning {
    color: var(--error);
    font-weight: bold;
    border-bottom: 2px solid var(--error);
    padding-bottom: 2px;
}

.down-payment-warning-orange {
    color: var(--warning);
    font-weight: bold;
    border-bottom: 2px solid var(--warning);
    padding-bottom: 2px;
}

.warning-message {
    color: var(--text);
    margin-top: 4px;
    background-color: color-mix(in srgb, var(--error) 15%, transparent);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--error);
}

.warning-message-orange {
    color: var(--text);
    margin-top: 4px;
    background-color: color-mix(in srgb, var(--warning) 15%, transparent);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--warning);
}

/* ===== UTILITIES ===== */
.hidden-element {
    display: none !important;
}

/* Bootstrap compatibility for hidden elements */
.hidden {
    display: none !important;
}

/* Ensure Bootstrap d-none works with our custom hidden classes */
.d-none {
    display: none !important;
}

/* ===== CHECKBOX SPACING ===== */
/* Increase gap between checkbox and text */
.form-check-input {
    margin-right: 0.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.form-check-label {
    margin-left: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.form-check {
    display: flex;
    align-items: flex-start;
}

/* ===== KÖLTSÉG ÖSSZESÍTŐ DIVIDERS ===== */
/* Override border color for dividers in cost summary section */
.glass-card-accent .border-top {
    border-color: var(--text) !important;
}

/* ===== UNIFIED CARD TITLE MARGINS ===== */
/* Ensure all card titles have consistent bottom margins */
.glass-card h1,
.glass-card h2,
.glass-card h3,
.glass-card-secondary h1,
.glass-card-secondary h2,
.glass-card-secondary h3,
.glass-card-accent h1,
.glass-card-accent h2,
.glass-card-accent h3 {
    margin-bottom: 1rem;
}

/* ===== SPECIFIC TITLE SPACING ===== */
/* Increase space under "Finanszírozás" title */
.financing-section h2 {
    margin-bottom: 2rem;
}

.embed-container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-dark);
    overflow-x: hidden;
    max-width: 100vw;
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    .glass-card,
    .glass-card-secondary,
    .glass-card-accent {
        padding: 1.5rem;
    }
    
    .financial-chart-container {
        height: 25rem;
    }
    
    .header-title {
        font-size: 2.5rem;
        line-height: 1.2;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Force each word to stay together, allow breaking between words */
    .header-title span {
        white-space: nowrap;
    }
    
    .badge-modern {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* Improve touch targets on mobile */
    .btn-uniform,
    .btn-modern,
    .social-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better button text scaling on mobile */
    .btn-modern {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        white-space: normal;
        line-height: 1.2;
        gap: 0.125rem;
    }
    
    .btn-modern svg {
        width: 12px;
        height: 12px;
    }
    
    .btn-uniform {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
        white-space: normal;
    }
    
    /* Financing option title responsive sizing */
    .financing-option-title {
        font-size: 1.1rem;
    }
    
    /* Fix checkbox scaling on mobile */
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-top: 0.25rem;
        flex-shrink: 0;
    }
    
    /* Better input field scaling */
    .purchase-price-input {
        font-size: 0.875rem;
        padding: 0.375rem 0.5rem;
        max-width: 100px;
        min-width: 70px;
    }
    
    /* Better slider touch experience */
    .form-range {
        height: 0.625rem;
        cursor: pointer;
    }
    
    .form-range::-webkit-slider-runnable-track {
        height: 0.625rem;
    }
    
    .form-range::-moz-range-track {
        height: 0.625rem;
    }
    
    .form-range::-ms-track {
        height: 0.625rem;
    }
    
    .form-range::-webkit-slider-thumb {
        width: 1.5rem;
        height: 1.5rem;
        margin-top: -0.4375rem; /* (1.5rem - 0.625rem) / 2 */
        cursor: pointer;
    }
    
    .form-range::-moz-range-thumb {
        width: 1.5rem;
        height: 1.5rem;
        cursor: pointer;
    }
    
    .form-range::-ms-thumb {
        width: 1.5rem;
        height: 1.5rem;
        cursor: pointer;
    }
    
    /* Better popup experience on mobile */
    .popup-content {
        padding: 1.5rem;
        max-height: 85vh;
    }
    
    /* Stack social buttons nicely on mobile */
    .social-buttons {
        gap: 0.5rem;
    }
    
    /* Prevent horizontal overflow */
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .col-lg-6 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* ===== ANNUITY CALCULATOR STYLES ===== */

/* Stat items */
.stat-item {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Annuity table styles */
.annuity-table-container {
    position: relative;
    width: 100%;
}

.annuity-table-wrapper {
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.annuity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.annuity-table-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--bg-dark);
}

.annuity-table thead th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    background-color: var(--bg-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 20;
}

.annuity-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.annuity-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Year header for collapsible sections */
.year-header {
    font-weight: 600;
    user-select: none;
    transition: background-color 0.2s;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--bg-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.year-header:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Consolidated summary table */
.summary-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.summary-table thead th {
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(0, 0, 0, 0.1);
    font-size: 0.85rem;
}

.summary-table tbody td {
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

.summary-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.summary-total-row {
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.summary-total-row td {
    padding: 0.75rem 0.5rem;
}

/* Export card styles */
#exportExcelBtn,
#copyToSheetsBtn {
    transition: all 0.2s ease;
}

#exportExcelBtn:hover,
#copyToSheetsBtn:hover {
    transform: translateY(-0.125rem);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.year-toggle-icon {
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.2s;
}

.month-row {
    display: table-row;
}

/* Calculation explanation */
.calculation-explanation {
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 0.5rem;
    line-height: 1.8;
    transition: all 0.3s ease;
}

/* Collapsible explanation toggle button */
#toggleExplanationBtn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

#explanationToggleIcon {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.875rem;
}

.calculation-explanation .formula {
    font-family: 'Courier New', monospace;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 0.25rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    word-break: break-word;
}

.calculation-explanation ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.calculation-explanation li {
    margin-bottom: 0.5rem;
}

/* Annuity chart container */
.annuity-chart-container {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
}

/* Loan section spacing */
.loan-section {
    margin-bottom: 3rem;
}

.loan-section:last-child {
    margin-bottom: 0;
}

/* Responsive table */
@media (max-width: 768px) {
    .annuity-table {
        font-size: 0.875rem;
    }
    
    .annuity-table thead th,
    .annuity-table tbody td {
        padding: 0.5rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.1rem;
    }
}

/* ===== GYIK (FAQ) SECTION ===== */
.gyik-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.gyik-container {
    max-width: 900px;
    margin: 0 auto;
}

.gyik-item {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.gyik-item:last-child {
    border-bottom: none;
}

.gyik-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.gyik-question:hover {
    color: var(--primary);
}

.gyik-question:focus {
    outline: none;
    color: var(--primary);
}

.gyik-question span {
    flex: 1;
    padding-right: 1rem;
}

.gyik-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.gyik-question[aria-expanded="true"] .gyik-icon {
    transform: rotate(180deg);
}

.gyik-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 0 0 0;
}

.gyik-question[aria-expanded="true"] + .gyik-answer {
    max-height: 1000px;
    padding: 0 0 1.5rem 0;
}

.gyik-answer p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text);
}

.gyik-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.gyik-links-label {
    font-weight: 600;
    margin-right: 0.5rem;
    color: var(--text-muted);
}

.gyik-links a {
    color: var(--primary);
    text-decoration: underline;
    transition: opacity 0.2s ease;
    margin-right: 0.5rem;
}

.gyik-links a:not(:last-child)::after {
    content: ' | ';
    color: var(--text);
    text-decoration: none;
    margin-left: 0.5rem;
}

.gyik-links a:hover {
    opacity: 0.8;
}

/* Mobile responsive for GYIK */
@media (max-width: 768px) {
    .gyik-question {
        font-size: 1rem;
        padding: 1rem 0;
        min-height: 44px; /* Better touch target */
    }
    
    .gyik-question span {
        padding-right: 0.75rem;
    }
    
    .gyik-icon {
        width: 18px;
        height: 18px;
    }
    
    .gyik-answer p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .gyik-links {
        font-size: 0.85rem;
    }
}

/* ===== HOW TO USE GUIDE SECTION ===== */
.how-to-use-section {
    margin-top: -4rem;
    margin-bottom: 2rem;
}

.how-to-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.2s ease;
    text-align: left;
}

.how-to-toggle:hover {
    color: var(--primary);
}

.how-to-toggle:focus {
    outline: none;
    color: var(--primary);
}

.how-to-toggle span {
    flex: 1;
    padding-right: 1rem;
}

.how-to-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.how-to-toggle[aria-expanded="true"] .how-to-icon {
    transform: rotate(180deg);
}

.how-to-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.how-to-toggle[aria-expanded="true"] + .how-to-content {
    max-height: 2000px;
    padding: 0 0 1.5rem 0;
}

.how-to-intro {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

.how-to-steps-grid {
    position: relative;
    margin-top: 1.5rem;
    min-height: 680px;
}

.how-to-step-card {
    background: var(--bg-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: absolute;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 180px;
    width: calc(50% - 1rem);
    z-index: 1;
    cursor: default;
}

.how-to-step-left {
    left: 0;
}

.how-to-step-right {
    right: 0;
}

/* Staggered positioning */
.how-to-step-card:nth-child(1) {
    top: 0;
}

.how-to-step-card:nth-child(2) {
    top: 120px;
    z-index: 2;
}

.how-to-step-card:nth-child(3) {
    top: 240px;
    z-index: 3;
}

.how-to-step-card:nth-child(4) {
    top: 360px;
    z-index: 4;
}

.how-to-step-card:nth-child(5) {
    top: 480px;
    z-index: 5;
}

.how-to-step-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: var(--bg);
    z-index: 10;
}

.how-to-collapse-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    padding-top: 1rem;
}

.step-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-icon {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: 0.5rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.step-extra-info {
    font-size: 0.85rem;
    color: var(--primary);
    line-height: 1.4;
    margin: 0.75rem 0 0 0;
    font-style: italic;
    font-weight: 500;
}

/* Mobile responsive for How to Use section */
@media (max-width: 768px) {
    .how-to-toggle {
        font-size: 1rem;
        padding: 1rem 0;
        min-height: 44px;
    }
    
    .how-to-toggle span {
        padding-right: 0.75rem;
    }
    
    .how-to-icon {
        width: 18px;
        height: 18px;
    }
    
    .how-to-steps-grid {
        min-height: 1000px;
    }
    
    .how-to-step-card {
        width: 100%;
        position: relative;
        min-height: 160px;
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .how-to-step-left,
    .how-to-step-right {
        left: 0;
        right: auto;
    }
    
    .how-to-step-card:nth-child(1),
    .how-to-step-card:nth-child(2),
    .how-to-step-card:nth-child(3),
    .how-to-step-card:nth-child(4),
    .how-to-step-card:nth-child(5) {
        top: auto;
        position: relative;
    }
    
    .how-to-collapse-container {
        margin-top: 1rem;
    }
    
    .step-badge {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 0.75rem;
    }
    
    .step-title {
        font-size: 1rem;
    }
    
    .step-description {
        font-size: 0.9rem;
    }
    
    .step-extra-info {
        font-size: 0.8rem;
        margin-top: 0.5rem;
    }
    
    .how-to-intro {
        font-size: 0.95rem;
    }
}