/**
 * Secondbay Footer Styles
 * Version: 4.0.0 - Advanced UX & Visual Balance Enhancement
 * 
 * CHANGES from 3.6.0:
 * - Added 8px-based spacing rhythm system
 * - Enhanced hover/active/focus states
 * - Improved visual hierarchy
 * - Added micro-interactions
 * - Trust section elevation
 * - Mobile collapsible sections
 * - Typography scale standardization
 * - Warmer color palette
 * - Touch target improvements
 * 
 * Matches actual footer.html structure
 */

/* ===== DESIGN TOKENS ===== */
:root {
    /* Spacing (8px base unit) */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 80px;
    
    /* Typography scale (1.2 minor third) */
    --text-xs: 12px;
    --text-sm: 13px;
    --text-base: 14px;
    --text-md: 16px;
    --text-lg: 20px;
    
    /* Footer-specific colors */
    --footer-bg-start: hsl(220, 26%, 18%);  /* Warmer blue-gray */
    --footer-bg-end: hsl(230, 35%, 8%);      /* Deep navy */
    --footer-text-bright: rgba(255, 255, 255, 1);
    --footer-text-body: rgba(255, 255, 255, 0.75);
    --footer-text-muted: rgba(255, 255, 255, 0.65);
    --footer-text-subtle: rgba(255, 255, 255, 0.5);
    --footer-border: rgba(255, 255, 255, 0.1);
    --footer-border-subtle: rgba(255, 255, 255, 0.06);
    --footer-surface: rgba(255, 255, 255, 0.03);
    
    /* Interaction colors */
    --footer-focus: rgba(255, 255, 255, 0.8);
    --footer-hover-bg: rgba(255, 255, 255, 0.05);
    
    /* Animation timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.back-to-top {
    contain: layout paint;
    will-change: transform, opacity;
}

.back-to-top:not(.visible) {
    will-change: auto;
}

/* ===== LAYOUT SHIFT PREVENTION ===== */
.footer-grid {
    contain: layout;
}

.footer-column {
    min-height: 180px;
}

.footer-brand {
    min-height: 200px;
}

.newsletter-feedback {
    min-height: 0;
    overflow: hidden;
}

.payment-section {
    min-height: 56px;
}

.footer-bottom {
    min-height: 48px;
}

/* ===== FOOTER ===== */
.footer {
    position: relative;
    background: linear-gradient(180deg, var(--footer-bg-start) 0%, var(--footer-bg-end) 100%);
    color: white;
    margin-top: auto;
    overflow: hidden;
    contain: layout paint style;
    min-height: 520px;
    contain-intrinsic-block-size: 520px;
    isolation: isolate;
}

/* Subtle texture overlay for depth */
.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.footer-wave {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    width: 100%;
    color: var(--bg, #f9fafb);
    transform: translateY(-99%);
    contain: strict;
    pointer-events: none;
}

.footer-wave svg {
    width: 100%;
    height: 60px;
    display: block;
}

.footer-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4xl) var(--space-lg) var(--space-xl);
    contain: layout style;
    min-height: 460px;
}

/* ===== FOOTER GRID ===== */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid var(--footer-border);
    contain: layout style;
    min-height: 220px;
}

/* ===== BRAND COLUMN ===== */
.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    text-decoration: none;
    color: white;
    min-height: 45px;
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

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

.footer-logo:focus-visible {
    outline: 2px solid var(--footer-focus);
    outline-offset: 4px;
}

.footer-logo-img {
    height: 45px;
    width: 66px;
    min-height: 45px;
    min-width: 66px;
    object-fit: contain;
    transition: transform 0.3s var(--ease-out-expo);
    aspect-ratio: 66 / 45;
}

.footer-logo:hover .footer-logo-img {
    transform: scale(1.05);
}

.footer-logo-text {
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.2;
}

.footer-tagline {
    color: var(--footer-text-body);
    font-size: var(--text-base);
    line-height: 1.7;
    margin-bottom: var(--space-lg);
    min-height: 48px;
}

/* ===== ECO BADGE ===== */
.eco-badge {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 12px;
    margin-top: auto;
    min-height: 60px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    transition: 
        background 0.2s ease, 
        border-color 0.2s ease,
        transform 0.2s var(--ease-out-expo),
        box-shadow 0.3s ease;
}

.eco-badge:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.eco-badge:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.1);
}

