/* =========================================================
 *  VARIABLES Y CONFIGURACIÓN GENERAL
 = *======================================================== */

:root {
  --primary: #0a6e94;
  --primary-dark: #063d54;
  --accent: #14b8a6;
  --accent-light: #34d1c5;

  --gradient-primary: linear-gradient(135deg, #0a6e94 0%, #14b8a6 55%, #34d1c5 100%);
  --gradient-primary-hover: linear-gradient(135deg, #063d54 0%, #0f9488 55%, #14b8a6 100%);
  --gradient-soft: linear-gradient(135deg, #eef7f8 0%, #e3f4f2 100%);
  --gradient-header: linear-gradient(90deg, #34d1c5 0%, #14b8a6 55%, #0a6e94 100%);

  --soft: #f3f8fa;
  --white: #ffffff;
  --text: #243746;
  --muted: #607684;

  --radius: 18px;

  --shadow:
  0 12px 35px rgba(15, 52, 72, 0.12);

  --max-width: 1180px;
}


/* =========================================================
 *  RESET
 = *======================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
  Arial,
  Helvetica,
  sans-serif;

  color: var(--text);
  background: var(--white);

  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}


/* =========================================================
 *  CONTENEDOR
 = *======================================================== */

.container {
  width: min(
    calc(100% - 40px),
             var(--max-width)
  );

  margin-inline: auto;
}


/* =========================================================
 *  HEADER / NAVEGACIÓN
 = *======================================================== */

.site-header {
  position: sticky;
  top: 0;

  z-index: 1000;

  background: var(--gradient-header);

  box-shadow:
  0 3px 15px rgba(15, 52, 72, 0.18);
}

.navbar {
  min-height: 82px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;

  padding: 0 22px;
}

.brand {
  display: flex;
  align-items: center;

  flex-shrink: 0;
}

.brand-logo {
  height: 69px;
  width: auto;

  display: block;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

.main-nav a {
  color: var(--white);

  font-size: 0.95rem;
  font-weight: 600;

  transition:
  color 0.2s ease,
  opacity 0.2s ease;
}

.main-nav a:hover {
  opacity: 0.8;
}

.menu-toggle {
  display: none;

  border: 0;
  background: transparent;

  color: var(--white);

  font-size: 1.8rem;

  cursor: pointer;
}


/* =========================================================
 *  TIPOGRAFÍA
 = *======================================================== */

h1,
h2,
h3 {
  line-height: 1.2;
}

h1 {
  font-size: clamp(
    2.5rem,
    5vw,
    4.4rem
  );

  margin-bottom: 25px;

  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h1 span {
  display: block;
}

h2 {
  font-size: clamp(
    2rem,
    4vw,
    3rem
  );

  margin-bottom: 20px;
}

h3 {
  font-size: 1.25rem;
}


/*
 * Títulos de sección bicolores (mismo degradado que el h1).
 * Se limita a los títulos principales -no a los h3 de las
 * tarjetas- para no perder contraste en textos pequeños.
 */

.section-heading h2,
.section-heading h3,
.content-text h2 {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p {
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 12px;

  color: var(--accent);

  font-size: 0.78rem;
  font-weight: 800;

  letter-spacing: 0.16em;
}


/* =========================================================
 *  HERO
 = *======================================================== */

.hero {
  padding: 70px 0 80px;

  background: var(--gradient-soft);
}

.hero-grid {
  display: grid;

  grid-template-columns:
  1fr 1fr;

  align-items: center;

  gap: 60px;
}

.hero-content {
  max-width: 620px;
}

.hero-text {
  max-width: 570px;

  font-size: 1.08rem;

  margin-bottom: 30px;
}

.hero-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;

  margin-bottom: 30px;
}

.hero-address {
  display: flex;

  flex-direction: column;

  gap: 3px;

  padding-left: 16px;

  border-left:
  4px solid var(--accent);
}

.hero-address strong {
  color: var(--primary);
}

.hero-address span {
  color: var(--muted);
}


/* =========================================================
 *  BOTONES
 = *======================================================== */

.btn {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 12px 24px;

  border-radius: 999px;

  font-weight: 700;

  transition:
  transform 0.2s ease,
  box-shadow 0.2s ease,
  background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);

  background: var(--gradient-primary);

  box-shadow:
  0 8px 20px rgba(11, 92, 142, 0.28);
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
}

.btn-secondary {
  color: var(--primary);

  background: var(--white);

  border:
  1px solid var(--primary);
}

.btn-light {
  color: var(--primary);

  background: var(--white);
}


/* =========================================================
 *  IMÁGENES
 = *======================================================== */

/*
 * Todas las imágenes principales comparten:
 * - bordes redondeados
 * - sombra
 * - overflow
 */

.hero-image,
.content-image,
.radiology-image,
.image-placeholder,
.dark-placeholder {
  overflow: hidden;

  border-radius: var(--radius);

  box-shadow: var(--shadow);
}


/*
 * HERO
 */

.hero-image {
  min-height: 420px;

  background: var(--gradient-primary);
}

.hero-image img {
  width: 100%;
  height: 100%;

  min-height: 420px;

  display: block;

  object-fit: cover;
}


/*
 * IMÁGENES DE CONTENIDO
 */

.content-image {
  height: 420px;

  background: var(--soft);
}

.content-image img,
.image-placeholder img,
.dark-placeholder img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.dark-placeholder {
  background: var(--primary-dark);
}


/*
 * CENTRO RADIOLÓGICO
 *
 * Antes usaba object-fit: contain, lo que dejaba franjas del
 * fondo visibles arriba y abajo cuando la proporción de la
 * imagen no calzaba con el contenedor. Con "cover" la imagen
 * llena todo el espacio sin dejar líneas sin rellenar.
 */

.radiology-image {
  height: 420px;

  background: var(--gradient-primary);
}

.radiology-image img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;
}


/* =========================================================
 *  SECCIONES GENERALES
 = *======================================================== */

.section {
  padding: 90px 0;
}

.section-soft {
  background: var(--soft);
}

.section-heading {
  margin-bottom: 45px;
}

.section-heading.centered {
  text-align: center;
}

.section-heading.centered > p:last-child {
  max-width: 680px;

  margin:
  0 auto;
}


/* =========================================================
 *  NOSOTROS / CONTENIDO
 = *======================================================== */

.content-grid {
  display: grid;

  grid-template-columns:
  1fr 1fr;

  align-items: center;

  gap: 70px;
}

.content-text {
  max-width: 560px;
}

.content-text p {
  margin-bottom: 18px;
}

.content-text .btn {
  margin-top: 12px;
}


/* =========================================================
 *  ESPECIALIDADES
 = *======================================================== */

.service-grid {
  display: grid;

  grid-template-columns:
  repeat(3, 1fr);

  gap: 22px;
}

.service-card {
  padding: 28px;

  background: var(--soft);

  border-radius: var(--radius);

  border:
  1px solid rgba(11, 92, 142, 0.05);

  transition:
  transform 0.2s ease,
  box-shadow 0.2s ease,
  border-color 0.2s ease;
}

.service-card:hover {
  transform: translateY(-4px);

  box-shadow:
  var(--shadow);

  border-color: var(--accent);
}

.service-card h3 {
  margin-bottom: 12px;

  color: var(--primary);
}


/* =========================================================
 *  CENTRO RADIOLÓGICO
 = *======================================================== */

.radiology-feature {
  display: grid;

  grid-template-columns:
  1fr 1fr;

  align-items: center;

  gap: 70px;

  margin-bottom: 55px;
}

.radiology-feature .section-heading {
  margin-bottom: 0;
}

.radiology-feature h2 {
  color: var(--primary);
}

.radiology-feature h3 {
  margin-bottom: 18px;

  color: var(--text);
}

.radiology-grid {
  display: grid;

  grid-template-columns:
  repeat(3, 1fr);

  gap: 22px;
}

.radiology-card {
  padding: 28px;

  background: var(--white);

  border-radius: var(--radius);

  box-shadow:
  0 8px 25px rgba(15, 52, 72, 0.06);
}

.radiology-card h3 {
  margin-bottom: 12px;

  color: var(--primary);
}


/* =========================================================
 *  BENEFICIOS
 = *======================================================== */

.benefit-grid {
  display: grid;

  grid-template-columns:
  repeat(4, 1fr);

  gap: 20px;
}

.benefit-grid article {
  padding: 26px;

  background: var(--soft);

  border-radius: var(--radius);
}

.benefit-grid h3 {
  margin-bottom: 12px;

  color: var(--primary);
}


/* =========================================================
 *  CTA
 = *======================================================== */

.cta-section {
  padding: 65px 0;

  background: var(--gradient-primary);
}

.cta-content {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 40px;
}

.cta-content .eyebrow {
  color: #d6fbf6;
}

.cta-content h2 {
  color: var(--white);

  margin-bottom: 12px;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.85);
}


/* =========================================================
 *  CONTACTO
 = *======================================================== */

#contacto {
  background: var(--gradient-soft);
}

.contact-grid {
  display: grid;

  grid-template-columns:
  0.8fr 1.2fr;

  gap: 45px;

  align-items: stretch;
}

.contact-info {
  display: flex;

  align-items: center;
}

.contact-list {
  width: 100%;
}

.contact-item {
  display: flex;

  align-items: center;

  gap: 18px;

  padding: 18px 0;

  border-bottom:
  1px solid rgba(11, 92, 142, 0.10);
}

.contact-item:last-child {
  border-bottom: 0;
}

.contact-item img {
  width: 28px;
  height: 28px;

  flex: 0 0 28px;

  object-fit: contain;

  display: block;
}

.contact-item h3 {
  margin-bottom: 3px;

  color: var(--primary);
}

.contact-item p {
  font-size: 0.95rem;
}

.contact-item a {
  color: var(--muted);

  font-weight: 600;
}

.contact-item a:hover {
  color: var(--primary);

  text-decoration: underline;
}


/* =========================================================
 *  MAPA
 = *======================================================== */

.map-container {
  min-height: 420px;

  overflow: hidden;

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  background: var(--soft);
}

.map-container iframe {
  width: 100%;
  height: 100%;

  min-height: 420px;

  display: block;

  border: 0;
}


/* =========================================================
 *  FOOTER
 = *======================================================== */

.site-footer {
  position: relative;

  background: var(--gradient-header);

  color: var(--white);
}

.footer-content {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 30px;

  padding: 45px 0;
}

.footer-logo {
  width: auto;
  height: 55px;

  display: block;

  margin-bottom: 12px;
}

.footer-content p {
  color: rgba(255, 255, 255, 0.75);
}


/* =========================================================
 *  REDES SOCIALES
 *
 *  Antes las imágenes de los íconos no tenían tamaño definido,
 *  por lo que se mostraban a su resolución original (muy grandes).
 = *======================================================== */

.social-links {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 16px;
}

.social-links a {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  border-radius: 50%;

  background: rgba(255, 255, 255, 0.08);

  transition:
  background 0.2s ease,
  transform 0.2s ease;
}

.social-links a:hover {
  background: var(--gradient-primary);

  transform: translateY(-2px);
}

.social-links img {
  width: 20px;
  height: 20px;

  object-fit: contain;

  display: block;
}

.footer-bottom {
  padding: 18px 0;

  border-top:
  1px solid rgba(255, 255, 255, 0.12);

  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.65);

  font-size: 0.85rem;
}


/* =========================================================
 *  WHATSAPP FLOTANTE
 *
 *  position se alterna entre "fixed" y "absolute" vía JS
 *  (ver main.js) para que no quede pegado sobre el footer.
 = *======================================================== */

.whatsapp-float {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 1100;

  width: 58px;
  height: 58px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background: var(--white);
  border: none;

  overflow: hidden;

  box-shadow:
  0 8px 25px rgba(15, 52, 72, 0.18);

  transition:
  transform 0.2s ease,
  box-shadow 0.2s ease;
}

.whatsapp-float img {
  width: 100%;
  height: 100%;

  border-radius: 50%;

  object-fit: cover;

  display: block;
}

.whatsapp-float:hover {
  transform: scale(1.08);

  box-shadow:
  0 12px 30px rgba(15, 52, 72, 0.30);
}


/* =========================================================
 *  RESPONSIVE — TABLET
 *
 *  El menú hamburguesa ahora aparece desde 1000px hacia abajo
 *  para evitar que el logo y los links del menú se aprieten
 *  entre sí en tablet.
 = *======================================================== */

@media (max-width: 1000px) {

  .hero-grid,
  .content-grid,
  .radiology-feature {
    gap: 40px;
  }

  .service-grid {
    grid-template-columns:
    repeat(2, 1fr);
  }

  .benefit-grid {
    grid-template-columns:
    repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns:
    1fr 1fr;
  }


  /* MENÚ */

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;

    top: 100%;
    left: 0;
    right: 0;

    display: none;

    flex-direction: column;
    align-items: stretch;

    gap: 0;

    padding: 10px 15px 20px;

    background: var(--white);

    box-shadow:
    0 10px 20px rgba(15, 52, 72, 0.10);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px 10px;

    color: var(--text);

    border-bottom:
    1px solid rgba(11, 92, 142, 0.08);
  }

  .main-nav a:hover {
    color: var(--primary);

    opacity: 1;
  }

}


