/* ===========================
   ROTARY EL TIGRE - ESTILOS
   =========================== */

:root {
  --blue: #005daa;
  --blue-dark: #003b74;
  --blue-deep: #002b55;
  --yellow: #f7a81b;
  --yellow-soft: #fff4d8;
  --ink: #17233a;
  --muted: #61708a;
  --white: #ffffff;
  --light: #f5f8fc;
  --line: #dce5f0;
  --shadow: 0 12px 35px rgba(18, 45, 83, .11);
  --radius: 16px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.6;
}
body.modal-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.container {
  width: min(var(--container), calc(100% - 40px));
  margin: 0 auto;
}

.section { padding: 88px 0; }
.section-small { padding: 62px 0; }

h1, h2, h3, .brand { font-family: "Montserrat", Arial, sans-serif; }
h1, h2, h3, p { margin-top: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.18; }
h3 { line-height: 1.28; }

.eyebrow {
  margin-bottom: 10px;
  color: rgba(255,255,255,.8);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .75rem;
  letter-spacing: .14em;
  font-weight: 800;
}
.eyebrow.blue { color: var(--blue); }
.eyebrow.yellow { color: var(--yellow); }

.section-heading.center { text-align: center; }
.section-heading.light { color: var(--white); }
.section-heading.light p:not(.eyebrow) { max-width: 680px; margin: 0 auto; color: rgba(255,255,255,.82); }
.heading-line { width: 54px; height: 4px; border-radius: 3px; margin: 16px auto 0; background: var(--yellow); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid rgba(220,229,240,.9);
  backdrop-filter: blur(8px);
}
.nav-wrap {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.brand { display: inline-flex; align-items: center; min-width: 168px; }
.brand img { width: 300px; height: 90px; object-fit: contain; object-position: left center; }
.brand-fallback { display: none; color: var(--blue); font-weight: 800; font-size: 1.12rem; }

.main-nav { display: flex; align-items: center; gap: 25px; }
.main-nav > a {
  padding: 9px 0;
  color: #33405a;
  font-size: .9rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: .2s ease;
}
.main-nav > a:hover, .main-nav > a.active { color: var(--blue); border-color: var(--yellow); }
.main-nav .nav-cta {
  padding: 10px 19px;
  color: var(--blue-deep);
  background: var(--yellow);
  border: 0;
  border-radius: 7px;
}
.main-nav .nav-cta:hover { color: var(--blue-deep); filter: brightness(.96); }

.menu-toggle {
  display: none;
  width: 43px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--blue); }

.hero {
  min-height: 615px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(0,47,96,.96) 0%, rgba(0,61,115,.88) 38%, rgba(0,61,115,.30) 66%, rgba(0,61,115,.16) 100%),
    url("../img/portada.jpg") center/cover no-repeat,
    linear-gradient(135deg, #1b4f81 0%, #0b2d5c 50%, #d49218 160%);
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,38,79,.42), transparent); }
.hero-content { position: relative; color: var(--white); }
.hero h1 { max-width: 700px; margin-bottom: 19px; font-size: clamp(2.75rem, 5.8vw, 5rem); letter-spacing: -.035em; line-height: 1.03; }
.hero-text { max-width: 570px; margin-bottom: 30px; font-size: clamp(1rem, 1.4vw, 1.16rem); color: rgba(255,255,255,.92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 21px;
  border: 0;
  border-radius: 7px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: .86rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--blue-deep); background: var(--yellow); }
