/* Footer Links Section */

/* Language visibility for footer */
.footer-links-section .lang-en {
    display: none;
}

.footer-links-section .lang-he {
    display: inline;
}

html[lang="en"] .footer-links-section .lang-en {
    display: inline;
}

html[lang="en"] .footer-links-section .lang-he {
    display: none;
}

.footer-links-section a.lang-en {
    display: none;
}

.footer-links-section a.lang-he {
    display: inline;
}

html[lang="en"] .footer-links-section a.lang-en {
    display: inline;
}

html[lang="en"] .footer-links-section a.lang-he {
    display: none;
}

/* Make body scrollable for footer section */
body {
    overscroll-behavior: auto !important;
    min-height: auto !important;
    padding-bottom: 0 !important;
}

html {
    overscroll-behavior: auto !important;
}

/* First viewport fills the screen */
.container {
    min-height: 100vh;
}

/* Footer Links Section - starts at second viewport */
.footer-links-section {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e1e1e;
    padding: 80px 24px;
    padding-bottom: 100px;
    z-index: 2;
}

.footer-links-inner {
    max-width: 1000px;
    width: 75%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20%;
    align-items: start;
}

html[dir="rtl"] .footer-links-inner {
    margin: 0 150px 0 100px;
}

html[dir="ltr"] .footer-links-inner {
    margin: 0 125px 0 150px;
}

.footer-col {
    width: 100%;
}

.footer-col h4 {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: 0.02em;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #7ca8e6;
}

.footer-logo {
    width: 40px;
    margin-bottom: 8px;
    opacity: 0.85;
    border-radius: 50%;
}

/* Link columns: pad top to align h4 with brand column's h4 */
.footer-col-links {
    padding-top: 56px;
}

/* RTL (Hebrew) */
html[dir="rtl"] .footer-links-section {
    direction: rtl;
}

html[dir="rtl"] .footer-col {
    text-align: right;
}

html[dir="rtl"] .footer-logo {
    margin-left: auto;
    margin-right: 0;
}

/* LTR (English) */
html[dir="ltr"] .footer-links-section {
    direction: ltr;
}

html[dir="ltr"] .footer-col {
    text-align: left;
}

html[dir="ltr"] .footer-logo {
    margin-right: auto;
    margin-left: 0;
}

/* Mobile: single column, centered */
@media (max-width: 768px) {
    .footer-links-section {
        min-height: auto;
        padding: 60px 20px 100px;
    }

    .footer-links-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-col-links {
        padding-top: 0;
    }

    .footer-col ul li a {
        font-size: 0.9rem;
    }

    .footer-logo {
        margin: 0 auto 12px !important;
        display: block;
    }

    html[dir="rtl"] .footer-col,
    html[dir="ltr"] .footer-col {
        text-align: center;
    }
}

/* Tablet: 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-links-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Light/Dark mode support for pages with theme toggle (e.g. onboarding) */
body.light-mode .footer-links-section {
    background: transparent;
}

body.annual .footer-links-section {
    background: transparent;
}

body.light-mode .footer-col h4 {
    color: #1a1a2e;
}

body.light-mode .footer-col ul li a {
    color: rgba(0, 0, 0, 0.6);
}

body.light-mode .footer-col ul li a:hover {
    color: #2c6fbb;
}

body.light-mode .footer-logo {
    opacity: 1;
}