/* ============================================ */
/* PREMIUM SITE MASTER CSS                     */
/* SEO & Core Web Vitals Optimized             */
/* ============================================ */

/* 
 * SEO PERFORMANCE NOTES:
 * - Critical CSS is inline in <head> for FCP/LCP
 * - This file contains non-critical styles
 * - Animations use transform/opacity only (no CLS)
 * - Font-display: swap for text visibility
 * - Reduced motion support for accessibility
 */

/* ============================================ */
/* CSS VARIABLES                               */
/* ============================================ */

:root {
    /* Primary Colors */
    --primary: #c2185b;
    --primary-light: #e91e63;
    --primary-dark: #880e4f;
    --primary-gradient: linear-gradient(135deg, #e91e63 0%, #c2185b 50%, #880e4f 100%);
    
    /* Secondary */
    --secondary: #6c5ce7;
    --secondary-light: #a29bfe;
    
    /* Neutrals */
    --dark: #1a1a2e;
    --dark-soft: #2d2d44;
    --gray-900: #16213e;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    
    /* Accents */
    --whatsapp: #25D366;
    --gold: #ffd700;
    
    /* Shadows - Optimized for Performance */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
    
    /* Transitions - Short for INP */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* ============================================ */
/* FONT LOADING - Prevent CLS                  */
/* ============================================ */

/* System font stack while custom fonts load */
body {
    font-family: var(--font-body);
    font-display: swap;
}

/* ============================================ */
/* ENHANCED HEADER STYLES                      */
/* ============================================ */

/* Background Layers - GPU Accelerated */
.header-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: auto; /* Reset after animation */
}

/* Particle Effect - Optimized Animation */
.header-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.25) 1px, transparent 1px),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 100px 100px, 150px 150px;
    pointer-events: none;
    opacity: 0.5;
    /* Subtle animation - no transform to prevent CLS */
    animation: particleOpacity 8s ease-in-out infinite;
}

@keyframes particleOpacity {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.7; }
}

