/* ==========================================================================
   Ekoloko – Apple-Style Clean Footer v19
   Minimal, Elegant, Transparent Design - EXTRA LARGE TEXT
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables (with fallbacks for Chrome 87)
   -------------------------------------------------------------------------- */
:root {
    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --footer-text: #ffffff;
    --footer-text-hover: rgba(255, 255, 255, 0.75);
    --footer-separator: rgba(255, 255, 255, 0.4);
    --btn-bg: rgba(255, 255, 255, 0.2);
    --btn-hover: rgba(255, 255, 255, 0.32);
    --btn-border: rgba(255, 255, 255, 0.4);
}

/* --------------------------------------------------------------------------
   Base Typography
   -------------------------------------------------------------------------- */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------------------------------------
   Footer Container - Clean & Spacious
   -------------------------------------------------------------------------- */
#site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: transparent;
    padding: 0;
}

[id^="footer_"] {
    position: relative;
    background: transparent;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 16px 110px 16px 28px;
    width: 100%;
    box-sizing: border-box;
}

/* Fallback for gap - Chrome 87 partial support */
[id^="footer_"] > * {
    margin: 7px 13px;
}

@supports (gap: 14px) {
    [id^="footer_"] > * {
        margin: 0;
    }
    [id^="footer_"] {
        gap: 14px 26px;
    }
}

[id^="footer_"][style*="hidden"] {
    display: none !important;
}

/* Hide all br tags in footer */
[id^="footer_"] br {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Navigation Container
   -------------------------------------------------------------------------- */
[id^="footer_"] nav {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
}

.footer-actions {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}

/* Fallback for gap */
.footer-actions > * {
    margin: 0 5px;
}

@supports (gap: 10px) {
    .footer-actions > * {
        margin: 0;
    }
    .footer-actions {
        gap: 10px;
    }
}

/* --------------------------------------------------------------------------
   Footer Text - EXTRA LARGE & Clean White
   -------------------------------------------------------------------------- */
.footerText {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: 0;
    color: #ffffff;
    color: var(--footer-text);
    margin: 0;
    white-space: nowrap;
}

/* Hebrew Footer - Bolder & Larger */
#footer_iw .footerText,
#footer_iw .footerLinks,
[lang="he"] .footerText,
[lang="he"] .footerLinks,
[dir="rtl"] .footerText,
[dir="rtl"] .footerLinks {
    font-weight: 600;
    font-size: 17px;
}

/* --------------------------------------------------------------------------
   Footer Links - EXTRA LARGE & Spacious
   -------------------------------------------------------------------------- */
.footerLinks {
    color: #ffffff !important;
    color: var(--footer-text) !important;
    text-decoration: none !important;
    font-size: 17px;
    font-weight: 400;
    padding: 8px 6px;
    margin: 0 4px;
    -webkit-transition: opacity 0.15s ease;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.footerLinks:hover {
    opacity: 0.7;
    text-decoration: none !important;
}

/* Pipe separators need more space */
.footerText {
    gap: 0 !important;
    letter-spacing: 0.3px;
}

/* --------------------------------------------------------------------------
   Copyright Text
   -------------------------------------------------------------------------- */
.footerText:last-of-type:not(:first-of-type),
.footerText:first-of-type {
    font-size: 16px;
    color: #ffffff;
    color: var(--footer-text);
    opacity: 0.9;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Footer CTA Buttons - Popup-like style
   -------------------------------------------------------------------------- */
.app-download-btn,
.discord-btn {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none !important;
    white-space: nowrap;
    -webkit-transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Fallback for gap */
.app-download-btn > *,
.discord-btn > * {
    margin: 0 4px;
}

@supports (gap: 8px) {
    .app-download-btn > *,
    .discord-btn > * {
        margin: 0;
    }
    .app-download-btn,
    .discord-btn {
        gap: 8px;
    }
}
.app-download-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #1a5c0a !important;
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.app-download-btn:hover {
    background: rgba(255, 255, 255, 0.97);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.18);
}

.discord-btn {
    background: rgba(88, 101, 242, 0.82);
    color: #fff !important;
    border-color: rgba(138, 148, 255, 0.45);
    box-shadow: 0 4px 18px rgba(88, 101, 242, 0.34), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.discord-btn:hover {
    background: rgba(88, 101, 242, 0.95);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
    box-shadow: 0 7px 24px rgba(88, 101, 242, 0.44);
}

.app-download-btn:active,
.discord-btn:active {
    -webkit-transform: translateY(0) scale(0.98);
    transform: translateY(0) scale(0.98);
}

.app-download-btn svg,
.discord-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.3px;
}

/* --------------------------------------------------------------------------
   Blog Button - White Background
   -------------------------------------------------------------------------- */
.blog-btn {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    color: #1d7d3c !important;
    padding: 12px 24px;
    border-radius: 14px;
    border: none;
    font-size: 17px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Fallback for gap */
.blog-btn > * {
    margin: 0 5px;
}

@supports (gap: 10px) {
    .blog-btn > * {
        margin: 0;
    }
    .blog-btn {
        gap: 10px;
    }
}

.blog-btn:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.blog-btn:active {
    -webkit-transform: scale(0.98);
    transform: scale(0.98);
}

.blog-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}

/* --------------------------------------------------------------------------
   Theme Switcher - Larger Pills
   -------------------------------------------------------------------------- */
.theme-switcher {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    background: var(--btn-bg);
    border-radius: 14px;
    padding: 4px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Fallback for gap */
.theme-switcher > * {
    margin: 0 1px;
}

@supports (gap: 3px) {
    .theme-switcher > * {
        margin: 0;
    }
    .theme-switcher {
        gap: 3px;
    }
}

[dir="rtl"] .theme-switcher {
    margin-left: 0;
    margin-right: 12px;
}

.theme-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    color: #ffffff;
    color: var(--footer-text);
    opacity: 0.7;
    -webkit-transition: all 0.15s ease;
    transition: all 0.15s ease;
}

.theme-btn:hover {
    opacity: 1;
}

.theme-btn.active {
    background: rgba(255, 255, 255, 0.95);
    color: #1d7d3c;
    opacity: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.theme-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2px;
}


/* --------------------------------------------------------------------------
   Footer Toggle Button - Right Side EXTRA LARGE
   -------------------------------------------------------------------------- */
#footer-toggle-btn,
.footer-toggle-btn {
    position: fixed;
    bottom: 16px;
    right: 20px;
    z-index: 10001;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    background: var(--btn-bg);
    color: #ffffff !important;
    color: var(--footer-text) !important;
    padding: 12px 20px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border: 1px solid var(--btn-border);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-family: var(--font-stack);
    letter-spacing: 0;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

/* Fallback for gap */
#footer-toggle-btn > *,
.footer-toggle-btn > * {
    margin: 0 4px;
}

@supports (gap: 8px) {
    #footer-toggle-btn > *,
    .footer-toggle-btn > * {
        margin: 0;
    }
    #footer-toggle-btn,
    .footer-toggle-btn {
        gap: 8px;
    }
}

#footer-toggle-btn:hover,
.footer-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.32);
    background: var(--btn-hover);
    border-color: rgba(255, 255, 255, 0.55);
}

#footer-toggle-btn:active,
.footer-toggle-btn:active {
    -webkit-transform: scale(0.97);
    transform: scale(0.97);
}

#footer-toggle-btn svg,
.footer-toggle-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5px;
    -webkit-transition: -webkit-transform 0.25s ease;
    transition: transform 0.25s ease;
}

#footer-toggle-btn.footer-hidden svg,
.footer-toggle-btn.footer-hidden svg,
#site-footer.footer-hidden+#footer-toggle-btn svg {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Footer Hidden State
   -------------------------------------------------------------------------- */
#site-footer.footer-hidden [id^="footer_"],
#site-footer.footer-hidden .lang-footer,
#site-footer.footer-hidden .footer-content,
#site-footer.footer-hidden .footer-banner {
    display: none !important;
}

