:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --bg: #ffffff;
  --primary: #0ea5a6;
  --accent: #ef5da8;
  --blue: #0f172a;
  --card: #ffffff;
  --soft: #f8fafc;
  --gold: #c9a227;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  padding-top: 76px;
}
a { color: inherit; }

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  background: var(--blue);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.header .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: .3px;
}
.nav a { color: #e5e7eb; text-decoration: none; margin: 0 10px; }
.nav .btn { margin-left: 10px; }

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  padding: 12px 18px;
  transition: .25s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(.95); }
.btn-outline { background: #fff; color: var(--primary); border: 2px solid var(--primary); }

/* HERO */
.hero.hero-minimal {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
  display: block;
}
.hero-minimal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.16) 55%, rgba(0,0,0,0.22) 100%);
  z-index: 1;
}
.hero-band {
  position: relative;
  z-index: 2;
  width: 100%;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(1.1) blur(1px);
  border-top: 4px solid var(--gold);
}
.hero-band-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}
.hero-text h1 { font-size: clamp(1.6rem,2.6vw,2.2rem); margin: 0; color: #0b1220; }
.hero-text p { margin: 2px 0 0; color: var(--muted); }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Certificaciones */
.cert-strip {
  background: #0b1220;
  color: #e5e7eb;
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
}
.cert-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.cert-inner .dot { opacity: .7; }

/* Secciones */
.section { padding: 70px 20px; text-align: center; }
.section h2 { font-size: clamp(1.5rem,2.4vw,2.1rem); margin: 0 0 20px; }
.section.muted { background: var(--soft); }

/* Tarjetas (flip cards) */
.grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 22px;
}
.flip {
  perspective: 1000px;
  position: relative;
  height: 340px;
  border-radius: 16px;
}
.flip::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: -6px;
  height: 6px;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, var(--gold) 14%, var(--gold) 86%, rgba(0,0,0,0) 100%);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  z-index: 2;
}
.flip-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s; }
.flip-face {
  position: absolute; inset: 0;
  border-radius: 16px;
  backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  background: #fff;
}
.flip-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.flip-title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 12px 14px;
  background: linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.55) 100%);
  color: #fff;
  font-weight: 700;
}
.flip-back {
  background: #fff;
  color: var(--ink);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
}
.flip:hover .flip-inner, .flip:focus-within .flip-inner { transform: rotateY(180deg); }

/* Galería */
.gallery {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap: 14px;
}
.gallery figure {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  overflow: hidden;
  margin: 0;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery img:hover { transform: scale(1.03); }
.gallery figcaption { text-align: center; padding: 10px; color: #6b7280; font-size: .95rem; }

/* Formulario */
.form {
  max-width: 900px;
  margin: 16px auto 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 16px 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  text-align: left;
}
.field { margin-bottom: 12px; }
.field.inline { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font: inherit;
}
textarea { resize: vertical; }
.err { color: #ef4444; font-size: .9rem; height: 18px; display: inline-block; margin-top: 4px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.legal { color: #6b7280; font-size: .9rem; margin-top: 8px; }

/* CTA */
.cta {
  background: linear-gradient(135deg, #0ea5a6 0%, #ef5da8 100%);
  color: #fff;
  border-radius: 20px;
  max-width: 1100px;
  margin: 10px auto;
}
.cta .btn { box-shadow: 0 6px 16px rgba(0,0,0,.12); }

/* Footer */
.footer {
  background: linear-gradient(180deg,#0b1220 0%,#111827 100%);
  color: #e5e7eb;
  text-align: center;
  padding: 50px 20px 25px;
  border-top: 4px solid #0ea5a6;
}
.footer a { color: #0ee0d0; text-decoration: none; font-weight: 600; }
.footer a:hover { text-decoration: underline; }
.footer address { font-style: normal; line-height: 1.6; margin-top: 8px; color: #d1d5db; }
.footer-copy { font-size: .9rem; color: #9ca3af; margin-top: 10px; }
.brand { font-weight: 700; font-size: 1.1rem; color: #fff; }

/* WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.28);
  z-index: 1200;
}
.whatsapp-float svg { display: block; }

/* Responsive */
@media (max-width: 900px) {
  .hero-band-inner { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 720px) {
  body { padding-top: 74px; }
  .nav a { display: none; }
  .nav .btn { display: inline-block; }
  .field.inline { grid-template-columns: 1fr; }
  .flip { height: 300px; }
}
