/* ICEF – estilos de la web (mismo aspecto que la versión Avada) */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --purple: #221638;
  --purple-dark: #0c0813;
  --lilac: #e9e3f4;
  --lilac-soft: #eae8f0;
  --gold: #c78001;
  --gold-light: #e4b435;
  --heading: #212934;
  --text: #606060;
  --white: #fff;
  --border: #dbd1ed;
  --site-width: 1200px;
  --gutter: 30px;
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: Nunito, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); }
strong { font-weight: 800; color: var(--heading); }

h1, h2, h3, h4, h5, h6 { color: var(--heading); margin: 0 0 .6em; }
h1 { font-size: 46px; font-weight: 800; line-height: 1.07; }
h2 { font-size: 40px; font-weight: 800; line-height: 1.1; }
h3 { font-size: 32px; font-weight: 400; line-height: 1.3; }
p { margin: 0 0 1.2em; }

.container { width: 100%; max-width: calc(var(--site-width) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 960px; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--purple); padding: 8px 16px; border-radius: 6px; font-weight: 800; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
main:focus { outline: none; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; }

/* ---------- Cabecera ---------- */
.site-header { background: var(--purple); position: relative; z-index: 20; }
.is-home .site-header { position: absolute; top: 0; left: 0; right: 0; background: linear-gradient(rgba(34, 22, 56, .55), rgba(34, 22, 56, 0)); }
.header-inner { display: flex; align-items: center; gap: 30px; min-height: 120px; padding: 15px 30px; }
.logo { flex: 0 0 auto; }
.logo img { width: 85px; height: 85px; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 34px; }
.main-nav a {
  position: relative; display: block; padding: 14px 0;
  color: var(--white); text-decoration: none; font-size: 15px; font-weight: 800; line-height: 1.2;
}
.main-nav a::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: var(--gold-light); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--gold-light); }
.main-nav a:hover::before, .main-nav a[aria-current="page"]::before { transform: scaleX(1); }
.main-nav .lang-switch a { font-size: 13px; font-weight: 700; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 6px; }
.main-nav .lang-switch a::before { display: none; }
.main-nav .lang-switch a:hover { border-color: var(--gold-light); }

.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--white); font-size: 28px; cursor: pointer; padding: 8px; line-height: 1; }
.menu-toggle-close { display: none; }

/* ---------- Título de página interior ---------- */
.page-title { background: var(--purple); border-top: 1px solid rgba(255, 255, 255, .08); padding: 70px 0; text-align: center; }
.page-title h1 { color: var(--white); margin: 0; font-size: 46px; }

/* ---------- Secciones ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 60px 0 20px; }
.bg-lilac { background: var(--lilac-soft); }
.lead { font-size: 22px; line-height: 1.4; color: var(--heading); }
.eyebrow { color: var(--gold); font-size: 22px; font-weight: 300; line-height: 1.2; margin-bottom: .8em; }
.display { font-size: 46px; font-weight: 800; line-height: 1.07; }

/* Portada: imagen principal */
.hero {
  background: var(--purple) url("../img/cantidad-de-alumnos-formados.webp") center / cover no-repeat;
  padding: 150px 0 77px;
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; min-height: 435px; }
.hero-badge img { width: 100%; max-width: 435px; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .35)); }
.hero-text { background: rgba(34, 22, 56, .55); padding: 32px 36px; border-radius: var(--radius); backdrop-filter: blur(2px); }
.hero-text h1 { color: var(--white); font-size: 56px; margin-bottom: .4em; }
.hero-sub { color: var(--white); font-size: 26px; line-height: 1.3; margin: 0; }

