:root {
    --primary:       #0056b3;
    --primary-dark:  #003d80;
    --primary-darker:#001d4a;
    --secondary:     #28a745;
    --accent:        #17a2b8;
    --text-dark:     #1e293b;
    --text-mid:      #475569;
    --text-light:    #94a3b8;
    --bg-light:      #f8fafc;
    --border:        #e2e8f0;
    --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
    --shadow-md:  0 8px 24px rgba(0,0,0,.10);
    --shadow-lg:  0 20px 40px rgba(0,86,179,.15);
    --radius: 12px;
    --ease: .3s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 8px;
    font-family: inherit; font-size: .95rem; font-weight: 600;
    cursor: pointer; border: 2px solid transparent;
    transition: all var(--ease); white-space: nowrap;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,86,179,.35); }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #218838; transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.25); border-color: #fff; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ── NAVBAR ── */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: transparent;
    transition: background .4s ease, box-shadow .4s ease;
}
.navbar.scrolled { background: #fff; box-shadow: var(--shadow-sm); }

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    height: 70px; display: flex; align-items: center; gap: 1.5rem;
}
.nav-logo {
    font-size: 1.5rem; font-weight: 700; letter-spacing: 2px;
    color: #fff; flex-shrink: 0; transition: color var(--ease);
}
.navbar.scrolled .nav-logo { color: var(--primary); }
.nav-logo img { height: 40px; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: .25rem; margin-left: auto; }
.nav-links a {
    padding: 8px 16px; border-radius: 6px;
    font-size: .9rem; font-weight: 500;
    color: rgba(255,255,255,.9); transition: all var(--ease);
}
.navbar.scrolled .nav-links a { color: var(--text-mid); }
.nav-links a:hover { background: rgba(255,255,255,.15); color: #fff; }
.navbar.scrolled .nav-links a:hover { background: var(--bg-light); color: var(--primary); }

.nav-cta { border-color: rgba(255,255,255,.6); color: #fff; background: rgba(255,255,255,.1); }
.navbar.scrolled .nav-cta { border-color: var(--primary); color: var(--primary); background: transparent; }
.navbar.scrolled .nav-cta:hover { background: var(--primary); color: #fff; }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto;
}
.hamburger span {
    display: block; width: 24px; height: 2px;
    background: #fff; border-radius: 2px; transition: .3s;
}
.navbar.scrolled .hamburger span { background: var(--primary); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: translateX(-10px); }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── HERO ── */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--primary-darker) 100%);
    overflow: hidden; padding: 6rem 1.5rem 5rem;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 1.5px 1.5px, rgba(255,255,255,.07) 1.5px, transparent 0);
    background-size: 40px 40px;
}
.hero-wave {
    position: absolute; bottom: 0; left: 0; right: 0;
    line-height: 0; overflow: hidden;
}
.hero-wave svg { display: block; width: 100%; height: 80px; }

.hero-content {
    position: relative; z-index: 1;
    max-width: 700px; margin: 0 auto; text-align: center; color: #fff;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.9);
    padding: 6px 18px; border-radius: 100px;
    font-size: .82rem; font-weight: 500; letter-spacing: .5px; margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700;
    line-height: 1.2; margin-bottom: 1.25rem; letter-spacing: -.5px;
}
.hero-highlight {
    background: linear-gradient(90deg, #7ec8e3, #c8e6ff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.1rem; color: rgba(255,255,255,.8);
    margin-bottom: 2.5rem; max-width: 560px; margin-left: auto; margin-right: auto;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ── SECTIONS ── */
section { padding: 5rem 1.5rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-tag {
    display: inline-block; color: var(--primary);
    font-size: .8rem; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: .6rem;
}
.section-header h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -.5px;
}
.section-header p { margin-top: .6rem; color: var(--text-mid); max-width: 540px; margin-left: auto; margin-right: auto; }

/* ── SERVICES ── */
#servicios { background: var(--bg-light); }
.services-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem;
}
.service-card {
    background: #fff; border-radius: var(--radius);
    padding: 2rem 1.75rem; box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--border); transition: all var(--ease); cursor: default;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-top-color: var(--primary); }