.btn-primary:hover { background: #ffc044; }
.btn-secondary { color: var(--white); border: 1px solid rgba(255,255,255,.8); background: transparent; }
.btn-secondary:hover { color: var(--blue-deep); background: var(--white); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 16, 35, 0.72);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .25s ease, visibility .25s ease;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 32px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  transform: translateY(16px);
  transition: transform .25s ease;
}
.modal-backdrop.open .modal-dialog { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eef5fb;
  color: var(--blue-dark);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-header { margin-bottom: 18px; }
.modal-header h3 { margin-bottom: 8px; color: var(--blue-dark); font-size: 1.4rem; }
.modal-header p { margin-bottom: 0; color: var(--muted); }
.modal-form { padding: 0; border: 0; box-shadow: none; }
.modal-form .btn { width: 100%; margin-top: 4px; }

.impact { background: var(--light); }
.impact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.impact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--white);
  border: 1px solid #e8eef6;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgba(18,45,83,.05);
}
.impact-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  flex: 0 0 46px;
  color: var(--yellow);
  background: var(--yellow-soft);
  border-radius: 50%;
  font-size: 1.42rem;
}
.impact-card strong { display: block; color: var(--blue); font-family: "Montserrat"; font-size: 1.55rem; line-height: 1; }
.impact-card span { display: block; margin-top: 5px; color: var(--muted); font-size: .79rem; line-height: 1.2; }

.split-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(35px, 7vw, 95px); }
.about-copy p:not(.eyebrow) { color: var(--muted); }
.about-copy h2 { margin-bottom: 20px; }
.text-link { display: inline-flex; gap: 8px; color: var(--blue); font-family: "Montserrat"; font-size: .85rem; font-weight: 800; }
.text-link:hover { color: var(--blue-deep); }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

.photo-placeholder {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  background: linear-gradient(135deg, #e7eef8, #cedff1);
}
.photo-placeholder img {
  width: 100%; height: 100%;
  position: absolute; inset: 0;
  object-fit: cover;
}
.photo-placeholder img[src=""] { display: none; }
.image-fallback {
  position: absolute; inset: 0;
  display: grid;
  place-content: center;
  padding: 20px;
  color: var(--blue-dark);
  text-align: center;
  font-family: "Montserrat";
  font-weight: 800;
  background:
    radial-gradient(circle at 25% 25%, rgba(247,168,27,.45) 0 4%, transparent 4.4%),
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(205,223,241,.92));
}
.image-fallback small { margin-top: 8px; color: #61708a; font-family: "Open Sans"; font-weight: 700; }
.photo-placeholder:has(img:not([src=""])) .image-fallback { display: none; }
.about-photo { min-height: 390px; border-radius: var(--radius); box-shadow: var(--shadow); }

.projects-section { background: var(--light); }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-top h2 { margin-bottom: 0; }
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; }
.project-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid #e6edf5;
  border-radius: 13px;
  box-shadow: 0 7px 22px rgba(18,45,83,.06);
  transition: transform .2s ease, box-shadow .2s ease;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-image { height: 210px; }
