/* --- THEME: MINIMALIST (Option 1) --- */
:root {
    --primary-color: #003478;
    /* Deep Ford Blue */
    --accent-color: #00a9e0;
    /* Cyan */
    --bg-body: #f4f7f6;
    --text-main: #1a1a1a;
    --hero-overlay: rgba(0, 52, 120, 0.85);
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body {
    font-family: var(--font-body);
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo img {
    height: 50px;
    width: auto;
    /* Fix deformation */
    object-fit: contain;
    /* Ensure aspect ratio */
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero */
/* Hero & Slider */
.hero-section {
    height: 90vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    isolation: isolate;
    /* Create new stacking context */
}

/* Hide the default static BG used by other themes if present */
.hero-bg,
.hero-bg-slider-classic {
    display: none;
}

/* Slider Styles */
.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Positive stack */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideShow 35s infinite;
    /* 35s for 7 slides (5s each) */
}

/* --- Slide Definitions --- */

/* 1. Frente Local (New First) */
.slide-1 {
    background-image: url('../fotos/frente-local.png');
    animation-delay: 0s;
}

/* 2. Parts (Old Slide 1) */
.slide-2 {
    background-image: url('../img/slide-1.png');
    animation-delay: 5s;
}

/* 3. Engine (Old Slide 2) */
.slide-3 {
    background-image: url('../img/slide-2.png');
    animation-delay: 10s;
}

/* 4. Mechanic (Old Slide 4) - Slide 3 was removed */
.slide-4 {
    background-image: url('../img/slide-4.png');
    animation-delay: 15s;
}

/* 5. Mano Mecánico (New) */
.slide-5 {
    background-image: url('../fotos/mano-mecanico.png');
    animation-delay: 20s;
}

/* 6. Aceite (New) */
.slide-6 {
    background-image: url('../fotos/aceite.png');
    animation-delay: 25s;
}

/* 7. Frenos (New) */
.slide-7 {
    background-image: url('../fotos/frenos.png');
    animation-delay: 30s;
}


/* 
 * Animation Logic for 7 slides (35s total cycle):
 * Show for ~4s, fade out overlap 1s.
 * 100% / 7 = ~14.28% per slot.
 */
@keyframes slideShow {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    3% {
        opacity: 1;
        /* Fade in fast */
        transform: scale(1.01);
    }

    14% {
        opacity: 1;
        /* Stay visible */
        transform: scale(1.04);
    }

    17% {
        opacity: 0;
        /* Fade out */
        transform: scale(1.05);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

.hero-overlay {
    background: linear-gradient(135deg, var(--primary-color) 0%, #001f4d 100%);
    opacity: 0.6;
    /* Reduced opacity to see images better */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* On top of slider */
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-content p {
    text-align: center !important;
    /* Force center for subtitle always */
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo-icon {
    display: none;
}

/* Hide small logo in hero for minimalist */
.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-block;
    margin-top: 1.5rem;
}

/* Experience Bar */
.experience-bar {
    background: white;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.experience-bar h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    /* Standardized Title Header */
}

/* Sections */
.generic-section {
    padding: 5rem 0;
}

.about-section {
    padding-top: 1.5rem;
    /* Gap below experience bar to match Classic */
}


.section-number {
    font-size: 4rem;
    color: #e0e0e0;
    font-weight: 800;
    line-height: 1;
    margin-bottom: -1rem;
    position: relative;
    z-index: -1;
}

.about-section .grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "quienes mision"
        "quienes vision";
    gap: 3rem;
    align-items: stretch;
    /* Stretch to fill height */
}

.about-section .text-block:nth-child(1) {
    grid-area: quienes;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.about-section .text-block:nth-child(2) {
    grid-area: mision;
}

.about-section .text-block:nth-child(3) {
    grid-area: vision;
}

.about-section .text-block {
    position: relative;
    background: transparent;
    /* Ensure unboxed */
    box-shadow: none;
    padding: 0;
}

.about-section p {
    color: #000000;
    /* Black Text */
    text-align: justify;
    /* Default for desktop */
}


.about-section h3 {
    font-family: var(--font-heading);
    background: var(--primary-color);
    /* Brand Blue */
    color: white;
    padding: 12px 24px;
    border-radius: 9999px;
    /* Pill shape */
    display: block;
    width: 100%;
    /* Ensure it spans the container like the screenshot */
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    /* Adjusted slightly for the pill look */
}

/* Services - Brocheur Hybrid Layout */
#servicios {
    margin-top: 2rem;
    padding-top: 2rem;
}

.services-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr 1fr;
}

/* 1. Clientes Card -> TRANSFORM into the "Container with 4 icons" look */
.service-card:nth-child(1) {
    grid-column: 1 / -1;
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    text-align: center;
    box-shadow: none;
}

.service-card:nth-child(1) h3 {
    /* Uses the new capsule style we already added globally for .service-card h3 if we scope it right, 
       but currently it's scoped to .about-section h3. We need to apply capsule to these too. */
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 9999px;
    display: block;
    width: 100%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

/* Hide big icon for clients card */
.service-card:nth-child(1) .card-icon {
    display: none;
}

.service-card:nth-child(1) ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.service-card:nth-child(1) li {
    background: white;
    padding: 2rem 1rem;
    border-radius: 8px;
    font-weight: 700;
    color: #1e293b;
    font-size: 0.9rem;
    /* Standardized small text */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.service-card:nth-child(1) li:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Pseudo-element Icons */
.service-card:nth-child(1) li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 2rem;
    color: #143365;
    /* Deep Navy */
    margin-bottom: 1rem;
}

.service-card:nth-child(1) li:nth-child(1)::before {
    content: "\f1ad";
}

/* Building */
.service-card:nth-child(1) li:nth-child(2)::before {
    content: "\f0d1";
}

/* Truck */
.service-card:nth-child(1) li:nth-child(3)::before {
    content: "\f722";
}

/* Tractor */
.service-card:nth-child(1) li:nth-child(4)::before {
    content: "\f0ad";
}

/* Wrench */
.service-card:nth-child(1) li:nth-child(5)::before {
    content: "\f54f";
}

/* Shop */

/* 5th item (Comercios) - Centered below */
.service-card:nth-child(1) li:nth-child(5) {
    grid-column: 1 / -1;
    width: 60%;
    margin: 0 auto;
    background: #e0f2fe;
    /* Light Blue */
}


/* 2 & 3: Capacidad & Infra */
.service-card:nth-child(2),
.service-card:nth-child(3) {
    background: transparent;
    box-shadow: none;
    padding: 0;
    border: none;
    text-align: left;
}

/* Capsule Headers for 2 & 3 */
.service-card:nth-child(2) h3,
.service-card:nth-child(3) h3 {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 9999px;
    display: block;
    width: 100%;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.service-card:nth-child(2) .card-icon,
.service-card:nth-child(3) .card-icon {
    display: none;
}

.service-card:nth-child(2) p,
.service-card:nth-child(3) p {
    color: #000000;
    /* Black Text */
    font-size: 1rem;
    /* Standardized Body Text */
    line-height: 1.8;
    text-align: justify;
}


/* 4. Logistica -> Blue Card */
.service-card:nth-child(4) {
    grid-column: 1 / -1;
    background: #143365;
    /* Deep Navy */
    color: white;
    padding: 3rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-top: 2rem;
    text-align: left;
    box-shadow: 0 10px 25px -5px rgba(20, 51, 101, 0.3);
}

.service-card:nth-child(4) h3 {
    /* Reset capsule style for this specific internal header? Or keep it? 
       In screenshot, "LOGISTICA Y COBERTURA" is white text, no capsule background, just plain text. */
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin: 0 0 1rem 0;
    font-size: 1.8rem;
    width: auto;
    display: block;
    color: white;
    text-align: left;
}

.service-card:nth-child(4) .card-icon {
    color: white;
    font-size: 2.5rem;
    margin: 0;
    background: rgba(255, 255, 255, 0.1);
    width: 100px;
    height: 100px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.logistics-content p {
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.highlight-box {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    border-left: 4px solid var(--accent-color);
}

/* Footer */
.main-footer {
    background: #0b111a;
    color: #8b9bb4;
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
}

.footer-logo {
    display: none !important;
    filter: brightness(0) invert(1);
    width: 150px;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    color: var(--accent-color);
    margin-top: 5px;
}

.footer-bottom {
    background: #05080c;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
}

/* --- GLOBAL TEXT --- */
p {
    text-align: justify;
}

/* --- HEADER BUTTON --- */
.nav-btn-highlight {
    background: #ffe600;
    /* ML Yellow */
    color: #2d3277 !important;
    /* ML Blue */
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 800 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.nav-btn-highlight:hover {
    background: #fff159;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* --- BRANDS --- */
.brands-section h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- CONTACT COLORS OVERRIDE (Forced Blue) --- */
.contact-info-col h3,
.contact-form-col h3 {
    border-bottom-color: var(--primary-color);
    /* Blue underline */
}

.contact-item i {
    color: var(--primary-color);
    /* Blue icons */
}

.btn-primary {
    background: var(--primary-color);
    /* Blue button */
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 52, 120, 0.1);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {

    /* Center all titles on mobile */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .about-section h3,
    .service-card h3,
    .experience-bar h2 {
        text-align: center !important;
    }

    .contact-info-col h3,
    .contact-form-col h3 {
        text-align: center;
        display: inline-block;
        /* Keep underline effect working nicely */
        width: auto;
    }

    .nav-links {
        display: none;
        /* Mobile Menu Hidden by default */
    }

    .nav-links.active {
        display: flex;
        /* Show when toggled */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .about-section .grid-layout {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Overrides for New Styles */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .experience-bar h2 {
        font-size: 1.8rem;
        /* Smaller Title for Mobile */
    }

    .about-section h3,
    .service-card h3 {
        font-size: 1rem;
        /* Smaller Capsules */
        padding: 10px 16px;
    }

    .service-card:nth-child(1) ul {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns for icons */
    }

    .service-card:nth-child(1) li:nth-child(5) {
        width: 100%;
        /* Full width for the last item */
    }

    .service-card:nth-child(4) {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 1.5rem;
    }

    .service-card:nth-child(4) h3 {
        text-align: center;
    }

    /* Fix Brand Logos too small on mobile */
    .brands-track img {
        height: 80px;
        /* Increased from 40px base style */
    }

    /* Refine Text Alignment for Mobile */
    p {
        text-align: center;
        /* Center align for mobile as requested (Option 3) */
    }

    .hero-content p {
        text-align: center;
        /* Keep hero subtitle centered */
    }

    /* Keep generic section text centered on mobile */
    .about-section p,
    .service-card p,
    .contact-wrapper p,
    .service-card:nth-child(2) p,
    .service-card:nth-child(3) p {
        text-align: center;
    }

    /* Center Quote in About if desired, or keep left */
    .quote-border {
        text-align: center;
    }

}

/* --- E-SHOP BUTTON --- */
.eshop-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    gap: 2rem;
    /* Space between buttons */
    flex-wrap: wrap;
}

.eshop-btn {
    font-family: var(--font-heading);
    background: #ffe600;
    /* Mercado Libre Yellow for highlight */
    color: #2d3277;
    /* Mercado Libre Blue */
    padding: 16px 32px;
    border-radius: 9999px;
    /* Capsule */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 230, 0, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    border: 2px solid white;
    /* Make it pop */
}

.eshop-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 230, 0, 0.6);
    background: #fff159;
}

/* --- LANDSCAPE MOBILE FIX --- */
@media (max-height: 500px) and (orientation: landscape),
(max-width: 1024px) {

    /* Ensure centering persists on horizontal phones and tablets */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .about-section h3,
    .service-card h3,
    .experience-bar h2 {
        text-align: center !important;
    }
}