/* ── Tipografía ──
   Inter servida desde epca.es: ni una petición a Google, ni una IP de
   visitante fuera. Fuente variable: un solo archivo cubre los pesos 300-700. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('fonts/inter-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ── Variables ── */
:root {
  --navy:   #1B2A4A;
  --gold:   #C9962A;
  --gold-light: #E8B84B;
  --white:  #FFFFFF;
  --gray-50:  #F8F9FB;
  --gray-100: #F0F2F6;
  --gray-400: #9BA3B2;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gold-dark: #8A6512;
  --gray-900: #111827;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(27,42,74,0.10);
  --transition: 0.22s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--gray-900); background: var(--white); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Container ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ── Accesibilidad ── */
.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: -9999px; top: 0; z-index: 300;
  background: var(--gold); color: var(--navy); font-weight: 700;
  padding: 12px 20px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
/* Foco visible en todo lo que se puede recorrer con el teclado */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold-light); outline-offset: 2px; border-radius: 4px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}
/* Texto navy sobre dorado: 5,9:1 de contraste (el blanco solo daba 2,7:1) */
.btn--primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--navy); transform: translateY(-1px); }
.btn--outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--navy); }
.btn--lg { padding: 15px 36px; font-size: 1rem; }
.btn--full { width: 100%; text-align: center; }

/* ── Section titles ── */
.section-title { font-size: 2rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; line-height: 1.25; }
.section-sub { color: var(--gray-600); max-width: 560px; margin-bottom: 48px; }

/* ════════════════════════════════
   NAVBAR
════════════════════════════════ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}
.navbar__logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 1.5rem; font-weight: 700; color: var(--gold); letter-spacing: 0.04em; }
.logo-sub { font-size: 0.7rem; color: rgba(255,255,255,0.55); letter-spacing: 0.02em; display: none; }
@media (min-width: 640px) { .logo-sub { display: inline; } }
.navbar__logo-img { height: 46px; width: auto; display: block; }

.navbar__links { display: flex; gap: 32px; }
.navbar__links a { color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 500; transition: color var(--transition); }
.navbar__links a:hover { color: var(--gold); }

.navbar__actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  background: transparent; border: 1.5px solid rgba(255,255,255,0.35);
  color: rgba(255,255,255,0.8); border-radius: 6px;
  padding: 9px 12px; font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }

/* 44x44 mínimo: es el único control de navegación en móvil */
.hamburger {
  display: none; background: none; border: none; color: var(--white);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  width: 44px; height: 44px; padding: 0;
}

