/* =====================================================
   style.css — DevLopez.es
   Diseño: Editorial profesional, limpio, usabilidad primero
   Fuentes: Fraunces (display) + DM Sans (cuerpo)
   Paleta: Azul profundo + Naranja cálido + Fondo crema
   ===================================================== */

/* ── Variables ── */
:root {
    --navy:    #1a2744;
    --navy-2:  #243356;
    --orange:  #695AA6;
    --orange-l:#234051;
    --cream:   #f8f6f1;
    --white:   #ffffff;
    --gray-1:  #f0eee8;
    --gray-2:  #ddd9d0;
    --gray-3:  #9b968c;
    --text:    #1c1b18;
    --text-2:  #4a4740;
    --purple:  #b5a9e4;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;

    --radius:  8px;
    --radius-l:16px;
    --shadow:  0 2px 16px rgba(26,39,68,.10);
    --shadow-l:0 8px 40px rgba(26,39,68,.15);

    --max-w:   1160px;
    --section: 5rem;
    
    /* Añadir para mejor control de espaciado en móvil */
    --section-mobile: 2rem;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
    border-radius: 3px;
}
ul { list-style: none; }

/* Asegurar que todas las imágenes sean responsivas */
.blog-post__thumb,
.post-card__img,
.post-thumbnail,
.entry-thumbnail,
.video-thumbnail {
    max-width: 100%;
    height: auto;
}

/* Correcciones para iOS Safari */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Evitar salto de barra de direcciones en iOS */
body {
    overflow-x: hidden;
}

/* Mejorar renderizado de fuentes en iOS */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Correcciones para iOS Safari */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Mejorar renderizado de fuentes en iOS */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Contenedor ── */
.container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 2rem);
}

/* ── Tipografía ── */
h1,h2,h3,h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p  { max-width: 68ch; }

.display { font-style: italic; font-weight: 300; }
.label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--orange);
}

/* ── Botones ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    text-decoration: none;
    line-height: 1;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--primary {
    background: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}
.btn--primary:hover { background: var(--orange-l); border-color: var(--orange-l); }
.btn--outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.btn--outline:hover { background: var(--navy); color: var(--white); }
.btn--outline-w {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.6);
}
.btn--outline-w:hover { background: var(--white); color: var(--navy); }
.btn--sm { padding: .5rem 1.1rem; font-size: .875rem; }
.btn--lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
}

/* ── Barra de idiomas ── */
.lang-bar {
    background: var(--navy);
    padding: .4rem 0;
    font-size: .8rem;
}
.lang-bar__inner {
    display: flex;
    align-items: center;
    gap: .75rem;
    justify-content: flex-end;
}
.lang-bar__nav {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .5rem;
}
.lang-bar__link {
    color: rgba(255,255,255,.65);
    padding: .15rem .4rem;
    border-radius: 4px;
    transition: color .15s, background .15s;
}
.lang-bar__link:hover { color: var(--white); }
.lang-bar__link--active {
    color: var(--white);
    background: rgba(255,255,255,.15);
    font-weight: 600;
}
.lang-bar__label { color: rgba(255,255,255,.5); }

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--cream);
    border-bottom: 1px solid var(--gray-2);
    transition: box-shadow .25s;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

/* Cuando el menú está abierto, evitar scroll en body */
body.menu-open {
    overflow: hidden;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}
.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-block: .85rem;
}
.site-header__logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: auto;
}
.logo-mark  { color: var(--navy); }
.logo-accent { color: var(--orange); }

