/* Reusing variables or defining local Fallbacks */
:root {
    --footer-bg-navy: #050533;
    --footer-accent-blue: #4A90E2;
    --footer-text-white: #ffffff;
    --footer-text-muted: rgba(255, 255, 255, 0.7);
}

.premium-footer {
    position: relative;
    background-color: var(--footer-bg-navy);
    color: var(--footer-text-white);
    padding: 100px 0 40px;
    overflow: hidden;
    margin-top: 0;
    /* Ensure no gap */
}

/* ... (existing styles) ... */

/* --- Layout Grid --- */
.premium-footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 1fr 1.2fr;
    /* Brand | Main | Action | Contact */
    gap: 40px;
    margin-bottom: 80px;
}

/* --- Visual Effects --- */

/* Reverse Mask (Gradient from Transparent/White to Navy) */
.premium-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to bottom, rgba(5, 1, 74, 0), rgba(5, 1, 74, 1));
    /* Adjust first color if body bg is not white, but "fading into navy" usually implies the gradient starts separate or is an overlay. 
       Actually, to "fade from page bg", it sits *above* content? No, standard gradient top-border effect:
    */
    background: linear-gradient(180deg, rgba(5, 1, 74, 0) 0%, #05014A 100%);
    top: -150px;
    /* Pull it up to overlap if we want, or just generic top inner shadow */
    /* Let's stick to a top inner shadow effect for smoothness */
    top: 0;
    height: 100px;
    background: linear-gradient(to bottom, #ffffff 0%, var(--footer-bg-navy) 100%);
    opacity: 0.05;
    /* Subtle blend if needed, or remove if hard cut is preferred. */
    display: none;
    /* Simpler: Just rely on clean separation or negative margin if user requested "Reverse Mask" specifically */
}

/* Texture - Animated Grain */
.premium-footer__texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.04;
    pointer-events: none;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    /* Optional Animation */
    animation: grainShift 8s infinite alternate;
}

@keyframes grainShift {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(20px);
    }
}


.premium-footer__container {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Layout Grid --- */
/* Grid definition corrected above. Removing specific override block. */

/* Column 1: Brand */
.footer-brand__logo {
    display: block;
    margin-bottom: 20px;
    max-width: 150px;
}

.footer-brand__tagline {
    font-family: var(--ph-font-script, cursive);
    font-size: 1.8rem;
    color: var(--footer-accent-blue);
    margin-bottom: 20px;
    line-height: 1.2;
}

.footer-brand__desc {
    font-family: var(--ph-font-sans, sans-serif);
    font-size: 0.95rem;
    color: var(--footer-text-muted);
    line-height: 1.6;
    max-width: 300px;
}

/* Columns 2 & 3: Headers */
.footer-heading {
    font-family: var(--ph-font-serif, serif);
    font-size: 1.25rem;
    color: var(--footer-text-white);
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 1px;
    background-color: var(--footer-accent-blue);
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-family: var(--ph-font-sans, sans-serif);
    font-size: 0.95rem;
    color: var(--footer-text-muted);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--footer-accent-blue);
    transform: translateY(-3px);
    /* Upward float */
}

/* Column 4: Newsletter / Contact (Styles shared) */
.footer-newsletter__text {
    font-family: var(--ph-font-sans, sans-serif);
    color: var(--footer-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* ... Social Icons (Glassmorphic) ... */
.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    /* Circle */
    color: white;
    font-size: 1rem;
    transition: all 0.4s ease;
}

.footer-social a:hover {
    background: var(--footer-accent-blue);
    border-color: var(--footer-accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}


/* --- Bottom Bar --- */
.premium-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    font-family: var(--ph-font-sans, sans-serif);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Floating Back to Top --- */
.premium-scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    /* Glass */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-accent-blue);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 999;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
}

.premium-scroll-top:hover {
    background: rgba(5, 1, 74, 0.8);
    border-color: var(--footer-accent-blue);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.premium-scroll-top.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}


/* --- Responsive --- */
@media (max-width: 992px) {
    .premium-footer__grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .premium-footer__grid {
        grid-template-columns: 1fr;
    }

    .footer-brand {
        grid-column: span 1;
    }
}