/* ==========================================================================
   FINAL FOOTER — ST. LAWRENCE JUNIOR SCHOOL KABOWA
   Option 3 — Split Layout with Tagline (Spacious Full-Width Layout)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Playfair+Display:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

.footer-target {
    background-color: #081426;
    color: #cbd5e1;
    position: relative;
    overflow: hidden;
    padding-top: 72px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

/* Wide, expansive horizontal container for maximum breathing room */
.footer-target .footer-container {
    width: 96%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   TOP FOOTER ROW — BALANCED EXPANSIVE DESKTOP ARCHITECTURE
   -------------------------------------------------------------------------- */
.footer-target .footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(12px, 1.5vw, 24px);
    width: 100%;
    box-sizing: border-box;
}

/* Column 1: Brand & Logo */
.footer-target .footer-brand-col {
    flex: 0 1 245px;
    max-width: 260px;
    min-width: 200px;
    box-sizing: border-box;
}

.footer-target .footer-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.footer-target .footer-school-logo {
    height: 58px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
    flex-shrink: 0;
}

.footer-target .footer-school-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.22;
    margin: 0;
    letter-spacing: -0.2px;
}

.footer-target .footer-brand-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0 0 14px 0;
}

.footer-target .footer-social-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-target .footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-target .footer-social-btn:hover {
    background-color: #003399;
    border-color: #003399;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.35);
}

/* Column 2: Cursive Tagline ("We Strive to Excel") */
.footer-target .footer-tagline-col {
    flex: 0 0 auto;
    width: 100px;
    min-width: 90px;
    max-width: 110px;
    padding-top: 4px;
    text-align: center;
    box-sizing: border-box;
}

.footer-target .footer-cursive-wrap {
    transform: rotate(-3deg);
    display: inline-block;
}

.footer-target .footer-cursive-text {
    font-family: 'Caveat', cursive, sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}

.footer-target .footer-cursive-underline {
    width: 65px;
    height: 2px;
    background-color: #d32f2f;
    border-radius: 2px;
    margin: 4px auto 0 auto;
    transform: rotate(2deg);
}

/* Column 3 & 4: Navigation Columns (Quick Links, Our Programs) */
.footer-target .footer-nav-col {
    flex: 0 0 auto;
    min-width: 105px;
    max-width: 125px;
    box-sizing: border-box;
}

.footer-target .footer-col-accent {
    width: 22px;
    height: 3px;
    background-color: #d32f2f;
    margin-bottom: 12px;
    border-radius: 2px;
}

.footer-target .footer-col-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 14px 0;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.footer-target .footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-target .footer-nav-list li {
    margin-bottom: 9px;
}

.footer-target .footer-nav-list a {
    color: #cbd5e1;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
    white-space: nowrap;
}

.footer-target .footer-nav-list a:hover {
    color: #ffffff;
    transform: translateX(3px);
}

/* Column 5: Contact Column — Dedicated Space So Email Never Wraps */
.footer-target .footer-contact-col {
    flex: 0 0 320px;
    min-width: 320px;
    width: 320px;
    box-sizing: border-box;
}

.footer-target .footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-target .footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 13px;
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.45;
    min-width: 0;
}

.footer-target .footer-contact-icon {
    font-size: 13px;
    color: #ef4444;
    margin-top: 3px;
    flex-shrink: 0;
    width: 15px;
    text-align: center;
}

.footer-target .footer-contact-item a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

.footer-target .footer-contact-item a:hover {
    color: #ffffff;
}

/* Strictly prevent email address from breaking across lines */
.footer-target .footer-contact-item a[href^="mailto:"] {
    display: inline-block !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    font-size: 12.8px !important;
    letter-spacing: -0.2px;
    flex-shrink: 0;
    color: #cbd5e1;
}

.footer-target .footer-contact-item a[href^="mailto:"]:hover {
    color: #60a5fa;
    text-decoration: underline;
}

.footer-target .footer-contact-item a[href^="tel:"] {
    white-space: nowrap;
}

/* Column 6: Far Right Institutional Pillars */
.footer-target .footer-pillars-col {
    flex: 0 0 auto;
    min-width: 105px;
    max-width: 120px;
    text-align: right;
    padding-top: 4px;
    box-sizing: border-box;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 14px;
}