/* Navegación */
.main-nav {
    display: flex;
    z-index: 1000; /* Actualizado de 999 a 1000 */
}
.main-nav__list {
    display: flex;
    align-items: center;
    gap: .25rem;
    flex-wrap: wrap;
}
.main-nav__link {
    display: block;
    padding: .45rem .7rem;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--radius);
    transition: color .15s, background .15s;
    white-space: nowrap;
}
.main-nav__link:hover,
.main-nav__link.active {
    color: var(--navy);
    background: var(--gray-1);
}

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
    display: none;
    position: absolute;
    left: 0;
    background: var(--white);
    border: 1px solid var(--gray-2);
    border-radius: var(--radius);
    box-shadow: var(--shadow-l);
    min-width: 180px;
    max-width: 250px;
    width: 100%;
    padding: .5rem;
    z-index: 200;
}
.has-dropdown:hover .dropdown,
.has-dropdown.dropdown-open .dropdown { display: block; }
.dropdown li a {
    display: block;
    padding: .5rem .75rem;
    font-size: .9rem;
    color: var(--text-2);
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.dropdown li a:hover { background: var(--gray-1); color: var(--navy); }

/* Arrow en enlace de dropdown */
.arrow { font-size: .65rem; vertical-align: middle; opacity: .7; }

/* Nav toggle (hamburguesa) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem;
    width: 36px;
    height: 36px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Secciones ── */
.section { padding-block: var(--section); }
.section--alt { background: var(--gray-1); }
.section--dark {
    background: var(--navy);
    color: var(--white);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark p { color: var(--white); }
.section__header { text-align: center; margin-bottom: 3rem; }
.section__header p { margin-inline: auto; margin-top: .75rem; color: var(--text-2); font-size: 1.05rem; }

/* ── Hero ── */
.hero {
    background: var(--navy);
    color: var(--white);
    padding-block: clamp(3rem, 8vw, 6rem);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(232,93,38,.18) 0%, transparent 60%);
    pointer-events: none;
}
.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}
.hero__content { max-width: clamp(300px, 90vw, 640px); }
.hero__label { margin-bottom: 1rem; }
.hero h1 {
    color: var(--white);
    margin-bottom: 1.25rem;
}
.hero__sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 2rem;
    max-width: 56ch;
}
.hero__deco {
    width: clamp(220px, 18vw, 320px);
    flex-shrink: 0;
    opacity: .3;
}

/* ── Cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.card {
    background: var(--white);
    border-radius: var(--radius-l);
    padding: 2rem;
    border: 1px solid var(--gray-2);
    transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-l); transform: translateY(-3px); }
.card__icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    display: block;
    line-height: 1;
}
.card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: .5rem;
}
.card__desc { color: var(--text-2); font-size: .95rem; margin-bottom: 1.25rem; }
.card__link {
    color: var(--orange);
    font-weight: 600;
    font-size: .9rem;
}
.card__link:hover { text-decoration: underline; }

/* Card destacada */
.card--featured {
    border-color: var(--orange);
    background: linear-gradient(135deg, #fff8f5 0%, var(--white) 100%);
}

/* ── Bloque de características (3 columnas icono) ── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
}
.feature-item { text-align: center; padding: 1.5rem 1rem; }
.feature-item__icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}
.feature-item__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
}
.feature-item__desc { color: var(--text-2); font-size: .95rem; }

/* ── Testimonios ── */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.testimonial {
    background: var(--white);
    border-radius: var(--radius-l);
    padding: 2rem;
    border-left: 4px solid var(--orange);
    box-shadow: var(--shadow);
}
.testimonial__text {
    font-style: italic;
    color: var(--text-2);
    font-size: 1rem;
    margin-bottom: 1rem;
}
.testimonial__text::before { content: '"'; font-size: 1.5em; color: var(--orange); line-height: 0; vertical-align: -.3em; margin-right: .15em; }
.testimonial__author { font-weight: 600; font-size: .9rem; color: var(--navy); }
.testimonial__role   { font-size: .8rem; color: var(--gray-3); }

/* ── Estadísticas ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.stat-item__number {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--orange);
    line-height: 1;
    display: block;
}
.stat-item__label { font-size: .9rem; color: rgba(255,255,255,.75); margin-top: .25rem; }

/* ── CTA banner ── */
.cta-banner {
    text-align: center;
    padding-block: clamp(3rem, 6vw, 5rem);
}
.cta-banner h2 { margin-bottom: 1rem; }
.cta-banner p  { margin-inline: auto; margin-bottom: 2rem; font-size: 1.1rem; color: var(--text-2); }
.section--dark .cta-banner p { color: rgba(255,255,255,.8); }

/* ── Formularios ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}
.form-grid .form-group--full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label {
    font-size: .875rem;
    font-weight: 600;
    color: var(--navy);
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: .7rem 1rem;
    border: 1.5px solid var(--gray-2);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--text);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,93,38,.15);
    outline: none;
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-error { color: #c0392b; font-size: .85rem; }
.form-success {
    background: #e8f5e9;
    border: 1px solid #81c784;
    color: #2e7d32;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
}
.form-info {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    color: #0d47a1;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    font-size: .9rem;
}

/* ── Herramientas interactivas ── */
.tool-wrapper {
    max-width: clamp(300px, 90vw, 760px);
    margin-inline: auto;
}
.tool-section {
    background: var(--white);
    border: 1px solid var(--gray-2);
    border-radius: var(--radius-l);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.tool-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--orange);
    display: inline-block;
}
.radio-group { display: flex; flex-direction: column; gap: .6rem; }
.radio-item {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .6rem .8rem;
    border: 1.5px solid var(--gray-2);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.radio-item:hover { background: var(--gray-1); border-color: var(--gray-3); }
.radio-item input[type="radio"] { margin-top: .2rem; flex-shrink: 0; accent-color: var(--orange); }
.radio-item input[type="radio"]:checked + span { font-weight: 600; color: var(--navy); }
.radio-item input[type="radio"]:checked { accent-color: var(--orange); }
label.radio-item { cursor: pointer; }

/* Resultados de herramientas */
.result-box {
    background: linear-gradient(135deg, #fffbf5 0%, var(--white) 100%);
    border: 2px solid var(--orange);
    border-radius: var(--radius-l);
    padding: 2.5rem;
    margin-top: 2rem;
}
.result-box__level {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--orange);
    margin-bottom: .5rem;
}
.result-box h3 { margin-bottom: 1rem; }
.result-box ul { padding-left: 0; }
.result-box ul li {
    padding: .5rem 0 .5rem 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--gray-2);
    font-size: .95rem;
    color: var(--text-2);
}
.result-box ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--orange);
    font-weight: 700;
}