.mobile-menu {
  display: none; flex-direction: column;
  background: var(--navy); padding: 12px 24px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-menu a { color: rgba(255,255,255,0.85); padding: 10px 0; font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.mobile-menu.open { display: flex; }

@media (max-width: 768px) {
  .navbar__links { display: none; }
  .hamburger { display: block; }
  .navbar__actions .btn { display: none; }
}

/* ════════════════════════════════
   HERO
════════════════════════════════ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #2C4080 100%);
  padding: 100px 0 90px;
  color: var(--white);
}
.hero__bg {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 700px; }
.hero__tag {
  display: inline-block; background: rgba(201,150,42,0.18);
  color: var(--gold-light); border: 1px solid rgba(201,150,42,0.35);
  border-radius: 20px; padding: 4px 16px; font-size: 0.82rem;
  font-weight: 600; letter-spacing: 0.05em; margin-bottom: 20px;
}
.hero__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; line-height: 1.15; margin-bottom: 20px; }
.hero__subtitle { font-size: 1.1rem; color: rgba(255,255,255,0.75); max-width: 560px; margin-bottom: 36px; }
.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ════════════════════════════════
   STATS
════════════════════════════════ */
.stats { background: var(--white); border-bottom: 1px solid var(--gray-100); padding: 48px 0; }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; text-align: center; }
.stat__number { display: block; font-size: 2.4rem; font-weight: 700; color: var(--navy); line-height: 1; }
.stat__label { display: block; font-size: 0.85rem; color: var(--gray-500); margin-top: 6px; }

/* ════════════════════════════════
   SERVICES
════════════════════════════════ */
.services { background: var(--gray-50); padding: 90px 0; }
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }
.service-card {
  position: relative;
  background: var(--white); border-radius: var(--radius);
  padding: 36px 28px; box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  transition: transform var(--transition), box-shadow var(--transition);
}
/* Toda la tarjeta es clicable, pero sigue habiendo un solo enlace */
.service-card__more::after { content: ''; position: absolute; inset: 0; }
.service-card:focus-within { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.service-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(27,42,74,0.14); }
.service-card__icon { font-size: 2.2rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.service-card p { color: var(--gray-600); font-size: 0.92rem; line-height: 1.65; }

/* Featured service card (Licitaciones) */
.service-card--featured {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #2C4080 100%);
  border-top-color: var(--gold-light);
  box-shadow: 0 8px 32px rgba(27,42,74,0.22);
}
.service-card--featured h3 { color: var(--white); }
.service-card--featured p { color: rgba(255,255,255,0.82); }
.service-card__badge {
  display: inline-block;
  background: var(--gold); color: var(--white);
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 20px; padding: 4px 12px; margin-bottom: 14px;
}
.service-card__cta { margin-top: 18px; font-size: 0.88rem; padding: 10px 22px; }

/* ════════════════════════════════
   ABOUT
════════════════════════════════ */
.about { background: var(--white); padding: 90px 0; }
.about__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__text p { color: var(--gray-600); margin-bottom: 16px; line-height: 1.75; }
.about__list { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.about__list li { font-weight: 600; color: var(--navy); font-size: 0.95rem; }

.about__img-placeholder {
  background: linear-gradient(135deg, var(--navy), #2C4080);
  border-radius: var(--radius); height: 340px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--white); gap: 8px;
}
.about__img-placeholder span { font-size: 3rem; font-weight: 700; color: var(--gold); letter-spacing: 0.06em; }
.about__img-placeholder small { color: rgba(255,255,255,0.55); font-size: 0.8rem; }

@media (max-width: 768px) { .about__inner { grid-template-columns: 1fr; } .about__image { order: -1; } }

/* ════════════════════════════════
   CONTACT
════════════════════════════════ */
.contact { background: var(--gray-50); padding: 90px 0; }
.contact__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; align-items: start; }
.contact__info p { color: var(--gray-600); margin-bottom: 32px; }
.contact__details { display: flex; flex-direction: column; gap: 16px; }
.contact__item { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.contact__icon { font-size: 1.1rem; }
.contact__item a { color: var(--navy); font-weight: 600; }
.contact__item a:hover { color: var(--gold); }
.contact__note { margin-top: 20px; font-size: 0.85rem; font-weight: 600; color: var(--navy); background: var(--gray-100); border-left: 3px solid var(--gold); padding: 12px 16px; border-radius: 8px; }

.contact__form { display: flex; flex-direction: column; gap: 16px; }
.form-row { position: relative; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 14px 16px;
  border: 1.5px solid var(--gray-100); border-radius: var(--radius);
  font-family: inherit; font-size: 0.95rem; color: var(--gray-900);
  background: var(--white); outline: none;
  transition: border-color var(--transition);
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--navy); }
.form-row textarea { resize: vertical; min-height: 120px; }
.form-row label {
  position: absolute; top: 14px; left: 16px;
  color: var(--gray-400); font-size: 0.9rem; pointer-events: none;
  transition: all 0.18s ease;
}
.form-row input:focus ~ label,
.form-row input:not(:placeholder-shown) ~ label,
.form-row textarea:focus ~ label,
.form-row textarea:not(:placeholder-shown) ~ label {
  top: -8px; left: 12px; font-size: 0.75rem;
  background: var(--white); padding: 0 4px; color: var(--navy);
}
.form-success { color: #16a34a; font-size: 0.9rem; font-weight: 600; text-align: center; margin-top: 8px; }
.hidden-field { display: none; }

/* ── WhatsApp flotante ── */
.whatsapp-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  transition: transform var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }
.whatsapp-float svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 480px) { .whatsapp-float { width: 50px; height: 50px; bottom: 16px; right: 16px; } }

@media (max-width: 768px) { .contact__inner { grid-template-columns: 1fr; } }

/* ════════════════════════════════
   LANDING PAGES (servicios)
════════════════════════════════ */
.page-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy) 0%, #2C4080 100%);
  color: var(--white); padding: 80px 0 70px;
}
.page-hero .hero__bg {
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero__inner { position: relative; max-width: 720px; }
.breadcrumb { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-bottom: 16px; }
.breadcrumb a { color: var(--gold-light); }
.breadcrumb a:hover { color: var(--white); }
.page-hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 700; line-height: 1.18; margin-bottom: 18px; }
.page-hero p { font-size: 1.08rem; color: rgba(255,255,255,0.78); max-width: 580px; margin-bottom: 30px; }

.lp { padding: 72px 0; }
.lp:nth-of-type(even) { background: var(--gray-50); }
.lp__lead { max-width: 720px; color: var(--gray-600); font-size: 1.05rem; line-height: 1.75; }
.lp__lead + .lp__lead { margin-top: 16px; }

.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 36px; }
.lp-feature {
  background: var(--white); border-radius: var(--radius); padding: 26px 24px;
  box-shadow: var(--shadow); border-left: 4px solid var(--gold);
}
.lp-feature h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.lp-feature p { color: var(--gray-600); font-size: 0.9rem; }
.lp-feature__price { display: block; margin-top: 12px; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.lp-feature__price small { font-weight: 400; color: var(--gray-600); font-size: 0.78rem; }
.lp-feature--star { border-left-color: var(--navy); background: linear-gradient(180deg, var(--white) 0%, var(--gray-50) 100%); }
.lp-feature__tag {
  display: inline-block; margin-bottom: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--navy); color: var(--gold); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.4px;
}
.lp-note { margin-top: 22px; font-size: 0.82rem; color: var(--gray-600); max-width: 760px; }