.service-icon {
    width: 56px; height: 56px; background: #eef4ff; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); margin-bottom: 1.25rem; transition: background var(--ease);
}
.service-card:hover .service-icon { background: var(--primary); color: #fff; }
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: .5rem; }
.service-card p { color: var(--text-mid); font-size: .9rem; }

/* ── STATS ── */
.stats-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 4rem 1.5rem;
}
.stats-grid {
    max-width: 900px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center;
}
.stat-item { color: #fff; }
.stat-number { font-size: 2.4rem; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.stat-label { font-size: .83rem; color: rgba(255,255,255,.72); margin-top: .4rem; }

/* ── CTA SUSCRIPCIÓN ── */
#suscripcion { background: #fff; }
.cta-box { max-width: 600px; margin: 0 auto; text-align: center; }
.cta-icon {
    width: 72px; height: 72px; background: #eef4ff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); margin: 0 auto 1.5rem;
}
.cta-icon svg { width: 34px; height: 34px; }
.cta-box h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: .6rem; }
.cta-box > p { color: var(--text-mid); margin-bottom: 2rem; }
.sub-form { display: flex; gap: .75rem; max-width: 460px; margin: 0 auto; }
.sub-form input {
    flex: 1; padding: 13px 18px; border: 1.5px solid var(--border);
    border-radius: 8px; font-family: inherit; font-size: .95rem; outline: none;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.sub-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,86,179,.12); }
.cta-disclaimer { font-size: .78rem; color: var(--text-light); margin-top: .75rem; }

/* ── CONTACTO ── */
#contacto { background: var(--bg-light); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 3rem; align-items: start; }

.contact-info h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: .4rem; }
.contact-info > p { color: var(--text-mid); font-size: .9rem; margin-bottom: 1.75rem; }
.info-items { display: flex; flex-direction: column; gap: .9rem; }
.info-item {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1rem 1.25rem; background: #fff;
    border-radius: 10px; box-shadow: var(--shadow-sm);
}
.info-item-icon {
    width: 40px; height: 40px; background: #eef4ff; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); flex-shrink: 0;
}
.info-item-icon svg { width: 20px; height: 20px; }
.info-item-text span {
    display: block; font-size: .72rem; color: var(--text-light);
    font-weight: 500; text-transform: uppercase; letter-spacing: .5px;
}
.info-item-text strong { font-size: .9rem; font-weight: 600; }

.contact-form-box { background: #fff; padding: 2.5rem; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .83rem; font-weight: 600; margin-bottom: .35rem; }
.form-group input,
.form-group textarea {
    width: 100%; padding: 12px 16px;
    border: 1.5px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: .95rem; color: var(--text-dark);
    background: var(--bg-light); outline: none;
    transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,86,179,.12); background: #fff;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check {
    display: flex; align-items: flex-start; gap: .75rem;
    cursor: pointer; user-select: none; margin-bottom: 1.5rem;
}
.form-check input[type="checkbox"] {
    width: 17px; height: 17px; accent-color: var(--primary);
    cursor: pointer; flex-shrink: 0; margin-top: 3px;
}
.form-check span { font-size: .83rem; color: var(--text-mid); line-height: 1.5; }
/* ── VALIDACIÓN ── */
.form-group input.is-valid {
    border-color: #28a745;
    background: #f0fff4;
}
.form-group input.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40,167,69,.12);
}
.form-group input.is-error {
    border-color: #dc3545;
    background: #fff5f5;
}
.form-group input.is-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220,53,69,.12);
}
.field-error {
    font-size: .78rem;
    color: #dc3545;
    margin-top: .35rem;
}