#site-footer.footer-hidden {
    padding: 0;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Social Icons (if any) - Clean Style
   -------------------------------------------------------------------------- */
.social-icons,
[id^="footer_"] .social-icons {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
}

/* Fallback for gap */
.social-icons > *,
[id^="footer_"] .social-icons > * {
    margin: 0 8px;
}

@supports (gap: 16px) {
    .social-icons > *,
    [id^="footer_"] .social-icons > * {
        margin: 0;
    }
    .social-icons,
    [id^="footer_"] .social-icons {
        gap: 16px;
    }
}

.social-icons a,
.social-icons svg {
    color: #ffffff;
    color: var(--footer-text);
    opacity: 0.85;
    -webkit-transition: opacity 0.15s ease;
    transition: opacity 0.15s ease;
}

.social-icons a:hover,
.social-icons a:hover svg {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    [id^="footer_"] {
        padding: 18px 100px 18px 28px;
        gap: 14px 32px;
    }

    .footerLinks,
    .footerText {
        font-size: 16px;
    }

    .app-download-btn,
    .discord-btn,
    .discord-btn,
    .blog-btn {
        padding: 10px 20px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    [id^="footer_"] {
        padding: 16px 90px 16px 20px;
        gap: 12px 24px;
        justify-content: center;
    }

    .footerLinks,
    .footerText {
        font-size: 15px;
    }

    .app-download-btn,
    .discord-btn,
    .blog-btn {
        padding: 10px 18px;
        font-size: 15px;
    }

    #footer-toggle-btn,
    .footer-toggle-btn {
        padding: 10px 18px;
        font-size: 15px;
        right: 14px;
        bottom: 14px;
    }

    .theme-switcher {
        margin: 0;
    }
}

@media (max-width: 480px) {
    [id^="footer_"] {
        padding: 14px 70px 14px 14px;
        gap: 10px 16px;
    }

    .footerLinks,
    .footerText {
        font-size: 13px;
    }

    .app-download-btn,
    .blog-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .app-download-btn svg,
    .discord-btn svg,
    .blog-btn svg {
        width: 14px;
        height: 14px;
    }

    #footer-toggle-btn,
    .footer-toggle-btn {
        padding: 8px 14px;
        font-size: 13px;
        right: 10px;
        bottom: 10px;
    }

    #footer-toggle-btn svg,
    .footer-toggle-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* --------------------------------------------------------------------------
   Accessibility
   -------------------------------------------------------------------------- */
.footerLinks:focus-visible,
.app-download-btn:focus-visible,
.discord-btn:focus-visible,
.blog-btn:focus-visible,
.theme-btn:focus-visible,
#footer-toggle-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    .footerLinks,
    .app-download-btn,
    .discord-btn,
    .blog-btn,
    .theme-btn,
    #footer-toggle-btn,
    .footer-toggle-btn,
    #footer-toggle-btn svg,
    .footer-toggle-btn svg {
        transition: none;
    }
}