/* Footer Styles - Shared across all pages */

footer.site-footer {
    padding: 60px 40px;
    background: var(--bg-primary, #18181b);
    border-top: 1px solid #27272a;
}

/* Desktop Layout */
/* Desktop Layout */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 3fr auto auto;
    /* Text area wider, links pushed right */
    grid-template-areas:
        "logo channels about"
        "text channels about";
    column-gap: 80px;
    /* More space between text and links */
    row-gap: 5px;
    /* Minimal gap between logo and text rows */
    align-items: start;
}

/* Logo */
.footer-logo {
    grid-area: logo;
}

.footer-logo h3 {
    font-size: 24px;
    margin: 0 0 5px 0;
    /* Reduced margin to bring text closer up */
}

.footer-logo h3 span:first-child {
    color: var(--accent, #8a2128);
}

/* Footer Logo Image - Grayscale effect */
.footer-logo-img {
    max-height: 24px;
    height: auto;
    width: auto;
    display: block;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.footer-logo-img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Links wrapper - invisible on desktop, children become grid items */
.footer-links-wrapper {
    display: contents;
}

/* Links columns */
.footer-links {
    min-width: 100px;
}

.footer-links:nth-child(1) {
    grid-area: channels;
}

.footer-links:nth-child(2) {
    grid-area: about;
}

.footer-links h4 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-muted, #a1a1aa);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Links list container */
.links-list {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    display: block;
    color: #888;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text, #ffffff);
}

/* Footer text */
.footer-text {
    grid-area: text;
}

.footer-text p {
    color: var(--text-muted, #a1a1aa);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.footer-text p:last-child {
    margin-bottom: 0;
}

/* Subtle page h1 rendered inline within footer text (for pages like Discover) */
.footer-h1 {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    margin: 0;
}

.footer-paragraph {
    color: var(--text-muted, #a1a1aa);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 12px;
}

/* ==================== MOBILE ==================== */
@media (max-width: 768px) {
    footer.site-footer {
        padding: 40px 16px 50px;
        padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));
        /* iOS safe area support */
    }

    .footer-content {
        display: block;
        text-align: center;
    }

    /* Logo - centered */
    .footer-logo {
        margin-bottom: 30px;
    }

    .footer-logo h3 {
        margin: 0;
    }

    .footer-logo-img {
        margin: 0 auto;
    }

    /* Links wrapper - flex row, centered */
    .footer-links-wrapper {
        display: flex;
        justify-content: center;
        gap: 30px;
        /* Reduced from 60px to bring columns closer to center */
        margin-bottom: 30px;
    }

    /* Each column - Use flex mainly to align items */
    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Centers header and list-box */
    }

    /* List container - fit content + left aligned text */
    .links-list {
        width: fit-content;
        text-align: left;
    }

    /* Ensure links align left inside the list box */
    .footer-links a {
        text-align: left;
    }

    /* Header centered */
    .footer-links h4 {
        text-align: center;
    }

    /* Text - centered */
    .footer-text {
        text-align: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .footer-links-wrapper {
        gap: 40px;
    }

    .footer-logo h3 {
        font-size: 20px;
    }

    .footer-links h4 {
        font-size: 13px;
        margin-bottom: 15px;
    }

    .footer-links a {
        font-size: 12px;
        margin-bottom: 10px;
    }
}