.eco-badge:focus-visible {
    outline: 2px solid var(--success, #10b981);
    outline-offset: 2px;
}

.eco-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: var(--success, #10b981);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s var(--ease-spring);
}

.eco-badge:hover .eco-icon {
    transform: scale(1.1);
}

.eco-icon svg {
    width: 18px;
    height: 18px;
    color: white;
}

.eco-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eco-text strong {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--success, #10b981);
}

.eco-text span {
    font-size: var(--text-xs);
    color: var(--footer-text-muted);
}

/* ===== FOOTER COLUMNS ===== */
.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-heading {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
    color: var(--footer-text-muted);
    line-height: 1.3;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-links li {
    margin: 0;
}

.footer-links a {
    display: inline-block;
    color: var(--footer-text-body);
    text-decoration: none;
    font-size: var(--text-base);
    line-height: 1.4;
    padding: var(--space-xs) 0;
    margin: calc(var(--space-xs) * -1) 0;
    border-radius: 4px;
    transition: 
        color 0.15s ease,
        transform 0.2s var(--ease-out-expo);
}

.footer-links a:hover {
    color: var(--footer-text-bright);
    transform: translateX(4px);
}

.footer-links a:active {
    transform: translateX(2px);
}

.footer-links a:focus-visible {
    outline: 2px solid var(--footer-focus);
    outline-offset: 4px;
}

/* ===== FOOTER CONTACT ===== */
.footer-contact {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--footer-border);
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary, #5b4cdb);
    font-size: var(--text-base);
    font-weight: 500;
    text-decoration: none;
    padding: var(--space-xs) 0;
    border-radius: 4px;
    transition: 
        color 0.2s ease,
        transform 0.2s var(--ease-out-expo);
}

.contact-link:hover {
    color: #7c6fe3;
    transform: translateX(2px);
}

.contact-link:active {
    transform: translateX(0);
}

.contact-link:focus-visible {
    outline: 2px solid var(--footer-focus);
    outline-offset: 4px;
}

.contact-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.contact-link:hover svg {
    transform: scale(1.1);
}

/* ===== NEWSLETTER ===== */
.footer-newsletter {
    grid-column: span 1;
    contain: layout;
    padding-left: var(--space-lg);
    border-left: 1px solid var(--footer-border-subtle);
}

.newsletter-desc {
    color: var(--footer-text-muted);
    font-size: var(--text-base);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 60px;
}

.newsletter-field {
    display: flex;
    gap: 10px;
    min-height: 48px;
}

.newsletter-field input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    height: 48px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: white;
    font-size: var(--text-base);
    font-family: inherit;
    transition: 
        border-color 0.2s ease, 
        background 0.2s ease,
        box-shadow 0.2s ease;
    box-sizing: border-box;
}

