/* =========================================
   VARIABLES Y TEMA
   ========================================= */
:root {
    --primary-color: #D31122; /* Rojo Arihaxa */
    --primary-hover: #b00d1a;
    --primary-glow: rgba(211, 17, 34, 0.2);
    --dark-bg: #0f1115;
    --darker-bg: #07080a;
    --light-bg: #ffffff;
    --gray-bg: #f5f7fa;
    --text-dark: #1a1c20;
    --text-light: #ffffff;
    --text-muted: #64748b;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --font-main: 'Inter', sans-serif;
    --radius: 12px;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-dark: rgba(15, 17, 21, 0.8);
}

/* =========================================
   RESET Y BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   UTILIDADES
   ========================================= */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.section-title.left-align {
    text-align: left;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 50px auto;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: var(--text-light);
    color: var(--text-dark);
    border-color: var(--text-light);
}

.btn-large {
    padding: 18px 42px;
    font-size: 1.15rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* =========================================
   NAVEGACIÓN
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.navbar .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
}

.navbar .logo img {
    height: 40px;
}

.logo .highlight {
    color: var(--primary-color);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a:not(.btn) {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:not(.btn):hover {
    color: var(--primary-color);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

.btn-primary.pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(211, 17, 34, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(211, 17, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(211, 17, 34, 0); }
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px;
    transition: var(--transition);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    min-height: 700px;
    background: url('img/Recursos/mechanic_onsite.png') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 8, 10, 0.9) 0%, rgba(7, 8, 10, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--text-light);
    max-width: 850px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.highlight-text {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--primary-color);
    opacity: 0.2;
    z-index: -1;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 48px;
    font-weight: 300;
    opacity: 0.95;
    line-height: 1.5;
    max-width: 650px;
}

.hero-buttons {
    display: flex;
    gap: 24px;
}

/* =========================================
   SERVICIOS
   ========================================= */
.services {
    background-color: var(--gray-bg);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--light-bg);
    padding: 40px 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.service-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--primary-color);
    color: white;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    background-color: var(--gray-bg);
    border-radius: 16px;
    transition: var(--transition);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 800;
}

.service-card p {
    color: var(--text-muted);
}

/* =========================================
   IN-SITE SECTION
   ========================================= */
.dark-bg {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.dark-bg .section-title {
    color: var(--text-light);
}

.insite-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.insite-text, .insite-image {
    flex: 1;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background-color: rgba(211, 17, 34, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.check-list {
    list-style: none;
    margin: 30px 0;
}

.check-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-placeholder {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    min-height: 400px;
}
.image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
}

/* =========================================
   CONTACTO
   ========================================= */
.contact {
    background-color: var(--light-bg);
}

.contact-box {
    background-color: var(--light-bg);
    border-radius: 20px;
    padding: 60px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.05);
}

.contact-box h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.contact-box > p {
    color: var(--text-muted);
    margin-bottom: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-icon {
    font-size: 2rem;
    background: rgba(211, 17, 34, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-item span:last-child {
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--light-bg);
    box-shadow: 0 0 0 3px rgba(211, 17, 34, 0.1);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: var(--darker-bg);
    color: var(--text-muted);
    padding: 40px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-brand h3 {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a:hover {
    color: var(--text-light);
}

/* =========================================
   ANIMACIONES BÁSICAS
   ========================================= */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

.slide-up:nth-child(2) { animation-delay: 0.2s; }
.slide-up:nth-child(3) { animation-delay: 0.4s; }

@keyframes fadeIn {
    to { opacity: 1; }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   BEFORE/AFTER SLIDER
   ========================================= */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.ba-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: col-resize;
}

.ba-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.ba-before {
    z-index: 1;
    width: 50%;
    border-right: 3px solid var(--text-light);
}

.ba-after {
    z-index: 0;
}

.ba-label {
    position: absolute;
    bottom: 20px;
    padding: 6px 16px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    backdrop-filter: blur(4px);
    z-index: 2;
    letter-spacing: 1px;
}

.ba-label-before {
    left: 20px;
}

.ba-label-after {
    right: 20px;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: var(--text-light);
    z-index: 3;
    pointer-events: none;
    transform: translateX(-50%);
}

.ba-handle::after {
    content: '↔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--text-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
}

/* =========================================
   REVEAL ON SCROLL
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   MEDIA QUERIES (Mobile Responsiveness)
   ========================================= */
@media screen and (max-width: 900px) {
    .insite-content {
        flex-direction: column;
        text-align: center;
    }
    
    .section-title.left-align {
        text-align: center;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .ba-container {
        height: 300px;
    }
}

@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: 80px;
        background-color: var(--light-bg);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
        gap: 40px;
        padding-top: 50px;
        box-shadow: -10px 0 20px rgba(0,0,0,0.05);
    }

    .nav-active {
        transform: translateX(0%);
    }

    .hamburger {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-content {
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }
}

/* =========================================
   WHATSAPP FLOATING BUTTON
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float span {
    font-style: normal;
}

@media screen and (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 28px;
    }
}