/* =========================================================
 *  RESPONSIVE — MÓVIL
 = *======================================================== */

@media (max-width: 700px) {

  .container {
    width: min(
      calc(100% - 30px),
               var(--max-width)
    );
  }


  /* HEADER */

  .navbar {
    min-height: 72px;
  }

  .brand-logo {
    height: 58px;
  }


  /* HERO */

  .hero {
    padding: 50px 0 60px;
  }

  .hero-grid {
    grid-template-columns: 1fr;

    gap: 35px;
  }

  h1 {
    font-size: 2.55rem;
  }

  .hero-image {
    min-height: 300px;

    height: 300px;

    border-radius: var(--radius);
  }

  .hero-image img {
    min-height: 300px;

    height: 300px;
  }


  /* SECCIONES */

  .section {
    padding: 65px 0;
  }


  /* IMÁGENES UNIFORMES */

  .hero-image,
  .content-image,
  .radiology-image,
  .image-placeholder,
  .dark-placeholder {
    height: 300px;

    border-radius: var(--radius);
  }

  .hero-image img,
  .content-image img,
  .radiology-image img,
  .image-placeholder img,
  .dark-placeholder img {
    height: 100%;
  }


  /* CONTENIDO */

  .content-grid,
  .radiology-feature {
    grid-template-columns: 1fr;

    gap: 35px;
  }

  .reverse-mobile .content-image {
    order: 2;
  }

  .reverse-mobile .content-text {
    order: 1;
  }


  /* ESPECIALIDADES */

  .service-grid,
  .radiology-grid,
  .benefit-grid {
    grid-template-columns: 1fr;
  }

  .service-card,
  .radiology-card,
  .benefit-grid article {
    padding: 23px;
  }


  /* CONTACTO */

  .contact-grid {
    grid-template-columns: 1fr;

    gap: 35px;
  }

  .map-container {
    min-height: 300px;
  }

  .map-container iframe {
    min-height: 300px;
  }


  /* CTA */

  .cta-content {
    flex-direction: column;

    align-items: flex-start;
  }


  /* FOOTER */

  .footer-content {
    flex-direction: column;

    align-items: flex-start;
  }


  /* WHATSAPP */

  .whatsapp-float {
    right: 16px;
    bottom: 16px;

    width: 52px;
    height: 52px;
  }

}
