*,*::before,*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  display: flex;
  /* Stack page sections vertically and allow the page to grow. */
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
  background-color: #274928;
  color: #ffffff;
  margin: 0;
}


.announcement-bar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #6a5d55;
  color: #f8e0c8;
  text-align: center;
  padding: 0 10px;
  font-size: 1rem;
  z-index: 1000;
}

.announcement-bar p {
  margin: 0;
}

.nav-bar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #6a5d55;
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  color: #f8e0c8;
}

/* Style the links inside the navigation bar */
.nav-bar a {
  color: #f8e0c8;
  text-decoration: none;
  margin: 0 15px;
  font-size: 1.2rem;
}

nav {
  width: 100%;
  padding: 10px clamp(12px, 4vw, 40px);
  background-color: #6a5d55;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle {
  display: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #f8e0c8;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.nav-links a:hover {
  border-color: #dab88a;
  background-color: #dab88a;
  color: #274928;
}

.nav-links a:focus-visible {
  outline: 3px solid #f8e0c8;
  outline-offset: 3px;
}

.hero {
  width: 100%;
  height: clamp(240px, 48vw, 600px);
  max-height: 70vh;
  margin: 0 auto;
  overflow: hidden;
  background-color: #6a5d55;
}

.hero-content {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 500ms ease;
}

.hero-image.is-active {
  opacity: 1;
}

.hero-controls {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(12px, 4vw, 32px);
  background: linear-gradient(transparent, rgba(39, 73, 40, 0.72));
}

.hero-arrow {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #dab88a;
  border-radius: 50%;
  background-color: #6a5d55;
  color: #f8e0c8;
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  transition: background-color 160ms ease, color 160ms ease;
}

.hero-arrow:hover {
  background-color: #dab88a;
  color: #274928;
}

.hero-arrow:focus-visible,
.hero-dot:focus-visible {
  outline: 3px solid #f8e0c8;
  outline-offset: 3px;
}

.hero-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid #f8e0c8;
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
}

.hero-dot.is-active {
  border-color: #dab88a;
  background-color: #dab88a;
}

.secondary-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 272px));
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 32px 16px;
}

.secondary-action {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 100%;
  aspect-ratio: 272 / 397;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  overflow: hidden;
  border: 2px solid #dab88a;
  border-radius: 18px;
  background-color: #6a5d55;
  background-position: center;
  background-size: cover;
  color: #f8e0c8;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.secondary-action::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(39, 73, 40, 0.2),
    rgba(39, 73, 40, 0.82)
  );
  content: "";
}

.secondary-action--appointment {
  background-image: url("../img/agenda-tu-cita.jpeg");
}

.secondary-action--branch {
  background-image: url("../img/sucursales.jpeg");
}

.secondary-action--promotions {
  background-image: url("../img/promociones.jpeg");
}

.secondary-action i {
  color: #dab88a;
  font-size: 2.5rem;
}

.secondary-action__text {
  max-width: 90%;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

a.secondary-action {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

a.secondary-action:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

a.secondary-action:focus-visible {
  outline: 3px solid #f8e0c8;
  outline-offset: 4px;
}

@media (max-width: 920px) {
  .secondary-actions {
    grid-template-columns: repeat(2, minmax(0, 272px));
  }

  .secondary-action:last-child {
    grid-column: 1 / -1;
    justify-self: center;
  }
}

@media (max-width: 600px) {
  .secondary-actions {
    grid-template-columns: minmax(0, 272px);
  }

  .secondary-action:last-child {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-image {
    transition: none;
  }

  a.secondary-action {
    transition: none;
  }
}

.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 28px 16px 36px;
  text-align: center;
}

#countdown {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: min(100%, 1100px);
  margin: 0 auto;
}

.title-main {
  margin: 0 0 20px;
  font-size: 34px;
  color: #dab88a; /* A nice blue color for the title */
}

.time-box {
  flex: 0 1 140px;
  background: #6a5d55;
  padding: 20px;
  border-radius: 10px;
  min-width: 80px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  text-align: center;
}

.time-box span {
  font-size: 3rem;
  font-weight: bold;
  color: #dab88a; /* A nice blue color for the numbers */
}

.label {
  font-size: 1rem;
  color: #f8e0c8;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-container {
  flex: 0 1 150px;
  margin: 0;
}

.logo {
  display: block;
  width: 30vw;
  max-width: 150px; /* límite superior */
  height: auto;
  border-radius: 15px;
}

@media (max-width: 600px) {
  #countdown {
    gap: 12px;
  }

  .countdown-container .logo-container {
    flex-basis: 100%;
  }

  .countdown-container .logo {
    width: min(40vw, 150px);
    margin: 0 auto;
  }

  .time-box {
    flex: 1 1 calc(50% - 12px);
    max-width: 180px;
    padding: 16px 10px;
  }
}