/* Barra de progreso */
.progress-bar {
    height: 8px;
    background: var(--gray-2);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .25rem;
}
.progress-bar__fill {
    height: 100%;
    background: var(--orange);
    border-radius: 99px;
    transition: width .6s ease;
}
.score-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .75rem;
    font-size: .9rem;
}
.score-row__label { min-width: clamp(100px, 30vw, 140px); color: var(--text-2); }
.score-row__bar   { flex: 1; }
.score-row__val   { min-width: clamp(20px, 10vw, 30px); text-align: right; font-weight: 600; color: var(--navy); }

/* ── Blog / Proyectos ── */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
}
.post-card {
    background: var(--white);
    border-radius: var(--radius-l);
    overflow: hidden;
    border: 1px solid var(--gray-2);
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-l); transform: translateY(-3px); }
.post-card__img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.post-card__body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card__cat  { font-size: .75rem; font-weight: 600; color: var(--orange); letter-spacing: .05em; text-transform: uppercase; margin-bottom: .5rem; }
.post-card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
    line-height: 1.3;
}
.post-card__excerpt { color: var(--text-2); font-size: .9rem; flex: 1; }
.post-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: .75rem;
    border-top: 1px solid var(--gray-2);
    font-size: .8rem;
    color: var(--gray-3);
}
.post-card__read { color: var(--orange); font-weight: 600; }

/* ── Página interior: hero pequeño ── */
.page-hero {
    background: var(--navy);
    color: var(--white);
    padding-block: clamp(2.5rem, 5vw, 4rem);
}
.page-hero h1 { color: var(--white); margin-bottom: .75rem; }
.page-hero p  { color: rgba(255,255,255,.8); font-size: 1.1rem; max-width: 60ch; }
.breadcrumb {
    font-size: .8rem;
    color: rgba(255,255,255,.5);
    margin-bottom: 1rem;
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: var(--white); }

/* ── Checklist ── */
.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-2);
    margin-bottom: .6rem;
    cursor: pointer;
    transition: background .15s;
}
.checklist-item:hover { background: var(--gray-1); }
.checklist-item input[type="checkbox"] { accent-color: var(--orange); width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; }
.checklist-item__label { font-size: .95rem; color: var(--text-2); }

