
:root {
    --primary-dark: #0c4a01;
    --primary-light: #a3c42d;
    --primary-gradient: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%);
    --primary-gradient-hover: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    --ink: #16210f;
    --muted: #5c6b53;
    --bg-soft: #f5f8f1;
    --bg-soft-2: #eef4e6;
    --white: #ffffff;
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 32px;
    --radius-full: 999px;
    --shadow-sm: 0 4px 16px rgba(12, 74, 1, 0.08);
    --shadow-md: 0 14px 40px rgba(12, 74, 1, 0.16);
    --shadow-lg: 0 24px 60px rgba(12, 74, 1, 0.22);
    --font-body: 'Open Sans', sans-serif;
    --font-display: 'Rubik', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

p { color: var(--muted); line-height: 1.7; }

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary-light); }

.eyebrow {
    display: inline-block;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

section, .section { padding: 5rem 0; }
.section-soft { background: var(--bg-soft); }

/* ==========================================================================
   Botones — todos redondeados
   ========================================================================== */
.btn {
    border-radius: var(--radius-full) !important;
    font-family: var(--font-display);
    font-weight: 600;
    padding: 0.85rem 2rem;
    transition: all 0.25s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-gradient) !important;
    color: #fff !important;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-gradient-hover) !important;
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent !important;
    color: var(--primary-dark) !important;
    border: 2px solid var(--primary-dark) !important;
    padding: 0.75rem 1.9rem;
}
.btn-outline-primary:hover {
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    color: #fff !important;
    transform: translateY(-3px);
}

.btn-light-pill {
    background: #fff !important;
    color: var(--primary-dark) !important;
    box-shadow: var(--shadow-sm);
}
.btn-light-pill:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

.btn-sm { padding: 0.5rem 1.25rem; font-size: 0.85rem; }

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
    background: var(--primary-gradient);
    color: #fff;
    font-size: 0.9rem;
}
.topbar a { color: #fff; }
.topbar a:hover { color: #e9ffcf; }

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar-modern {
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 0.6rem 0;
}
.navbar-modern .navbar-brand img {
    max-height: 54px;
    width: auto;
}
.navbar-modern .navbar-nav {
    align-items: center;
    gap: 0.25rem;
}
.navbar-modern .nav-link {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ink) !important;
    padding: 0.6rem 1rem !important;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}
.navbar-modern .nav-link:hover,
.navbar-modern .nav-link.active {
    background: var(--bg-soft-2);
    color: var(--primary-dark) !important;
}
.navbar-modern .dropdown-menu {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.6rem;
    margin-top: 0.5rem;
}
.navbar-modern .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-weight: 500;
}
.navbar-modern .dropdown-item:hover,
.navbar-modern .dropdown-item:active {
    background: var(--bg-soft-2) !important;
    color: var(--primary-dark) !important;
}
.navbar-modern .btn { white-space: nowrap; }

@media (max-width: 991.98px) {
    .navbar-modern .navbar-nav { align-items: flex-start; gap: 0.4rem; padding: 1rem 0; }
    .navbar-modern .navbar-collapse { border-top: 1px solid var(--bg-soft-2); margin-top: 0.6rem; }
}

/* ==========================================================================
   Botones flotantes (llamada / correo / WhatsApp) — redondos
   ========================================================================== */
.floating-actions {
    position: fixed;
    right: 20px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1000;
}
.floating-actions a {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 1.4rem;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
}
.floating-actions a:hover { transform: scale(1.1); box-shadow: var(--shadow-lg); }
.fab-call { background: var(--primary-gradient); }
.fab-mail { background: var(--ink); }
.fab-whatsapp { background: #25D366; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(12,74,1,.92) 10%, rgba(12,74,1,.55) 55%, rgba(12,74,1,.25) 100%);
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; color: #fff; }
.hero-content .badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-full);
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.hero-content h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.6rem); line-height: 1.1; }
.hero-content p.lead { color: rgba(255,255,255,0.85); font-size: 1.2rem; max-width: 560px; }

