/* =========================================
   1. VARIABLES DE COLOR PREMIUM
   ========================================= */
:root {
    --primary-green: #2E5C31;
    --primary-green-dark: #1e3d20;
    --concrete-gray: #5C6368;
    --concrete-dark: #3a3f42;
    --accent-orange: #E67E22;
    --accent-hover: #cf6f1a;
    --light-bg: #F8F9FA;
    --dark-text: #2d3436;
    --white: #FFFFFF;
}

/* =========================================
   2. RESETEO Y BASE
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
html { scroll-behavior: smooth; }
body { color: var(--dark-text); background-color: var(--white); line-height: 1.7; overflow-x: hidden; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* =========================================
   3. NAVEGACIÓN Y LOGO
   ========================================= */
.nav-logo-img { max-height: 55px; width: auto; display: block; }
.nav-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-text { font-size: 1.5rem; font-weight: 800; color: var(--concrete-dark); letter-spacing: -0.5px; }
.brand-highlight { color: var(--primary-green); }

.navbar { background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 4px 20px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 1000; transition: all 0.3s ease; }
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }
.nav-links { display: flex; align-items: center; }
.nav-links a { text-decoration: none; color: var(--concrete-gray); font-weight: 600; margin-left: 30px; transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active-nav { color: var(--primary-green); }
.menu-toggle { display: none; font-size: 1.8rem; background: none; border: none; cursor: pointer; color: var(--concrete-dark); }

/* =========================================
   4. BOTONES
   ========================================= */
.btn { display: inline-block; padding: 14px 28px; text-decoration: none; border-radius: 8px; font-weight: 600; letter-spacing: 0.5px; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 7px 14px rgba(0,0,0,0.15); }
.btn-primary { background-color: var(--primary-green); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-green-dark); }
.btn-accent { background-color: var(--accent-orange); color: var(--white); font-size: 1.1rem; }
.btn-accent:hover { background-color: var(--accent-hover); }
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: var(--white) !important; }

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero { position: relative; background-image: url('../assets/images/hero-bg.jpg'); background-color: var(--concrete-gray); background-size: cover; background-position: center; height: 85vh; display: flex; align-items: center; text-align: center; }
.hero-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(135deg, rgba(46,92,49,0.85) 0%, rgba(58,63,66,0.7) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; color: var(--white); }
.hero-slogan { font-size: 1.5rem; font-weight: 600; color: var(--accent-orange); margin-bottom: 15px; letter-spacing: 2px; text-transform: uppercase; }
.hero-content h1 { font-size: 4.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.hero-content p { font-size: 1.25rem; margin-bottom: 30px; max-width: 750px; margin-left: auto; margin-right: auto; opacity: 0.95; }
.established-badge { display: inline-block; background-color: rgba(255, 255, 255, 0.2); padding: 10px 20px; border-radius: 50px; font-weight: 600; font-size: 1rem; margin-top: 30px; border: 1px solid rgba(255, 255, 255, 0.4); letter-spacing: 0.5px; }

/* =========================================
   6. TRUST BADGES & TESTIMONIALS
   ========================================= */
.trust-badges { background-color: var(--primary-green-dark); color: var(--white); padding: 25px 0; }
.trust-badges-grid { display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; text-align: center; }
.badge-item { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 600; font-size: 1.1rem; }
.badge-item span { font-size: 1.5rem; color: var(--accent-orange); }

.testimonials { padding: 100px 0; background-color: var(--white); }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; margin-top: 50px; }
.testimonial-card { background-color: var(--light-bg); padding: 40px 30px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); transition: transform 0.3s ease; }
.testimonial-card:hover { transform: translateY(-5px); }
.stars { color: #f39c12; font-size: 1.4rem; margin-bottom: 15px; letter-spacing: 2px; }
.testimonial-text { font-style: italic; color: var(--concrete-gray); font-size: 1.05rem; margin-bottom: 20px; }
.client-name { font-weight: 800; color: var(--concrete-dark); font-size: 1.1rem; }
.client-service { font-size: 0.9rem; color: var(--primary-green); font-weight: 600; }

/* =========================================
   7. GRID DE SERVICIOS
   ========================================= */
.services-overview { padding: 100px 0; background-color: var(--light-bg); }
.section-title { text-align: center; font-size: 2.8rem; color: var(--primary-green-dark); margin-bottom: 60px; font-weight: 800; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 40px; }
.service-link { text-decoration: none; color: inherit; display: block; }
.service-card { background-color: var(--white); padding: 40px 30px; border-radius: 12px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); border-bottom: 4px solid transparent; height: 100%; }
.service-card:hover { transform: translateY(-15px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-bottom: 4px solid var(--accent-orange); }
.service-card .icon { font-size: 3.5rem; margin-bottom: 20px; transition: transform 0.3s ease; }
.service-card:hover .icon { transform: scale(1.1); }
.service-card h3 { color: var(--concrete-dark); margin-bottom: 15px; font-size: 1.3rem; }
.service-card p { color: var(--concrete-gray); font-size: 1rem; margin-bottom: 15px;}
.learn-more { color: var(--accent-orange); font-weight: 600; }

/* =========================================
   8. PÁGINAS INDIVIDUALES & SIDEBAR
   ========================================= */
.service-header { background-color: var(--primary-green-dark); color: var(--white); padding: 60px 0; text-align: center; }
.service-header h1 { font-size: 3rem; margin-bottom: 10px; }
.service-detail-container { display: grid; grid-template-columns: 2.5fr 1fr; gap: 50px; padding: 60px 0; }
.service-main-content h2 { color: var(--primary-green); margin-bottom: 20px; font-size: 2rem; }
.service-main-content p, .service-main-content ul { font-size: 1.1rem; color: var(--concrete-dark); margin-bottom: 20px; }
.service-main-content ul { padding-left: 20px; }
.service-main-content li { margin-bottom: 10px; }
.service-image { width: 100%; height: 400px; object-fit: cover; border-radius: 12px; margin-bottom: 30px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.service-sidebar { background-color: var(--light-bg); padding: 30px; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); height: fit-content; position: sticky; top: 100px; }
.service-sidebar h3 { margin-bottom: 20px; color: var(--concrete-dark); border-bottom: 2px solid var(--primary-green); padding-bottom: 10px; }

/* Sidebar Menú Apple Style */
.sidebar-menu { list-style: none; padding: 0; margin-bottom: 30px; }
.sidebar-menu li { margin-bottom: 6px; }
.sidebar-menu li a { display: block; padding: 14px 18px; color: var(--concrete-gray); text-decoration: none; border-radius: 10px; font-weight: 500; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.sidebar-menu li a::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%) scaleY(0); width: 4px; height: 60%; background-color: var(--primary-green); border-radius: 4px; transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.sidebar-menu li a:hover { background-color: var(--white); color: var(--primary-green-dark); transform: translateX(6px); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.sidebar-menu li a:hover::before { transform: translateY(-50%) scaleY(1); }
.sidebar-menu li a.active { background-color: var(--white); color: var(--primary-green); font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.sidebar-menu li a.active::before { transform: translateY(-50%) scaleY(1); }

.sidebar-cta { text-align: center; background-color: var(--concrete-dark); color: var(--white); padding: 20px; border-radius: 8px; }
.sidebar-cta p { margin-bottom: 15px; font-size: 0.95rem; }

/* =========================================
   9. GALERÍA Y LIGHTBOX
   ========================================= */
.gallery-section { padding: 80px 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 30px; }
.gallery-item { overflow: hidden; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 300px; object-fit: cover; display: block; cursor: pointer; transition: transform 0.5s ease; }
.gallery-item img:hover { transform: scale(1.08); }

.lightbox { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); backdrop-filter: blur(5px); }
.lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 90vh; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: zoom-in 0.3s ease; }
@keyframes zoom-in { from { transform: translate(-50%, -50%) scale(0.8); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.close-lightbox { position: absolute; top: 20px; right: 40px; color: #f1f1f1; font-size: 50px; font-weight: bold; cursor: pointer; transition: color 0.3s ease; }
.close-lightbox:hover { color: var(--accent-orange); }

/* =========================================
   10. FORMULARIO CONTACTO
   ========================================= */
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 80px 0; }
.contact-info p { margin-bottom: 20px; font-size: 1.1rem; }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form select, .contact-form textarea { padding: 15px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; font-family: 'Inter', sans-serif;}

/* =========================================
   11. BOTÓN WHATSAPP
   ========================================= */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center; font-size: 30px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); z-index: 9999; display: flex; justify-content: center; align-items: center; text-decoration: none; transition: all 0.3s ease; animation: pulse-green 2s infinite; }
.whatsapp-float:hover { transform: scale(1.1); background-color: #1ebe57; }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.whatsapp-float svg { width: 35px; height: 35px; fill: white; }

/* =========================================
   12. ANIMACIONES JS (SCROLL)
   ========================================= */
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; } .delay-4 { transition-delay: 0.4s; }

/* =========================================
   13. RESPONSIVO Y FOOTER
   ========================================= */
.footer { background-color: var(--concrete-dark); color: rgba(255,255,255,0.7); text-align: center; padding: 30px 0; }

@media (max-width: 900px) {
    .service-detail-container { grid-template-columns: 1fr; }
    .service-sidebar { position: static; }
    .contact-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .brand-text { font-size: 1.2rem; }
    .menu-toggle { display: block; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--white); box-shadow: 0 10px 20px rgba(0,0,0,0.1); padding: 20px 0; }
    .nav-links.active { display: flex; }
    .nav-links a { margin: 15px 0; text-align: center; }
    .hero-content h1 { font-size: 2.8rem; }
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .whatsapp-float svg { width: 28px; height: 28px; }
}
/* =========================================
   14. UX UPGRADES - PÁGINAS DE SERVICIO
   ========================================= */
