/* ============================================================
   IDU - Instituto de Diagnóstico Urológico
   Hoja de estilos principal
   ============================================================ */

/* ---------- 1. Variables ---------- */
:root {
  --navy: #0B1F3A;
  --navy-dark: #060F1E;
  --teal: #1A7A78;
  --teal-light: #25A8A5;
  --stone: #EEF2F5;
  --border-soft: #dce4ed;
  --white: #FFFFFF;
  --text: #2C3E50;
  --muted: #6B7A8D;
}

/* ---------- 2. Reset + base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
}

.display-font {
  font-family: 'Cormorant Garamond', serif;
}

.tirra-regular {
  font-family: 'Tirra', cursive;
  font-weight: 600;
}

/* ---------- 3. Topbar ---------- */
.topbar {
  background: var(--stone);
  border-bottom: 1px solid var(--navy);
}

.topbar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar li {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--text);
}

.topbar a {
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}

.topbar a:hover {
  color: var(--teal-light);
}

.topbar i {
  color: var(--teal-light);
  font-size: .9rem;
}

.topbar li:nth-child(1) a {
  color: var(--teal-light);
}

.topbar li:nth-child(2) a,
.topbar li:nth-child(3) a {
  color: var(--teal);
}

/* ---------- 4. Navbar ---------- */
.navbar {
  background: rgba(11, 31, 58, .97);
  backdrop-filter: blur(8px);
  padding: 1rem 0;
  transition: padding .3s;
}

/* .navbar-brand img {
  height: 48px;
} */

.navbar-toggler {
  border: 1px solid rgba(255, 255, 255, .3);
  padding: .5rem .65rem;
  transition: border-color .25s, background .25s;
}

.navbar-toggler:hover,
.navbar-toggler:focus {
  border-color: var(--teal-light);
  background: rgba(26, 122, 120, .12);
  box-shadow: none;
}

/* Oculta el icono por defecto de Bootstrap */
.navbar-toggler-icon {
  display: none;
}

/* Icono hamburguesa animado: 3 líneas → X */
.hamburger-icon {
  display: block;
  position: relative;
  width: 24px;
  height: 18px;
}

.hamburger-icon span {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  opacity: 1;
  transform: rotate(0deg);
  transition: top .25s ease, transform .25s ease, opacity .2s ease;
}

.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 8px; }
.hamburger-icon span:nth-child(3) { top: 16px; }

/* Estado desplegado: las 3 líneas se transforman en una X */
.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(1) {
  top: 8px;
  transform: rotate(135deg);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(2) {
  opacity: 0;
  transform: translateX(-12px);
}

.navbar-toggler[aria-expanded="true"] .hamburger-icon span:nth-child(3) {
  top: 8px;
  transform: rotate(-135deg);
}

/* Transición animada del menú en móvil (se activa al expandir/contraer) */
@media (max-width: 991.98px) {

  /* Suaviza aún más el colapso de altura de Bootstrap */
  .navbar-collapse {
    transition: height .35s ease;
  }

  /* Estado base de cada item: invisible y desplazado hacia arriba */
  .navbar-collapse .nav-item {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .28s ease, transform .28s ease;
  }

  /* Cuando el menú está desplegado, los items aparecen en cascada */
  .navbar-collapse.show .nav-item {
    opacity: 1;
    transform: translateY(0);
  }

  .navbar-collapse.show .nav-item:nth-child(1) { transition-delay: .08s; }
  .navbar-collapse.show .nav-item:nth-child(2) { transition-delay: .12s; }
  .navbar-collapse.show .nav-item:nth-child(3) { transition-delay: .16s; }
  .navbar-collapse.show .nav-item:nth-child(4) { transition-delay: .20s; }
  .navbar-collapse.show .nav-item:nth-child(5) { transition-delay: .24s; }
  .navbar-collapse.show .nav-item:nth-child(6) { transition-delay: .28s; }
  .navbar-collapse.show .nav-item:nth-child(7) { transition-delay: .32s; }

  /* Separador visual y fondo semitransparente cuando el menú está abierto */
  .navbar-collapse.show {
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: .5rem;
    padding-top: .5rem;
  }
}

.nav-link {
  color: rgba(255, 255, 255, .8) !important;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .5rem 1rem !important;
  transition: color .2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--teal-light) !important;
}

.dropdown-menu {
  background: var(--navy);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 2px;
  padding: .5rem 0;
}

.dropdown-item {
  color: rgba(255, 255, 255, .7);
  font-size: .82rem;
  padding: .55rem 1.25rem;
  transition: color .2s, background .2s;
}

