/**
 * Universal Footer Styles
 * Completely restructured with simplified class names
 * Bulletproof responsive design that works on ALL devices
 */

/* ============================================
   BASE FOOTER STYLES - DESKTOP FIRST
   ============================================ */

.site-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 60px 20px 20px;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   FOOTER GRID - DESKTOP LAYOUT
   ============================================ */

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

/* ============================================
   FOOTER COLUMNS - BASE STYLES
   ============================================ */

.footer-col {
    /* Left-aligned by default for desktop */
}

/* Footer Titles/Headings */
.footer-title {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding: 0 0 10px 0;
    border-bottom: 2px solid rgba(204, 0, 0, 0.6);
    display: block;
}

/* Footer Menus */
.footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-item {
    margin-bottom: 12px;
}

.footer-item:last-child {
    margin-bottom: 0;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
    display: inline-block;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #cc0000;
    transform: translateX(5px);
}

.footer-link:focus {
    outline: 2px solid #cc0000;
    outline-offset: 2px;
}

/* ============================================
   FOOTER BOTTOM BAR
   ============================================ */

.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* ============================================
   TABLET LAYOUT - 900px and below
   ============================================ */

@media (max-width: 900px) {
    .site-footer {
        padding: 45px 20px 20px;
        margin-top: 50px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 30px;
        max-width: 700px;
        margin: 0 auto 40px;
    }

    /* Third column spans full width and centers */
    .footer-col:nth-child(3) {
        grid-column: 1 / -1;
        max-width: 350px;
        margin: 0 auto;
    }

    .footer-title {
        font-size: 1.1rem;
    }

    .footer-link {
        font-size: 0.95rem;
    }
}

/* ============================================
   MOBILE LAYOUT - 768px and below
   ============================================ */

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 15px 20px;
        margin-top: 40px;
    }

    .footer-container {
        padding: 0 10px;
    }

    /* Single column layout */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 35px;
        max-width: 100%;
    }

    /* ALL columns center-aligned on mobile */
    .footer-col {
        text-align: center;
    }

    /* Reset third column special treatment */
    .footer-col:nth-child(3) {
        grid-column: auto;
        max-width: 100%;
        margin: 0;
    }

    /* Titles centered with inline-block for proper border */
    .footer-title {
        font-size: 1.15rem;
        margin: 0 auto 15px;
        display: inline-block;
        text-align: center;
    }

    /* Menu items centered */
    .footer-item {
        margin-bottom: 15px;
        text-align: center;
    }

    /* Links as block elements for better touch targets */
    .footer-link {
        font-size: 1rem;
        padding: 10px 15px;
        display: block;
        margin: 0 auto;
        max-width: fit-content;
    }

    /* Remove transform on mobile */
    .footer-link:hover {
        transform: none;
    }

    .footer-bar {
        padding-top: 25px;
        margin-top: 10px;
    }

    .footer-text {
        font-size: 0.85rem;
    }
}

/* ============================================
   SMALL MOBILE - 480px and below
   ============================================ */

@media (max-width: 480px) {
    .site-footer {
        padding: 30px 10px 15px;
        margin-top: 30px;
    }

    .footer-grid {
        gap: 30px;
    }

    .footer-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .footer-item {
        margin-bottom: 12px;
    }

    .footer-link {
        font-size: 0.95rem;
        padding: 8px 12px;
    }

    .footer-text {
        font-size: 0.8rem;
        padding: 0 5px;
    }
}

/* ============================================
   TOUCH DEVICES - Better tap targets
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    .footer-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 12px 15px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* High contrast mode */
@media (prefers-contrast: high) {
    .site-footer {
        background: #000000;
        border-top: 3px solid #ffffff;
    }

    .footer-title {
        border-bottom-color: #ffffff;
        color: #ffffff;
    }

    .footer-link {
        color: #ffffff;
    }

    .footer-link:hover,
    .footer-link:focus {
        color: #ff0000;
        text-decoration: underline;
    }

    .footer-text {
        color: #ffffff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer-link {
        transition: none;
    }

    .footer-link:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .site-footer {
        display: none;
    }
}