/* ============================================================
   Oirtplus — Centro Audiológico · Madrid
   Paleta extraída del logo: azul petróleo #4295B5 · verde #64C486
   ============================================================ */

:root {
  --primary: #4295b5;
  --primary-dark: #2f7794;
  --primary-deep: #1d5570;
  --navy: #143447;
  --green: #64c486;
  --green-dark: #46a86b;
  --bg: #f4f9fb;
  --surface: #ffffff;
  --text: #2c3e4a;
  --text-soft: #5c7382;
  --border: #dfeaf0;
  --radius: 18px;
  --shadow-sm: 0 2px 10px rgba(20, 52, 71, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 52, 71, 0.12);
  --shadow-lg: 0 24px 60px rgba(20, 52, 71, 0.16);
  --grad: linear-gradient(135deg, #4295b5 0%, #2f7794 55%, #1d5570 100%);
  --grad-accent: linear-gradient(135deg, #4295b5, #64c486);
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); line-height: 1.15; }

.container { width: min(1160px, 92%); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--grad-accent); color: #fff; box-shadow: 0 8px 20px rgba(66, 149, 181, .35); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(66, 149, 181, .45); }
.btn-light { background: #fff; color: var(--primary-deep); box-shadow: var(--shadow-md); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline-light:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.btn-sm { padding: 10px 22px; font-size: .92rem; }
.btn-lg { padding: 16px 40px; font-size: 1.08rem; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none !important; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand-name {
  font-family: var(--font-head); font-weight: 800; font-size: 1.45rem;
  color: var(--primary-deep); letter-spacing: -.02em;
}
.brand-name b { color: var(--green-dark); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a:not(.btn) {
  text-decoration: none; color: var(--text); font-weight: 500; font-size: .98rem;
  position: relative; padding: 4px 0;
}
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--grad-accent); border-radius: 2px; transition: width .25s ease;
}
.nav a:not(.btn):hover::after { width: 100%; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--navy); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad);
  padding: 170px 0 110px;
  color: #fff;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before {
  content: ''; position: absolute; width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(100,196,134,.25), transparent 70%);
  top: -200px; right: -150px;
}
.hero-wave { position: absolute; bottom: 0; left: 0; width: 100%; height: 40%; }

.hero-inner {
  position: relative; display: grid; grid-template-columns: 1.2fr .8fr;
  gap: 60px; align-items: center;
}
.hero-badge {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  font-size: .85rem; font-weight: 500; margin-bottom: 24px; letter-spacing: .02em;
}
.hero h1 {
  color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 800;
  letter-spacing: -.025em; margin-bottom: 20px;
}
.hero h1 em { font-style: normal; color: #a9e8c2; }
.hero p { font-size: 1.15rem; color: rgba(255,255,255,.92); max-width: 540px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-checks { display: flex; gap: 22px; flex-wrap: wrap; list-style: none; }
.hero-checks li {
  font-size: .9rem; color: rgba(255,255,255,.9); display: flex; align-items: center; gap: 7px;
}
.hero-checks li::before {
  content: ''; width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat;
}

.hero-card {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 24px; padding: 34px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg);
}
.soundwave { display: flex; align-items: center; gap: 4px; height: 70px; margin-bottom: 26px; }
.soundwave span {
  flex: 1; background: linear-gradient(180deg, #a9e8c2, #64c486);
  border-radius: 4px; animation: wave 1.4s ease-in-out infinite;
  height: 20%;
}
.soundwave span:nth-child(3n)   { animation-delay: .15s; }
.soundwave span:nth-child(3n+1) { animation-delay: .45s; }
.soundwave span:nth-child(4n)   { animation-delay: .3s; }
.soundwave span:nth-child(5n)   { animation-delay: .6s; }
@keyframes wave {
  0%, 100% { height: 18%; opacity: .65; }
  50% { height: 95%; opacity: 1; }
}
.hero-card-body { display: flex; gap: 16px; align-items: flex-start; }
.hero-card-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255,255,255,.18); display: grid; place-items: center; color: #fff;
}
.hero-card-body p { font-size: .98rem; margin: 0; color: rgba(255,255,255,.95); }

/* ---------- Stats ---------- */
.stats { background: var(--surface); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { text-align: center; padding: 34px 12px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-num {
  display: block; font-family: var(--font-head); font-size: 2.2rem; font-weight: 800;
  background: var(--grad-accent); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label { font-size: .9rem; color: var(--text-soft); }

/* ---------- Secciones ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--surface); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 800; letter-spacing: -.02em; margin: 10px 0 14px; }
.section-head p { color: var(--text-soft); font-size: 1.06rem; }
.section-head.light h2 { color: #fff; }
.section-head.light p { color: rgba(255,255,255,.85); }
.eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 600;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--green-dark);
  background: rgba(100, 196, 134, .12); padding: 6px 16px; border-radius: 999px;
}
.section-booking .eyebrow { background: rgba(255,255,255,.15); color: #a9e8c2; }

/* ---------- Cards servicios ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 26px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 28px; transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(66,149,181,.4); }
.card-icon {
  width: 60px; height: 60px; border-radius: 18px; margin-bottom: 22px;
  background: var(--grad-accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 18px rgba(66,149,181,.3);
}
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--text-soft); font-size: .96rem; flex: 1; }
.card-link {
  margin-top: 18px; text-decoration: none; font-family: var(--font-head);
  font-weight: 600; font-size: .94rem; color: var(--primary);
}
.card-link:hover { color: var(--primary-deep); }

/* ---------- Split nosotros ---------- */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: center; }
.split-text h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 10px 0 16px; letter-spacing: -.02em; }
.split-text > p { color: var(--text-soft); margin-bottom: 24px; }
.check-list { list-style: none; margin-bottom: 32px; display: grid; gap: 14px; }
.check-list li { padding-left: 36px; position: relative; color: var(--text-soft); }
.check-list li strong { color: var(--navy); }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat;
}