.dropdown-item:hover,
.dropdown-item.active {
  color: var(--teal-light);
  background: rgba(26, 122, 120, .15);
}

.btn-nav {
  background: var(--teal) !important;
  color: #fff !important;
  border-radius: 2px;
  padding: .45rem 1.2rem !important;
  transition: background .2s;
}

.btn-nav:hover {
  background: var(--teal-light) !important;
}

/* ---------- 5. Hero ---------- */
.hero {
  min-height: 91svh;
  background: url('../img/portada_alt_ok.png') center / cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 2rem 0;
}

.hero::before {
  display: none;
}

@media (max-width: 768px) {
  .hero {
    min-height: 80svh;
  }
}

/* Scrim detrás del texto: garantiza contraste WCAG contra cualquier fondo */
.hero-card {
  position: relative;
  max-width: 756px;
  padding: 1.75rem 2rem;
  /* background: rgba(11, 31, 58, .72); */
  background-color: rgb(0 0 0 / 72%);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-radius: 4px;
  border-left: 4px solid var(--teal-light);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

@media (max-width: 576px) {
  .hero-card {
    padding: 1.5rem 1.25rem;
  }
}

.hero-kicker {
  font-size: .75rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal-light);
  font-weight: 600;
  margin-bottom: .75rem;
  opacity: 0;
  animation: fadeUp .8s .3s forwards;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
  opacity: 0;
  animation: fadeUp .9s .5s forwards;
}

.hero h1 em {
  font-style: normal;
  color: var(--teal-light);
  text-transform: uppercase;

}

.hero-sub {
  font-size: .95rem;
  color: rgba(255, 255, 255, .95);
  line-height: 1.65;
  margin-top: 1rem;
  opacity: 0;
  animation: fadeUp .9s .7s forwards;
}

.hero-ctas {
  margin-top: 1.25rem;
  opacity: 0;
  animation: fadeUp .9s .9s forwards;
}

.btn-outline-custom {
  border: 1px solid rgba(255, 255, 255, .3);
  color: #fff;
  padding: .8rem 2rem;
  border-radius: 2px;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: transparent;
  transition: border-color .2s, background .2s, color .2s;
}

.btn-outline-custom:hover {
  border-color: var(--teal-light);
  background: rgba(26, 122, 120, .15);
  color: #fff;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 6. Section base ---------- */
section {
  padding: 6rem 0;
}

.section-eyebrow {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--navy);
}

.divider-teal {
  width: 40px;
  height: 2px;
  background: var(--teal-light);
  margin: 1rem 0 1.5rem;
}

.divider-teal.animate-slide {
  transform-origin: left;
  animation: slideIn .42s cubic-bezier(.2, .9, .2, 1) forwards;
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
    opacity: 0;
  }

  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* ---------- 7. Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: .1s;
}

.reveal-delay-2 {
  transition-delay: .2s;
}

.reveal-delay-3 {
  transition-delay: .3s;
}

.reveal-delay-4 {
  transition-delay: .4s;
}

/* ---------- 8. Especialidades ---------- */
#especialidades {
  background: var(--stone);
}

.spec-card {
  background: var(--white);
  border-radius: 4px;
  padding: 2rem 1.5rem;
  height: 100%;
  border-bottom: 3px solid transparent;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}

.spec-card:hover {
  border-color: var(--teal-light);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .08);
  transform: translateY(-4px);
}

.spec-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.spec-icon i {
  font-size: 1.4rem;
  color: #fff;
}

.spec-card h3 {
  font-family: 'Tirra', cursive;
  font-size: 1.55rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .5rem;
}

.spec-card p {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

/* ---------- 9. Médicos ---------- */
.doctor-card {
  text-align: center;
  padding: 1.5rem;
}

.doctor-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--teal), var(--navy));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 3px solid var(--teal-light);
}

.doctor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--navy);
}

.doctor-spec {
  font-size: .8rem;
  color: var(--teal);
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.doctor-bio {
  font-size: .85rem;
  color: var(--muted);
  margin-top: .6rem;
  line-height: 1.6;
}

/* Obras sociales */
#obras img {
  width: 200px;
  max-width: 100%;
  height: auto;
}

/* ---------- 10. Contacto ---------- */
#contacto {
  background: var(--stone);
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  transition: background .25s, border-color .25s, box-shadow .25s, transform .25s;
}

.contact-card:hover {
  background: rgba(26, 122, 120, .08);
  border-color: var(--teal);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  transform: translateY(-3px);
}

