html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; }

:root {
  --color-1: var(--demo-primary, #2563eb);
  --color-2: var(--demo-secondary, #10b981);
  --color-3: #0f172a;
  --creamy-white: #f8fafc;
  --success: #38a169;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Roboto', sans-serif;
  margin: 0; padding: 0;
  background-color: var(--color-2);
  color: var(--color-3);
}


nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 90%;
  margin: 20px auto;
  padding: 20px;
  background-color: var(--color-3);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  border-radius: 10px;
}

.logo { width: 50px; height: auto; margin-right: 4rem; }

nav ul {
  display: flex;
  justify-content: center;
  flex-grow: 1;
  list-style: none;
  padding: 0; margin: 0;
  gap: clamp(1.25rem, 5vw, 4.5rem);
  flex-wrap: nowrap;
}

nav ul a {
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
  margin: 0;
  white-space: nowrap;
  display: inline-block;
  text-align: center;
  line-height: 1.1;
  transition: color 0.2s;
}
nav ul a:hover { color: var(--color-1); }

#menu-toggle { display: none; }
.responsive-nav { display: none; }

hr {
  border: 0;
  height: 2px;
  background-color: var(--color-2);
  margin-top: 2rem;
}


.title-div {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 3rem 0;
}
.title-div h1 { margin-bottom: 0; }

.subtitle {
  color: var(--color-1);
  font-family: 'Dancing Script', cursive;
}
.title-div .subtitle {
  margin: 0 0 2rem;
  font-size: 2rem;
  letter-spacing: 0.2rem;
}

h1 { font-family: 'Poppins', sans-serif; font-size: 3.5rem; color: var(--color-3); letter-spacing: 0.15rem; }
h2 { font-family: 'Dancing Script', cursive; color: var(--color-3); font-size: 2.8rem; text-align: center; margin-top: 2rem; }
h3 { font-family: 'Poppins', sans-serif; color: var(--color-3); font-size: 1.6rem; text-align: center; margin: 0; }
h4 { font-family: 'Poppins', sans-serif; color: var(--color-3); font-size: 1.5rem; margin-top: 3rem; text-align: center; }


main {
  width: 90%;
  margin: 20px auto;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 20%, rgba(37,99,235,0.22), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(16,185,129,0.2), transparent 35%),
    linear-gradient(160deg, #f8fafc 0%, #ecfeff 100%);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  opacity: 1;
}

section { margin-bottom: 3rem; margin-top: 2rem; }
p { font-size: 1rem; line-height: 1.6; margin-top: 10px; }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }


.h3-container {
  display: flex;
  flex-direction: column;
  padding: 20px;
  margin: 0 10rem;
  text-align: center;
  background-color: var(--creamy-white);
  opacity: 0.85;
  border-radius: 0;
}
.h3-container p { font-size: 1.2rem; color: black; }


.plan-description { font-size: 1.20rem; letter-spacing: 0.03rem; }

.card {
  padding: 20px;
  margin: 0 10rem;
  border-radius: 10px;
  text-align: center;
}
.card.color-1 { background-color: var(--color-1); }
.card button {
  background-color: var(--color-3);
  color: #fff;
  font-size: 1em;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.25s;
}
.card.color-1 button:hover { background-color: var(--color-2); }

.prices-hint {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bounce-arrow {
  display: inline-block;
  animation: bounce-down 1.1s ease-in-out infinite;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(10px); }
}


footer {
  background-color: var(--color-3);
  color: #fff;
  padding: 20px 0;
  text-align: center;
  margin-top: 40px;
}
footer p { font-size: 0.9em; margin-top: 10px; }

.redes-sociales { display: flex; justify-content: center; gap: 25px; }
.redes-sociales a {
  color: var(--color-1);
  margin: 2rem;
  text-decoration: none;
  transition: color 0.3s;
  display: inline-flex;
}
.social-icon {
  width: 2.5rem;
  height: 2.5rem;
}
.redes-sociales a:hover { color: var(--color-2); }