.calc {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  border-left: 4px solid var(--gold); padding: 28px 26px; max-width: 640px; margin-top: 36px;
}
.calc__row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.calc__row label { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.calc__row input, .calc__row select {
  padding: 10px 12px; border: 1px solid var(--gray-100); border-radius: 8px;
  font: inherit; font-size: 0.95rem; background: var(--gray-50);
}
.calc__result {
  display: none; margin-top: 18px; padding: 16px 18px; border-radius: 8px;
  background: var(--gray-50); border: 1px solid var(--gray-100);
  font-size: 0.95rem; line-height: 1.6;
}
.calc__result strong { color: var(--navy); }
.calc__result.calc__result--alert { background: #fdf3e7; border-color: #f0d5ae; }

.lp-steps { counter-reset: step; display: flex; flex-direction: column; gap: 20px; margin-top: 36px; max-width: 760px; }
.lp-step { display: flex; gap: 18px; align-items: flex-start; }
.lp-step__num {
  counter-increment: step; flex: 0 0 auto;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.lp-step__num::before { content: counter(step); }
.lp-step h3 { font-size: 1rem; color: var(--navy); margin-bottom: 4px; }
.lp-step p { color: var(--gray-600); font-size: 0.92rem; }

.lp-faq { max-width: 760px; margin-top: 32px; }
.lp-faq details {
  background: var(--white); border: 1px solid var(--gray-100); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 12px;
}
.lp-faq summary { font-weight: 600; color: var(--navy); cursor: pointer; font-size: 0.98rem; }
.lp-faq p { color: var(--gray-600); font-size: 0.92rem; margin-top: 10px; }

.lp-cta { background: var(--navy); color: var(--white); text-align: center; padding: 64px 0; }
.lp-cta h2 { font-size: 1.8rem; margin-bottom: 14px; }
.lp-cta p { color: rgba(255,255,255,0.75); max-width: 520px; margin: 0 auto 28px; }

/* Link "saber más" en las tarjetas de servicio */
.service-card__more { display: inline-block; margin-top: 14px; color: var(--gold); font-weight: 600; font-size: 0.9rem; }
.service-card__more:hover { color: var(--navy); }
.service-card--featured .service-card__more { color: var(--gold-light); }

/* ════════════════════════════════
   ASISTENTES ONLINE (home)
════════════════════════════════ */
.assist { background: var(--white); padding: 80px 0; border-bottom: 1px solid var(--gray-100); }
.assist__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.assist-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--gray-50); border: 1.5px solid var(--gray-100);
  border-radius: var(--radius); padding: 28px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.assist-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gold); }
.assist-card__tag {
  align-self: flex-start; background: rgba(201,150,42,0.12); color: var(--gold-dark);
  border-radius: 20px; padding: 3px 12px; font-size: 0.75rem; font-weight: 700;
}
.assist-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--navy); }
.assist-card p { color: var(--gray-600); font-size: 0.9rem; line-height: 1.6; flex: 1; }
.assist-card__go { color: var(--gold); font-weight: 700; font-size: 0.9rem; }
.assist-card:hover .assist-card__go { color: var(--navy); }

/* ════════════════════════════════
   FORM: consentimiento y errores
════════════════════════════════ */
.form-consent { font-size: 0.83rem; color: var(--gray-600); }
.form-consent label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.form-consent input { margin-top: 3px; flex: 0 0 auto; accent-color: var(--gold); width: 15px; height: 15px; }
.form-consent a { color: var(--navy); font-weight: 600; text-decoration: underline; }
.form-consent a:hover { color: var(--gold); }
.form-error { color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 10px 14px; font-size: 0.88rem; font-weight: 600; text-align: center; margin-top: 8px; }

/* ════════════════════════════════
   PÁGINAS LEGALES
════════════════════════════════ */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 36px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p, .legal li { color: var(--gray-600); font-size: 0.95rem; line-height: 1.75; margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal a { color: var(--navy); font-weight: 600; text-decoration: underline; }
.legal a:hover { color: var(--gold); }

/* ════════════════════════════════
   FOOTER
════════════════════════════════ */
.footer { background: var(--navy); color: rgba(255,255,255,0.6); padding: 48px 0 28px; }
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.8fr;
  gap: 36px; padding-bottom: 28px; margin-bottom: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer__col h4 { color: var(--white); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.footer__col a, .footer__col span { color: rgba(255,255,255,0.65); font-size: 0.85rem; transition: color var(--transition); }
.footer__col a:hover { color: var(--gold); }
.footer__name { font-size: 0.82rem; }
.footer__nif { font-size: 0.78rem; color: rgba(255,255,255,0.45); }
.footer__copy { font-size: 0.82rem; text-align: center; }
.footer__social { font-size: 0.85rem; font-weight: 600; color: var(--gold) !important; transition: color var(--transition); margin-top: 6px; }
.footer__social:hover { color: var(--gold-light) !important; }