.contact-card i {
  font-size: 1.8rem;
  color: var(--teal-light);
  margin-bottom: .75rem;
  display: block;
}

.contact-card .label {
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--teal);
}

.contact-card .value {
  font-size: .95rem;
  margin-top: .25rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--teal);
}

/* Variantes para la sección de contacto del index */
.contact-eyebrow {
  color: var(--muted);
}

.contact-schedule {
  color: var(--teal);
  font-size: 1rem;
  margin-bottom: 0;
}

/* ---------- 11. Footer ---------- */
.site-footer {
  background: var(--navy);
  padding: 3rem 0 0;
  color: rgba(255, 255, 255, .6);
  font-size: .85rem;
}

.site-footer h2 {
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 1rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

.site-footer a {
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
  transition: color .2s;
}

.site-footer a:hover {
  color: var(--teal-light);
}

.site-footer i {
  color: var(--teal-light);
}

.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .78rem;
  color: rgba(255, 255, 255, .35);
  text-align: center;
}

/* ---------- 12. Page header (información para pacientes) ---------- */
.page-header {
  background: linear-gradient(135deg, var(--navy) 55%, #143050 100%);
  position: relative;
  padding: 5rem 0 3.5rem;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='1.5' fill='rgba(26,122,120,0.18)'/%3E%3C/svg%3E") repeat;
}

.page-header h1 {
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  position: relative;
}

.breadcrumb-idu {
  position: relative;
}

.breadcrumb-idu .breadcrumb-item a {
  color: var(--teal-light);
  text-decoration: none;
  font-size: .82rem;
}

.breadcrumb-idu .breadcrumb-item.active {
  color: rgba(255, 255, 255, .5);
  font-size: .82rem;
}

.breadcrumb-idu .breadcrumb-item+.breadcrumb-item::before {
  color: rgba(255, 255, 255, .3);
}

/* ---------- 13. Sidebar nav ---------- */
.sidebar-nav {
  position: sticky;
  top: 90px;
}

.sidebar-nav .nav-title {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 1rem;
}

.sidebar-nav a {
  display: block;
  font-size: .83rem;
  color: var(--muted);
  padding: .45rem 0 .45rem .75rem;
  border-left: 2px solid #e0e6ed;
  text-decoration: none;
  transition: color .2s, border-color .2s;
  line-height: 1.4;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: var(--teal);
  border-left-color: var(--teal-light);
}

/* ---------- 14. Patient articles ---------- */
.section-main {
  padding: 4rem 0 5rem;
}

.patient-article {
  padding: 2.5rem 0;
  border-bottom: 1px solid #e8edf2;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}

.patient-article:last-of-type {
  border-bottom: none;
}

.patient-article.visible {
  opacity: 1;
  transform: none;
}

.patient-article h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: var(--navy);
  margin-bottom: .4rem;
}

.patient-article p {
  font-size: .93rem;
  color: var(--text);
  line-height: 1.8;
  margin: 0;
}

.patient-cta .btn-nav {
  padding: .8rem 2rem !important;
  font-size: .88rem;
}

/* Scroll-margin para anclas detrás del navbar fijo */
#cistitis-aguda,
#disfuncion-sexual-erectil,
#calculos-renales-y-ureterales,
#hiperplasia-prostatica-benigna,
#cancer-de-prostata-y-antigeno-prostatico-especifico-psa,
#vasectomia,
#incontinencia-urinaria {
  scroll-margin-top: 90px;
}

/* ---------- 15. Botones flotantes ---------- */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(11, 31, 58, .18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .28s ease, transform .28s ease, background .2s;
  z-index: 1100;
  pointer-events: none;
  text-decoration: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--teal);
  color: #fff;
}

.back-to-top i {
  font-size: 1.05rem;
}

.call-now-floating {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1090;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--teal);
  color: #fff;
  padding: .65rem 1.2rem;
  border-radius: 2px;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .05em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
  transition: background .2s, transform .2s;
}

.call-now-floating:hover {
  background: var(--teal-light);
  color: #fff;
  transform: translateY(-2px);
}

.call-now-floating img {
  width: 18px;
  filter: brightness(0) invert(1);
}

/* ---------- 16. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {

  .hero-kicker,
  .hero h1,
  .hero-sub,
  .hero-ctas {
    animation: none;
    opacity: 1;
  }

  .reveal,
  .patient-article {
    transition: none;
    opacity: 1;
    transform: none;
  }
}