:root {
    --primary-color: #c41e3a;
    --primary-dark: #a01829;
    --primary-light: #e63946;
    --secondary-color: #1a1a1a;
    --secondary-light: #2d2d2d;
    --accent-color: #f8f9fa;
    --accent-dark: #e9ecef;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --gold: #faeb99;
    --shadow: rgba(0, 0, 0, 0.15);
    --shadow-hover: rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--accent-color);
    scroll-behavior: smooth;
}

/* Header & Navigation */
header {
    background-color: var(--secondary-color);
    color: white;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(26, 26, 26, 0.95));
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px var(--shadow);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    cursor: pointer;
}

.logo-image {
    height: 100px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.logo:hover .logo-image {
    transform: scale(1.1) rotate(-1deg);
    filter: drop-shadow(0 4px 15px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 20px rgba(196, 30, 58, 0.3));
}

.logo::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(45deg, transparent, rgba(196, 30, 58, 0.1), transparent);
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.logo:hover::before {
    opacity: 1;
}

.nav-links a {
    color: white;
    text-decoration: none;
    margin-left: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(196, 30, 58, 0.2), transparent);
    transition: left 0.5s;
}

.nav-links a:hover::before {
    left: 100%;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(196, 30, 58, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.2);
}

.contact-quick {
    flex-shrink: 0;
    margin-left: 2rem;
}

.phone-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.phone-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.3), transparent);
    transition: left 0.5s;
}

.phone-display:hover::before {
    left: 100%;
}

.phone-display:hover {
    transform: translateY(-2px) scale(1.05);
    background: linear-gradient(135deg, var(--gold), #e6c200);
    color: var(--secondary-color);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.phone-icon {
    font-size: 1.1rem;
    animation: ring 2s ease-in-out infinite;
}

@keyframes ring {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-10deg); }
    20% { transform: rotate(10deg); }
}

.hero {
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(196, 30, 58, 0.3)), url('images/los-potreros-ap-classic-cars-lineup-las-aguilas-sign-sunset.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    font-weight: 900;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
    letter-spacing: -2px;
    background: linear-gradient(45deg, #ffffff, var(--gold), #ffffff, var(--primary-light));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleEntrance 1.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards, 
               titleGlow 3s ease-in-out infinite 1.8s, 
               gradientShift 4s ease-in-out infinite 1.8s;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.4));
    opacity: 0;
    transform: translateY(100px) scale(0.3) rotateX(90deg);
}

.hero p {
    font-size: 1.5rem;
    font-weight: 500;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.9);
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 215, 0, 0.8), rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: subtitleEntrance 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.5s forwards,
               pulse 3s ease-in-out infinite 2s;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(50px) scale(0.8);
}

@keyframes titleEntrance {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.3) rotateX(90deg);
        filter: drop-shadow(0 0 0px rgba(255, 215, 0, 0)) blur(20px);
    }
    40% {
        opacity: 0.7;
        transform: translateY(-20px) scale(1.1) rotateX(-10deg);
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8)) blur(5px);
    }
    70% {
        opacity: 0.9;
        transform: translateY(10px) scale(0.95) rotateX(5deg);
        filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.6)) blur(2px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.4)) blur(0px);
    }
}

@keyframes subtitleEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.8);
    }
    60% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes titleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.4)) drop-shadow(0 0 60px rgba(196, 30, 58, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 80px rgba(196, 30, 58, 0.4));
    }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

/* Main Content */
section {
    padding: 6rem 5%;
    position: relative;
}

h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: var(--secondary-color);
    font-size: 2.8rem;
    font-weight: 800;
    position: relative;
    letter-spacing: -0.5px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold));
    border-radius: 2px;
}

/* Services Section */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.service-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(196, 30, 58, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--gold));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 50px var(--shadow-hover);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.9) contrast(1.1);
}

.service-card:hover img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

.service-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: var(--secondary-color);
    font-size: 1.4rem;
    font-weight: 700;
}

.service-card p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Inventory Section */
.inventory {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
    position: relative;
}

.inventory::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(196, 30, 58, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.inventory-item {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 30px var(--shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: 1px solid rgba(196, 30, 58, 0.08);
}

.inventory-item::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-color), var(--gold), var(--primary-color));
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inventory-item:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 50px var(--shadow-hover);
}

.inventory-item:hover::before {
    opacity: 1;
}

.inventory-item h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.inventory-item p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23c41e3a" fill-opacity="0.03"><circle cx="30" cy="30" r="1"/></g></g></svg>');
    pointer-events: none;
}

.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    text-align: center;
}

.contact-info > div {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow);
    border: 1px solid rgba(196, 30, 58, 0.08);
    transition: all 0.3s ease;
}

.contact-info > div:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 120px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem 2rem;
    text-decoration: none;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 30px rgba(196, 30, 58, 0.3);
}

.action-btn.primary:hover {
    transform: translateY(-5px) scale(1.02);
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    box-shadow: 0 15px 50px rgba(196, 30, 58, 0.5);
}

.action-btn.secondary {
    background: linear-gradient(135deg, white, var(--accent-color));
    color: var(--secondary-color);
    border: 2px solid rgba(196, 30, 58, 0.1);
    box-shadow: 0 8px 30px var(--shadow);
}

.action-btn.secondary:hover {
    transform: translateY(-5px) scale(1.02);
    background: linear-gradient(135deg, var(--accent-color), white);
    border-color: var(--gold);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.2);
    color: var(--text-color);
}

.btn-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.btn-text {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.action-btn.primary .btn-icon {
    animation: pulse 2s ease-in-out infinite;
}

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

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    position: relative;
}

.contact-info h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

.contact-info p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

footer p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        height: 70vh;
        background-attachment: scroll;
        background-position: center top;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 4rem 5%;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .service-grid,
    .inventory-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-actions {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .action-btn {
        flex: 1;
        min-width: 200px;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-quick {
        margin-left: 1rem;
    }
    
    .phone-display {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Performance Optimizations */
img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 480px) {
    .contact-quick {
        margin-left: 0.5rem;
    }
    
    .phone-display {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
    
    .phone-text {
        display: none;
    }
    
    .logo-image {
        height: 50px;
        max-width: 200px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
