/* ==========================================================================
   CSS VARIABLES & RESET
   ========================================================================== */
:root {
    /* Colors */
    --brand-primary: #e62020;
    --brand-secondary: #0d1e34;
    --brand-dark: #07101c;
    --brand-light: #f4f6f8;
    --text-main: #334155;
    --text-light: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;

    /* Typography */
    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body: 'Barlow', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --section-pad: 80px 0;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button, input, select, textarea { font-family: inherit; }
.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-pad { padding: var(--section-pad); }

/* Utility Classes */
.bg-light { background-color: var(--brand-light); }
.bg-dark { background-color: var(--brand-secondary); }
.text-white { color: var(--white) !important; }
.text-light { color: #94a3b8 !important; }
.center { text-align: center; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 2px solid transparent;
}
.btn-primary {
    background-color: var(--brand-primary);
    color: var(--white);
}
.btn-primary:hover {
    background-color: #c91b1b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    border-color: var(--white);
    color: var(--white);
}
.btn-outline:hover {
    background-color: var(--white);
    color: var(--brand-secondary);
}

/* Section Titles */
.section-title {
    margin-bottom: 48px;
    max-width: 700px;
}
.section-title.center {
    margin-left: auto;
    margin-right: auto;
}
.eyebrow {
    display: inline-block;
    color: var(--brand-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.eyebrow-light { color: #f87171; }
h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--brand-secondary);
    line-height: 1.1;
    margin-bottom: 16px;
    text-transform: uppercase;
}
.subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.top-bar {
    background-color: var(--brand-light);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    padding: 6px 0;
}
.tb-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}
.tb-item { display: flex; align-items: center; gap: 6px; color: var(--text-light); }
.tb-item svg { color: var(--brand-primary); }
.tb-item a:hover { color: var(--brand-primary); }
.tb-sep { color: #cbd5e1; }

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}
.nav-logo img { height: 45px; border-radius: 4px; }
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    font-weight: 500;
    color: var(--brand-secondary);
}
.nav-links a:not(.btn):hover { color: var(--brand-primary); }
.burger { display: none; cursor: pointer; color: var(--brand-secondary); }

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    padding-top: 180px; /* Accounts for fixed header */
    padding-bottom: 100px;
    background-color: var(--brand-secondary);
    background-image: radial-gradient(circle at top right, #1a365d 0%, var(--brand-secondary) 70%);
    color: var(--white);
    min-height: 85vh;
    display: flex;
    align-items: center;
}
.hero-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 2;
}
.hero-content h1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1;
    margin: 16px 0 24px;
    text-transform: uppercase;
}
.hero-content p {
    font-size: 1.25rem;
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 500px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    pointer-events: none;
}

/* ==========================================================================
   POR QUÉ ELEGIRNOS
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.feature-card {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}
.f-icon {
    width: 56px; height: 56px;
    background: #fee2e2;
    color: var(--brand-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 24px;
}
.feature-card h3 {
    font-size: 1.25rem;
    color: var(--brand-secondary);
    margin-bottom: 12px;
}
.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==========================================================================
   NOSOTROS
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.about-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: var(--radius-md);
}
.ac-icon {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--brand-primary);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 16px;
}
.about-card h3 {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 16px;
    border-bottom: 2px solid var(--brand-primary);
    padding-bottom: 8px;
    display: inline-block;
}
.about-card p {
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}
.sc-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 4px solid var(--brand-primary);
}
.sc-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.service-card:hover .sc-image img {
    transform: scale(1.05);
}
.sc-content {
    padding: 32px;
    flex-grow: 1;
}
.sc-content h3 {
    font-size: 1.25rem;
    color: var(--brand-secondary);
    margin-bottom: 16px;
    text-transform: uppercase;
    font-family: var(--font-heading);
}
.sc-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    text-align: justify;
}

/* ==========================================================================
   ACCESORIOS
   ========================================================================== */