.logo-footer-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}
.logo-footer { width: 2.5rem; height: 2.5rem; object-fit: contain; }
.info-footer { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.logo-texto { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; font-size: 1.2rem; }
.correo-send { color: inherit; text-decoration: none; }
.footer-rights {
  width: 100%;
  text-align: center;
  margin: 0;
  font-size: 0.9rem;
}
.footer-links {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
}
.footer-links a {
  color: inherit;
}


.profile-container {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  margin: 1rem auto;
}
.profile-img { width: 50%; object-fit: cover; }
.text-container { width: 50%; text-align: left; }
.text-container p { font-size: 1.5rem; color: #333; margin-left: 5rem; }


.popup {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.55);
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 1rem;
}
.popup.open { display: flex; }

.popup-container {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

.popup-content {
  width: 100%;
  background: var(--creamy-white);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  padding: 28px 28px 24px;
  overflow-y: auto;
  max-height: 95vh;
  font-family: 'Poppins', sans-serif;
  position: relative;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.popup-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-3);
  margin: 0;
}

.close-btn {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--color-3);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
}
.close-btn:hover { color: var(--color-1); }


.step-indicator {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin-bottom: 1.5rem;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  max-width: 100px;
  position: relative;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-2);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-2);
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.step-item.active .step-circle,
.step-item.done .step-circle {
  background: var(--color-1);
  border-color: var(--color-1);
  color: white;
}

.step-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: var(--color-2);
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
  max-width: 100%;
  min-height: 2.2em;
}
.step-item.active .step-label { color: var(--color-1); font-weight: bold; }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--color-2);
  margin-top: 15px;
  transition: background 0.3s;
}
.step-line.done { background: var(--color-1); }


.step-content { display: none; }
.step-content.active { display: block; }


.popup-input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 2px solid var(--color-2);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s;
  background: white;
  margin-bottom: 14px;
}
.popup-input:focus {
  border-color: var(--color-1);
  box-shadow: 0 0 0 3px rgba(254,160,36,0.15);
}

.popup-select {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9rem;
  border: 2px solid var(--color-2);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s;
  background: white;
  margin-bottom: 14px;
  cursor: pointer;
}
.popup-select:focus {
  border-color: var(--color-1);
  box-shadow: 0 0 0 3px rgba(254,160,36,0.15);
}

.phone-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

@supports not (gap: 10px) {
  .phone-row select { margin-right: 10px; }
  .popup-nav .btn-back { margin-right: 10px; }
}
.phone-row select {
  flex: 0 0 40%;
  min-width: 0;
  padding: 10px 8px;
  font-size: 0.8rem;
  border: 2px solid var(--color-2);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s;
  background: white;
  cursor: pointer;
}
.phone-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 0.9rem;
  border: 2px solid var(--color-2);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.25s;
  background: white;
}
.phone-row select:focus, .phone-row input:focus {
  border-color: var(--color-1);
  box-shadow: 0 0 0 3px rgba(254,160,36,0.15);
}