/* Keep the logo on the left and the exam offer on the right. */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-top: 56px;
  padding: 24px clamp(12px, 4vw, 40px);
}

/* Keep the shared countdown logo styles from affecting the header logo. */
header .logo-container {
  flex: 0 0 auto;
  margin: 0;
}

/* Crop the header logo into a circle without stretching the image. */
header .logo {
  display: block;
  width: clamp(88px, 18vw, 150px);
  height: clamp(88px, 18vw, 150px);
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
}

/* Style the exam offer as a pill-shaped booking link. */
.eye-exam {
  display: flex;
  flex: 0 1 280px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 2px solid #dab88a;
  border-radius: 999px;
  background-color: #f8e0c8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  font-size: 17px;
  color: #274928;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.eye-exam:hover {
  background-color: #dab88a;
  transform: translateY(-2px);
}

.eye-exam:focus-visible {
  outline: 3px solid #274928;
  outline-offset: 3px;
}

.eye-exam i {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #6a5d55;
  font-size: 2.5rem;
}

.actions-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-icon {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border: 1px solid #dab88a;
  border-radius: 12px;
  background-color: #6a5d55;
  color: #dab88a;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.action-icon__label {
  display: none;
}

.action-icon i {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  font-size: 2.5rem;
}

.action-icon:hover {
  transform: translateY(-2px);
  background-color: #dab88a;
  color: #274928;
}

.action-icon:focus-visible {
  outline: 3px solid #274928;
  outline-offset: 3px;
}

.eye-exam__text {
  font-size: clamp(0.8rem, 2vw, 1rem);
  line-height: 1.35;
}

.free-exam {
  font-size: 1.2em;
  font-weight: 700;
}

@media (max-width: 600px) {
  header {
    flex-wrap: wrap;
    align-items: center;
  }

  header .actions-icons {
    order: 2;
    margin-left: auto;
    gap: 6px;
  }

  .eye-exam {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
  }

  .action-icon {
    width: 42px;
    height: 42px;
  }

  .action-icon i {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 1.5rem;
  }

  .action-icon--account {
    display: flex;
    width: auto;
    min-width: 42px;
    height: auto;
    flex-direction: column;
    gap: 2px;
    padding: 3px 4px;
    border: 0;
    background: transparent;
  }

  .action-icon--account .action-icon__label {
    display: block;
    white-space: nowrap;
    font-size: 0.65rem;
  }

  .action-icon--cart {
    display: none;
  }

  nav {
    position: relative;
    z-index: 1101;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    height: 56px;
    padding: 4px 12px;
    background: transparent;
    box-shadow: none;
  }

  .mobile-menu-toggle {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    padding: 0;
    border: 1px solid #dab88a;
    border-radius: 12px;
    background-color: #6a5d55;
    cursor: pointer;
  }

  .mobile-menu-toggle img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
  }

  .mobile-menu-toggle:focus-visible {
    outline: 3px solid #f8e0c8;
    outline-offset: 3px;
  }

  nav .nav-links {
    display: none;
  }

  nav.menu-open {
    position: fixed;
    inset: 0 auto auto 0;
    display: block;
    width: min(360px, 100vw);
    height: min(800px, 100dvh);
    overflow-y: auto;
    padding: 12px 20px 24px;
    background-color: #6a5d55;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  nav.menu-open .mobile-menu-toggle {
    display: grid;
    margin-left: auto;
  }

  nav.menu-open .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 20px;
  }

  nav.menu-open .nav-links a {
    padding: 14px 16px;
    border-radius: 10px;
    text-align: left;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open::before {
    position: fixed;
    z-index: 1100;
    inset: 0;
    background: rgba(15, 24, 16, 0.62);
    content: "";
  }
}

.booking-page {
  flex: 1;
  padding: 72px 20px 48px;
}

.booking-card {
  width: min(100%, 640px);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 40px);
  border: 2px solid #dab88a;
  border-radius: 20px;
  background-color: #f8e0c8;
  color: #274928;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.booking-card h1 {
  margin: 0 0 12px;
  color: #274928;
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

.booking-intro {
  margin: 0 0 28px;
  text-align: center;
  line-height: 1.5;
}

.booking-form {
  display: grid;
  gap: 22px;
}

.booking-options {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 18px;
  border: 1px solid #a86648;
  border-radius: 16px;
}

.booking-options legend {
  padding: 0 8px;
  color: #274928;
  font-weight: 700;
}

.booking-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.booking-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #274928;
}

.booking-field {
  display: grid;
  gap: 7px;
}

.booking-field label {
  font-weight: 700;
}

.booking-field input {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #a86648;
  border-radius: 8px;
  background-color: #fffaf4;
  color: #274928;
  font: inherit;
}

