/* Critical CSS for Broncos Towing - Core Web Vitals Optimization */

/* Reset crítico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
    overflow-x: hidden;
    font-display: swap;
}

/* Typography crítica */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p {
    font-size: 1.1rem;
    color: #5a6c7d;
    margin-bottom: 1rem;
}

/* Container crítico */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header crítico */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    flex-shrink: 0;
}

.logo-image {
    width: 120px;
    height: 40px;
    object-fit: contain;
}

/* Hero crítico */
.hero {
    background: linear-gradient(135deg, rgba(0,0,0,0.9) 0%, rgba(163, 43, 32, 0.8) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 69px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    min-height: 70vh;
}

.hero-title-main {
    display: block;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.hero-title-sub {
    display: block;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 600;
    color: #ffffff;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    max-width: 400px;
    opacity: 0.95;
    line-height: 1.5;
}

/* Botones críticos */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-align: center;
    min-height: 44px;
    min-width: 44px;
}

.btn-primary {
    background: linear-gradient(135deg, #a32b20 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(163, 43, 32, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(163, 43, 32, 0.4);
}

/* Imágenes optimizadas */
.optimized-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.logo-image {
    width: 120px;
    height: 40px;
    object-fit: contain;
}

/* Responsive crítico */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title-main {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
    
    .hero-title-sub {
        font-size: clamp(1.2rem, 5vw, 2rem);
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin: 0 auto 2rem;
    }
    
    .service-image {
        height: 150px;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-title-main {
        font-size: clamp(2rem, 10vw, 3rem);
    }
    
    .hero-title-sub {
        font-size: clamp(1rem, 6vw, 1.5rem);
    }
    
    .hero-description {
        font-size: 1rem;
    }
}

/* Animaciones críticas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Optimizaciones para Core Web Vitals */
* {
    will-change: auto;
}

img {
    content-visibility: auto;
}

.hero {
    content-visibility: auto;
    contain-intrinsic-size: 100vh;
}

/* Preload optimizations */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
} 