/* ── About / Sobre mí ── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}
.about-sidebar {
    position: sticky;
    top: 100px;
}
.about-avatar {
    width: 100%;
    border-radius: var(--radius-l);
    /*background: var(--orange);*/
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    margin-bottom: 1.5rem;
}
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}
.skill-tag {
    background: var(--gray-1);
    color: var(--navy);
    border: 1px solid var(--gray-2);
    padding: .3rem .8rem;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 500;
}

/* ── Recursos: lista ── */
.resource-list { display: flex; flex-direction: column; gap: 1.25rem; }
.resource-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.25rem;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-2);
    border-radius: var(--radius-l);
    padding: 1.5rem;
    transition: box-shadow .2s;
}
.resource-item:hover { box-shadow: var(--shadow); }
.resource-item__icon { font-size: 2rem; }
.resource-item__title { font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.05rem; margin-bottom: .25rem; }
.resource-item__desc  { font-size: .9rem; color: var(--text-2); }

/* ── Code blocks ── */
pre {
    background: #1e2a3a;
    color: #e2e8f0;
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    font-size: .87rem;
    line-height: 1.7;
    margin-block: 1.25rem;
}
code {
    background: rgba(26,39,68,.1);
    padding: .15em .4em;
    border-radius: 4px;
    font-size: .88em;
}
pre code { background: none; padding: 0; }

/* ── Footer ── */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,.75);
    padding-block: 4rem 2rem;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.site-footer__logo {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: .75rem;
}
.site-footer__brand p {
    font-size: .9rem;
    color: rgba(255,255,255,.6);
    max-width: 32ch;
    margin-bottom: .5rem;
}
.site-footer__email a {
    color: var(--orange);
    font-weight: 500;
}
.site-footer__email a:hover { text-decoration: underline; }
.site-footer__col h3 {
    font-family: var(--font-body);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    margin-bottom: .75rem;
}
.site-footer__col ul { display: flex; flex-direction: column; gap: .4rem; }
.site-footer__col a {
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    transition: color .15s;
}
.site-footer__col a:hover { color: var(--white); }
.site-footer__bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
    font-size: .82rem;
    color: rgba(255,255,255,.4);
}
.site-footer__legal a {
    color: rgba(255,255,255,.5);
    transition: color .15s;
}
.site-footer__legal a:hover { color: var(--white); }

