/* ==========================================================================
   ARBOLCHECK — Sistema de diseño moderno
   Se apoya en la grilla/utilidades de Bootstrap (container, row, col) pero
   con una capa visual propia: tarjetas, botones, navbar y hero modernos.
   ========================================================================== */

:root {
    --green-dark: #0c4a3a;
    --green: #159a5c;
    --green-light: #c8efe0;
    --accent: #22c55e;
    --ink: #0f2a22;
    --muted: #556b63;
    --bg-soft: #f1f8f5;
    --line: #dceae4;
    --white: #ffffff;
    --primary-gradient: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
    --primary-gradient-hover: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 32px;
    --radius-full: 999px;
    --shadow-sm: 0 4px 16px rgba(12, 74, 58, 0.08);
    --shadow-md: 0 14px 40px rgba(12, 74, 58, 0.16);
    --shadow-lg: 0 24px 60px rgba(12, 74, 58, 0.22);
    --font-body: 'Poppins', sans-serif;
    --font-display: 'Poppins', 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: 800;
    color: var(--ink);
    letter-spacing: -0.01em;
}

p { color: var(--muted); line-height: 1.7; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green); }

.eyebrow {
    display: inline-block;
    color: var(--green);
    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
   ========================================================================== */
.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);
    border-color: transparent !important;
}
.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(--green-dark) !important;
    border: 2px solid var(--green-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(--green-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; }

/* Overrides de utilidades de Bootstrap (color primario) */
.text-primary { color: var(--green-dark) !important; }
.bg-primary { background: var(--primary-gradient) !important; }
.border-primary { border-color: var(--green-dark) !important; }
.dropdown-item:hover, .dropdown-item:active { background: var(--bg-soft) !important; color: var(--green-dark) !important; }
.form-control:focus, .form-select:focus { border-color: var(--green); box-shadow: 0 0 0 0.2rem rgba(21,154,92,0.25); }

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

.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);
    color: var(--green-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; }

@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); margin-top: 0.6rem; }
}

/* ==========================================================================
   Botones flotantes
   ========================================================================== */
.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,58,.92) 10%, rgba(12,74,58,.55) 55%, rgba(12,74,58,.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; }

.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::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(120deg, rgba(12,74,58,.88), rgba(12,74,58,.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
   ========================================================================== */
.card-modern {
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    border: 1px solid rgba(12,74,58,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: 220px; 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.1rem; 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; -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; }

.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,58,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); color: var(--green-dark); }

.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: 2.6rem; font-weight: 800; 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; }

.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,58,.85), transparent);
    color: #fff; padding: 1.2rem 1rem 0.8rem; font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
}

.form-modern .form-control, .form-modern .form-select { border-radius: var(--radius-sm); border: 1px solid var(--line); padding: 0.9rem 1rem; }
.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,58,0.06); }

.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-body { padding: 1.3rem 1.5rem; }

.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); }

.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,58,0.06); }
.cert-card img { max-width: 150px; margin-bottom: 1rem; }

.scale-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; height: 100%; }
.scale-box .pill { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .94rem; font-weight: 600; color: var(--ink); }
.scale-box .pill:last-child { border: none; }

/* Chips de tecnología y gráfico de dona (sección "Gestión basada en datos") */
.tech-chip {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius-sm); padding: 0.9rem 1rem; color: #fff; font-weight: 600; font-size: 0.92rem;
    height: 100%; display: flex; align-items: center;
}
.chart-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); padding: 2rem; }
.donut-chart { width: 210px; height: 210px; border-radius: 50%; position: relative; }
.donut-chart .donut-hole { position: absolute; inset: 32px; background: var(--green-dark); border-radius: 50%; }
.legend-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; }
.chart-box .row.g-2 .col-6 { color: rgba(255,255,255,.85); font-size: 0.88rem; font-weight: 600; text-align: left; }


/* ==========================================================================
   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(--green-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-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;
}

/* ==========================================================================
   Utilidades
   ========================================================================== */
.rounded-modern { border-radius: var(--radius) !important; }
.shadow-modern { box-shadow: var(--shadow-md) !important; }
.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; }
}
