/* ── Variables ─────────────────────────────────────────────────── */
:root {
    --primary:       #2f6df6;
    --primary-dark:  #214ed3;
    --secondary:     #22b8e6;
    --tertiary:      #7bd47d;
    --accent:        #ff2a43;
    --bg:            #f5f9ff;
    --bg-soft:       #edf5ff;
    --surface:       rgba(255,255,255,0.88);
    --surface-strong:#ffffff;
    --text:          #16324f;
    --muted:         #5b738d;
    --border:        rgba(61,135,246,0.15);
    --success:       #168256;
    --danger:        #c13b38;
    --shadow:        0 18px 50px rgba(17,39,74,0.10);
    --shadow-soft:   0 12px 28px rgba(28,57,105,0.08);
    --radius:        24px;
}

/* ── Reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    margin: 0;
    font-family: 'DM Sans', Inter, ui-sans-serif, system-ui, -apple-system,
                 BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left,  rgba(47,109,246,0.11), transparent 28%),
        radial-gradient(circle at top right, rgba(34,184,230,0.14), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    background-attachment: fixed;
    line-height: 1.65;
    overflow-x: hidden;
}
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }

/* ── Layout ────────────────────────────────────────────────────── */
.container {
    width: min(1140px, calc(100% - 32px));
    margin: 0 auto;
}

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(248,251,255,0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(47,109,246,0.08);
}
.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    flex-wrap: wrap;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    flex: 1;
    min-width: 0;
}
.brand img {
    width: 46px; height: 46px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(47,109,246,0.18);
    flex-shrink: 0;
}
.brand strong { display: block; font-size: 1rem; letter-spacing: -0.02em; }
.brand span   { display: block; color: var(--muted); font-size: 0.84rem;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Nav ───────────────────────────────────────────────────────── */
.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.site-nav a {
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    transition: 0.22s ease;
    white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: rgba(47,109,246,0.08); }
.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    box-shadow: 0 10px 20px rgba(47,109,246,0.20);
}
.nav-admin {
    font-size: .8rem; color: var(--muted) !important;
    border: 1px solid var(--border); border-radius: 8px; padding: 4px 10px !important;
}

/* ── Hamburger ─────────────────────────────────────────────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none; border: none;
    cursor: pointer; padding: 8px;
    border-radius: 8px;
    transition: background .15s;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}
.nav-toggle:hover { background: rgba(47,109,246,.08); }
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--text); border-radius: 2px;
    transition: transform .22s ease, opacity .22s ease;
    transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ──────────────────────────────────────────────────────── */
.hero, .page-hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before, .page-hero::before {
    content: ""; position: absolute;
    inset: auto -8% -90px auto; width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(123,212,125,0.28), transparent 62%);
    pointer-events: none;
}
.page-hero.small { padding: 48px 0 28px; }

.hero-grid, .split-grid, .form-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 36px; align-items: center;
}
.form-layout { align-items: stretch; }