/* Encabezado Inmersivo (Parallax) */
.service-hero-dynamic {
    position: relative;
    padding: 140px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax de profundidad */
    color: var(--white);
    margin-bottom: 60px;
}
.service-hero-dynamic::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Gradiente oscuro para que las letras blancas resalten perfecto */
    background: linear-gradient(135deg, rgba(30,61,32,0.85) 0%, rgba(58,63,66,0.8) 100%);
}
.service-hero-dynamic .container {
    position: relative;
    z-index: 2;
}
.service-hero-dynamic h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    letter-spacing: -1px;
    font-weight: 800;
}
.service-hero-dynamic p {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Tarjetas de Sub-servicios (Reemplaza las listas aburridas) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 40px 0;
}
.feature-box {
    background-color: var(--white);
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--primary-green);
}
.feature-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-left-color: var(--accent-orange);
}
.feature-box h4 {
    color: var(--concrete-dark);
    margin-bottom: 10px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.feature-box p {
    font-size: 0.95rem;
    color: var(--concrete-gray);
    margin: 0;
    line-height: 1.6;
}

/* Caja de Valor (Para capturar clientes rápidamente) */
.value-prop-box {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    color: var(--white);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin: 50px 0;
    box-shadow: 0 15px 30px rgba(46,92,49,0.25);
    position: relative;
    overflow: hidden;
}
.value-prop-box::after {
    content: '🧱';
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 150px;
    opacity: 0.05;
    transform: rotate(-15deg);
}
.value-prop-box h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}
.value-prop-box p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: rgba(255,255,255,0.9);
    position: relative;
    z-index: 2;
}
/* =========================================
   CORRECCIÓN: CAJA DE LLAMADA A LA ACCIÓN (SIDEBAR)
   ========================================= */
