/* ============================================================
   DEEPSHIELD™ ACADEMY — styles
   Ocean-deep theme, fully responsive, overflow-safe for long
   DE/RU strings.
   ============================================================ */

:root {
  --navy-900: #061320;
  --navy-800: #0a1929;
  --navy-700: #0f2438;
  --navy-600: #14304a;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --teal: #2dd4bf;
  --gold: #f5b301;
  --text: #eaf4fb;
  --text-dim: #9fb6c8;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.04);
  --card-hover: rgba(255, 255, 255, 0.07);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --radius: 16px;
  --wrap: 1180px;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(34, 211, 238, 0.14), transparent 60%),
    radial-gradient(1000px 700px at -10% 20%, rgba(45, 212, 191, 0.10), transparent 55%),
    linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1rem; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- buttons (overflow-safe) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .4em;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: .98rem;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, filter .2s ease;
  white-space: normal;          /* allow wrapping for long DE/RU labels */
  word-break: break-word;
  hyphens: auto;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--cyan-deep)); color: #04212b; box-shadow: 0 10px 26px rgba(34, 211, 238, .35); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.28); color: var(--text); }
.btn-outline:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-buy { background: linear-gradient(135deg, var(--cyan), var(--teal)); color: #04212b; width: 100%; box-shadow: 0 8px 20px rgba(45,212,191,.28); }
.btn-buy:hover { filter: brightness(1.06); }
.btn-whatsapp { background: #25d366; color: #04250f; }
.btn-whatsapp:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }

.link-btn {
  background: none; border: none; color: var(--cyan);
  font: inherit; cursor: pointer; text-decoration: underline; padding: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(6, 19, 32, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; width: 100%; }
.logo {
  font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 1.35rem;
  color: var(--text); letter-spacing: .5px; margin-right: auto; white-space: nowrap;
}
.logo:hover { color: var(--cyan); text-decoration: none; }
.main-nav { display: flex; gap: 22px; }
.main-nav a { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.main-nav a:hover { color: var(--cyan); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* language switch */
.lang-switch { position: relative; }
.lang-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  color: var(--text); border-radius: 999px; padding: 8px 12px;
  font: inherit; font-size: .9rem; cursor: pointer; white-space: nowrap;
}
.lang-toggle:hover { border-color: var(--cyan); }
.lang-toggle .chev { font-size: .7rem; opacity: .7; }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  list-style: none; margin: 0; padding: 6px;
  background: var(--navy-700); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow);
  min-width: 180px; max-height: 70vh; overflow: auto;
  display: none; z-index: 60;
}
.lang-menu.open { display: block; }
.lang-menu li button {
  width: 100%; text-align: left; background: none; border: none;
  color: var(--text); font: inherit; padding: 9px 12px; border-radius: 8px; cursor: pointer;
}
.lang-menu li button:hover { background: rgba(255,255,255,.08); }
.lang-menu li.active button { background: rgba(34,211,238,.16); color: var(--cyan); font-weight: 700; }

/* hamburger */
.menu-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: clamp(60px, 12vw, 130px) 0 clamp(50px, 9vw, 100px);
  position: relative;
}
.eyebrow { color: var(--cyan); font-weight: 700; letter-spacing: 3px; font-size: .82rem; margin-bottom: 14px; }
.hero-title {
  font-size: clamp(2.6rem, 9vw, 6rem); font-weight: 900; letter-spacing: 2px; margin: 0;
  background: linear-gradient(135deg, #fff, var(--cyan)); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 600; margin: 14px 0 6px; }
.hero-tagline { color: var(--teal); font-weight: 700; letter-spacing: 1.5px; font-size: .95rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 42px; }
.section-head h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
.section-head p { color: var(--text-dim); }
.section:nth-of-type(even) { background: rgba(255,255,255,.015); }

/* instructor */
.instructor-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
.instructor-media { max-width: 420px; margin-inline: auto; }
.instructor-media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: auto; object-fit: cover; }
.badge-elite { display: inline-block; background: rgba(245,179,1,.15); color: var(--gold); border: 1px solid rgba(245,179,1,.35); padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; margin-bottom: 10px; }
.instructor-body h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
.instructor-role { color: var(--cyan); font-weight: 600; margin-bottom: 18px; }
.stats { display: flex; gap: 30px; margin: 18px 0 24px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: 'Montserrat'; font-size: 2rem; font-weight: 900; color: var(--teal); }
.stat-label { color: var(--text-dim); font-size: .85rem; }
.certs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 18px; }
.certs li { position: relative; padding-left: 24px; color: var(--text-dim); font-size: .92rem; }
.certs li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }

