/*
 * footer.css
 *
 * BTV Footer styles – loaded site-wide via functions.php.
 *
 * @package BTV
 * @since   1.0.0
 */

.btv-footer {
    position: relative;
    background: #1d2c4d;
    color: #ffffff;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

/* Top gradient bar — navy → cyan → green, full viewport width.
 * max-width: 100vw is needed to override the constrained layout's
 * max-width: var(--wp--style--global--content-size) applied by WP's
 * .is-layout-constrained rule to all direct children of the footer. */
.btv-footer__gradient {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    height: 6px;
    margin-left: calc(50% - 50vw);
    background: linear-gradient(to right, #1d2c4d 0%, #00aeef 50%, #8dc63f 100%);
}

.btv-footer__container {
    position: relative;
    max-width: 1217px;
    margin: 0 auto;
    padding: 71px 0 0;
}

/* === Main row (logo + 3 columns) === */
.wp-block-group.btv-footer__main,
.btv-footer__main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
    padding-bottom: 71px;
}

.btv-footer__logo {
    flex: 0 0 auto;
    margin: 0;
}

.btv-footer__logo a { display: inline-block; line-height: 0; }

.btv-footer__logo img {
    display: block;
    width: 185px;
    height: 115px;
    object-fit: contain;
}

.btv-footer__col {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.btv-footer__col--socials {
    width: 250px;
}

/* Section heading */
.btv-footer__heading {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 16px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #00aeef;
}

/* Link lists */
.btv-footer__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btv-footer__list a {
    font-family: 'Outfit', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24.2px;
    letter-spacing: 1.044px;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s ease;
}

.btv-footer__list a:hover,
.btv-footer__list a:focus-visible {
    color: #00aeef;
}

/* Socials row */
.btv-footer__socials {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 16px;
}

.btv-footer__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 1.5px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

/* Hover keeps icons white-visible: translucent fill + cyan border */
.btv-footer__social:hover,
.btv-footer__social:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: #00aeef;
}

.btv-footer__social img { display: block; }

/* === Decorative seal + flag (in flow, below socials in the right column) === */
.wp-block-group.btv-footer__decorative,
.btv-footer__decorative {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 50px;
    pointer-events: none;
}

.btv-footer__seal,
.btv-footer__flag {
    margin: 0;
    line-height: 0;
}

.btv-footer__seal img {
    display: block;
    width: 140px;
    height: auto;
    transform: rotate(-3.13deg);
    opacity: 0.85;
}

.btv-footer__flag img {
    display: block;
    width: 87px;
    height: 58px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(18, 36, 98, 0.44);
    border: 0.25px solid #9c9c9c;
}

/* === Bottom row (copyright + legal links) === */
.wp-block-group.btv-footer__bottom,
.btv-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

.btv-footer__copy {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 10px;
    line-height: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
}

.btv-footer__legal {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 32px;
    flex-shrink: 0;
}

.btv-footer__legal a {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    line-height: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.btv-footer__legal a:hover,
.btv-footer__legal a:focus-visible {
    color: #00aeef;
}

/* === Mobile (< 1024px) === */
@media (max-width: 1023.98px) {
    .btv-footer__container {
        padding: 48px 24px 0;
    }

    .btv-footer__main {
        flex-direction: column;
        gap: 32px;
        padding-bottom: 48px;
    }

    .btv-footer__col--socials {
        width: 100%;
    }

    .btv-footer__decorative {
        display: none;
    }

    .btv-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .btv-footer__legal {
        flex-wrap: wrap;
        gap: 16px 24px;
    }

    /* Shrink stacked logo on mobile (matches the header scale-down). */
    .btv-footer__logo img {
        width: 100px;
        height: auto;
    }
}