/* ── Utilidades ── */
.text-center  { text-align: center; }
.text-orange  { color: var(--orange); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.divider { border: none; border-top: 1px solid var(--gray-2); margin-block: 2rem; }
.tag {
    display: inline-block;
    background: var(--gray-1);
    color: var(--navy);
    padding: .25rem .75rem;
    border-radius: 99px;
    font-size: .8rem;
    font-weight: 500;
}
.tag--orange { background: rgba(232,93,38,.12); color: var(--orange); }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Prevenir overflow horizontal en todos los elementos */
* {
    max-width: 100%;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    /* Ajustes para tablets */
    :root { --section: 3.5rem; }
}

@media (max-width: 900px) {
    /* Header */
    .nav-toggle { display: flex; }
    .header-cta { display: none; }
    .main-nav {
        display: none;
        position: fixed;
        inset: 0;
        top: 0;
        background: var(--navy);
        z-index: 999;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6rem 2rem 2rem; /* Espaciado mejorado */
        overflow-y: auto;
    }
    .main-nav--open { display: flex; }
    .main-nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: .25rem;
        width: 100%;
    }
    .main-nav__link {
        font-size: 1.15rem;
        color: rgba(255,255,255,.8);
        padding: .8rem .7rem; /* Área táctil mejorada */
        width: 100%;
        min-height: 48px; /* Mínimo recomendado para toque */
        display: flex;
        align-items: center;
    }
    .main-nav__link:hover,
    .main-nav__link.active { 
        color: var(--white); 
        background: rgba(255,255,255,.08); 
    }
    .dropdown {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: .25rem 0 .25rem 1rem;
        min-width: 0;
        margin-top: .5rem; /* Espacio para evitar toques accidentales */
    }
    .dropdown li a {
        color: rgba(255,255,255,.65);
        font-size: 1rem;
        padding: .5rem .75rem;
    }
    .dropdown li a:hover { 
        color: var(--white); 
        background: transparent; 
    }
    .has-dropdown.dropdown-open .dropdown { display: block; }
    .nav-toggle {
        position: fixed;
        top: 1rem;
        right: 1.5rem;
        z-index: 1000;
    }
    .nav-toggle.is-active span { background: var(--white); }

    /* Layouts */
    .hero__inner { grid-template-columns: 1fr; }
    .hero__deco  { display: none; }
    .about-grid  { grid-template-columns: 1fr; }
    .about-sidebar { position: static; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .form-grid { grid-template-columns: 1fr; }
    .resource-item { grid-template-columns: auto 1fr; }
    .resource-item .btn { grid-column: 2; }
}

@media (max-width: 768px) {
    :root { --section: var(--section-mobile); } /* Usar variable móvil */
    
    /* Ajustes adicionales para móviles pequeños */
    .hero {
        padding-block: clamp(2rem, 8vw, 4rem);
    }
    .hero h1 {
        font-size: clamp(1.8rem, 5vw, 2.8rem);
    }
    .hero__sub {
        font-size: 1rem;
    }
    
    /* Mejorar grids en móvil */
    .features-grid,
    .stats-grid,
    .cards-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ajustar tarjetas */
    .card,
    .testimonial {
        padding: 1.5rem;
    }
}

@media (max-width: 600px) {
    :root { --section: 2rem; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer__bottom { 
        flex-direction: column; 
        text-align: center; 
        gap: 1rem;
    }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    
    /* Mejorar footer en móvil muy pequeño */
    .site-footer__col h3 {
        margin-top: 1.5rem;
        border-top: 1px solid rgba(255,255,255,.1);
        padding-top: 1rem;
    }
    .site-footer__col:first-child h3 {
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }
}

/* ── Print ── */
@media print {
    .site-header, .site-footer, .lang-bar,
    .btn, .nav-toggle { display: none !important; }
    body { font-size: 12pt; }
    a { color: inherit; }
}

/* Contenedor del tag */
.info-hover {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* El Tooltip */
.info-hover::after {
    /* AQUÍ ESTÁ LA MAGIA: Captura el texto del atributo data-info */
    content: attr(data-info); 
    
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
    
    /* Estilo Moderno: Glassmorphism suave */
    background: rgba(15, 23, 42, 0.9); /* Azul muy oscuro */
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: sans-serif;
    white-space: nowrap;
    z-index: 10;
    
    /* Animación */
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

/* Triángulo inferior */
.info-hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.9);
    opacity: 0;
    transition: all 0.2s ease-in-out;
}

/* Activación al pasar el ratón */
.info-hover:hover::after,
.info-hover:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Áreas táctiles mínimas para navegación */
.main-nav__link,
.dropdown li a {
    min-height: 48px; /* Estándar de accesibilidad para toque */
}

/* Mejorar áreas táctiles en formularios */
.form-group input,
.form-group select,
.form-group textarea,
.form-group button {
    min-height: 48px;
    font-size: 1rem; /* Texto legible */
    padding: .75rem 1rem;
}

/* Mejorar espaciado entre elementos de formulario */
.form-group {
    margin-bottom: 1.5rem;
}

/* Mejorar botones para toque */
.btn {
    min-height: 44px;
    padding: .75rem 1.5rem;
}
.btn--lg {
    min-height: 48px;
    padding: 1rem 2rem;
}

/* Mejoras de accesibilidad y enfoque */
/* Enfoque más visible para navegación con teclado */
:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 3px;
    border-radius: 3px;
}

/* Mejorar contraste en textos sobre fondos oscuros */
.section--dark .stat-item__label,
.section--dark .testimonial__role {
    color: rgba(255,255,255,.8); /* Mejorado de .75/.75 a .8 */
}

/* Mejorar contraste en footer */
.site-footer__col a {
    color: rgba(255,255,255,.7);
}
.site-footer__col a:hover {
    color: var(--white);
}

/* Mejorar legibilidad de placeholder en formularios */
::placeholder {
    color: var(--gray-3);
    opacity: 0.7;
}