.footer-target .footer-pillars-text {
    font-size: 10.5px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 1.6px;
    line-height: 2.0;
    margin: 0;
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   BOTTOM COPYRIGHT & LEGAL STRIP
   -------------------------------------------------------------------------- */
.footer-target .footer-bottom-strip {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    margin-top: 56px;
    padding: 24px 0 28px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #94a3b8;
    box-sizing: border-box;
}

.footer-target .footer-copyright-text {
    margin: 0;
}

.footer-target .footer-legal-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-target .footer-legal-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-target .footer-legal-links a:hover {
    color: #ffffff;
}

.footer-target .footer-legal-separator {
    color: rgba(255, 255, 255, 0.2);
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN — CLEAN, APPEALED INSTITUTIONAL MOBILE LAYOUT
   -------------------------------------------------------------------------- */
/* Standard Laptops & Tablets (769px to 1199px) — Structured 4-Column Balanced Institutional Grid */
@media (min-width: 769px) and (max-width: 1199px) {
    .footer-target {
        padding-top: 56px;
    }

    .footer-target .footer-container {
        width: 95%;
        padding: 0 20px;
    }

    .footer-target .footer-top-row {
        display: grid !important;
        grid-template-columns: 1.35fr 0.9fr 0.9fr 1.75fr !important;
        grid-template-areas:
            "brand quick prog contact"
            "tagline quick prog pillars" !important;
        gap: 24px 20px !important;
        align-items: start !important;
    }

    .footer-target .footer-brand-col {
        grid-area: brand !important;
        flex: none !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .footer-target .footer-tagline-col {
        grid-area: tagline !important;
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-top: 0 !important;
        margin-top: 4px !important;
        text-align: left !important;
    }

    .footer-target .footer-cursive-wrap {
        transform: rotate(-2deg) !important;
        display: inline-block !important;
    }

    .footer-target .footer-cursive-text {
        font-size: 24px !important;
        line-height: 1.2 !important;
    }

    .footer-target .footer-cursive-underline {
        width: 60px !important;
        margin: 4px 0 0 0 !important;
    }

    /* Quick Links */
    .footer-target .footer-top-row > div:nth-child(3),
    .footer-target .footer-nav-col:nth-of-type(1) {
        grid-area: quick !important;
        flex: none !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Our Programs */
    .footer-target .footer-top-row > div:nth-child(4),
    .footer-target .footer-nav-col:nth-of-type(2) {
        grid-area: prog !important;
        flex: none !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Contact Us */
    .footer-target .footer-contact-col {
        grid-area: contact !important;
        flex: none !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .footer-target .footer-contact-item a[href^="mailto:"] {
        font-size: 12.5px !important;
        white-space: nowrap !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
    }

    /* Pillars */
    .footer-target .footer-pillars-col {
        grid-area: pillars !important;
        flex: none !important;
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding-left: 0 !important;
        padding-top: 12px !important;
        margin-top: 4px !important;
        text-align: left !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .footer-target .footer-pillars-text {
        font-size: 10px !important;
        letter-spacing: 1.4px !important;
        line-height: 1.65 !important;
    }
}

/* --------------------------------------------------------------------------
   MOBILE SCREENS (SMARTPHONES & TABLETS <= 768px)
   STRICT 2-COLUMN BALANCED INSTITUTIONAL GRID
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .footer-target {
        padding-top: 44px !important;
        padding-bottom: 16px !important;
    }

    .footer-target .footer-container {
        width: 100% !important;
        padding: 0 20px !important;
        box-sizing: border-box !important;
    }

    /* Single clean, vertical stacking layout with consistent gaps */
    .footer-target .footer-top-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 26px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* 1. Brand Identity Card (Centered) */
    .footer-target .footer-brand-col {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: none !important;
    }

    .footer-target .footer-brand-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .footer-target .footer-school-logo {
        height: 60px !important;
        width: auto !important;
        margin: 0 auto !important;
        filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45)) !important;
    }

    .footer-target .footer-school-title {
        font-family: 'Playfair Display', Georgia, serif !important;
        font-size: 19px !important;
        font-weight: 700 !important;
        line-height: 1.25 !important;
        text-align: center !important;
        margin: 0 !important;
        color: #ffffff !important;
    }

    .footer-target .footer-brand-desc {
        font-size: 13px !important;
        line-height: 1.55 !important;
        color: #94a3b8 !important;
        text-align: center !important;
        max-width: 380px !important;
        margin: 0 auto 14px auto !important;
    }

    .footer-target .footer-social-links {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        margin: 0 auto !important;
    }

    .footer-target .footer-social-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 14px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.18) !important;
        color: #ffffff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 2. Cursive School Motto — Centered & Seamless (No pill, with red underline) */
    .footer-target .footer-tagline-col {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        margin: 2px 0 6px 0 !important;
        padding: 0 !important;
        flex: none !important;
    }

    .footer-target .footer-cursive-wrap {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        transform: none !important;
        margin: 0 auto !important;
    }

    .footer-target .footer-cursive-text {
        font-family: 'Caveat', cursive, sans-serif !important;
        font-size: 28px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        line-height: 1.15 !important;
        margin: 0 !important;
        letter-spacing: 0.5px !important;
        text-align: center !important;
        white-space: nowrap !important;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
    }

    .footer-target .footer-cursive-text br {
        display: inline !important;
    }

    .footer-target .footer-cursive-text br::after {
        content: " " !important;
    }

    .footer-target .footer-cursive-underline {
        display: block !important;
        width: 68px !important;
        height: 2.5px !important;
        background-color: #d32f2f !important;
        border-radius: 2px !important;
        margin: 5px auto 0 auto !important;
        transform: rotate(1deg) !important;
    }

    /* 3. Hide Navigation Columns (Quick Links & Our Programs) on Mobile Devices */
    .footer-target .footer-nav-col,
    .footer-target .footer-top-row > div:nth-child(3),
    .footer-target .footer-top-row > div:nth-child(4) {
        display: none !important;
    }

    /* 4. Contact Section — Centered Block with Strict Vertical Icon Alignment */
    .footer-target .footer-contact-col {
        width: 100% !important;
        max-width: 100% !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 6px 0 0 0 !important;
        box-sizing: border-box !important;
        flex: none !important;
        text-align: center !important;
    }

    .footer-target .footer-contact-col .footer-col-accent {
        width: 28px !important;
        height: 3px !important;
        background-color: #d32f2f !important;
        margin: 0 auto 10px auto !important;
        border-radius: 2px !important;
    }

    .footer-target .footer-contact-col .footer-col-title {
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        margin: 0 auto 16px auto !important;
        letter-spacing: 0.2px !important;
        text-align: center !important;
    }

    /* Centered contact list: the block itself is centered, but rows and icons strictly align */
    .footer-target .footer-contact-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        width: fit-content !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 14px !important;
    }

    /* Fixed 28px icon column guarantees all icons sit on the exact same vertical line */
    .footer-target .footer-contact-item {
        display: grid !important;
        grid-template-columns: 28px 1fr !important;
        column-gap: 12px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: left !important;
        font-size: 13.5px !important;
        line-height: 1.5 !important;
        color: #cbd5e1 !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .footer-target .footer-contact-icon {
        width: 28px !important;
        min-width: 28px !important;
        height: 28px !important;
        border-radius: 50% !important;
        background: rgba(211, 47, 47, 0.16) !important;
        color: #ef4444 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .footer-target .footer-contact-item span {
        display: block !important;
        text-align: left !important;
    }

    /* Plain Phone Numbers - Absolutely No Card, No Box, No Background */
    .footer-target .footer-contact-item a {
        display: inline-block !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #cbd5e1 !important;
        font-weight: 500 !important;
        text-decoration: none !important;
        font-size: 13.5px !important;
        line-height: 1.55 !important;
        text-align: left !important;
        transition: color 0.2s ease !important;
    }

    .footer-target .footer-contact-item a:hover {
        color: #ffffff !important;
        text-decoration: underline !important;
    }

    .footer-target .footer-contact-item a[href^="tel:"] {
        display: block !important;
        white-space: nowrap !important;
        padding: 1px 0 !important;
        text-align: left !important;
    }

    /* Email Link — Clean & Non-Breaking */
    .footer-target .footer-contact-item a[href^="mailto:"] {
        display: inline !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
        color: #93c5fd !important;
        text-decoration: underline !important;
        text-underline-offset: 3px !important;
        overflow-wrap: anywhere !important;
        word-break: break-all !important;
        text-align: left !important;
    }

    /* 6. Institutional Pillars Motto Banner */
    .footer-target .footer-pillars-col {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        margin-top: 6px !important;
        padding: 12px 14px !important;
        background: rgba(211, 47, 47, 0.08) !important;
        border: 1px solid rgba(211, 47, 47, 0.2) !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        flex: none !important;
    }

    .footer-target .footer-pillars-text {
        font-size: 10.5px !important;
        font-weight: 700 !important;
        letter-spacing: 1.8px !important;
        line-height: 1.7 !important;
        color: #fecaca !important;
        text-align: center !important;
        margin: 0 !important;
        text-transform: uppercase !important;
    }

    .footer-target .footer-pillars-text br {
        display: none !important;
    }

    /* 7. Bottom Copyright & Legal Strip */
    .footer-target .footer-bottom-strip {
        margin-top: 28px !important;
        padding-top: 20px !important;
        padding-bottom: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 10px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        box-sizing: border-box !important;
    }

    .footer-target .footer-copyright-text {
        font-size: 12.5px !important;
        color: #94a3b8 !important;
        line-height: 1.5 !important;
        text-align: center !important;
        margin: 0 !important;
    }

    .footer-target .footer-legal-links {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 8px 12px !important;
    }

    .footer-target .footer-legal-links a {
        font-size: 12px !important;
        color: #94a3b8 !important;
        text-decoration: none !important;
        padding: 2px 4px !important;
    }

    .footer-target .footer-legal-separator {
        color: rgba(255, 255, 255, 0.2) !important;
    }
}

/* --------------------------------------------------------------------------
   VERY NARROW MOBILE SCREENS (<= 420px)
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
    .footer-target {
        padding-top: 36px !important;
    }

    .footer-target .footer-container {
        padding: 0 16px !important;
    }

    .footer-target .footer-school-logo {
        height: 52px !important;
    }

    .footer-target .footer-school-title {
        font-size: 18px !important;
    }

    .footer-target .footer-cursive-text {
        font-size: 25px !important;
    }

    .footer-target .footer-contact-col .footer-col-title {
        font-size: 15px !important;
    }

    .footer-target .footer-contact-item {
        font-size: 13px !important;
    }

    .footer-target .footer-pillars-text {
        font-size: 9.5px !important;
        letter-spacing: 1.4px !important;
    }
}

/* --------------------------------------------------------------------------
   FLOATING ACTION BUTTONS: PRECISE VERTICAL ALIGNMENT & SIZING
   Guarantees back-to-top and chatbot launcher align on the exact same vertical line
   -------------------------------------------------------------------------- */
.back-to-top,
#backToTop,
.chat-button,
#chatButton {
    position: fixed !important;
    left: auto !important;
    margin: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}

.back-to-top,
#backToTop {
    bottom: 24px !important;
    right: 27px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    font-size: 14px !important;
    z-index: 10001 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.35) !important;
}

.chat-button,
#chatButton {
    bottom: 68px !important;
    right: 24px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    z-index: 9999 !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 102, 204, 0.35) !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.chat-button img,
#chatButton img {
    width: 26px !important;
    height: 26px !important;
    border-radius: 50% !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto !important;
}

.chat-button .chat-unread-dot,
#chatButton .chat-unread-dot {
    width: 7.5px !important;
    height: 7.5px !important;
    top: 1px !important;
    right: 1px !important;
    border: 1.5px solid #ffffff !important;
}

@media (max-width: 768px) {
    .back-to-top,
    #backToTop {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        right: max(20px, calc(16px + env(safe-area-inset-right, 0px))) !important;
        bottom: max(18px, calc(14px + env(safe-area-inset-bottom, 0px))) !important;
        font-size: 13px !important;
    }

    .chat-button,
    #chatButton {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px !important;
        min-height: 38px !important;
        right: max(18px, calc(14px + env(safe-area-inset-right, 0px))) !important;
        bottom: max(60px, calc(56px + env(safe-area-inset-bottom, 0px))) !important;
    }

    .chat-button img,
    #chatButton img {
        width: 24px !important;
        height: 24px !important;
    }
}
