:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #d1d5db;
  --blue: #1e3a8a;
  --red: #c62828;
  --red-hover: #ab2222;
  --danger: #b42318;
  --ok: #047857;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0f172a;
  border-bottom: 1px solid #111c34;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.app-header.is-scrolled {
  border-bottom-color: #1e293b;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.35);
}

.logo {
  width: 120px;
  display: block;
  margin: 14px auto;
}

.brand-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.brand-nav:hover,
.brand-nav:focus,
.brand-nav:active {
  text-decoration: none;
}

.brand-nav .logo {
  width: 68px;
  margin: 8px 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

.hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.hero p {
  color: var(--muted);
  margin: 8px 0 20px;
  line-height: 1.5;
}

.action-buttons {
  margin-bottom: 20px;
}

.btn-primary,
.btn-secondary {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  margin-bottom: 12px;
}

.btn-primary:hover {
  background: var(--red-hover);
}

.btn-primary:link,
.btn-primary:visited {
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  border: 2px solid var(--blue);
  color: var(--blue);
  background: #fff;
}

.btn-secondary:hover {
  background: #f8fafc;
}

.btn-whatsapp {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  background: #16a34a;
  color: #ffffff;
  border: 1px solid #15803d;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.btn-whatsapp:hover {
  background: #15803d;
  border-color: #166534;
}

.btn-whatsapp:link,
.btn-whatsapp:visited {
  color: #fff;
  text-decoration: none;
}

.card {
  background: var(--panel);
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.card-section {
  margin-bottom: 18px;
}

.card-section:last-of-type {
  margin-bottom: 0;
}

.card h2,
.card-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

input,
select {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 16px;
  color: var(--text);
  background: #fff;
  margin: 0;
}

input:focus,
select:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.info {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 13px;
}

.parq-panel {
  background: #fafbff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
}

.parq-list {
  display: grid;
  gap: 10px;
}

.parq-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.parq-item p {
  margin: 0 0 8px;
  font-size: 14px;
}

.answers {
  display: flex;
  gap: 12px;
  align-items: center;
}

.answers label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.answers input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  display: inline-grid;
  place-content: center;
  margin: 0;
  padding: 0;
}

.answers input[type="radio"]::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 200ms ease;
  background: var(--blue);
}

.answers input[type="radio"]:checked {
  border-color: var(--blue);
}

.answers input[type="radio"]:checked::before {
  transform: scale(1);
}

.medical-warning {
  margin-top: 12px;
  border: 1px solid #fecaca;
  background: #fff5f5;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.warning-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fee2e2;
  color: #991b1b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
}

.medical-warning p {
  margin: 0;
  font-size: 13px;
  color: #7f1d1d;
}

.check {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  padding: 0;
}

.actions {
  margin-top: 6px;
}

.actions-inline {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  width: 100%;
  border: none;
  background: var(--red);
  color: #fff;
  border-radius: 999px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 200ms ease;
}

button:hover {
  background: var(--red-hover);
}

button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.status {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--ok);
}

.pdf-download {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
}

.pdf-download p {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: #166534;
}

.pdf-download .btn-primary {
  margin: 0;
}


.contract-actions {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.contract-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
}

.contract-help {
  margin: 0 0 10px;
  font-size: 13px;
  color: #1e3a8a;
}

.contract-actions button {
  width: 100%;
  margin: 0;
}

.whatsapp-sign-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #93c5fd;
}

.whatsapp-sign-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
}

.whatsapp-sign-panel label {
  margin-bottom: 8px;
}

.hidden {
  display: none;
}

.public-page .hero p {
  margin-bottom: 10px;
}

.public-section {
  padding: 84px 0;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.public-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.public-section p {
  margin: 0 0 10px;
  color: #374151;
  line-height: 1.55;
}

.public-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.public-grid article {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.public-grid article strong {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
}

.public-grid article p {
  margin: 0;
  color: #475569;
}

.gallery-slider {
  position: relative;
  display: flex;
  align-items: center;
  overflow: visible;
  padding: 0 24px;
}

.gallery-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-viewport::-webkit-scrollbar {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 32px) / 3);
  gap: 16px;
  padding: 2px;
}

.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: zoom-in;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.gallery-grid img:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.2);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  min-width: 0;
  padding: 0;
  border-radius: 999px;

  display: grid;
  place-items: center;

  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border: 1px solid rgba(15, 23, 42, 0.08);

  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.15),
    0 2px 6px rgba(15, 23, 42, 0.08);

  cursor: pointer;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;

  z-index: 5;
}

.gallery-nav.prev {
  left: -26px;
}

.gallery-nav.next {
  right: -26px;
}

.gallery-nav svg {
  width: 14px;
  height: 14px;
  stroke: #0f172a;
  stroke-width: 2.5;
  fill: none;
}