.card-content { padding: 23px; }
.tag { display: inline-block; margin-bottom: 10px; color: var(--blue); font-family: "Montserrat"; font-size: .68rem; letter-spacing: .08em; font-weight: 800; }
.card-content h3 { margin-bottom: 10px; font-size: 1.18rem; }
.card-content p { min-height: 70px; color: var(--muted); font-size: .9rem; }
.mini-btn { display: inline-flex; padding: 8px 14px; color: var(--white); background: var(--blue); border-radius: 5px; font-family: "Montserrat"; font-size: .72rem; font-weight: 800; }
.mini-btn:hover { background: var(--blue-dark); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { overflow: hidden; border: 1px solid #e6edf5; border-radius: 12px; background: var(--white); box-shadow: 0 7px 22px rgba(18,45,83,.05); }
.news-image { height: 185px; }
.news-content { padding: 21px; }
.news-date { color: var(--blue); font-family: "Montserrat"; font-size: .65rem; font-weight: 800; letter-spacing: .08em; }
.news-content h3 { margin: 10px 0; font-size: 1.05rem; }
.news-content p { color: var(--muted); font-size: .88rem; }
.text-link.small { font-size: .77rem; }

.join-section { padding: 86px 0; background: linear-gradient(130deg, var(--blue-deep), var(--blue)); }
.join-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 19px; margin-top: 36px; }
.join-card { display: block; padding: 28px; color: var(--white); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; background: rgba(255,255,255,.08); transition: .2s ease; }
.join-card:hover { transform: translateY(-4px); border-color: var(--yellow); background: rgba(255,255,255,.14); }
.join-icon { display: grid; width: 45px; height: 45px; place-items: center; margin-bottom: 16px; color: var(--blue-deep); background: var(--yellow); border-radius: 50%; font-size: 1.2rem; }
.join-card h3 { margin-bottom: 8px; }
.join-card p { color: rgba(255,255,255,.78); font-size: .9rem; }
.join-card > span:last-child { color: var(--yellow); font-family: "Montserrat"; font-size: .78rem; font-weight: 800; }

.support-section { padding: 60px 0; }
.support-box { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 40px; border: 1px solid #e6edf5; border-radius: var(--radius); background: var(--light); }
.support-box h2 { margin-bottom: 12px; }
.support-box p:not(.eyebrow) { max-width: 690px; margin-bottom: 0; color: var(--muted); }

.contact-section { background: #fbfcfe; }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(34px, 7vw, 90px); }
.contact-intro { color: var(--muted); }
.contact-list { margin-top: 28px; }
.contact-list p { margin-bottom: 10px; color: var(--muted); }
.contact-list strong { color: var(--ink); }
.contact-list a { color: var(--blue); font-weight: 700; }
.contact-form { padding: 28px; background: var(--white); border: 1px solid #e5edf5; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form label { display: block; margin-bottom: 16px; color: var(--ink); font-family: "Montserrat"; font-size: .82rem; font-weight: 800; }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: 7px; padding: 12px 13px;
  border: 1px solid #cdd9e7; border-radius: 7px;
  color: var(--ink); background: #fff; outline: none;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,93,170,.12); }
.contact-form textarea { resize: vertical; }
.form-message { min-height: 22px; margin: 12px 0 0; color: var(--blue); font-size: .85rem; font-weight: 700; }

.site-footer { color: rgba(255,255,255,.83); background: var(--blue-deep); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr 1.2fr; gap: 38px; padding: 56px 0; }
.site-footer h3 { margin-bottom: 13px; color: var(--white); font-size: 1rem; }
.site-footer a { display: block; margin: 8px 0; font-size: .85rem; }
.site-footer a:hover { color: var(--yellow); }
.footer-brand img { width: 180px; height: 63px; object-fit: contain; object-position: left center; margin-bottom: 14px; }
.footer-brand p, .site-footer p { font-size: .84rem; line-height: 1.5; }
.newsletter-form { display: flex; margin-top: 13px; }
.newsletter-form input { min-width: 0; width: 100%; padding: 10px; border: 0; border-radius: 5px 0 0 5px; outline: none; }
.newsletter-form button { padding: 10px 11px; color: var(--blue-deep); border: 0; border-radius: 0 5px 5px 0; background: var(--yellow); font-family: "Montserrat"; font-size: .7rem; font-weight: 800; cursor: pointer; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; color: rgba(255,255,255,.65); font-size: .75rem; }

.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  display: grid; width: 54px; height: 54px; place-items: center;
  color: var(--white); background: #25D366; border-radius: 50%;
  box-shadow: 0 9px 22px rgba(0,0,0,.24); font-size: 1.65rem;
}
.whatsapp-float:hover { transform: scale(1.08); }

@media (max-width: 940px) {
  .main-nav { gap: 14px; }
  .main-nav > a { font-size: .82rem; }
  .impact-grid, .projects-grid, .news-grid, .join-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .container { width: min(100% - 30px, var(--container)); }
  .section { padding: 65px 0; }
  .section-small { padding: 50px 0; }
  .nav-wrap { min-height: 70px; }
  .brand img { width: 145px; height: 50px; }
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; top: 70px; left: 0; right: 0;
    display: none; padding: 13px 22px 21px;
    border-bottom: 1px solid var(--line); background: var(--white);
    box-shadow: 0 14px 28px rgba(18,45,83,.1);
  }
  .main-nav.open { display: grid; }
  .main-nav > a { padding: 11px 0; }
  .main-nav .nav-cta { display: inline-flex; width: max-content; margin-top: 6px; }
  .hero { min-height: 565px; background-position: 58% center; }
  .hero h1 { font-size: clamp(2.35rem, 12vw, 3.5rem); }
  .hero-actions { display: grid; }
  .hero-actions .btn { width: 100%; }
  .impact-grid, .projects-grid, .news-grid, .join-grid, .split-grid, .contact-grid { grid-template-columns: 1fr; }
  .impact-card { padding: 17px; }
  .section-top, .support-box { align-items: flex-start; flex-direction: column; }
  .about-photo { min-height: 310px; }
  .card-content p { min-height: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom .container { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 380px) {
  .brand img { width: 128px; }
  .hero h1 { font-size: 2.2rem; }
}

/* ===========================
   JUNTA DIRECTIVA
   =========================== */
.board-grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-top: 42px !important;
}

.board-card {
  min-width: 0 !important;
}

.board-photo {
  height: 210px !important;
  min-height: 210px !important;
}

.board-info {
  padding: 14px 8px 16px !important;
}

.board-info h3 {
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
}

.board-info p {
  font-size: 0.62rem !important;
  line-height: 1.3 !important;
}

/* En pantallas pequeñas: no baja las tarjetas, se desplaza hacia los lados */
@media (max-width: 1100px) {
  .board-grid {
    display: flex !important;
    overflow-x: auto !important;
    gap: 14px !important;
    padding-bottom: 14px !important;
    scroll-snap-type: x mandatory;
  }

  .board-card {
    min-width: 175px !important;
    flex: 0 0 175px !important;
    scroll-snap-align: start;
  }
}

/* Movimiento suave al pasar el cursor sobre la junta directiva */

.miembro-junta {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.miembro-junta:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(18, 45, 83, 0.22) !important;
}

.miembro-junta:hover img {
  transform: scale(1.04);
}

.miembro-junta img {
  transition: transform 0.35s ease;
}

/* =========================================
   ANIMACIÓN PARA SERVICIOS MÉDICOS
   ========================================= */

.medical-box {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.medical-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(18, 45, 83, 0.14);
}

.medical-box summary {
  position: relative;
  overflow: hidden;
  transition: background 0.25s ease, padding-left 0.25s ease;
}

.medical-box summary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 93, 170, 0.07),
    transparent
  );
  transition: left 0.55s ease;
}