.media-frame {
  position: relative; aspect-ratio: 1; max-width: 420px; margin-inline: auto;
  display: grid; place-items: center;
}
.media-logo {
  width: 58%; position: relative; z-index: 2; border-radius: 50%;
  box-shadow: var(--shadow-lg); background: #fff; padding: 24px;
}
.media-rings i {
  position: absolute; inset: 0; margin: auto; border-radius: 50%;
  border: 2px solid rgba(66,149,181,.25);
  animation: ring 3.5s ease-out infinite;
}
.media-rings i:nth-child(1) { width: 70%; height: 70%; }
.media-rings i:nth-child(2) { width: 85%; height: 85%; animation-delay: 1.1s; }
.media-rings i:nth-child(3) { width: 100%; height: 100%; animation-delay: 2.2s; }
@keyframes ring {
  0% { transform: scale(.92); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: scale(1.06); opacity: 0; }
}

/* ---------- Pasos ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
  counter-reset: step;
}
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 26px; position: relative;
}
.step-num {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: var(--grad-accent); color: #fff; font-family: var(--font-head);
  font-weight: 700; font-size: 1.15rem; margin-bottom: 18px;
  box-shadow: 0 6px 14px rgba(66,149,181,.3);
}
.step h3 { font-size: 1.08rem; margin-bottom: 8px; }
.step p { color: var(--text-soft); font-size: .93rem; }

/* ---------- Booking ---------- */
.section-booking {
  background: var(--grad); position: relative; overflow: hidden;
}
.section-booking::before {
  content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(100,196,134,.2), transparent 70%);
  bottom: -200px; left: -150px; pointer-events: none;
}
.booking {
  position: relative;
  background: var(--surface); border-radius: 26px; padding: 44px;
  max-width: 980px; margin-inline: auto; box-shadow: var(--shadow-lg);
}
.booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.field { display: block; margin-bottom: 20px; }
.field > span {
  display: block; font-family: var(--font-head); font-weight: 600;
  font-size: .92rem; color: var(--navy); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: 12px; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg); transition: border-color .2s, box-shadow .2s; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(66,149,181,.15); background: #fff;
}
.field textarea { resize: vertical; }

.slots { display: flex; flex-wrap: wrap; gap: 10px; min-height: 48px; }
.slots-hint { color: var(--text-soft); font-size: .9rem; }
.slot {
  padding: 10px 16px; border-radius: 10px; border: 1.5px solid var(--border);
  background: var(--bg); font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  color: var(--text); cursor: pointer; transition: all .18s ease;
}
.slot:hover { border-color: var(--primary); color: var(--primary-deep); }
.slot.selected {
  background: var(--grad-accent); color: #fff; border-color: transparent;
  box-shadow: 0 6px 14px rgba(66,149,181,.35);
}

.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.booking-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.booking-footer .btn-light { background: var(--grad-accent); color: #fff; }
.booking-msg { font-weight: 500; font-size: .96rem; min-height: 1.4em; flex: 1; }
.booking-msg.ok { color: var(--green-dark); }
.booking-msg.error { color: #d64545; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: start; }
.contact-item { display: flex; gap: 18px; margin-bottom: 28px; }
.contact-icon {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: 14px;
  background: rgba(66,149,181,.12); color: var(--primary-dark);
  display: grid; place-items: center;
}
.contact-item strong { font-family: var(--font-head); color: var(--navy); display: block; margin-bottom: 3px; }
.contact-item p { color: var(--text-soft); font-size: .97rem; }
.contact-item a { color: var(--primary-dark); text-decoration: none; font-weight: 500; }
.contact-item a:hover { text-decoration: underline; }
.social-row { display: flex; gap: 14px; margin-top: 6px; }
.social-row a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(66,149,181,.12); color: var(--primary-dark); transition: all .2s;
}
.social-row a:hover { background: var(--grad-accent); color: #fff; transform: translateY(-3px); }
.contact-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); height: 100%; min-height: 380px; }
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.8); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 46px; padding-bottom: 46px; }
.brand-footer .brand-name { color: #fff; }
.brand-footer img { background: #fff; border-radius: 50%; }
.footer-tagline { margin-top: 16px; font-size: .95rem; max-width: 320px; }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-grid a { display: block; color: rgba(255,255,255,.75); text-decoration: none; margin-bottom: 10px; font-size: .95rem; }
.footer-grid a:hover { color: var(--green); }
.footer-grid p { font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; text-align: center;
  font-size: .88rem; color: rgba(255,255,255,.55);
}

/* ---------- WhatsApp FAB ---------- */
.whatsapp-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
  transition: transform .2s ease;
}
.whatsapp-fab:hover { transform: scale(1.1); }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .soundwave span, .media-rings i { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero { padding: 140px 0 90px; }
  .split { grid-template-columns: 1fr; gap: 44px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .booking-grid { grid-template-columns: 1fr; gap: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; top: 76px; right: 0; bottom: 0; width: min(320px, 84vw);
    background: #fff; flex-direction: column; align-items: flex-start;
    padding: 36px 30px; gap: 24px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .3s ease;
  }
  .nav.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .steps { grid-template-columns: 1fr; }
  .booking { padding: 30px 22px; }
  .section { padding: 70px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