.submit-btn {
    width: 100%; padding: 14px; background: var(--primary); color: #fff;
    border: none; border-radius: 8px; font-family: inherit;
    font-size: 1rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all var(--ease);
}
.submit-btn:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,86,179,.3); }
.submit-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; box-shadow: none; }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── HONEYPOT (nunca visible para humanos) ── */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

/* ── MAPA ── */
.map-container {
    margin-top: 3rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}
.map-container iframe {
    display: block;
    width: 100%;
    height: 340px;
    border: 0;
}

/* ── FOOTER ── */
footer { background: #0f1923; color: rgba(255,255,255,.7); padding: 4rem 1.5rem 2rem; }
.footer-grid {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 3rem;
    padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .brand-name { font-size: 1.5rem; font-weight: 700; color: #fff; letter-spacing: 2px; }
.footer-brand p { margin-top: .75rem; font-size: .86rem; line-height: 1.7; max-width: 280px; }
.footer-socials { display: flex; gap: .75rem; margin-top: 1.5rem; }
.social-btn {
    width: 38px; height: 38px; background: rgba(255,255,255,.08);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.65); transition: all var(--ease);
}
.social-btn:hover { background: var(--primary); color: #fff; }
.social-btn svg { width: 17px; height: 17px; }
.footer-col h4 {
    font-size: .8rem; font-weight: 600; color: #fff;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1.2rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: .55rem; }
.footer-col ul a { font-size: .86rem; color: rgba(255,255,255,.6); transition: color var(--ease); }
.footer-col ul a:hover { color: #fff; }
.footer-contact-item { display: flex; align-items: flex-start; gap: .75rem; font-size: .86rem; margin-bottom: .7rem; }
.footer-contact-item svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.footer-bottom {
    max-width: 1200px; margin: 2rem auto 0;
    display: flex; align-items: center; justify-content: space-between;
    font-size: .8rem; flex-wrap: wrap; gap: .5rem;
}

/* ── TOAST ── */
.toast {
    position: fixed; bottom: 2rem; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1e293b; color: #fff;
    padding: 1rem 1.5rem; border-radius: 12px;
    font-size: .9rem; font-weight: 500;
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    z-index: 9999; display: flex; align-items: center; gap: .75rem;
    min-width: 280px; max-width: 90vw;
    transition: transform .4s cubic-bezier(.175,.885,.32,1.275), opacity .4s;
    opacity: 0; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast-icon {
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #dcfce7; color: #16a34a; flex-shrink: 0;
}
.toast-icon svg { width: 17px; height: 17px; }

/* ── WHATSAPP FAB ── */
.whatsapp-fab {
    position: fixed; bottom: 2rem; right: 2rem;
    width: 56px; height: 56px; background: #25d366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; box-shadow: 0 4px 20px rgba(37,211,102,.4);
    z-index: 1000; transition: all var(--ease);
}
.whatsapp-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.55); }
.whatsapp-fab svg { width: 30px; height: 30px; }
.whatsapp-fab::before {
    content: ''; position: absolute; inset: -4px; border-radius: 50%;
    background: rgba(37,211,102,.25);
    animation: pulse-ring 2.5s ease infinite;
}
@keyframes pulse-ring {
    0%   { transform: scale(.9); opacity: .8; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* ── REVEAL ── */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
.reveal-d4 { transition-delay: .4s; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .hamburger { display: flex; }
    .nav-links {
        display: none; position: absolute;
        top: 70px; left: 0; right: 0;
        background: #fff; flex-direction: column;
        padding: 1rem; box-shadow: var(--shadow-md);
    }
    .nav-links.open { display: flex; }
    .nav-links a { color: var(--text-mid) !important; padding: 12px 16px; }
    .nav-links a:hover { background: var(--bg-light) !important; color: var(--primary) !important; }
    .nav-cta { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .sub-form { flex-direction: column; }
    .contact-form-box { padding: 1.5rem; }
}
@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
