/* Prevent white flash on page load and pull-to-refresh */
html {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%) !important;
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%) !important;
    color: #f8f9fa !important;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
    z-index: -1;
}

@media (max-width: 768px) {
    html, body {
        overscroll-behavior-y: none;
        -webkit-overflow-scrolling: touch;
    }
}

:root {
    --primary: #0a2463;
    --secondary: #3e92cc;
    --accent: #2d46b9;
    --gold: #D4AF37;
    --light-gold: #f4e8c1;
    --platinum: #E5E4E2;
    --dark: #0a0a1a;
    --darker: #050510;
    --light: #f8f9fa;
    --gray: #9ca3af;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Footer */
footer {
    background: var(--darker);
    padding: 6rem 5% 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section {
    transition: var(--transition);
}

.footer-logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--light);
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    width: 35px;
    height: 35px;
    margin-right: 12px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.footer-about {
    max-width: 400px;
}

.footer-about p {
    color: var(--gray);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.footer-heading {
    font-size: 1.2rem;
    color: var(--light);
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--gold));
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 300;
    position: relative;
    padding-left: 0;
    display: inline-block;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: var(--transition);
    color: var(--gold);
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 20px;
}

.footer-links a:hover::before {
    left: 0;
    opacity: 1;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    gap: 1rem;
}

.social-icons a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 1.1rem;
}

.social-icons a:hover {
    background: linear-gradient(145deg, var(--primary), var(--accent));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(10, 36, 99, 0.3);
    color: white;
    border-color: transparent;
}

.copyright {
    text-align: center;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 300;
}

/* Luxury Badge (AI Chat Button) */
.luxury-badge {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--gold), var(--primary));
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    z-index: 1001;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
    border: none;
    opacity: 1;
    visibility: visible;
}

.luxury-badge:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    animation: none;
}

.luxury-badge:active {
    transform: scale(0.95);
}

.luxury-badge.open {
    background: linear-gradient(145deg, var(--primary), var(--gold));
    transform: rotate(180deg);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(212, 175, 55, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    footer {
        padding: 5rem 4% 2rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .footer-about {
        grid-column: 1 / -1;
        max-width: 100%;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-section {
        text-align: center;
    }

    .footer-links a::before {
        display: none;
    }

    .footer-links a:hover {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    footer {
        padding: 4rem 4% 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-about {
        max-width: 100%;
    }

    .footer-heading {
        font-size: 1.1rem;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .social-icons {
        justify-content: center;
    }

    .luxury-badge {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    footer {
        padding: 3rem 4% 1.5rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    .footer-logo-img {
        width: 30px;
        height: 30px;
    }

    .footer-heading {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .footer-links li {
        margin-bottom: 0.6rem;
    }

    .footer-links a {
        font-size: 0.95rem;
    }

    .social-icons a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .copyright {
        font-size: 0.85rem;
        padding-top: 2rem;
    }

    .luxury-badge {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 2.5rem 3% 1.5rem;
    }

    .footer-logo {
        font-size: 1.3rem;
    }

    .footer-logo-img {
        width: 26px;
        height: 26px;
    }

    .footer-about p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .social-icons {
        gap: 0.8rem;
    }

    .social-icons a {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .luxury-badge {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Focus styles for accessibility */
.footer-links a:focus,
.social-icons a:focus,
.luxury-badge:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    footer {
        background: #000;
        border-top: 2px solid var(--gold);
    }

    .footer-links a,
    .social-icons a {
        border: 1px solid white;
    }

    .footer-links a:hover,
    .social-icons a:hover {
        background: var(--gold);
        color: black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }

    .luxury-badge {
        animation: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .footer-links a:hover {
        padding-left: 0;
        color: var(--gray);
    }

    .footer-links a:active {
        color: var(--gold);
    }

    .social-icons a:hover {
        transform: none;
        background: rgba(255, 255, 255, 0.05);
    }

    .social-icons a:active {
        background: linear-gradient(145deg, var(--primary), var(--accent));
        color: white;
    }

    .luxury-badge:hover {
        transform: none;
        animation: pulse 2s infinite;
    }

    .luxury-badge:active {
        transform: scale(0.9);
    }
}