/* ==========================================================================
   C2G Logistics — Redesigned site footer
   --------------------------------------------------------------------------
   Drop-in replacement for the old `.footer` rules in css/index.css. This
   file is loaded AFTER index.css on every page so these rules win.

   Layout plan:
   • Top CTA strip (1-liner call to action into the quote flow)
   • Main grid — brand + 3 link columns + contact block
   • Bottom bar — copyright + legal/site links
   • Responsive down to 360px
   ========================================================================== */

/* Hard reset of any conflicting rules inherited from the old footer. */
.footer {
    position: relative;
    padding: 0 !important;
    background: linear-gradient(180deg, #0b1120 0%, #060913 100%) !important;
    color: #e2e8f0;
    font-size: 0.95rem;
    overflow: hidden;
    isolation: isolate;
}

/* Subtle blue glow peeking from the top edge. Purely decorative. */
.footer::before {
    content: "";
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: min(760px, 90%);
    height: 260px;
    background: radial-gradient(closest-side, rgba(0, 82, 255, 0.28), transparent 70%);
    filter: blur(24px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
}

.footer > * {
    position: relative;
    z-index: 1;
}

/* ---------- Top CTA strip ---------- */
.footer-cta {
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.14), rgba(77, 141, 255, 0.04));
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-cta .container {
    padding-top: 32px;
    padding-bottom: 32px;
}

.footer-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-cta-text h3 {
    color: #ffffff;
    font-size: clamp(1.2rem, 2.4vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
    margin: 0 0 4px;
}

.footer-cta-text p {
    color: rgba(226, 232, 240, 0.78);
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.45;
}

.footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(180deg, #2a73ff 0%, #0046dc 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    border-radius: 999px;
    box-shadow:
        0 12px 28px rgba(0, 82, 255, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.25s ease;
    white-space: nowrap;
}

.footer-cta-btn:hover {
    background: linear-gradient(180deg, #3d83ff 0%, #0049e5 100%);
    transform: translateY(-2px);
    box-shadow:
        0 16px 34px rgba(0, 82, 255, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    color: #ffffff !important;
}

.footer-cta-btn i {
    transition: transform 0.2s ease;
}

.footer-cta-btn:hover i {
    transform: translateX(3px);
}

/* ---------- Main section ---------- */
.footer-main {
    padding: 64px 0 44px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1.6fr;
    gap: 48px 40px;
    margin-bottom: 0 !important;
}

/* ---------- Brand column ---------- */
.footer-brand {
    min-width: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
    margin-bottom: 18px;
}

.footer-logo-mark,
.footer-logo-text {
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #ffffff;
    line-height: 1;
}

.footer-tagline {
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.96rem;
    line-height: 1.65;
    margin: 0 0 22px;
    max-width: 360px;
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.footer-social a:hover,
.footer-social a:focus-visible {
    background: rgba(0, 82, 255, 0.22);
    border-color: rgba(77, 141, 255, 0.55);
    color: #ffffff;
    transform: translateY(-2px);
    outline: none;
}

/* ---------- Link columns ---------- */
.footer-col {
    min-width: 0;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin: 0 0 20px;
}

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

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

.footer-col ul li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(226, 232, 240, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    transition: color 0.2s ease, transform 0.2s ease;
    position: relative;
}

.footer-col ul li a::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 1px;
    background: #4d8dff;
    transition: width 0.2s ease, margin-right 0.2s ease;
    margin-right: 0;
}

.footer-col ul li a:hover,
.footer-col ul li a:focus-visible {
    color: #ffffff;
    outline: none;
}

.footer-col ul li a:hover::before,
.footer-col ul li a:focus-visible::before {
    width: 10px;
    margin-right: 4px;
}

/* ---------- Contact column ---------- */
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-contact ul li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 0;
}

.footer-contact .contact-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: rgba(0, 82, 255, 0.15);
    color: #60a5fa;
    font-size: 0.95rem;
}

.footer-contact ul li > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.footer-contact strong {
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer-contact a,
.footer-contact span {
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.95rem;
    text-decoration: none;
    word-break: break-word;
    transition: color 0.2s ease;
    line-height: 1.45;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
    color: #ffffff;
    outline: none;
}

/* ---------- Bottom bar ---------- */
.footer-bottom {
    padding: 18px 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
    background: rgba(0, 0, 0, 0.25);
    text-align: left !important;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-copy {
    color: rgba(226, 232, 240, 0.55);
    font-size: 0.86rem;
    margin: 0;
    line-height: 1.5;
}

.footer-legal {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px 22px;
    flex-wrap: wrap;
}

.footer-legal li a {
    color: rgba(226, 232, 240, 0.6);
    text-decoration: none;
    font-size: 0.86rem;
    transition: color 0.2s ease;
}

.footer-legal li a:hover,
.footer-legal li a:focus-visible {
    color: #ffffff;
    outline: none;
}

/* ========== RESPONSIVE ==========
   Breakpoints are tuned to the content so we never get awkward orphan
   columns or cramped text at any width. */

/* Large tablet / small desktop — 5 → 3 columns, brand + contact span all cols */
@media (max-width: 1100px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 40px 32px;
    }

    .footer-brand,
    .footer-contact {
        grid-column: 1 / -1;
    }

    .footer-tagline {
        max-width: 620px;
    }
}

/* Tablet — 3 → 2 columns */
@media (max-width: 820px) {
    .footer-main {
        padding: 56px 0 36px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px 28px;
    }

    .footer-contact {
        grid-column: 1 / -1;
    }

    .footer-cta-inner {
        justify-content: center;
        text-align: center;
    }

    .footer-cta-text {
        flex: 1 1 280px;
    }
}

/* Phone — single column */
@media (max-width: 560px) {
    .footer-main {
        padding: 48px 0 32px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .footer-cta .container {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .footer-cta-inner {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        flex-wrap: nowrap;
    }

    /* Reset the tablet `flex: 1 1 280px` — in a column flex this was
       being applied to HEIGHT, inflating the text block to 280px+
       and creating a huge empty gap before the button. */
    .footer-cta-text {
        flex: 0 0 auto;
        width: 100%;
    }

    .footer-cta-text h3 {
        font-size: 1.12rem;
        margin: 0 0 2px;
    }

    .footer-cta-text p {
        font-size: 0.88rem;
        line-height: 1.4;
    }

    .footer-cta-btn {
        width: 100%;
        justify-content: center;
        padding: 13px 22px;
        font-size: 0.95rem;
    }

    .footer-tagline {
        max-width: none;
    }

    .footer-bottom {
        padding: 20px 0 !important;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .footer-legal {
        justify-content: center;
        gap: 6px 18px;
    }
}

/* Very small phones — keep everything readable */
@media (max-width: 380px) {
    .footer-grid {
        gap: 28px;
    }

    .footer-col h4 {
        font-size: 0.72rem;
    }

    .footer-contact .contact-icon {
        width: 36px;
        height: 36px;
    }
}

/* ========== DARK MODE =========
   The footer is already dark by default. Dark mode adjustments are minimal
   — just a slightly different glow so it sits nicely against the dark body
   surface. Light mode is unchanged (footer stays dark — it's always the
   "night" section of the page). */
body.dark-mode .footer {
    background: linear-gradient(180deg, #070b16 0%, #030510 100%) !important;
}

body.dark-mode .footer::before {
    opacity: 0.4;
}

body.dark-mode .footer-bottom {
    background: rgba(0, 0, 0, 0.35);
}