.gallery-nav:hover {
  transform: translateY(-50%) scale(1.08);
  box-shadow:
    0 14px 30px rgba(15, 23, 42, 0.22),
    0 4px 10px rgba(15, 23, 42, 0.12);
}

.gallery-nav:active {
  transform: translateY(-50%) scale(0.96);
}

.gallery-nav:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(30, 58, 138, 0.25),
    0 8px 24px rgba(15, 23, 42, 0.15);
}

.flow-list {
  margin: 0;
  padding-left: 18px;
  color: #334155;
}

.flow-list li {
  margin-bottom: 8px;
}

.action-single .btn-primary {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .container {
    max-width: 900px;
  }

  .logo {
    margin: 12px 24px;
  }

  .brand-nav {
    justify-content: flex-start;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
  }

  body:not(.public-page) .hero,
  body:not(.public-page) .action-buttons,
  #formulario {
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
  }

  .action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .btn-primary {
    margin-bottom: 0;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .public-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-grid {
    grid-auto-columns: calc((100% - 16px) / 2);
  }

  button {
    width: auto;
    min-width: 220px;
  }

  .actions {
    display: flex;
    justify-content: flex-end;
  }
}

.public-page .public-section h2 {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
}

.public-page .public-section p,
.public-page .flow-list li {
  font-size: 16px;
  line-height: 1.65;
}

.public-page .cta-section h2 {
  font-size: 22px;
}

.public-nav-wrap {
  max-width: 900px;
  margin: 0 auto;
  min-height: 74px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.public-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.public-menu a {
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: #cbd5e1;
}

.public-menu a:hover {
  color: #ffffff;
  text-decoration: none;
}

.nav-cta {
  display: flex;
  gap: 8px;
}

.btn-sm {
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.nav-cta .btn-primary {
  background: #c62828;
  border: 1px solid #c62828;
}

.nav-cta .btn-primary:hover {
  background: #ab2222;
}

.nav-cta .btn-secondary {
  border-color: #334155;
  color: #e2e8f0;
  background: #111827;
}

.nav-cta .btn-secondary:hover {
  background: #1f2937;
}

.institutional-hero {
  position: relative;
  min-height: 100vh;
  padding: 110px 0 80px;
  border: 0;
  background-image:
    linear-gradient(125deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.72)),
    url("../assets/augustus-team/img-024.jpeg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 50% 8%;
}

.hero-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.hero-media {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  background: #eef2f7;
}

.hero-media img {
  width: 100%;
  height: min(62vw, 340px);
  object-fit: contain;
  object-position: center;
  display: block;
}

.kicker {
  margin: 0 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #cbd5e1;
}

.institutional-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #f8fafc;
}

.institutional-hero p {
  max-width: 760px;
  font-size: 1.02rem;
  color: #e2e8f0;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.public-footer {
  border-top: 1px solid #dbe3ee;
  padding: 22px 0 30px;
  background: #f8fafc;
}

.public-footer .container {
  padding-top: 0;
  padding-bottom: 0;
}

.public-footer p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 900px) {
  .public-nav-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 8px;
  }

  .public-menu {
    gap: 14px;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
  }

  .hero-media img {
    height: 240px;
  }

  .institutional-hero {
    background-position: 60% 4%;
  }

}

@media (max-width: 640px) {
  .gallery-grid {
    grid-auto-columns: 100%;
  }

  .gallery-grid img {
    height: 220px;
  }

  .gallery-nav {
    width: 30px;
    height: 30px;
  }

  .gallery-nav.prev {
    left: -16px;
  }

  .gallery-nav.next {
    right: -16px;
  }
}

@media (min-width: 992px) {
  .hero-layout {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .hero-media img {
    height: 360px;
  }
}

.section-content {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.section-alt {
  background: #f8fafc;
}

.cta-section {
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.cta-content {
  text-align: center;
}

.cta-content .action-buttons {
  max-width: 560px;
  margin: 22px auto 0;
}

.action-buttons.action-single {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.action-buttons.action-single .btn-primary,
.action-buttons.action-single .btn-whatsapp {
  margin: 0;
  min-width: 180px;
  max-width: 260px;
  flex: 1 1 220px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .action-buttons.action-single .btn-primary,
  .action-buttons.action-single .btn-whatsapp {
    flex-basis: 100%;
    max-width: 100%;
    white-space: normal;
  }
}

.gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.88);
  display: grid;
  place-items: center;
  padding: 20px;
}

.gallery-modal.hidden {
  display: none;
}

.gallery-modal img {
  width: auto;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  background: #0f172a;
  object-fit: contain;
}

.gallery-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: auto;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.5);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

.sign-link-panel,
.access-validation-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #93c5fd;
}

.sign-link-title,
.access-validation-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
}

.sign-link-panel label,
.access-validation-panel label,
.whatsapp-sign-panel label {
  margin-bottom: 8px;
}