/* ---------- card grids ---------- */
.cards { display: grid; gap: 22px; }
.cards-5 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.cards-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; flex-direction: column;
  min-width: 0;                      /* prevent grid blowout with long words */
  transition: transform .18s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,.4); background: var(--card-hover); }
.card img { border-radius: 12px; margin-bottom: 14px; width: 100%; height: 170px; object-fit: cover; background: var(--navy-700); }
.card h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
.card .price { font-family: 'Montserrat'; font-size: 1.9rem; font-weight: 900; color: var(--cyan); margin: 4px 0 12px; }
.card .price-consult { font-size: 1.15rem; color: var(--gold); }
.card .card-desc { color: var(--text-dim); font-size: .9rem; flex: 1 0 auto; }
.card .feat { list-style: none; padding: 0; margin: 0 0 18px; flex: 1 0 auto; }
.card .feat li { position: relative; padding-left: 22px; margin-bottom: 6px; font-size: .9rem; color: var(--text-dim); overflow-wrap: anywhere; }
.card .feat li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.card .btn { margin-top: auto; }

.card-popular { border-color: rgba(34,211,238,.5); box-shadow: 0 0 0 1px rgba(34,211,238,.3), 0 20px 44px rgba(34,211,238,.12); }
.ribbon {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--gold); color: #2a1c00; font-family: 'Montserrat';
  font-weight: 800; font-size: .7rem; letter-spacing: 1px; padding: 4px 10px; border-radius: 999px;
}

.eco-cards .eco-card { text-align: center; align-items: center; }
.eco-icon { font-size: 2.4rem; }
.eco-card h3 { color: var(--cyan); letter-spacing: 1px; }
.eco-card p { color: var(--text-dim); font-size: .92rem; }

.section-note { text-align: center; margin-top: 30px; }

/* ---------- contacto ---------- */
.contacto-inner { text-align: center; max-width: 720px; margin: 0 auto; }
.contacto-lead { color: var(--text-dim); }
.contact-list { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 14px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.c-label { color: var(--text-dim); font-size: .78rem; text-transform: uppercase; letter-spacing: 1px; }
.contacto-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(6,19,32,.6); padding-top: 50px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 30px; padding-bottom: 34px; }
.footer-brand { font-family: 'Montserrat'; font-weight: 900; font-size: 1.3rem; }
.footer-tagline, .footer-loc { color: var(--text-dim); font-size: .88rem; }
.footer-col h4 { font-size: .95rem; color: var(--text); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-dim); font-size: .9rem; }
.footer-col a:hover { color: var(--cyan); }
.footer-bottom { border-top: 1px solid var(--line); padding: 20px 0 30px; }
.footer-bottom p { color: var(--text-dim); font-size: .8rem; margin: 0; text-align: center; }

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 10, 18, .72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  position: relative; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto;
  background: var(--navy-700); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px; box-shadow: var(--shadow);
}
.modal h2 { font-size: 1.5rem; }
.modal-sub { color: var(--text-dim); font-size: .92rem; }
.modal-close {
  position: absolute; top: 12px; right: 14px;
  background: none; border: none; color: var(--text-dim);
  font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--cyan); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05);
  color: var(--text); font: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.field select option { color: #04212b; }
.field-error { display: none; color: #ff8a8a; font-size: .8rem; margin-top: 5px; }
.field.invalid input, .field.invalid select { border-color: #ff8a8a; }
.field.invalid .field-error { display: block; }
.hp-field { position: absolute; left: -5000px; }
.form-status { text-align: center; font-size: .9rem; margin: 14px 0 0; min-height: 1.2em; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: #ff8a8a; }

/* ---------- legal pages ---------- */
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 40px 20px 70px; }
.legal-wrap h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.legal-wrap h2 { font-size: 1.3rem; margin-top: 34px; color: var(--cyan); }
.legal-wrap p, .legal-wrap li { color: var(--text-dim); }
.legal-wrap a { overflow-wrap: anywhere; }
.legal-note { background: rgba(245,179,1,.1); border: 1px solid rgba(245,179,1,.3); border-radius: 12px; padding: 14px 18px; color: var(--text-dim); font-size: .88rem; }
.legal-updated { color: var(--text-dim); font-size: .85rem; font-style: italic; }
.back-link { display: inline-block; margin-bottom: 24px; font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .instructor-grid { grid-template-columns: 1fr; }
  .instructor-media { max-width: 360px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--navy-700); border-bottom: 1px solid var(--line);
    padding: 8px 0; transform: translateY(-120%); transition: transform .25s ease;
    box-shadow: var(--shadow);
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 14px 24px; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: flex; }
  .lang-current { display: none; }        /* compact toggle on mobile */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cards { gap: 16px; }
  .hero-cta .btn, .contacto-cta .btn { width: 100%; }
  .modal { padding: 24px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