.acc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.acc-text p { font-size: 1.1rem; color: var(--text-main); }
.acc-image img {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   CLIENTES (MARQUEE)
   ========================================================================== */
.clientes { background: var(--white); }
.marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    padding: 20px 0;
}
.marquee::before, .marquee::after {
    content: '';
    position: absolute; top: 0; width: 150px; height: 100%; z-index: 2;
}
.marquee::before {
    left: 0; background: linear-gradient(to right, white, transparent);
}
.marquee::after {
    right: 0; background: linear-gradient(to left, white, transparent);
}
.marquee-content {
    display: inline-flex;
    align-items: center;
    gap: 60px;
    animation: scroll 35s linear infinite;
}
.marquee-content img {
    height: 60px;
    width: auto;
    object-fit: contain;
    /* FULL COLOR - No grayscale */
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 64px;
}
.contact-channels {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.c-box {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 20px;
}
.c-icon {
    width: 48px; height: 48px;
    background: var(--brand-light);
    color: var(--brand-primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.c-details strong { display: block; color: var(--brand-secondary); margin-bottom: 4px; }
.c-details a { display: block; color: var(--text-main); font-size: 0.95rem; }
.c-details a:hover { color: var(--brand-primary); }

.contact-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.fg { margin-bottom: 24px; }
.form-row .fg { margin-bottom: 0; }
label { display: block; font-weight: 500; margin-bottom: 8px; color: var(--brand-secondary); }
input, select, textarea {
    width: 100%; padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--brand-light);
    transition: var(--transition);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand-primary); background: var(--white);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: #040a12;
    color: var(--text-light);
    padding-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}
.f-logo { height: 50px; margin-bottom: 20px; border-radius: 4px; }
.footer-grid h4 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}
.f-links { display: flex; flex-direction: column; gap: 12px; }
.f-links a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.f-counter {
    background: rgba(255,255,255,0.05);
    padding: 6px 12px;
    border-radius: 20px;
}
.f-counter strong { color: var(--brand-primary); }

/* ==========================================================================
   WHATSAPP FAB
   ========================================================================== */
.wsp-fab {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 60px; height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.38);
    z-index: 1000;
}
.wsp-fab svg { width: 32px; height: 32px; fill: white; }
.wsp-fab:hover { transform: scale(1.1); }

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE-FIRST APPROACH IS HANDLED BY MAX-WIDTH QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-wrap, .acc-layout, .contact-layout { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 140px; text-align: center; }
    .hero-content p { margin: 0 auto 40px; }
    .hero-actions { justify-content: center; }
    .about-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .top-bar { display: none; }
    .nav-links { display: none; }
    .burger { display: block; }
    .services-grid { grid-template-columns: 1fr; }
    .about-grid, .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 768px) {
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px 0;
        box-shadow: var(--shadow-md);
        border-top: 1px solid var(--border);
    }
}

/* ==========================================================================
   FORM FEEDBACK (TOAST/ALERT)
   ========================================================================== */
.form-msg {
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
    text-align: center;
}
.form-msg.success {
    display: block;
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.form-msg.error {
    display: block;
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* ==========================================================================
   HERO SLIDER ANIMATION
   ========================================================================== */
.hero-image-wrapper.slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
.hero-image-wrapper.slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeSlide 20s infinite;
}

/* 4 images, each gets 25% of the total 20s time = 5s each */
.hero-image-wrapper.slider .s1 { animation-delay: 0s; }
.hero-image-wrapper.slider .s2 { animation-delay: 5s; }
.hero-image-wrapper.slider .s3 { animation-delay: 10s; }
.hero-image-wrapper.slider .s4 { animation-delay: 15s; }

@keyframes fadeSlide {
    0%   { opacity: 0; transform: scale(1.05); }
    5%   { opacity: 1; transform: scale(1); }
    25%  { opacity: 1; transform: scale(1); }
    30%  { opacity: 0; transform: scale(0.95); }
    100% { opacity: 0; transform: scale(0.95); }
}
/* Phosphor Icons Sizing */
.c-icon i { font-size: 24px; }
.f-icon i { font-size: 28px; }
.wsp-fab i { font-size: 32px; color: white; }
.tb-item i { font-size: 16px; margin-right: 4px; }
