/* ===================================
   ADVANCED FOOTER - Premium Design
   Glassmorphism + Neon Blue + Advanced Effects
   =================================== */

:root {
    --primary-cyan: #06b6d4;
    --primary-blue: #3b82f6;
    --accent-cyan: #22d3ee;
    --accent-blue: #60a5fa;
    --dark-bg: #0f172a;
    --dark-secondary: #1e293b;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --success-green: #10b981;
    --error-red: #ef4444;
}

/* ===================================
   FOOTER MAIN - Premium Container - FIXED
   =================================== */

footer {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.98) 0%,
        rgba(20, 30, 50, 0.96) 25%,
        rgba(10, 14, 39, 0.99) 50%,
        rgba(20, 30, 50, 0.96) 75%,
        rgba(15, 23, 42, 0.98) 100%
    );
    backdrop-filter: blur(40px) saturate(180%) brightness(1.05);
    -webkit-backdrop-filter: blur(40px) saturate(180%) brightness(1.05);
    border-top: 2px solid rgba(34, 211, 238, 0.3);
    /* FIXED: Reduced padding */
    padding: 3rem 2rem 2rem;
    margin-top: 6rem;
    box-shadow: 
        0 -20px 80px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 2px 30px rgba(6, 182, 212, 0.1),
        0 0 0 1px rgba(34, 211, 238, 0.12);
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(34, 211, 238, 0.8) 20%,
        rgba(59, 130, 246, 0.6) 50%,
        rgba(34, 211, 238, 0.8) 80%,
        transparent 100%
    );
    opacity: 0.8;
}

footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

footer > div {
    max-width: 90rem;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ===================================
   GRID LAYOUT - FIXED
   =================================== */

footer > div > div:first-child {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* FIXED: Reduced gap */
    gap: 2.5rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1.5px solid rgba(34, 211, 238, 0.15);
    position: relative;
}

footer > div > div:first-child::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0;
    width: 35%;
    height: 2px;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.8), rgba(59, 130, 246, 0.6), transparent);
    border-radius: 2px;
    filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.4));
}

/* ===================================
   BRAND SECTION - FIXED
   =================================== */

footer > div > div:first-child > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeInUp 0.8s ease-out 0s;
}

footer > div > div:first-child > div:first-child > div {
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

footer > div > div:first-child > div:first-child > div:hover {
    transform: translateX(8px);
}

footer > div > div:first-child > div:first-child > div > div {
    position: relative;
    /* FIXED: Explicit dimensions */
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

footer > div > div:first-child > div:first-child > div > div::before {
    content: '';
    position: absolute;
    inset: -8px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    transition: all 0.3s ease;
}

footer > div > div:first-child > div:first-child > div:hover > div::before {
    inset: -15px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4) 0%, transparent 70%);
}

footer > div > div:first-child > div:first-child > div > div svg {
    /* FIXED: Explicit size */
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 30px rgba(6, 182, 212, 0.4));
    transition: filter 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

footer > div > div:first-child > div:first-child > div:hover > div svg {
    filter: drop-shadow(0 0 50px rgba(6, 182, 212, 0.7)) drop-shadow(0 0 20px rgba(59, 130, 246, 0.4));
}

footer > div > div:first-child > div:first-child > div > span {
    font-weight: 950;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #ffffff 0%, #22d3ee 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1.2;
}

footer > div > div:first-child > div:first-child > div:hover > span {
    filter: drop-shadow(0 0 20px rgba(34, 211, 238, 0.5));
}

footer > div > div:first-child > div:first-child > p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    letter-spacing: 0.3px;
}

/* ===================================
   SOCIAL LINKS - Advanced
   =================================== */

footer > div > div:first-child > div:first-child > div:last-child {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(20, 30, 50, 0.5) 100%);
    backdrop-filter: blur(20px);
    border: 1.5px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.75rem;
    color: var(--accent-cyan);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    group: social;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(34, 211, 238, 0.8);
    transform: translateY(-6px) scale(1.12);
    box-shadow: 
        0 0 40px rgba(6, 182, 212, 0.5),
        0 12px 35px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

.social-link:hover::after {
    opacity: 1;
}

.social-link svg {
    width: 1.4rem;
    height: 1.4rem;
    stroke: currentColor;
    stroke-width: 2;
    position: relative;
    z-index: 2;
}

/* ===================================
   NAVIGATION LISTS - Premium Links
   =================================== */

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

footer h4 {
    font-weight: 950;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0 0 1.25rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #22d3ee 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 0.6rem;
}

footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

footer > div > div:first-child > div:hover h4::after {
    opacity: 1;
}

.footer-nav-list li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: 0.2px;
    padding: 0.3rem 0;
}