.price-info-box {
  background: white;
  border: 2px solid var(--color-1);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  font-size: 0.9rem;
}
.price-info-box .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
}
.price-info-box .label { color: var(--color-2); font-size: 0.82rem; }
.price-info-box .label.reserve { color: #b91c1c; }
.price-info-box .value { font-weight: bold; color: var(--color-3); }
.price-info-box .value.highlight { color: var(--color-1); font-size: 1.05rem; }
.price-info-box .value.reserve   { color: #b91c1c; font-size: 1.05rem; }

.account-copy-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-family: monospace;
  word-break: break-all;
}
.btn-copy {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.btn-copy:hover { background: #ddd; }


.secretary-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1a7a40;
  color: white;
  border-radius: 8px;
  padding: 12px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  margin: 10px 0 14px;
  transition: opacity 0.2s;
}
.secretary-btn:hover { opacity: 0.88; }
.secretary-btn svg { width: 1.2rem; height: 1.2rem; }
.inline-icon { width: 1em; height: 1em; vertical-align: -0.15em; }


.voucher-label {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-2);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
  margin-bottom: 6px;
}
.voucher-label:hover { background: var(--color-1); }
.file-name { font-size: 0.75rem; color: var(--color-2); display: block; margin-bottom: 12px; }
.file-name.selected { color: var(--success, #38a169); font-weight: bold; }
.demo-file-hint { font-size: 0.72rem; color: #64748b; margin: -6px 0 10px; }


.popup-nav {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.btn-back {
  flex: 1;
  padding: 11px;
  background: white;
  color: var(--color-3);
  border: 2px solid var(--color-2);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-back:hover { border-color: var(--color-1); }
.btn-next {
  flex: 2;
  padding: 11px;
  background: var(--color-1);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.25s;
  letter-spacing: 0.04rem;
}
.btn-next:hover { background: var(--color-2); }
.btn-next:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-next.full { flex: 1; }


.summary-box {
  background: white;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  font-size: 0.88rem;
}
.summary-box .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f0f0f0;
}
.summary-box .summary-row:last-child { border-bottom: none; }
.summary-box .summary-label { color: var(--color-2); }
.summary-box .summary-row span:last-child { font-weight: bold; word-break: break-word; }

textarea.popup-input { min-height: 70px; resize: vertical; font-family: 'Roboto', sans-serif; }


.slot-hint {
  font-size: 0.88rem;
  color: var(--color-2);
  margin-bottom: 12px;
}

.slot-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--color-2);
}

.slot-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(134,137,84,0.25);
  border-top-color: var(--color-1);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }


.slot-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.slot-date-chip {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  background: white;
  color: var(--color-3);
  border: 2px solid var(--color-2);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
}
.slot-date-chip:hover  { background: rgba(134,137,84,0.1); }
.slot-date-chip.active { background: var(--color-2); color: white; border-color: var(--color-2); }

.slot-time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

.slot-btn {
  padding: 10px 6px;
  min-height: 44px;
  font-size: 0.85rem;
  font-weight: 600;
  background: white;
  color: var(--color-2);
  border: 2px solid var(--color-2);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.slot-btn:hover { background: rgba(254,160,36,0.12); border-color: var(--color-1); color: var(--color-3); }
.slot-btn.selected { background: var(--color-1); border-color: var(--color-1); color: white; }

.no-slots {
  text-align: center;
  color: #999;
  font-size: 0.88rem;
  padding: 16px 0;
}

.slot-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-3);
}

.slot-week-btn {
  background: none;
  border: 2px solid var(--color-2);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-2);
  transition: background 0.2s, color 0.2s;
  min-height: 32px;
}
.slot-week-btn:hover:not(:disabled) { background: var(--color-1); border-color: var(--color-1); color: white; }
.slot-week-btn:disabled { opacity: 0.35; cursor: default; }




@media (max-width: 768px) {
  .slot-time-grid { grid-template-columns: repeat(3, 1fr); }
  .summary-box .summary-row { flex-wrap: wrap; gap: 2px 6px; }
}

