/* Jorna Med — estilos */
:root {
  --blue: #40AAE1;
  --blue-dark: #2B8FC4;
  --black: #000;
  --text: #0A0A0A;
  --soft: #EFF2FE;
  --white: #fff;
  --green: #028B14;
  --green-dark: #186D23;
  --shadow: 2px 3px 11px rgba(0, 0, 0, .1);
  --header-h: 92px;
  --container: 1140px;
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-alt: "Poppins", "Montserrat", system-ui, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }
svg { width: 1em; height: 1em; flex-shrink: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 820px; margin-inline: auto; }
.center { text-align: center; }
.justify { text-align: justify; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--black); color: var(--white); text-decoration: none;
  font: 600 18px/1.3 var(--font); padding: 10px 36px; border-radius: 10px; border: 0; cursor: pointer;
  transition: background .25s, color .25s, transform .25s;
}
.btn:hover { background: var(--blue); }
.btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.btn-upper { text-transform: uppercase; }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: var(--black); color: var(--white); }
.btn-sm { font-size: 15px; font-weight: 700; padding: 8px 32px; }
.btn-block { width: 100%; border-radius: 30px; font-family: var(--font-alt); font-size: 18px; padding: 12px; }
.btn-icon svg { width: 18px; height: 18px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); max-width: 1440px; padding-inline: 48px; }
.logo img { width: 142px; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a { font-weight: 600; font-size: 16px; text-decoration: none; color: var(--black); transition: color .2s; }
.main-nav ul a:hover { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-wa {
  display: inline-flex; align-items: center; gap: 8px; background: var(--green); color: var(--white);
  font-weight: 600; font-size: 16px; text-decoration: none; padding: 13px 34px; border-radius: 30px; transition: background .25s;
}
.btn-wa:hover { background: var(--green-dark); }
.btn-wa svg { width: 16px; height: 16px; }
.socials { display: flex; gap: 6px; }
.socials a { width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: var(--white); display: grid; place-items: center; transition: background .25s; }
.socials a:hover { background: var(--black); }
.socials svg { width: 22px; height: 22px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 3px; background: var(--black); border-radius: 2px; margin: 5px 0; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; height: min(41.67vw, 800px); min-height: 460px; overflow: hidden; background: #1c3f55; }
.hero-slide { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s ease-out; }
.hero-slide.is-active .hero-bg { transform: scale(1); }
.hero .container { position: relative; max-width: 1280px; }
.hero-box {
  max-width: 820px; background: rgba(64, 170, 225, .82); color: var(--white); padding: 42px 48px; border-radius: 4px;
  transform: translateY(30px); opacity: 0; transition: transform .9s .35s ease, opacity .9s .35s ease;
}
.hero-slide.is-active .hero-box { transform: none; opacity: 1; }
.hero-box h1, .hero-box h2 { font-size: clamp(26px, 2.9vw, 42px); font-weight: 700; line-height: 1.2; text-transform: uppercase; margin-bottom: 18px; }
.hero-box p { font-size: clamp(17px, 1.8vw, 26px); line-height: 1.5; margin-bottom: 28px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-btns .btn { text-transform: uppercase; font-size: 14px; font-weight: 700; padding: 14px 28px; border-radius: 4px; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(0, 0, 0, .35); color: var(--white); font-size: 34px; line-height: 1; cursor: pointer; transition: background .2s;
}
.hero-arrow:hover { background: var(--black); }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 3; }
.hero-dots button, .carousel-dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--white); background: transparent; padding: 0; cursor: pointer; }
.hero-dots button[aria-selected="true"], .carousel-dots button[aria-selected="true"] { background: var(--white); }

/* ---------- Secciones ---------- */
.section { position: relative; padding: 100px 0; }
.bg-soft { background: var(--soft); }
.wave-top::before, .wave-top-white::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 60px; pointer-events: none;
  background: no-repeat top / 100% 100%;
}
.wave-top::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='%23fff' opacity='.35' d='M0 0v100C250 60 700 20 1000 40V0z'/%3E%3Cpath fill='%23fff' opacity='.6' d='M0 0v60c300-40 600-40 1000 0V0z'/%3E%3Cpath fill='%23fff' d='M0 0v30C350 10 650 0 1000 20V0z'/%3E%3C/svg%3E"); }
.wave-top-white::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 100' preserveAspectRatio='none'%3E%3Cpath fill='%23EFF2FE' opacity='.35' d='M0 0v40c300 30 700 60 1000 60V0z'/%3E%3Cpath fill='%23EFF2FE' opacity='.6' d='M0 0v30c350 10 650 30 1000 45V0z'/%3E%3Cpath fill='%23EFF2FE' d='M0 0v15c350 0 650 5 1000 20V0z'/%3E%3C/svg%3E"); }