/* ── Typography ────────────────────────────────────────────────── */
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 14px; padding: 6px 12px; border-radius: 999px;
    background: rgba(47,109,246,0.09); color: var(--primary);
    font-weight: 800; font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.06em;
}
h1, h2, h3, h4 { margin: 0 0 14px; line-height: 1.1; letter-spacing: -0.03em; }
h1 { font-size: clamp(1.9rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1rem; }
.lead { font-size: 1.04rem; max-width: 60ch; }
.lead, .page-hero p, .section-heading p, .card p,
.highlight-box p, .site-footer p, li, label, small { color: var(--muted); }

/* ── Buttons ───────────────────────────────────────────────────── */
.hero-actions, .phone-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; min-height: 46px; padding: 11px 18px;
    border-radius: 14px; font-weight: 800; font-size: 0.95rem;
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover     { transform: translateY(-1px); }
.btn-primary   { background: linear-gradient(135deg, var(--primary), var(--secondary));
                 color: white; box-shadow: 0 12px 26px rgba(47,109,246,0.18); }
.btn-secondary { background: rgba(255,255,255,0.75);
                 border-color: rgba(47,109,246,0.12); color: var(--text); }
.btn.full      { width: 100%; }

/* ── Cards ─────────────────────────────────────────────────────── */
.phone-card, .card, .highlight-box {
    position: relative; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.phone-card {
    padding: 28px; text-align: center;
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(237,245,255,0.88));
}
.phone-card::before {
    content: ""; position: absolute; inset: 18px; border-radius: 22px;
    background: radial-gradient(circle at top left, rgba(47,109,246,0.12), transparent 35%),
                radial-gradient(circle at bottom right, rgba(34,184,230,0.16), transparent 42%);
    z-index: 0;
}
.phone-card > * { position: relative; z-index: 1; }
.phone-card img { width: min(200px,55%); margin: 0 auto 20px;
                  border-radius: 24px; box-shadow: 0 20px 38px rgba(34,80,179,0.18); }
.phone-badges span {
    padding: 7px 12px; border-radius: 999px;
    background: rgba(255,255,255,0.86); border: 1px solid rgba(47,109,246,0.10);
    font-weight: 700; font-size: 0.88rem; color: var(--text);
}
.card, .highlight-box { padding: 26px; }
.card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card:hover { transform: translateY(-3px); border-color: rgba(47,109,246,0.18); box-shadow: var(--shadow); }
.card-icon  { font-size: 26px; margin-bottom: 10px; display: block; }
.feature-card h2 { font-size: 1.28rem; margin-bottom: 10px; }
.feature-list    { padding-left: 18px; margin: 0; }
.feature-list li + li { margin-top: 10px; }
.feature-list.compact li + li { margin-top: 8px; }
.info-card { background: linear-gradient(180deg, rgba(47,109,246,0.98), rgba(34,184,230,0.94));
             color: white; box-shadow: 0 20px 42px rgba(47,109,246,0.20); }
.info-card h2, .info-card li, .info-card p { color: white; }
.highlight-box { background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,250,255,0.94)); }

/* ── Sections ──────────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section.alt {
    background: linear-gradient(180deg, rgba(255,255,255,0.28), rgba(233,245,255,0.72));
    border-top: 1px solid rgba(47,109,246,0.05);
    border-bottom: 1px solid rgba(47,109,246,0.05);
}
.section-heading { margin-bottom: 26px; max-width: 760px; }
.cards-2, .cards-3 { display: grid; gap: 20px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer { background: linear-gradient(180deg, #10243d 0%, #0d1c31 100%);
               color: #edf4ff; padding-top: 46px; margin-top: 28px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 26px; }
.site-footer h3, .site-footer h4, .site-footer a { color: #f4f8ff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 8px; }
.footer-copy { padding: 16px 0 26px; margin-top: 16px;
               border-top: 1px solid rgba(255,255,255,0.12); }

/* ── Lang switcher ─────────────────────────────────────────────── */
.lang-switcher { display: inline-flex; gap: 2px; background: var(--bg-soft);
                 border: 1px solid var(--border); border-radius: 999px;
                 padding: 3px; margin-left: 6px; }
.lang-btn { display: inline-block; padding: 4px 9px; border-radius: 999px;
            font-size: 11px; font-weight: 700; color: var(--muted);
            text-decoration: none; transition: background .15s, color .15s; white-space: nowrap; }