.medical-box summary:hover::before {
  left: 100%;
}

.medical-box summary:hover {
  padding-left: 27px;
  background: #f0f7ff;
}

.medical-box summary:hover strong {
  color: var(--blue);
}

.medical-box-icon {
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.medical-box:hover .medical-box-icon {
  transform: rotate(90deg) scale(1.08);
  color: #ffffff;
  background: var(--blue);
}

.medical-arrow {
  transition: transform 0.3s ease, color 0.3s ease;
}

.medical-box:hover .medical-arrow {
  color: var(--yellow);
  transform: translateX(5px);
}

.medical-box[open] .medical-arrow {
  transform: rotate(180deg);
}

.medical-box[open]:hover .medical-arrow {
  transform: rotate(180deg) translateX(-3px);
}

.medical-box-content {
  animation: abrirMedico 0.35s ease;
}

@keyframes abrirMedico {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.doctor-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(18, 45, 83, 0.1);
/* Decoración de semicírculos amarillos de fondo */

#servicios-medicos {
  position: relative;
  overflow: hidden;
}

#servicios-medicos::before,
#servicios-medicos::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border: 45px solid rgba(247, 168, 27, 0.10);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

#servicios-medicos::before {
  top: 180px;
  left: -210px;
}

#servicios-medicos::after {
  right: -210px;
  bottom: 80px;
}

#servicios-medicos .container {
  position: relative;
  z-index: 1;
}
}