.footer-nav-list li a::before {
    content: '›';
    position: relative;
    font-size: 1.3rem;
    color: var(--primary-cyan);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
    transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-nav-list li a:hover {
    color: var(--accent-cyan);
    transform: translateX(6px);
}

.footer-nav-list li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-nav-list li a:hover::after {
    width: 100%;
}

/* ===================================
   NEWSLETTER SECTION - Advanced Form
   =================================== */

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    position: relative;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.9rem 1.4rem;
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(34, 211, 238, 0.3);
    border-radius: 0.85rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    letter-spacing: 0.2px;
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 
        0 0 50px rgba(6, 182, 212, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 2px 20px rgba(6, 182, 212, 0.1);
}

.newsletter-btn {
    padding: 0.9rem 2rem;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white;
    border: 1.5px solid rgba(6, 182, 212, 0.6);
    border-radius: 0.85rem;
    font-size: 0.9rem;
    font-weight: 850;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: 
        0 0 40px rgba(6, 182, 212, 0.6),
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
}

.newsletter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.7s ease, height 0.7s ease;
    z-index: 1;
}

.newsletter-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(59, 130, 246, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-btn:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 0 60px rgba(6, 182, 212, 0.8),
        0 14px 45px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.newsletter-btn:hover::before {
    width: 400px;
    height: 400px;
}

.newsletter-btn:hover::after {
    opacity: 1;
}

.newsletter-btn:active {
    transform: translateY(-1px);
}

/* ===================================
   FOOTER DIVIDER - Advanced
   =================================== */

.footer-divider {
    position: relative;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.2), transparent);
    margin: 0 0 2.5rem 0;
}

.footer-divider::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.15), transparent);
    filter: blur(1px);
}

/* ===================================
   FOOTER BOTTOM - Copyright & Legal
   =================================== */

.footer-bottom {
    text-align: center;
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.footer-bottom-content {
    max-width: 90rem;
    margin: 0 auto;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
    letter-spacing: 0.2px;
    line-height: 1.6;
}

.footer-copyright strong {
    color: var(--text-primary);
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, #22d3ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-copyright .tagline {
    color: var(--accent-cyan);
    font-style: italic;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.legal-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    letter-spacing: 0.2px;
}

.legal-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06b6d4, #22d3ee);
    transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.legal-link:hover {
    color: var(--accent-cyan);
}

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

.divider {
    color: var(--text-muted);
    opacity: 0.5;
    font-weight: 300;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(6, 182, 212, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(6, 182, 212, 0.7));
    }
}

footer > div > div:first-child > div:nth-child(1) {
    animation-delay: 0s;
}

footer > div > div:first-child > div:nth-child(2) {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

footer > div > div:first-child > div:nth-child(3) {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

footer > div > div:first-child > div:nth-child(4) {
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

footer > div > div:first-child > div:nth-child(5) {
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

/* ===================================
   RESPONSIVE DESIGN - FIXED
   =================================== */

@media (max-width: 1024px) {
    footer {
        padding: 2.5rem 1.5rem 2rem;
        margin-top: 5rem;
    }

    footer > div > div:first-child {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        padding-bottom: 2.5rem;
        margin-bottom: 2.5rem;
    }

    footer h4 {
        font-size: 0.95rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-input,
    .newsletter-btn {
        width: 100%;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 2rem 1.25rem 1.75rem;
        margin-top: 4rem;
    }

    footer > div > div:first-child {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }

    /* FIXED: Smaller icons on tablet */
    footer > div > div:first-child > div:first-child > div > div {
        width: 50px;
        height: 50px;
    }

    footer > div > div:first-child > div:first-child > div > div svg {
        width: 50px;
        height: 50px;
    }

    footer > div > div:first-child > div:first-child > div > span {
        font-size: 1.25rem;
    }

    footer h4 {
        font-size: 0.9rem;
    }

    .footer-legal {
        gap: 0.5rem;
    }

    .legal-link {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 1.75rem 1rem 1.5rem;
        margin-top: 3rem;
    }

    footer > div > div:first-child {
        gap: 1.75rem;
        padding-bottom: 1.75rem;
        margin-bottom: 1.75rem;
    }

    /* FIXED: Even smaller on mobile */
    footer > div > div:first-child > div:first-child > div > div {
        width: 42px;
        height: 42px;
    }

    footer > div > div:first-child > div:first-child > div > div svg {
        width: 42px;
        height: 42px;
    }

    footer > div > div:first-child > div:first-child > div > span {
        font-size: 1.1rem;
    }

    footer h4 {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .footer-nav-list {
        gap: 0.85rem;
    }

    .footer-nav-list li a {
        font-size: 0.85rem;
    }

    .newsletter-form {
        gap: 0.6rem;
    }

    .newsletter-input,
    .newsletter-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
    }

    .footer-copyright {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }

    .legal-link {
        font-size: 0.7rem;
    }

    .divider {
        display: none;
    }

    .social-link {
        width: 2.75rem;
        height: 2.75rem;
    }

    .social-link svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* ===================================
   ACCESSIBILITY & REDUCED MOTION
   =================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    footer {
        background: linear-gradient(
            135deg,
            rgba(15, 23, 42, 1) 0%,
            rgba(10, 14, 39, 1) 50%,
            rgba(15, 23, 42, 1) 100%
        );
    }
}