.lang-btn:hover  { color: var(--text); background: rgba(47,109,246,.08); }
.lang-btn.active { background: var(--primary); color: #fff; }
.lang-switcher--footer { margin-top: 14px; }
.lang-switcher--footer .lang-btn { font-size: 12px; padding: 5px 10px; }

/* ── Forms ─────────────────────────────────────────────────────── */
.suggestion-form { display: grid; gap: 16px; }
.form-group      { display: grid; gap: 8px; }
label { font-weight: 700; color: var(--text); }
input, textarea, select {
    width: 100%; padding: 13px 14px;
    border: 1px solid rgba(47,109,246,0.14); border-radius: 14px;
    font: inherit; font-size: 16px;   /* evita zoom en iOS */
    background: rgba(255,255,255,0.95); color: var(--text); outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, textarea:focus, select:focus {
    border-color: rgba(47,109,246,0.55); box-shadow: 0 0 0 4px rgba(47,109,246,0.10);
}
textarea { resize: vertical; min-height: 150px; }

/* ── Alerts ────────────────────────────────────────────────────── */
.alert { padding: 12px 14px; border-radius: 14px; margin-bottom: 16px; font-weight: 700; }
.alert.success { background: rgba(22,130,86,0.12); color: var(--success); border: 1px solid rgba(22,130,86,0.22); }
.alert.error   { background: rgba(193,59,56,0.08); color: var(--danger);  border: 1px solid rgba(193,59,56,0.18); }

/* ── Admin dropdown ────────────────────────────────────────────── */
.admin-menu { position: relative; }
.admin-menu-trigger {
    display: flex; align-items: center; gap: 6px; padding: 8px 14px;
    border-radius: 999px; border: 1.5px solid rgba(27,110,243,.3);
    background: rgba(27,110,243,.06); color: var(--primary);
    font-size: .88rem; font-weight: 700; cursor: pointer; font-family: inherit;
    transition: background .18s, border-color .18s; white-space: nowrap;
}
.admin-menu-trigger:hover { background: rgba(27,110,243,.12); border-color: rgba(27,110,243,.5); }
.admin-chevron { font-size: .7rem; transition: transform .2s; display: inline-block; }
.admin-menu.open .admin-chevron { transform: rotate(180deg); }
.admin-dropdown {
    display: none; position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 220px; background: #fff; border: 1px solid var(--border);
    border-radius: 14px; box-shadow: 0 8px 32px rgba(27,110,243,.13);
    padding: 6px; z-index: 200; animation: dropIn .15s ease;
}
@keyframes dropIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:none; } }
.admin-menu.open .admin-dropdown { display: block; }
.admin-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
              border-radius: 10px; color: var(--text); text-decoration: none; transition: background .15s; }
.admin-item:hover { background: rgba(27,110,243,.07); }
.admin-item-icon  { font-size: 18px; flex-shrink: 0; width: 28px; text-align: center; }
.admin-item strong { display: block; font-size: .88rem; font-weight: 700; color: var(--text); }
.admin-item small  { display: block; font-size: .76rem; color: var(--muted); margin-top: 1px; }
.admin-divider     { height: 1px; background: var(--border); margin: 4px 6px; }
.admin-item-logout strong { color: #C00; }
.admin-item-logout:hover  { background: rgba(200,0,0,.06); }

/* ════════════════════════════════════════════════════
   RESPONSIVE — tablet (≤900px)
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none; flex-direction: column; align-items: flex-start;
        width: 100%; padding: 10px 0 14px; gap: 2px;
        border-top: 1px solid var(--border); margin-top: 8px; order: 3;
    }
    .site-nav.open { display: flex; }
    .site-nav a    { width: 100%; padding: 11px 14px; border-radius: 10px; }
    .site-nav .nav-cta { text-align: center; }
    .lang-switcher { margin-left: 0; margin-top: 10px; align-self: center; }
    .hero-grid, .split-grid, .form-layout,
    .cards-2, .cards-3, .footer-grid { grid-template-columns: 1fr; }
    .hero, .page-hero { padding: 52px 0 38px; }
}

/* ════════════════════════════════════════════════════
   RESPONSIVE — móvil (≤480px)
   ════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    .container { width: calc(100% - 24px); }
    .hero, .page-hero { padding: 36px 0 28px; }
    .section          { padding: 40px 0; }
    h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
    h2 { font-size: clamp(1.3rem, 6vw, 1.9rem); }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .phone-badges { justify-content: center; }
    .card, .highlight-box, .phone-card { padding: 18px; border-radius: 18px; }
    .brand span { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .lang-switcher--footer { display: flex; flex-wrap: wrap; }
    .admin-dropdown { right: auto; left: 0; min-width: 200px; }
}
