/* =============================================================
   public/css/app.css  —  7H Protection v2  (Light Mode)
   ============================================================= */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    /* Brand palette (tal como se especificó) */
    --primary:        #16213F;
    --primary-light:  #22345f;
    --primary-dark:   #0e1628;
    --dark:           #0B0F1A;
    --white:          #FFFFFF;
    --gray:           #9CA3AF;

    /* Derivados para modo claro */
    --navy-50:        #EEF1F8;    /* Tinte muy claro de navy */
    --navy-100:       #D6DCF0;
    --navy-200:       #B0BDE3;
    --navy-600:       #1E2E55;
    --navy-800:       #111E3A;

    /* Fondos */
    --bg:             #FFFFFF;
    --bg-alt:         #F4F6FB;    /* Casi blanco con tinte frío */
    --bg-subtle:      #EAEEF8;
    --bg-navy:        var(--primary);   /* Secciones oscuras */

    /* Texto */
    --text:           #16213F;
    --text-mid:       #3B4E72;
    --text-muted:     #6B7B9A;
    --text-light:     #9CAAC4;
    --text-on-dark:   #FFFFFF;

    /* Acento — azul medio derivado del navy */
    --accent:         #2563EB;
    --accent-light:   #EFF6FF;

    /* Borde */
    --border:         rgba(22,33,63,.10);
    --border-mid:     rgba(22,33,63,.18);
    --border-dark:    rgba(22,33,63,.30);

    /* Sombras */
    --shadow-xs:      0 1px 4px rgba(22,33,63,.07);
    --shadow-sm:      0 4px 14px rgba(22,33,63,.09);
    --shadow-md:      0 12px 36px rgba(22,33,63,.12);
    --shadow-lg:      0 24px 64px rgba(22,33,63,.16);
    --shadow-xl:      0 40px 100px rgba(22,33,63,.20);

    /* Tipografía */
    --font-display: 'Syne', sans-serif;
    --font-body:    'DM Sans', sans-serif;

    /* Layout */
    --container:   1240px;
    --section-py:  110px;
    --radius-sm:   6px;
    --radius-md:   14px;
    --radius-lg:   24px;
    --radius-xl:   36px;

    /* Transición */
    --ease:        cubic-bezier(.4,0,.2,1);
    --tr:          .28s var(--ease);
    --tr-slow:     .55s var(--ease);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, textarea, select { font-family: var(--font-body); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Container ──────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Section ────────────────────────────────────────────────── */
.section { padding: var(--section-py) 0; position: relative; }
.section-alt { background: var(--bg-alt); }
.section-navy { background: var(--primary); }
.section-dark { background: var(--dark); }

/* ── Section Labels ─────────────────────────────────────────── */
.label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 18px;
}

.label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--primary);
    display: block;
    flex-shrink: 0;
}

.label-light { color: rgba(255,255,255,.6); }
.label-light::before { background: rgba(255,255,255,.4); }

/* ── Headings ───────────────────────────────────────────────── */
.h1, .h2, .h3 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.08;
}

.h1 { font-size: clamp(2.8rem, 6vw, 5.5rem); }
.h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
.h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.mark-primary { color: var(--primary); }
.mark-accent  { color: var(--accent); }
.mark-light   { color: rgba(255,255,255,.55); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 14px 30px;
    font-size: .875rem;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: 100px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--tr), box-shadow var(--tr), background var(--tr), color var(--tr), border-color var(--tr);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: .01em;
}

.btn-navy {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.btn-navy:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(22,33,63,.25);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--border-dark);
}
.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    border-color: var(--white);
}
.btn-white:hover {
    background: var(--navy-50);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.35);
}
.btn-outline-white:hover {
    background: rgba(255,255,255,.12);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-lg { padding: 17px 38px; font-size: .95rem; }
.btn-sm { padding: 10px 20px; font-size: .8rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.badge-navy { background: var(--navy-50); color: var(--primary); }
.badge-white { background: rgba(255,255,255,.12); color: var(--white); border: 1px solid rgba(255,255,255,.2); }

/* ── Loader ──────────────────────────────────────────────────── */
.loader {
    position: fixed;
    inset: 0;
    background: var(--primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.loader.out { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-logo {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -.04em;
    animation: loaderPulse 1.2s ease infinite;
}
.loader-logo em { font-style: normal; color: rgba(255,255,255,.3); }

.loader-line {
    width: 80px;
    height: 2px;
    background: rgba(255,255,255,.15);
    border-radius: 1px;
    overflow: hidden;
    margin: 18px auto 0;
}
.loader-fill {
    height: 100%;
    background: var(--white);
    border-radius: 1px;
    animation: loaderFill 1.5s var(--ease) forwards;
}

@keyframes loaderPulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .6; }
}
@keyframes loaderFill {
    from { width: 0; }
    to   { width: 100%; }
}

/* ── WhatsApp float ──────────────────────────────────────────── */
.wa-float {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 900;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 6px 24px rgba(37,211,102,.4);
    transition: transform var(--tr), box-shadow var(--tr);
    text-decoration: none;
}
.wa-float:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 10px 36px rgba(37,211,102,.55);
}
.wa-float-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    background: var(--primary);
    color: var(--white);
    font-size: .72rem;
    font-weight: 600;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--tr);
}
.wa-float:hover .wa-float-tooltip { opacity: 1; }

/* ── Scroll top ──────────────────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 32px;
    z-index: 900;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--white);
    border: 1px solid var(--border-mid);
    color: var(--primary);
    font-size: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity var(--tr), visibility var(--tr), transform var(--tr), background var(--tr);
    box-shadow: var(--shadow-sm);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--primary); color: var(--white); }

/* ── Reveal ──────────────────────────────────────────────────── */
/* .rv { opacity: 0; transition: opacity .75s var(--ease), transform .75s var(--ease); } */
.rv-up   { transform: translateY(48px); }
.rv-left { transform: translateX(-48px); }
.rv-right{ transform: translateX(48px); }
.rv-scale{ transform: scale(.94); }
.rv.in   { opacity: 1; transform: none; }

/* ── Responsive util ─────────────────────────────────────────── */
@media (max-width: 768px) {
    :root { --section-py: 72px; }
    .container { padding: 0 20px; }
    .btn-lg { padding: 15px 28px; font-size: .875rem; }
    .wa-float { bottom: 20px; right: 20px; }
    .scroll-top { right: 20px; bottom: 80px; }
}


/* =============================================================
   FIX GLOBAL — EVITAR DESBORDE HORIZONTAL EN MÓVIL
   ============================================================= */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    position: relative;
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.container,
.navbar-inner,
.footer-grid,
.footer-bottom-inner,
.hero-inner {
    width: 100%;
    max-width: var(--container);
}

/* Evita que textos largos rompan el ancho */
h1, h2, h3, h4, h5, h6,
p, a, span, li, div {
    overflow-wrap: break-word;
}

/* Evita que grids/flex hijos fuercen ancho */
* {
    min-width: 0;
}

@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .btn {
        white-space: normal;
        text-align: center;
    }
}