/* Comprobación de certificado */
.lookup { background: var(--lilac); padding: 2rem 0; }
.lookup-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 12px 40px; }
.lookup-title { font-size: 22px; font-weight: 900; line-height: 1.2; margin: 0; }
.lookup-form { display: flex; }
.lookup-form input {
  flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 15px;
  font: inherit; color: #38245d; background: var(--white);
  border: 1px solid var(--border); border-right: 0; border-radius: 6px 0 0 6px;
}
.lookup-form input[aria-invalid="true"] { border-color: #b3261e; }
.lookup-form button {
  flex: 0 0 auto; height: 44px; padding: 0 28px;
  font: inherit; font-size: 14px; font-weight: 800; color: var(--white);
  background: var(--purple); border: 0; border-radius: 0 6px 6px 0; cursor: pointer;
}
.lookup-form button:hover { background: #38245d; }
.lookup-form button[disabled] { opacity: .7; cursor: wait; }
.lookup-result {
  grid-column: 1 / -1; margin-top: 4px; padding: 16px 32px; border-radius: 10px;
  font-weight: 700; color: #000; background: #dcf0e1; border: 1px solid #c3e6cb;
}
.lookup-result.is-no { background: #fbe9e7; border-color: #f2c4bd; }
.lookup-result.is-error { background: #fff4e0; border-color: #f3d9a4; }

/* Contador */
.counter { padding: 4vh 0 2vh; text-align: center; }
.counter-text { font-size: 32px; line-height: 1.3; color: var(--heading); margin: 0; }

/* Texto + imagen */
.split-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split-reverse .split-media { order: -1; }
.split-media img { width: 100%; border-radius: var(--radius) var(--radius) 80px var(--radius); object-fit: cover; }
.split-text .lead { margin-bottom: 0; }

/* Ventajas */
.advantages { padding-bottom: 40px; }
.advantages h2 { margin-bottom: .3em; }
.advantages .lead { max-width: 760px; margin: 0 auto 50px; }
.adv-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 50px 40px; }
.adv-item { text-align: center; }
.adv-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--purple); color: var(--gold-light); font-size: 42px; margin-bottom: 18px;
}
.adv-item h3 { font-size: 28px; font-weight: 800; line-height: 1.1; margin-bottom: .5em; }
.adv-item p { font-size: 15px; line-height: 1.8; margin: 0 auto; max-width: 320px; }
.adv-item p strong { font-weight: 700; }

/* Niveles */
.levels { padding-top: 5vh; }
.levels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.level-name { font-size: 32px; font-weight: 400; margin-bottom: .4em; }
.level-sub { color: var(--gold); font-size: 22px; font-weight: 300; line-height: 1.2; margin: 0 auto 20px; max-width: 300px; }
.level img { width: 250px; margin: 0 auto 20px; }
.level-eqf { font-size: 22px; font-weight: 900; line-height: 1.2; color: var(--heading); margin: 0; }

/* Páginas de texto */
.prose { font-size: 16px; }
.prose h2 { font-size: 30px; margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose-legal h2 { font-size: 20px; font-weight: 800; letter-spacing: .02em; margin-top: 2em; }
.prose-legal h3 { font-size: 17px; font-weight: 800; margin: 1.6em 0 .6em; }
.prose ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.prose li { margin-bottom: .6em; }
.page-about .prose, .page-ethics .prose, .page-legal .prose { max-width: 960px; }

.cols-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 50px; align-items: start; margin-top: 30px; }
.certificate img { border-radius: 8px; box-shadow: 0 10px 30px rgba(34, 22, 56, .18); margin: 0 auto; }

.button {
  display: inline-block; padding: 12px 26px; border-radius: 6px;
  background: linear-gradient(#f7d35f, #c27a00); color: var(--purple); font-weight: 800; text-decoration: none;
}
.button:hover { background: linear-gradient(#e9e3f4, #c7b8e3); }

/* Formulario de solicitud */
.application { background: #fffaf3; }
.form-wrap { max-width: 900px; }
.form-wrap h2 { margin-bottom: 40px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field { display: flex; flex-direction: column; }
.field-full { grid-column: 1 / -1; }
.field label, .field .label { font-size: 14px; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.field abbr { color: #b3261e; text-decoration: none; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select {
  height: 48px; padding: 0 14px; font: inherit; color: var(--heading);
  background: var(--white); border: 1px solid #d6d6d6; border-radius: 3px; width: 100%;
}
.field select { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath fill='%23221638' d='M207 381.5L12.7 187.1c-9.4-9.4-9.4-24.6 0-33.9l22.7-22.7c9.4-9.4 24.5-9.4 33.9 0L224 284.5l154.7-154c9.4-9.3 24.5-9.3 33.9 0l22.7 22.7c9.4 9.4 9.4 24.6 0 33.9L241 381.5c-9.4 9.4-24.6 9.4-34 0z'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus { border-color: var(--purple); outline: 2px solid var(--gold-light); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: 14px; font-weight: 700; margin: 6px 0 0; }

.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; min-height: 150px; padding: 24px; text-align: center; cursor: pointer;
  background: var(--white); border: 2px dashed #cfc6dd; border-radius: 6px; color: var(--heading);
  transition: border-color .2s ease, background .2s ease;
}
.field .dropzone { font-weight: 400; font-size: 16px; margin: 0; }
.dropzone:hover, .dropzone.is-over { border-color: var(--purple); background: #f8f5fc; }
.dropzone.has-error { border-color: #b3261e; }
.dropzone:focus-within { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.dropzone-icon { font-size: 26px; color: var(--purple); }
.dropzone-help { font-size: 13px; color: var(--text); }
.dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-list { font-size: 14px; color: var(--heading); }
.file-list:not(:empty) { margin-top: 10px; }
.file-list ul { margin: 4px 0 0; padding-left: 1.2em; }

.field-check { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.field-check input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--purple); flex: 0 0 auto; }
.field-check label { flex: 1; font-weight: 400; font-size: 15px; margin: 0; }
.field-check .field-error { flex-basis: 100%; }

.privacy-box { border-top: 1px solid #e2e2e2; margin-top: 28px; padding-top: 20px; font-size: 13px; line-height: 1.6; }
.privacy-box p { margin-bottom: 6px; font-weight: 700; color: var(--heading); }
.privacy-box ul { margin: 0; padding-left: 1.2em; }
.privacy-box strong { font-weight: 700; }

.app-form .submit {
  display: block; width: 100%; margin-top: 28px; height: 52px;
  font: inherit; font-size: 16px; font-weight: 800; color: var(--white);
  background: var(--purple); border: 0; border-radius: 6px; cursor: pointer;
}
.app-form .submit:hover { background: #38245d; }
.app-form .submit[disabled] { opacity: .7; cursor: wait; }

.form-notice { padding: 18px 24px; border-radius: 10px; margin-bottom: 28px; color: #000; }
.form-notice p { margin: 0 0 .3em; }
.form-notice ul { margin: 0; padding-left: 1.2em; }
.form-notice.is-ok { background: #dcf0e1; border: 1px solid #c3e6cb; }
.form-notice.is-error { background: #fbe9e7; border: 1px solid #f2c4bd; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Pie ---------- */
.site-footer { background: var(--purple-dark); padding: 20px 0; text-align: center; font-size: 13px; }
.site-footer a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin: 0 0 6px; }
.footer-copy { color: rgba(255, 255, 255, .6); margin: 0; }

.to-top {
  position: fixed; right: 20px; bottom: 0; z-index: 30;
  width: 46px; height: 36px; display: flex; align-items: center; justify-content: center;
  background: #333; color: var(--white); border-radius: 6px 6px 0 0; font-size: 16px;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease;
}
.to-top.is-visible { opacity: .9; visibility: visible; }
.to-top:hover { background: var(--purple); }

/* ---------- Tableta ---------- */
@media (max-width: 1100px) {
  .main-nav ul { gap: 4px 22px; }
  .hero-text h1 { font-size: 44px; }
  .display, h1, .page-title h1 { font-size: 40px; }
}

/* ---------- Móvil y tableta pequeña ---------- */
@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .header-inner { min-height: 90px; padding: 10px 20px; flex-wrap: wrap; }
  .logo img { width: 64px; height: 64px; }
  .menu-toggle { display: block; }
  .main-nav { display: none; flex: 1 0 100%; margin: 0; }
  .site-header.menu-open { background: var(--purple); }
  .site-header.menu-open .main-nav { display: block; }
  .site-header.menu-open .menu-toggle-open { display: none; }
  .site-header.menu-open .menu-toggle-close { display: inline; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 12px; }
  .main-nav a { padding: 13px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 16px; }
  .main-nav a::before { display: none; }
  .main-nav .lang-switch { margin-top: 12px; }
  .main-nav .lang-switch a { display: inline-block; border-top: 1px solid rgba(255, 255, 255, .45); }

  .hero { padding: 110px 0 50px; background-image: url("../img/cantidad-de-alumnos-formados-mobile.webp"); }
  .hero-inner { grid-template-columns: 1fr; text-align: center; min-height: 0; gap: 24px; }
  .hero-badge img { max-width: 260px; margin: 0 auto; }
  .hero-text { padding: 24px; }
  .hero-text h1 { font-size: 34px; }
  .hero-sub { font-size: 21px; }

  .lookup-inner { grid-template-columns: 1fr; text-align: center; }
  .lookup-result { text-align: left; padding: 14px 18px; }

  .section { padding: 56px 0; }
  .section-tight { padding: 40px 0 10px; }
  h1, .display, .page-title h1 { font-size: 32px; }
  h2 { font-size: 30px; }
  .page-title { padding: 44px 0; }
  .lead, .eyebrow { font-size: 19px; }
  .counter-text { font-size: 24px; }

  .split-inner { grid-template-columns: 1fr; gap: 30px; }
  .split-reverse .split-media { order: 0; }
  .split-media { max-width: 576px; }

  .adv-grid { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .levels-grid { grid-template-columns: 1fr; gap: 50px; }
  .cols-2-1 { grid-template-columns: 1fr; }
  .certificate img { max-width: 320px; }
  .prose h2 { font-size: 24px; }
  .prose-legal h2 { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .adv-grid { grid-template-columns: 1fr; }
  .lookup-form button { padding: 0 18px; }
}