.newsletter-field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.newsletter-field input:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.newsletter-field input:focus {
    outline: none;
    border-color: var(--primary, #5b4cdb);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(91, 76, 219, 0.15);
}

.newsletter-field input:focus-visible {
    outline: none;
}

.newsletter-field button {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary, #5b4cdb);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: 
        background 0.2s ease, 
        transform 0.2s var(--ease-out-expo),
        box-shadow 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(91, 76, 219, 0.25);
}

.newsletter-field button:hover:not(:disabled) {
    background: var(--primary-dark, #4a3cb8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 76, 219, 0.35);
}

.newsletter-field button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(91, 76, 219, 0.2);
}

.newsletter-field button:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

.newsletter-field button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.newsletter-field button svg {
    width: 20px;
    height: 20px;
}

/* Icon states */
.newsletter-field button .icon-send { display: block; }
.newsletter-field button .icon-loading { display: none; }
.newsletter-field button .icon-success { display: none; }

.newsletter-field button.loading .icon-send { display: none; }
.newsletter-field button.loading .icon-loading { display: block; animation: spin 1s linear infinite; }

.newsletter-field button.success .icon-send { display: none; }
.newsletter-field button.success .icon-success { display: block; }
.newsletter-field button.success { 
    background: var(--success, #10b981); 
    animation: success-pulse 0.4s var(--ease-spring);
}

.newsletter-field button.error { background: var(--danger, #ef4444); }

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes success-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.newsletter-feedback {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: var(--text-sm);
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: 
        opacity 0.2s ease, 
        max-height 0.3s var(--ease-out-expo), 
        visibility 0.2s,
        transform 0.2s var(--ease-out-expo);
    margin-top: 0;
    transform: translateY(-8px);
}

.newsletter-feedback.show {
    visibility: visible;
    opacity: 1;
    max-height: 60px;
    margin-top: var(--space-sm);
    transform: translateY(0);
}

.newsletter-feedback.success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.newsletter-feedback.error {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.newsletter-feedback.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.newsletter-privacy {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-sm);
    font-size: var(--text-xs);
    color: var(--footer-text-muted);
}

.newsletter-privacy svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.newsletter-privacy a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.newsletter-privacy a:hover {
    color: var(--footer-text-body);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.newsletter-privacy a:focus-visible {
    outline: 2px solid var(--footer-focus);
    outline-offset: 2px;
}

/* ===== PAYMENT SECTION (Elevated Trust Zone) ===== */
.payment-section {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    margin: 0 calc(var(--space-lg) * -1);
    background: var(--footer-surface);
    border-top: 1px solid var(--footer-border-subtle);
    border-bottom: 1px solid var(--footer-border-subtle);
    min-height: 80px;
    contain: layout;
}

.payment-label {
    font-size: var(--text-sm);
    color: var(--footer-text-muted);
    white-space: nowrap;
    font-weight: 500;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.payment-method {
    width: 50px;
    height: 32px;
    min-width: 50px;
    min-height: 32px;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.7;
    transition: 
        opacity 0.2s ease,
        transform 0.2s var(--ease-out-expo);
    contain: strict;
}

.payment-method:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.payment-method svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
    min-height: 48px;
    contain: layout;
}

.copyright {
    color: var(--footer-text-muted);
    font-size: var(--text-sm);
    margin: 0;
}

.legal-links {
    display: flex;
    gap: 4px;
}

.legal-links a {
    color: var(--footer-text-muted);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: 
        color 0.2s ease,
        background 0.2s ease;
    padding: var(--space-xs) var(--space-sm);
    margin: calc(var(--space-xs) * -1) 0;
    border-radius: 6px;
}

.legal-links a:hover {
    color: var(--footer-text-bright);
    background: var(--footer-hover-bg);
}

.legal-links a:active {
    background: rgba(255, 255, 255, 0.08);
}

.legal-links a:focus-visible {
    outline: 2px solid var(--footer-focus);
    outline-offset: 2px;
}

.made-in {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--footer-text-muted);
    text-decoration: none;
    padding: var(--space-xs) var(--space-sm);
    margin: calc(var(--space-xs) * -1) 0;
    border-radius: 6px;
    transition: 
        color 0.2s ease,
        background 0.2s ease;
}

.made-in:hover {
    color: var(--footer-text-bright);
    background: var(--footer-hover-bg);
}

.made-in:focus-visible {
    outline: 2px solid var(--footer-focus);
    outline-offset: 2px;
}

.made-in span:first-child {
    font-size: var(--text-md);
    transition: transform 0.2s var(--ease-spring);
}

.made-in:hover span:first-child {
    transform: scale(1.2);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    bottom: max(24px, env(safe-area-inset-bottom, 24px));
    right: 24px;
    right: max(24px, env(safe-area-inset-right, 24px));
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary, #5b4cdb);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: var(--z-fixed, 100);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: 
        opacity 0.3s ease, 
        visibility 0.3s ease, 
        transform 0.3s var(--ease-out-expo), 
        background 0.2s ease,
        box-shadow 0.2s ease;
    box-shadow: 0 4px 16px rgba(91, 76, 219, 0.3);
    contain: layout;
}

.back-to-top:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

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

.back-to-top:hover {
    background: var(--primary-dark, #4a3cb8);
    transform: translateY(-2px) scale(1);
    box-shadow: 0 6px 20px rgba(91, 76, 219, 0.4);
}

.back-to-top:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(91, 76, 219, 0.3);
}

/* Progress circle wrapper */
.back-to-top-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.back-to-top-progress circle {
    fill: none;
    stroke-width: 3;
}

.back-to-top-progress .progress-bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.back-to-top-progress .progress-bar {
    stroke: white;
    stroke-linecap: round;
    stroke-dasharray: 100.53;
    stroke-dashoffset: 100.53;
    transition: stroke-dashoffset 0.1s ease;
}

/* Arrow icon */
.back-to-top-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    position: relative;
    z-index: 1;
    transition: transform 0.2s var(--ease-spring);
}

.back-to-top:hover .back-to-top-icon {
    transform: translateY(-2px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1.5fr repeat(3, 1fr);
        gap: 40px;
    }
    
    .footer-newsletter {
        grid-column: span 1;
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-brand {
        grid-column: span 2;
    }
    
    .footer-newsletter {
        grid-column: span 2;
        padding-left: 0;
        border-left: none;
        padding-top: var(--space-xl);
        border-top: 1px solid var(--footer-border-subtle);
    }
    
    .eco-badge {
        max-width: 280px;
    }
}

@media (max-width: 768px) {
    .footer {
        min-height: 800px;
        contain-intrinsic-block-size: 800px;
    }
    
    .footer-container {
        padding: var(--space-3xl) var(--space-md) var(--space-lg);
        min-height: 740px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        min-height: auto;
    }
    
    .footer-brand,
    .footer-newsletter {
        grid-column: span 1;
    }
    
    .footer-column {
        min-height: auto;
    }
    
    .footer-brand {
        min-height: auto;
    }
    
    .footer-newsletter {
        padding-top: var(--space-lg);
    }
    
    .eco-badge {
        max-width: none;
        height: auto;
        min-height: 60px;
    }
    
    .payment-section {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        min-height: auto;
        padding: var(--space-md);
        margin: 0 calc(var(--space-md) * -1);
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: var(--space-md);
        min-height: auto;
    }
    
    .legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .back-to-top {
        bottom: 16px;
        bottom: max(16px, env(safe-area-inset-bottom, 16px));
        right: 16px;
        right: max(16px, env(safe-area-inset-right, 16px));
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 576px) {
    /* Intermediate breakpoint for smoother mobile transition */
    .footer-grid {
        gap: var(--space-lg);
    }
    
    .footer-links {
        gap: var(--space-xs);
    }
    
    .newsletter-desc {
        font-size: var(--text-sm);
    }
    
    .legal-links {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
    
    .legal-links a {
        padding: var(--space-sm) var(--space-md);
        margin: 0;
    }
    
    /* Mobile collapsible sections */
    /* Handle both direct children and nav-nested headings */
    .footer-column > .footer-heading,
    .footer-column > nav > .footer-heading {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: var(--space-md) 0;
        margin-bottom: 0;
        border-bottom: 1px solid var(--footer-border);
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .footer-column > .footer-heading::after,
    .footer-column > nav > .footer-heading::after {
        content: '+';
        font-size: 18px;
        font-weight: 400;
        color: var(--footer-text-subtle);
        transition: transform 0.3s var(--ease-out-expo);
    }
    
    .footer-column.expanded > .footer-heading::after,
    .footer-column.expanded > nav > .footer-heading::after {
        transform: rotate(45deg);
    }
    
    .footer-column:not(.footer-brand):not(.footer-newsletter) .footer-links {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s var(--ease-out-expo), padding 0.3s ease;
        padding-top: 0;
    }
    
    .footer-column.expanded:not(.footer-brand):not(.footer-newsletter) .footer-links {
        max-height: 300px;
        padding-top: var(--space-sm);
        overflow: visible;
    }
    
    /* Keep brand and newsletter always visible */
    .footer-brand .footer-heading::after,
    .footer-newsletter .footer-heading::after {
        display: none;
    }
    
    .footer-brand .footer-heading,
    .footer-newsletter .footer-heading {
        cursor: default;
        border-bottom: none;
        padding: 0;
        margin-bottom: var(--space-md);
    }
}

@media (max-width: 480px) {
    .newsletter-field {
        flex-direction: column;
    }
    
    .newsletter-field button {
        width: 100%;
        height: 44px;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .back-to-top {
        transform: none !important;
    }
    
    .back-to-top.visible {
        transform: none !important;
    }
    
    .footer-links a:hover,
    .contact-link:hover {
        transform: none !important;
    }
    
    .eco-badge:hover {
        transform: none !important;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    .footer {
        background: black;
    }
    
    .footer-links a,
    .legal-links a,
    .contact-link {
        text-decoration: underline;
    }
    
    .eco-badge,
    .newsletter-field input {
        border-width: 2px;
    }
    
    .footer-heading,
    .payment-label,
    .copyright,
    .legal-links a,
    .made-in {
        color: white;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .footer {
        background: white !important;
        color: black !important;
        padding: 20px 0;
    }
    
    .footer::before {
        display: none;
    }
    
    .footer-wave,
    .eco-badge,
    .newsletter-form,
    .payment-section,
    .back-to-top {
        display: none !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-links a {
        color: black;
        text-decoration: underline;
    }
    
    .footer-logo-text,
    .footer-heading {
        color: black !important;
    }
}