/* Decorative Elements */
.header-decoration {
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.header-decoration.left {
    top: -125px;
    left: -125px;
}

.header-decoration.right {
    bottom: -125px;
    right: -125px;
}

/* ============================================ */
/* NAVIGATION ENHANCEMENTS                     */
/* ============================================ */

.nav-brand:hover {
    transform: scale(1.03);
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.nav-links a.nav-cta {
    background: var(--whatsapp);
    border-color: var(--whatsapp);
}

.nav-links a.nav-cta:hover {
    background: #20bd5a;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* ============================================ */
/* HERO SECTION ENHANCEMENTS                   */
/* ============================================ */

/* Hero Badge Animation - No CLS */
.hero-badge {
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0);
    }
}

.hero-badge i {
    color: var(--gold);
}

/* Title Highlight Effect */
.hero-title .highlight {
    position: relative;
    display: inline-block;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(255, 215, 0, 0.4);
    border-radius: 3px;
    z-index: -1;
}

.hero-title .subtitle-block {
    display: block;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: 400;
    margin-top: var(--space-sm);
    opacity: 0.95;
}

/* ============================================ */
/* TRUST BADGES HOVER EFFECTS                  */
/* ============================================ */

.trust-badge {
    transition: transform var(--transition-normal), 
                background var(--transition-normal),
                box-shadow var(--transition-normal);
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ============================================ */
/* STATISTICS CARDS                            */
/* ============================================ */

.stat-card {
    transition: transform var(--transition-normal), 
                box-shadow var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Animation on Scroll - No CLS (uses opacity/transform) */
.stat-card.animate {
    animation: statReveal 0.5s ease-out forwards;
}

@keyframes statReveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-content {
    display: flex;
    flex-direction: column;
}

/* ============================================ */
/* CTA BUTTONS                                 */
/* ============================================ */

.cta-button:hover {
    transform: translateY(-3px);
}

.cta-button.primary:hover {
    background: var(--gray-100);
    box-shadow: var(--shadow-lg);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.cta-button.whatsapp:hover {
    background: #20bd5a;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* ============================================ */
/* FOOTER STYLES                               */
/* ============================================ */

.site-footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-col {
    text-align: left;
}

.footer-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.footer-title i {
    color: var(--primary-light);
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-400);
}

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

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast), 
                padding-left var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--dark-soft);
}

.copyright {
    font-size: 0.9rem;
    color: var(--gray-400);
    margin-bottom: var(--space-sm);
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* ============================================ */
/* RESPONSIVE - TABLET                         */
/* ============================================ */

@media (max-width: 768px) {
    .header-container {
        padding: var(--space-sm);
    }
    
    .hero-section {
        padding: var(--space-lg) 0;
    }
    
    .hero-badge {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.8rem;
    }
    
    .trust-badges {
        gap: var(--space-sm);
    }
    
    .trust-badge {
        padding: var(--space-sm) var(--space-md);
        min-width: 90px;
    }
    
    .badge-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .badge-text {
        font-size: 0.75rem;
    }
    
    .stats-section {
        gap: var(--space-sm);
    }
    
    .stat-card {
        padding: var(--space-md);
        min-width: 140px;
        gap: var(--space-sm);
    }
    
    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .cta-section {
        gap: var(--space-sm);
        padding: var(--space-md) var(--space-sm) var(--space-xl);
    }
    
    .cta-button {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.85rem;
        min-width: 140px;
    }
    
    .footer-grid {
        gap: var(--space-xl);
    }
}

/* ============================================ */
/* RESPONSIVE - MOBILE                         */
/* ============================================ */

@media (max-width: 576px) {
    .top-nav {
        padding: var(--space-sm) 0;
        margin-bottom: var(--space-md);
    }
    
    .nav-brand {
        font-size: 1.2rem;
    }
    
    .nav-links a span {
        display: none;
    }
    
    .nav-links a {
        padding: var(--space-sm);
        width: 40px;
        height: 40px;
        justify-content: center;
    }
    
    .hero-section {
        padding: var(--space-md) 0;
    }
    
    .trust-badge {
        flex: 1 1 calc(33.333% - 10px);
        padding: var(--space-sm);
        min-width: 80px;
    }
    
    .badge-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .badge-text {
        font-size: 0.7rem;
    }
    
    .stats-section {
        margin: var(--space-lg) 0;
        padding: 0 var(--space-xs);
    }
    
    .stat-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
    
    .cta-section {
        flex-direction: column;
        padding: var(--space-md) var(--space-sm) var(--space-lg);
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .footer-title {
        justify-content: center;
    }
    
    .footer-links a:hover {
        padding-left: 0;
    }
    
    .main-content {
        padding: var(--space-lg) 0 var(--space-2xl);
    }
}

/* ============================================ */
/* RESPONSIVE - EXTRA SMALL                    */
/* ============================================ */

@media (max-width: 380px) {
    .header-container {
        padding: var(--space-xs);
    }
    
    .nav-links {
        gap: var(--space-xs);
    }
    
    .trust-badge {
        padding: var(--space-xs);
    }
    
    .badge-icon {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
    
    .badge-text {
        font-size: 0.65rem;
    }
    
    .stat-card {
        padding: var(--space-sm) var(--space-md);
    }
    
    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
}

/* ============================================ */
/* ACCESSIBILITY                               */
/* ============================================ */

/* Focus Styles - Required for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary-light);
    outline-offset: 2px;
}

.nav-links a:focus-visible,
.cta-button:focus-visible {
    outline-color: var(--white);
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-sm);
}

/* ============================================ */
/* REDUCED MOTION - Accessibility              */
/* ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .header-particles {
        animation: none;
        opacity: 0.5;
    }
    
    .hero-badge {
        animation: none;
    }
    
    .stat-card.animate {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ============================================ */
/* HIGH CONTRAST MODE                          */
/* ============================================ */

@media (prefers-contrast: high) {
    .trust-badge,
    .stat-card,
    .cta-button {
        border: 2px solid currentColor;
    }
    
    .hero-title,
    .badge-text,
    .stat-number {
        text-shadow: none;
    }
}

/* ============================================ */
/* PRINT STYLES                                */
/* ============================================ */

@media print {
    .premium-header {
        background: var(--white) !important;
        color: var(--dark) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .header-bg-layer,
    .header-particles,
    .header-decoration,
    .cta-section {
        display: none !important;
    }
    
    .hero-title,
    .hero-subtitle,
    .badge-text,
    .stat-number,
    .stat-label {
        color: var(--dark) !important;
    }
    
    .trust-badge,
    .stat-card {
        border: 1px solid var(--gray-300);
        box-shadow: none;
    }
}

/* ============================================ */
/* BROWSER FALLBACKS                           */
/* ============================================ */

/* Fallback for browsers without backdrop-filter */
@supports not (backdrop-filter: blur(10px)) {
    .nav-links a,
    .trust-badge,
    .hero-badge,
    .cta-button.secondary {
        background: rgba(255, 255, 255, 0.3);
    }
}

/* Fallback for browsers without CSS Grid */
@supports not (display: grid) {
    .footer-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .footer-col {
        flex: 1 1 30%;
        min-width: 200px;
        margin-bottom: var(--space-xl);
    }
}

/* ============================================ */
/* PERFORMANCE OPTIMIZATIONS                   */
/* ============================================ */

/* Contain for Layout Performance */
.premium-header {
    contain: layout style;
}

.stat-card {
    contain: layout;
}

/* GPU Acceleration Hints - Use Sparingly */
.stat-card:hover,
.trust-badge:hover,
.cta-button:hover {
    will-change: transform;
}

/* Reset will-change after interaction */
.stat-card,
.trust-badge,
.cta-button {
    will-change: auto;
}