.title { font-size: 35px; font-weight: 800; line-height: 1.35; color: var(--black); margin-bottom: 24px; }
.title span { color: var(--blue); }
.title-lg { font-size: 32px; }

#nosotros p { margin-bottom: 1.6em; }
#nosotros .btn { margin-top: 6px; }

/* Split (imagen + contenido) */
.split { display: grid; grid-template-columns: 5fr 6fr; gap: 40px; align-items: start; }
.split-content > .btn { margin-top: 24px; }
.rounded-img { width: 100%; border-radius: 30px 30px 100px 30px; }
.rounded-img.soft { border-radius: 24px; }

/* Carrusel de fotos de jornadas (acompaña la lectura de los servicios) */
#servicios .split-media { align-self: stretch; }
.photo-carousel {
  position: sticky; top: calc(var(--header-h) + 24px);
  aspect-ratio: 4 / 5; border-radius: 30px 30px 100px 30px; overflow: hidden; background: var(--soft); box-shadow: var(--shadow);
}
.photo-carousel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.04); transition: opacity 1s ease, transform 5s ease-out; }
.photo-carousel img.is-active { opacity: 1; transform: scale(1); }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.carousel-dots button { box-shadow: 0 0 4px rgba(0, 0, 0, .4); }

/* Acordeón */
.accordion { margin-top: 28px; border: 1px solid #d5d8dc; }
.acc-hint { display: flex; align-items: center; gap: 8px; margin: 26px 0 -16px; font-size: 15px; font-weight: 600; color: var(--blue); }
.acc-hint svg { width: 22px; height: 22px; animation: tap 1.6s ease-in-out infinite; }
@keyframes tap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.accordion details + details { border-top: 1px solid #fff; }
.accordion summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px;
  background: var(--blue); color: var(--white); font: 500 16px/1.4 var(--font-alt); padding: 9px 14px; transition: background .25s;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::before { content: "+"; font: 700 22px/1 var(--font-alt); width: 14px; text-align: center; flex-shrink: 0; }
.accordion details[open] > summary { background: var(--black); }
.accordion details[open] > summary::before { content: "\2013"; }
.accordion summary:hover { background: var(--blue-dark); }
.accordion details[open] > summary:hover { background: #222; }
.accordion summary:focus-visible { outline: 3px solid var(--black); outline-offset: -3px; }
.acc-body { background: var(--white); padding: 22px 16px 16px; text-align: justify; font-size: 15px; overflow: hidden; }
.acc-body > :last-child { margin-bottom: 0; }
.acc-body ul { margin: 0 0 1em; padding-left: 30px; }
.acc-body li { margin-bottom: .7em; }
.acc-body li::marker { color: var(--text); }
.acc-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }

/* Tarjetas de clientes */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.card { background: var(--white); border-radius: 6px; box-shadow: var(--shadow); overflow: hidden; text-align: center; padding-bottom: 18px; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.card img { width: 100%; aspect-ratio: 7 / 4; object-fit: cover; }
.card h3 { color: var(--blue); font-size: 20px; font-weight: 800; margin: 20px 15px 10px; }
.card p { font-size: 14px; color: var(--black); margin: 0 15px; }

/* CTA */
.cta { align-items: center; grid-template-columns: 1fr 1fr; gap: 60px; }
.cta .split-content { max-width: 400px; justify-self: end; }
.cta p { font-size: 14px; }

/* Atención al cliente */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 40px 0 80px; text-align: center; }
.contact-item { display: flex; flex-direction: column; align-items: center; }
.contact-item svg { width: 50px; height: 50px; color: var(--blue); margin-bottom: 18px; }
.contact-item p { font-size: 20px; line-height: 1.6; flex: 1; display: flex; align-items: center; margin-bottom: 18px; }

/* Formulario */
.quote-form { background: var(--soft); border-radius: 24px; padding: 40px 60px; max-width: 1140px; margin: 0 auto; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 20px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font: 600 14px/1.3 var(--font-alt); color: var(--black); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input, .form-grid textarea {
  font: 400 15px/1.4 var(--font); color: var(--text); background: var(--white);
  border: 1px solid #818a91; border-radius: 3px; padding: 8px 12px; width: 100%; min-height: 40px;
}
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.form-grid .invalid { border-color: #c62828; outline-color: #c62828; }
.hp { position: absolute !important; left: -9999px; }
.form-msg { margin: 14px 0 0; text-align: center; font-weight: 600; min-height: 1.5em; }
.form-msg.ok { color: var(--green); }
.form-msg.err { color: #c62828; }
.quote-form button[disabled] { opacity: .6; cursor: wait; }

/* Footer */
.site-footer { background: var(--black); color: var(--blue); text-align: center; font-weight: 700; font-size: 15px; padding: 16px 20px; }
.site-footer p { margin: 0; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: var(--white); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: transform .25s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }

/* Aparición al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .header-inner { padding-inline: 24px; }
  .main-nav ul { gap: 18px; }
  .btn-wa { padding: 12px 22px; }
  .socials a { width: 40px; height: 40px; }
  .socials svg { width: 18px; height: 18px; }
}

@media (max-width: 1024px) {
  :root { --header-h: 76px; }
  .logo img { width: 116px; }
  .nav-toggle { display: block; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); box-shadow: 0 12px 20px rgba(0, 0, 0, .12); padding: 8px 24px 24px;
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid #eee; font-size: 17px; }
  .nav-actions { justify-content: space-between; padding-top: 18px; flex-wrap: wrap; }

  .section { padding: 80px 0; }
  .split, .cta { grid-template-columns: 1fr; gap: 36px; }
  .split-media { max-width: 560px; width: 100%; margin: 0 auto; }
  .photo-carousel { position: relative; top: 0; }
  .cta .split-content { max-width: none; justify-self: stretch; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .quote-form { padding: 36px 32px; }
  .hero-arrow { display: none; }
}

@media (max-width: 767px) {
  body { font-size: 15px; }
  .section { padding: 64px 0; }
  .wave-top::before, .wave-top-white::before { height: 34px; }
  .title, .title-lg { font-size: 27px; }
  .hero { height: auto; min-height: 560px; }
  .hero-box { padding: 28px 22px; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-bg { object-position: 60% 50%; }
  .split-media { max-width: none; }
  .photo-carousel { aspect-ratio: 1 / 1; }
  .cards { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; margin-bottom: 56px; }
  .contact-item p { font-size: 18px; }
  .quote-form { padding: 28px 18px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .acc-body { text-align: left; }
  .justify { text-align: left; }
  .wa-float { width: 52px; height: 52px; right: 14px; bottom: 14px; }
  /* Imagen de preguntas más baja para no empujar el contenido */
  #preguntas .rounded-img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 35%; border-radius: 24px 24px 60px 24px; }
  /* Botones de contacto con área de toque cómoda */
  .btn-sm { min-height: 44px; padding: 10px 36px; }
  /* Evita el zoom automático de iPhone al escribir en el formulario */
  .form-grid input, .form-grid textarea { font-size: 16px; min-height: 46px; }
  /* Que el botón flotante de WhatsApp no tape el texto del pie */
  .site-footer { padding: 16px 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