.sidebar-cta h3 {
    color: var(--white) !important; /* Fuerza el texto a ser blanco */
    border-bottom: none !important; /* Quita la línea verde sobrante */
    padding-bottom: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
}
/* =========================================
   15. BOTÓN DIVIDIDO INTERACTIVO (SPLIT BTN)
   ========================================= */
.split-btn-container {
    position: relative;
    width: 100%;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* El estado normal (Botón Naranja) */
.split-btn-default {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--accent-orange);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s ease;
    z-index: 2;
}

/* Lo que pasa con el botón original al pasar el mouse */
.split-btn-container:hover .split-btn-default {
    opacity: 0;
    transform: scale(0.8); /* Se hace chiquito y desaparece */
    pointer-events: none;
}

/* El contenedor de las dos mitades */
.split-btn-options {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    z-index: 1;
}

/* Estilo general para cada mitad */
.btn-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Mitad Izquierda (Llamada) */
.call-half {
    background-color: #25d366; /* Verde tipo WhatsApp/Llamada */
    transform: translateX(-100%); /* Escondido a la izquierda */
    border-right: 1px solid rgba(255,255,255,0.2);
}

/* Mitad Derecha (Formulario) */
.form-half {
    background-color: var(--primary-green-dark);
    transform: translateX(100%); /* Escondido a la derecha */
}

/* Animación de entrada al pasar el mouse */
.split-btn-container:hover .call-half {
    transform: translateX(0);
}
.split-btn-container:hover .form-half {
    transform: translateX(0);
}

/* Efecto al pasar el mouse sobre una de las mitades */
.btn-half:hover {
    filter: brightness(1.15); /* Se hace un poco más brillante */
}