.booking-field input:focus-visible,
.booking-option input:focus-visible {
  outline: 3px solid #6a5d55;
  outline-offset: 2px;
}

.booking-note {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}

.booking-submit {
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background-color: #6a5d55;
  color: #f8e0c8;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.booking-submit:hover {
  background-color: #4f443e;
}

.booking-submit:focus-visible {
  outline: 3px solid #274928;
  outline-offset: 3px;
}

.booking-back {
  display: block;
  width: fit-content;
  margin: 24px auto 0;
  color: #274928;
  font-weight: 700;
  text-align: center;
}

.footer-copy {
  /* Keep the copyright notice centered across the full footer width. */
  grid-column: 1 / -1;
  margin: 0;
  width: 100%;
  text-align: center;
  font-size: 0.9rem;
  color: #f8e0c8;
}

footer {
  /* Use three equal columns for the main footer sections on desktop. */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 28px 24px;
  width: 100%;
  margin-top: auto;
  padding: 36px clamp(20px, 6vw, 80px) 20px;
  background-color: #6a5d55;
  color: #f8e0c8;
}

footer h2 {
  margin: 0 0 12px;
  color: #dab88a;
  font-size: 1.15rem;
}

footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

footer li + li {
  margin-top: 8px;
}

footer a {
  color: #f8e0c8;
  text-decoration: none;
  cursor: pointer;
}

footer a:hover {
  color: #dab88a;
}

.promotions {
  /* Align the first section to the left edge of its column. */
  justify-self: start;
}

.we {
  /* Center the About section in the middle column. */
  justify-self: center;
}

.legal {
  /* Align the Legal section to the right edge of its column. */
  justify-self: end;
}

.customer-service {
  /* Place customer service on its own full-width row below the columns. */
  grid-column: 1 / -1;
  width: 100%;
  padding-top: 20px;
  border-top: 1px solid rgba(248, 224, 200, 0.35);
  text-align: center;
}

.customer-service ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
}

@media (max-width: 600px) {
  footer {
    /* Stack footer sections vertically on narrow screens. */
    grid-template-columns: 1fr;
    gap: 24px;
    padding-right: 20px;
    padding-left: 20px;
  }

  .promotions,
  .we,
  .legal {
    justify-self: stretch;
    text-align: center;
  }

  .customer-service,
  .footer-copy {
    grid-column: 1;
  }
}

/* STEP 1: Style the dialog's size, colors, and shape.
   On small screens, the width shrinks so the modal fits the viewport. */
.anniversary-modal {
  position: fixed;
  width: min(800px, calc(100vw - 32px));
  height: 452px;
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background: #f8e0c8;
  color: #274928;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

/* The backdrop is the dark layer behind the open dialog. */
.anniversary-modal::backdrop {
  background: rgba(15, 24, 16, 0.78);
  backdrop-filter: blur(4px);
}

/* STEP 2: When the dialog is open, arrange its text and image side by side. */
.anniversary-modal[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34%;
  animation: anniversary-modal-appear 250ms ease-out;
}

/* Center the text vertically and leave comfortable space around it. */
.anniversary-modal__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 30px 24px 30px 38px;
}

/* STEP 3: Style the title, subtitle, large anniversary number, and message.
   The clamp() values let text scale smoothly for different screen widths. */
.anniversary-modal__content h1 {
  margin: 0;
  color: #274928;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.anniversary-modal__content h2 {
  margin: 12px 0 0;
  color: #8a563d;
  font-size: 1rem;
  letter-spacing: 0.22em;
}

.anniversary-modal__number {
  margin: -12px 0 -15px;
  color: #a86648;
  font-size: clamp(8rem, 19vw, 10rem);
  font-weight: 800;
  line-height: 1;
}

.anniversary-modal__message {
  max-width: 420px;
  margin: 16px 0 0;
  font-size: 1rem;
  line-height: 1.55;
}

.anniversary-modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Place the close button in the top-right corner above the dialog content. */
.anniversary-modal__close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(39, 73, 40, 0.88);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
}

.anniversary-modal__close:hover {
  background: #18351a;
}

@keyframes anniversary-modal-appear {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* STEP 4: On phones, stack the text and image instead of squeezing them side by side. */
@media (max-width: 600px) {
  .anniversary-modal {
    width: calc(100vw - 24px);
    height: min(620px, calc(100dvh - 24px));
    border-radius: 14px;
  }

  .anniversary-modal[open] {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(100px, 30%);
  }

  .anniversary-modal__content {
    overflow-y: auto;
    padding: 24px 26px;
  }

  .anniversary-modal__content h1 {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  .anniversary-modal__number {
    font-size: clamp(7rem, 28vw, 9rem);
  }
}

/* Respect visitors who have asked their device to reduce animations. */
@media (prefers-reduced-motion: reduce) {
  .anniversary-modal[open] {
    animation: none;
  }
}