@media (max-width: 1100px) {
  h1 { font-size: 2rem; letter-spacing: 0; }
  .subtitle { font-size: 1.7rem; }
  .text-container { background: var(--creamy-white); opacity: 0.85; }
  .h3-container { width: 100%; margin: 0; padding: 0; }
  .h3-container p { font-size: 1rem; }
  .card { padding: 0; margin: 0; }
  .card p { font-size: 1rem; }
  nav { display: none; }
  .logo { height: 45px; }
  .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    font-size: 38px;
    line-height: 1;
    color: var(--color-1);
    cursor: pointer;
  }
  .responsive-nav {
    position: relative;
    background: var(--color-3);
    display: flex;
    margin: 10px auto 0;
    padding: 6px 12px;
    width: 70%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
  }
  .responsive-nav .logo {
    display: block;
    width: 42px;
    height: 42px;
    margin: 0;
    object-fit: contain;
  }
  .responsive-menu {
    display: none;
    flex-direction: column;
    background: var(--color-3);
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    margin-top: 5px;
    border-radius: 10px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    padding: 6px 0;
    gap: 2px;
  }
  .responsive-menu li { padding: 0; margin: 0; text-align: center; list-style: none; width: 100%; }
  .responsive-menu a {
    display: block;
    padding: 11px 14px;
    color: var(--creamy-white);
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
  }
  .responsive-menu a:hover { color: var(--color-1); }
  #menu-toggle:checked + .logo + .menu-icon + .responsive-menu { display: flex; }
  .profile-container { margin: 0; flex-direction: row; align-items: center; justify-content: center; }
  .profile-container p { margin: 0; font-size: 1rem; text-align: center; }
  .card button { font-size: 0.8rem; margin-top: 0; margin-bottom: 1rem; }
  .plan-description { padding: 0.75rem; }
}

@media (max-width: 600px) {
  .responsive-nav {
    min-height: 54px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .responsive-nav .logo {
    width: 40px;
    height: 40px;
    margin: 0;
  }
  .responsive-menu a { font-size: 0.86rem; }
  .responsive-menu li { font-size: 0.86rem; }
  .menu-icon {
    width: 40px;
    height: 40px;
    margin: 0;
    font-size: 34px;
  }
  h2 { font-size: 1.6rem; }
  .title-div { margin-top: 1.5rem; }
  .profile-img { width: 50%; }
  .profile-container p { font-size: 0.65rem; }
  .plan-description { padding: 0.5rem; }
  .logo-footer-wrap { width: 2.5rem; height: 2.5rem; }
  .logo-footer { width: 2rem; height: 2rem; }
  .logo-texto { font-size: 0.9rem; }

  
  .popup { padding: 8px; align-items: center; }
  .popup-container {
    width: 100%;
    max-width: calc(100vw - 16px);
    max-height: 95vh;
    margin: auto;
  }
  .popup-content {
    border-radius: 16px;
    padding: 20px 16px max(24px, env(safe-area-inset-bottom));
    max-height: 95vh;
    overflow-y: auto;
  }
  .slot-time-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-box .summary-row { flex-wrap: wrap; gap: 2px 6px; }
  .popup-title { font-size: 1.25rem; }
  .phone-row select { flex: 0 0 45%; font-size: 0.75rem; }
  .price-info-box .row { flex-direction: column; align-items: flex-start; gap: 2px; }
}

@media (max-width: 450px) {
  h1 { font-size: 1.4rem; letter-spacing: 0; }
  .subtitle { font-size: 1.25rem; }
  .card, main { padding: 10px; }
  .logo-footer-wrap { width: 2rem; height: 2rem; }
  .logo-footer { width: 1.6rem; height: 1.6rem; }
  .logo-texto { font-size: 0.7rem; gap: 5px; }

  .popup-content { padding: 16px 12px max(24px, env(safe-area-inset-bottom)); }
  .popup-title { font-size: 1.1rem; }
  .step-circle { width: 26px; height: 26px; font-size: 0.75rem; }
  .step-label { font-size: 0.6rem; letter-spacing: 0; line-height: 1.1; }
  .step-item { max-width: 74px; }
  .popup-input { font-size: 0.88rem; padding: 9px 10px; }
  .popup-select { font-size: 0.85rem; padding: 9px 10px; }
  .phone-row { gap: 6px; }
  .phone-row select { flex: 0 0 46%; font-size: 0.7rem; padding: 9px 6px; }
  .btn-back, .btn-next { font-size: 0.88rem; padding: 10px; }
  .summary-box { font-size: 0.82rem; }
  .price-info-box { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bounce-arrow { animation: none; }
  .slot-spinner { animation-duration: 0.01ms; }
}

.demo-info-toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(12px);
  max-width: min(680px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10050;
}

.demo-info-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
