:root {
  --bg-color: #25262a;
  --text-color: #fefefe;
  --highlight: #f5d976;
  --cta-green: #9be3a2;
  --cta-yellow: #fdf0ba;
  --specialty-tag: #44c450;
  --shadow: rgba(0, 0, 0, 0.1);
  --max-navbar-width: 1200px;
}

body {
  padding: 0;
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background: #42c3ff;
  /*
  background: #42c3ff url("../assets/img/back7.png") center center no-repeat;
  background-size: cover;
  background-attachment: fixed;
  min-height: 100vh;
  */
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-color);
  color: var(--text-color);
  width: auto;
  max-width: var(--max-navbar-width);
  margin: 1rem auto 0 auto;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  overflow: hidden;
  box-shadow: 4px 4px 6px var(--shadow);
  /*padding: 1rem 2rem;*/
  box-sizing: border-box;
  gap: 2rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  white-space: nowrap;
  margin-left: 20px;
  margin-right: auto;
}

.logo {
  height: 50px;
}

.doctor-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.prefix {
  color: var(--highlight);
  font-weight: bold;
}

.name {
  font-size: 1.3rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 6px;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  color: var(--highlight);
  text-decoration: none;
  position: relative;
  font-size: 1rem;
  flex: 0 0 auto;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--highlight);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  transition: width 0.3s ease-in-out;
  border-radius: 2px;
}

.nav-links a.active::after {
  width: 100%;
}

.cta-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--cta-green);
  border-radius: 0 1rem 0 0;
  overflow: hidden;
  min-width: 210px;
  max-width: min-content;
  text-align: center;
  margin-left: auto;
  margin-right: -1px;
}

.cta-button {
  all: unset; /* limpia los estilos por defecto */
  padding: 0.75rem 1rem;
  font-weight: bold;
  color: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: none; /* el fondo ya lo tiene el contenedor .cta-box */
  cursor: pointer;
}

.cta-button .arrow {
  font-size: 1.2rem;
  line-height: 1;
}

.phone {
  background: var(--cta-yellow);
  padding: 0.75rem;
  font-weight: 600;
  color: #444;
  font-size: 1rem;
}

/* Transición suave de .cta-box */
.cta-box {
  transition: opacity 0.5s ease;
}

/* Animación de progreso */
.cta-progress {
  position: relative;
  overflow: hidden;
}

.cta-progress::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(135deg, #fcf4d98c, #d4ffac80, #7cfc8894);
  animation: progressBar 4s linear forwards;
  width: 0%;
}

@keyframes progressBar {
  to {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .navbar {
    margin: 1rem 0.7rem 0 0.7rem;
  }
}

@media (max-width: 850px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 1rem 1rem 0 0;
    padding: 1rem;
    gap: 1rem;
  }

  .logo-area {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-box {
    flex-direction: row;
    border-radius: 1rem;
    width: 100%;
    max-width: 60%;
    margin-left: auto;
    margin-right: auto;
  }

  .cta-button {
    justify-content: center;
    margin: auto;
  }

  .logo {
    height: 40px;
  }

  .doctor-name .name {
    font-size: 1rem;
  }

  .phone {
    display: block;
    font-size: 0.9rem;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    gap: 1rem;
    flex-wrap: nowrap;
    justify-content: center;
  }

  .nav-links a {
    flex: 0 0 auto;
    text-align: center;
  }
}

@media (max-width: 736px) {
  .cta-box {
    max-width: 80%;
    margin-left: 10%;
    margin-right: 10%;
  }
}

@media (max-width: 570px) {
  .cta-box {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .cta-button {
    margin: inherit;
  }
}

@media (max-width: 474px) {
  .navbar {
    margin: 0;
    border-radius: 0 0 0.9rem 0.9rem;
  }
  .cta-button {
    font-size: 0.8rem;
  }
  .phone {
    display: none;
  }
}
