:root {
  --bg: #f5f8ff;
  --surface: #ffffff;
  --primary: #1b79ff;
  --primary-dark: #0857c8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #dbe7ff;
  --shadow: 0 10px 30px rgba(27, 121, 255, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  color: var(--text);
}
a { text-decoration: none; }
img { max-width: 100%; display: block; }
.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(11, 21, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px;
}
.brand strong,
.brand small {
  color: #f8fbff;
}
.brand small { display: block; color: rgba(248, 251, 255, 0.78); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links a { color: #f8fbff; font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 700;
  border: 0;
  transition: 0.2s ease;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #57a7ff);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-small { padding: 10px 16px; }

.hero {
  padding: 72px 0 48px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero-visual {
  min-height: 520px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  background: url('assets/imgs/medico_pc.webp') center/cover no-repeat;
  box-shadow: var(--shadow);
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(9, 20, 42, 0.65), rgba(6, 86, 166, 0.16));
  backdrop-filter: blur(2px);
}
.hero-visual-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
.hero-logo-card {
  width: min(360px, 82%);
  padding: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}
.hero-logo-card img {
  width: 100%;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25));
}
.eyebrow {
  display: inline-block;
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  margin-bottom: 14px;
}
h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0 0 16px;
  color: #0d1b35;
}
h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: 0 0 10px; }
h3 { margin: 0 0 8px; }
p { color: var(--muted); line-height: 1.7; }
.hero-copy p { max-width: 620px; }
.hero-actions {
  display: flex;
  gap: 14px;
  margin: 24px 0 18px;
  flex-wrap: wrap;
}
.hero-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}
.hero-card,
.feature-card,
.price-card,
.stat-card,
.cta-box,
.module-item {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(27, 121, 255, 0.12);
  border-radius: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover,
.price-card:hover,
.stat-card:hover,
.module-item:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(27, 121, 255, 0.18);
}
.dashboard-preview {
  background: linear-gradient(180deg, #edf5ff, #ffffff);
  padding: 16px;
  border-radius: 24px;
}
.dashboard-preview img {
  width: 100%;
  border-radius: 16px;
}

.stats { padding: 10px 0 40px; }
.stats-grid,
.cards-grid,
.pricing-grid,
.gallery-grid {
  display: grid;
  gap: 18px;
}
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  padding: 22px;
  text-align: center;
}
.stat-card strong {
  display: block;
  font-size: 1.8rem;
  color: var(--primary);
}
.stat-card span { color: var(--muted); }

.section { padding: 72px 0; }
.alt-section { background: rgba(255,255,255,0.6); }
.section-title {
  text-align: center;
  margin-bottom: 30px;
}
.cards-grid { grid-template-columns: repeat(3, 1fr); margin-top: 22px; }
.feature-card { padding: 24px; }
.icon { font-size: 2rem; margin-bottom: 10px; }

.module-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  align-items: center;
}
.video-section {
  background: rgba(255,255,255,0.6);
}
.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 32px;
  align-items: center;
}
.video-copy p {
  margin-bottom: 18px;
}
.video-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0 0 24px;
  list-style: none;
  color: var(--text);
  font-weight: 600;
}
.video-list li {
  position: relative;
  padding-left: 28px;
}
.video-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(27, 121, 255, 0.12);
}
.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 16 / 9;
  background: #0b152a;
  border: 1px solid rgba(27, 121, 255, 0.16);
  box-shadow: 0 20px 45px rgba(11, 21, 42, 0.18);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.module-image img {
  border-radius: 18px;
  border: 1px solid var(--border);
}
.module-list {
  display: grid;
  gap: 16px;
}
.module-item { padding: 18px 20px; }

.gallery-grid {
  grid-template-columns: repeat(5, 1fr);
}
.gallery-item {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 34px rgba(11, 21, 42, 0.2);
}
.gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}
.gallery-item:hover img {
  transform: scale(1.04);
}

.pricing-grid { grid-template-columns: repeat(3, 1fr); }
.price-card { padding: 26px; position: relative; }
.price-card.featured {
  transform: translateY(-8px);
  border-color: rgba(27, 121, 255, 0.45);
}
.price { font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.price span { font-size: 1rem; color: var(--muted); }
.badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #0f9d58;
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.price-card ul { padding-left: 18px; color: var(--muted); }

.cta-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(11, 21, 42, 0.98), rgba(27, 121, 255, 0.92));
  color: #ffffff;
  box-shadow: 0 20px 45px rgba(11, 21, 42, 0.2);
}
.cta-box h2 {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  color: #ffffff;
}
.cta-box .eyebrow {
  color: #9fd0ff;
}
.cta-box .btn-primary {
  min-width: 190px;
  padding: 14px 22px;
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}
.cta-box .btn-primary:hover {
  background: #eaf3ff;
  color: var(--primary-dark);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.is-open {
  display: flex;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 11, 23, 0.76);
  backdrop-filter: blur(5px);
}
.modal-content {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  background: #ffffff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}
.modal-content img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 14px;
}
.modal-content p {
  margin: 12px 4px 0;
  text-align: center;
  color: var(--text);
  font-weight: 700;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(11, 21, 42, 0.86);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
}
.contact-modal-content {
  width: min(760px, 100%);
  padding: 24px;
}
.contact-modal-header h2 {
  margin-bottom: 8px;
}
.contact-modal-header p {
  margin: 0 0 18px;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
}
.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-field {
  display: grid;
  gap: 8px;
}
.form-field-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-field-full {
  grid-column: 1 / -1;
}
.form-field span {
  font-weight: 700;
  color: var(--text);
}
.form-field em {
  color: #d12f2f;
  font-style: normal;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font: inherit;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid rgba(27, 121, 255, 0.2);
  border-color: var(--primary);
}
.turnstile-wrap {
  margin-top: 16px;
}
.contact-submit {
  min-width: 116px;
}
.btn-loading {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.contact-form.is-submitting .btn-loading {
  display: inline-block;
}
.contact-form.is-submitting input,
.contact-form.is-submitting textarea,
.contact-form.is-submitting button {
  pointer-events: none;
}
.contact-form.is-submitting .contact-submit {
  opacity: 0.82;
}
.contact-form-actions {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.contact-status {
  margin: 0;
  font-weight: 600;
  color: var(--primary);
}
.footer {
  padding: 24px 0 42px;
  background: rgba(11, 21, 42, 0.96);
  color: #f8fbff;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  color: rgba(248, 251, 255, 0.82);
}
.footer-info {
  display: grid;
  gap: 6px;
}
.footer-info p {
  margin: 0;
  color: rgba(248, 251, 255, 0.82);
}
.footer a {
  color: #f8fbff;
  font-weight: 700;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .hero-grid,
  .video-layout,
  .module-layout,
  .stats-grid,
  .cards-grid,
  .pricing-grid,
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    min-height: 400px;
  }
  .cta-box,
  .footer-wrap,
  .nav-wrap {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .hero-grid,
  .stats-grid,
  .cards-grid,
  .pricing-grid,
  .gallery-grid,
  .module-layout {
    grid-template-columns: 1fr;
  }
  .nav-links {
    flex-wrap: wrap;
  }
  .hero { padding-top: 40px; }
  .gallery-grid img { height: 260px; }
  .video-copy .btn { width: 100%; }
}