.hero-slider { position: relative; }
.hero-slide { display: none; }
.hero-slide.active { display: block; }
.hero-dots { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,0.45); padding: 0; }
.hero-dots button.active { background: #fff; width: 26px; border-radius: var(--radius-full); transition: width .3s; }

/* Sub-hero para páginas internas (servicios, ciudades, quiénes somos, contacto) */
.page-hero {
    position: relative;
    min-height: 46vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.page-hero .hero-bg { }
.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(12,74,1,.88), rgba(12,74,1,.5));
    z-index: 1;
}
.page-hero-content { position: relative; z-index: 2; color: #fff; }
.page-hero-content h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.page-hero-content p { color: rgba(255,255,255,0.85); }

/* ==========================================================================
   Tarjetas (servicios, ciudades, certificaciones, valores)
   ========================================================================== */
.card-modern {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(12,74,1,0.06);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.card-modern:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.card-modern img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.card-modern .card-modern-body {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card-modern .card-modern-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card-modern .card-modern-body p {
    font-size: 0.95rem;
    margin-bottom: 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-modern .card-modern-body .btn { margin-top: auto; align-self: flex-start; }

.card-link {
    display: flex;
    height: 100%;
    color: inherit;
}
.card-link:hover { color: inherit; }

/* Tarjeta de ícono (por qué elegirnos, valores) */
.icon-card {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    border: 1px solid rgba(12,74,1,0.06);
    transition: all .3s ease;
}
.icon-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.icon-circle {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
}
.icon-circle.light { background: var(--bg-soft-2); color: var(--primary-dark); }

/* Estadísticas */
.stat-card {
    background: var(--primary-gradient);
    color: #fff;
    border-radius: var(--radius);
    padding: 2.4rem 1.5rem;
    text-align: center;
    height: 100%;
}
.stat-card .stat-number { font-size: 3rem; font-weight: 700; line-height: 1; margin-bottom: 0.5rem; }
.stat-card .stat-icon { font-size: 1.6rem; margin-bottom: 0.8rem; opacity: 0.9; }
.stat-card span.label { font-weight: 500; opacity: 0.95; }

/* Ciudades pill grid */
.city-pill {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius);
    padding: 1.3rem 1.2rem;
    color: #fff !important;
    transition: all .25s ease;
    height: 100%;
}
.city-pill:hover { background: rgba(255,255,255,0.18); transform: translateY(-4px); }
.city-pill i { font-size: 1.3rem; }
.city-pill span { color: #fff; font-family: var(--font-display); font-weight: 600; }

/* Galería de trabajos */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item .gallery-caption {
    position: absolute; inset: auto 0 0 0;
    background: linear-gradient(to top, rgba(12,74,1,.85), transparent);
    color: #fff; padding: 1.2rem 1rem 0.8rem; font-family: var(--font-display); font-weight: 600;
}

/* Video */
.video-block { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.video-block video, .video-block img { width: 100%; display: block; }
.video-play-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 84px; height: 84px; border-radius: 50%;
    background: rgba(255,255,255,0.9); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
    box-shadow: var(--shadow-md); border: none; transition: all .25s ease;
}
.video-play-btn:hover { transform: translate(-50%, -50%) scale(1.08); background: #fff; }

/* Formulario */
.form-modern .form-control,
.form-modern .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #dfe6d6;
    padding: 0.9rem 1rem;
}
.form-modern .form-control:focus,
.form-modern .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(163,196,45,0.25);
}
.form-modern label { color: var(--muted); }
.form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(12,74,1,0.06);
}

/* Acordeón FAQ */
.accordion-modern .accordion-item {
    border: none;
    border-radius: var(--radius) !important;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}
.accordion-modern .accordion-button {
    font-family: var(--font-display);
    font-weight: 600;
    padding: 1.2rem 1.5rem;
    background: #fff;
    color: var(--ink);
}
.accordion-modern .accordion-button:not(.collapsed) {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: none;
}
.accordion-modern .accordion-button:focus { box-shadow: none; }
.accordion-modern .accordion-button::after { filter: none; }
.accordion-modern .accordion-body { padding: 1.3rem 1.5rem; }

/* CTA banda oscura */
.cta-band {
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
    color: #fff;
    text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); }

/* Certificaciones */
.cert-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    height: 100%;
    border: 1px solid rgba(12,74,1,0.06);
}
.cert-card img { max-width: 130px; margin-bottom: 1rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer-modern {
    background: var(--ink);
    color: rgba(255,255,255,0.75);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 4rem 0 0;
    margin-top: 5rem;
}
.footer-modern h5 { color: #fff; font-size: 1.05rem; margin-bottom: 1.2rem; }
.footer-modern a { color: rgba(255,255,255,0.75); }
.footer-modern a:hover { color: var(--primary-light); }
.footer-modern .footer-social a {
    width: 42px; height: 42px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 0.5rem; transition: all .2s ease;
}
.footer-modern .footer-social a:hover { background: var(--primary-gradient); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Back to top
   ========================================================================== */
.back-to-top-modern {
    position: fixed;
    right: 20px;
    bottom: 200px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 999;
}

/* ==========================================================================
   Spinner de carga
   ========================================================================== */
#spinner .spinner-border { color: var(--primary-dark) !important; }

/* ==========================================================================
   Utilidades
   ========================================================================== */
.rounded-modern { border-radius: var(--radius) !important; }
.shadow-modern { box-shadow: var(--shadow-md) !important; }
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal-visible { opacity: 1; transform: none; }

@media (max-width: 767.98px) {
    section, .section { padding: 3.2rem 0; }
    .floating-actions { right: 14px; bottom: 16px; }
    .floating-actions a { width: 48px; height: 48px; font-size: 1.2rem; }
}