/* ============================================
   CRYSTAL FACILITY SOLUTIONS - FOOTER
   Four Columns: Brand | Navigate | Services | Get Started
   Lightened to match services section tone
   ============================================ */

.footer {
    position: relative;
    /* LIGHTENED: was #0a0a0a → #1a1a1a → #0d1f0d */
    /* Fades back to services tone for bookend effect */
    background: linear-gradient(135deg, #3b4a70 0%, #242c3e 50%, #222735 100%);
    color: var(--white);
    padding: 0;
    overflow: hidden;
    isolation: isolate;
}

/* ============================================
   ANIMATED BACKGROUND — LIGHTENED
   ============================================ */
.footer-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.footer-gradient {
    position: absolute;
    inset: 0;
    background:
        /* Reduced opacity for lighter feel */
        radial-gradient(ellipse at 20% 0%, rgba(124, 179, 66, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(156, 204, 101, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(124, 179, 66, 0.04) 0%, transparent 70%);
}

.footer-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(124, 179, 66, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 179, 66, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;

}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.footer-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    /* Reduced from 0.4 to 0.2 */
    opacity: 0.2;
    animation: glow-pulse 8s ease-in-out infinite;
}

.footer-glow-1 {
    width: 400px;
    height: 400px;
    /* Reduced from 0.3 to 0.15 */
    background: rgba(124, 179, 66, 0.15);
    top: -200px;
    left: 10%;
    animation-delay: 0s;
}

.footer-glow-2 {
    width: 300px;
    height: 300px;
    /* Reduced from 0.2 to 0.1 */
    background: rgba(156, 204, 101, 0.1);
    bottom: -100px;
    right: 20%;
    animation-delay: -4s;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.2); }
}

/* Particle Canvas — LIGHTENED */
.footer-particles {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ============================================
   CONTAINER
   ============================================ */
.footer-container {
    position: relative;
    z-index: 1;
    padding: 5rem 2rem 2rem;
}

/* ============================================
   MAIN FOOTER GRID — 4 COLUMNS
   ============================================ */
.footer-main {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    margin-bottom: 3rem;
}

/* ============================================
   COLUMN 1: BRAND (Bigger Logo + More Text)
   ============================================ */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-logo {
    display: inline-block;
    transition: opacity 0.2s ease;
    margin-bottom: 0.5rem;
}

.footer-logo:hover {
    opacity: 0.8;
}

.footer-logo img {
    height: 80px;
    width: auto;
    display: block;
}

.footer-tagline {
    font-size: 1rem;
    font-weight: 600;
    color: var(--cfs-green);
    margin: 0;
}

.footer-description {
    font-size: 0.85rem;
    line-height: 1.6;
    /* LIGHTENED for better contrast */
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    max-width: 300px;
}

/* ============================================
   COLUMNS 2-4: NAV / SERVICES / GET STARTED
   All share identical styling
   ============================================ */
.footer-nav-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.footer-nav-title {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.92);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-nav-title::after {
    content: '';
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--cfs-green), transparent);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.footer-nav-section:hover .footer-nav-title::after {
    width: 60px;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.link-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cfs-green);
    font-size: 0.75rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
}

.footer-link:hover {
    color: var(--white);
    padding-left: 0.5rem;
}

.footer-link:hover .link-icon {
    opacity: 1;
    transform: translateX(0);
}

.link-text {
    position: relative;
    font-weight: bolder;
}

.link-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cfs-green);
    transition: width 0.3s ease;
}

.footer-link:hover .link-text::after {
    width: 100%;
}

/* ============================================
   GET STARTED COLUMN SPECIFIC
   ============================================ */
.footer-cta-hint {
    font-size: 0.8rem;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

/* Social Icons under Get Started */
.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 36px;
    height: 36px;
    /* LIGHTENED: was rgba(255,255,255,0.05) */
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--cfs-green);
    border-color: var(--cfs-green);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================================
   BOTTOM BAR — LIGHTENED
   ============================================ */
.footer-bottom {
    /* LIGHTENED border */
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-copyright {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    margin: 0;
}

.copy-icon {
    color: var(--cfs-green);
}

.copy-brand {
    /* LIGHTENED */
    color: rgba(255, 255, 255, 0.85);
    font-weight: var(--font-weight-semibold);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(124, 179, 66, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 10px 30px rgba(124, 179, 66, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--cfs-green);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(124, 179, 66, 0.4);
}

.top-arrow {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 12px solid var(--white);
    position: relative;
    z-index: 2;
}


    100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .footer-main {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 3;
        align-items: center;
        text-align: center;
    }

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

    .footer-description {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 3rem 1.5rem 1.5rem;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: span 2;
        align-items: center !important;
        text-align: center !important;
    }

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

    .footer-brand .footer-description {
        max-width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-nav-section {
        align-items: center;
        text-align: center;
    }

    .footer-nav-title {
        align-items: center;
    }

    .footer-nav-title::after {
        margin: 0 auto;
    }

    .footer-nav-list {
        align-items: center;
    }

    .footer-link {
        justify-content: center;
    }

    .footer-link:hover {
        padding-left: 0;
    }

    .link-icon {
        display: none;
    }

    .footer-cta-hint {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
        align-items: center !important;
        text-align: center !important;
    }

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

    .footer-brand .footer-description {
        max-width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-nav-section {
        grid-column: span 1;
        align-items: center;
        text-align: center;
    }
}

/* ============================================
   REDUCED MOTION & HIGH CONTRAST
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .footer-grid-pattern,
    .footer-glow,
    .top-pulse {
        animation: none;
    }

    .back-to-top {
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
}

@media (prefers-contrast: high) {
    .social-link,
    .footer-link {
        border-width: 2px;
    }

    .back-to-top {
        border: 2px solid var(--white);
    }
}