@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes gradientTestimonials {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes animatedGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.bg-animated {
  background: linear-gradient(-45deg, #3C62AB, #86A8E7, #F9F7FD, #d1f2f9);
  background-size: 600% 600%;
  animation: animatedGradient 15s ease infinite;
}


/* === VARIABLES === */
:root {
  --header-height: 80px;
  --color-primary: #092649;
  --color-accent: #3C62AB;
  --color-light: #f8f9fa;
  --color-dark: #092649;
  --color-text: #333;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --font-main: 'Poppins', sans-serif;
}

/* === GLOBAL RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.6;
  background-color: #fff;
}
a {
  text-decoration: none;
  color: inherit;
}

/* === HEADER === */
.header {
  background: transparent;
  padding: 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease;
}
.header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}
.header-container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo {
  height: 50px;
}
.header-info .doctor-name {
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-dark);
}
.header-info .doctor-subtitle {
  font-size: 0.9rem;
  color: #666;
}

/* === NAVIGATION === */
.nav {
  display: flex;
  gap: 1rem;
}
.nav-link {
  color: var(--color-dark);
  font-weight: 500;
}
.nav-link:hover {
  color: var(--color-accent);
}

/* === HERO === */
.landing-hero {
  height: 100vh;
  background-image: url('imagenes/BgLanding.jpg');
  background-size: cover;
  background-position: center;
  padding-top: var(--header-height);
  display: flex;
  position: relative;
}
.hero-content {
  margin-top: 278px;
  margin-left: 55px;
  max-width: 600px;
  color: #fff;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
  z-index: 2;
  
}
.hero-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero-content p {
  font-size: 1.2rem;
}
.cta-button {
  display: inline-block;
  background: var(--color-dark);
  color: #fff;
  padding: 0.75rem 1.5rem;
  margin-top: 1rem;
  border-radius: 8px;
  font-weight: 600;
}

/* === HAMBURGER MENU === */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2000;
}
.hamburger .bar {
  height: 3px;
  background: var(--color-dark);
  border-radius: 2px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
  }
  .nav.show {
    display: flex;
  }
  .hamburger {
    display: flex;
    position: absolute;
    top: 1.5rem;
    right: 2rem;
  }
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-content {
    margin-top: 110px;
    text-align: center;
    padding: 0 1rem;
  }
  .hero-content h2 {
    font-size: 1.8rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .cta-button {
    width: 100%;
  }
}


/* Servicios */
.services-section {
  padding: 4rem 1rem;
  text-align: center;
  background: linear-gradient(-45deg, #3C62AB, #86A8E7, #F9F7FD, #d1f2f9);
  background-size: 600% 600%;
  animation: gradientShift 12s ease infinite;
  color: #092649;
}

.services-section h2 {
  font-size: 2rem;
  color: #092649;
  margin-bottom: 2rem;
}

.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
}


.service-card {
  background: #fff;
  opacity: 0.9;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-6px);
}

.service-card img {
  width: 80px;
  height: 80px;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #3C62AB;
}

.service-card p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
}

/* Sección Testimonios */
/* ✅ Contenedor de testimonios */
.testimonial-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en pantallas medianas/grandes */
    align-items: stretch; /* ✅ Igualar alturas */
  }
}

/* ✅ Cada tarjeta de testimonio */
.testimonial-wrapper {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 5rem 1.5rem 2rem; /* ⬅️ Más espacio arriba para que el texto no se monte sobre las comillas */
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  background-color: transparent;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  max-width: 100%;
}

.cta-testimonial-wrapper h2 {
  margin-top: 1.5rem;
  color: #092649;
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
}

/* ✅ Fondo decorativo SVG */
.testimonial-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

/* ✅ Contenido del testimonio encima del fondo */
.testimonial-content {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
  color: #092649;
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
}

.testimonial-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0rem;
  margin-top: 1rem;
}

.testimonial-author {
  font-weight: 600;
  color: #3C62AB;
  font-size: 0.95rem;
  display: block;
}

/* ✅ Responsive: mejor ajuste para móviles */
@media (max-width: 768px) {
  .testimonial-content {
    padding: 2rem 1rem;
  }

  .testimonial-content p {
    font-size: 0.95rem;
  }

  .testimonial-author {
    font-size: 0.85rem;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}
.testimonial-carousel-wrapper {
  position: relative;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.testimonial-carousel {
  display: flex;
  gap: 1rem;
  scroll-behavior: smooth;
  overflow: hidden;
}

.testimonial-card {
  flex: 0 0 auto;
  width: 300px;
  padding: 2rem;
  margin: 0 0.5rem;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  text-align: center;
}

.testimonial-card p {
  font-size: 1rem;
  color: #092649;
  line-height: 1.6;
}

.testimonial-author {
  font-weight: 600;
  color: #3C62AB;
  margin-top: 1rem;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #3C62AB;
  z-index: 2;
}
.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }

/* Eliminar barra de scroll */
.testimonial-carousel::-webkit-scrollbar {
  display: none;
}
.testimonial-carousel {
  -ms-overflow-style: none;
  scrollbar-width: none;
}



@media (max-width: 768px) {
  .testimonial-card {
    flex: 0 0 100%;
    max-width: 100%;
    margin: 0 0.5rem;
  }
}



.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 28px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 9999;
}

.map {
  object-position: center;
  background-color: #f9f9f9;
}
.map h3 {
  text-align: center;
  color: #092649;
  font-size: 3rem;
  margin-bottom: 3rem;
  margin-top: 35px;
  animation: fadeUp 1s ease-out forwards;
}

/* ✅ Contenedor del mapa con altura adaptable */
.map-container {
  max-width: 100%;
  max-height: 100%;
  object-position: center;
  margin: 0 ;
  height: 400px;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.footer-container {
  background: #092649;
  color: white;
  padding: 4rem 2rem;
  font-family: sans-serif;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
}

.footer-column {
  flex: 1 1 220px;
  min-width: 200px;
}

.footer-column h4,
.footer-column h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column li {
  margin-bottom: 0.5rem;
  color: #ccc;
  font-size: 0.95rem;
}

.footer-column a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 3rem;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: #aaa;
}

.footer-socials a {
  color: #ccc;
  margin: 0 0.5rem;
  font-size: 1.2rem;
  transition: color 0.3s ease;
}

.footer-socials a:hover {
  color: white;
}

/* 📱 Ajustes responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .footer-columns {
    flex-direction: column;
  }

  .footer-bottom {
    text-align: center;
  }
}
/* Credenciales */

.credenciales-banner {
  background-color: #f8f9fa;
  padding: 6rem 1rem 3rem; /* ⬅️ más espacio arriba y abajo */
  text-align: center;
}

.credenciales-banner h2 {
  font-size: 2.5rem;
  color: #092649;
  margin-bottom: 1rem;
  animation: fadeUp 1s ease-out forwards;
}
.credenciales-banner h3 {
  font-size: 1.2rem;
  color: #444;
  margin-bottom: 2rem;
  animation: fadeUp 1s ease-out forwards;
}
.foto-doctor img {
  width: 280px;       /* ⬅️ más grande */
  height: 280px;
  object-fit: cover;
  border-radius: 50%;
  border: 8px solid #3C62AB; /* azul del logo */
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.card-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding: 2rem;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.main-content {
  padding-top: 2rem; 
}
.info-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.info-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.info-icon img {
  align-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 0.75rem;
  filter: invert(18%) sepia(60%) saturate(746%) hue-rotate(191deg) brightness(90%) contrast(92%);
  align-items: center;
}

.info-card h2 {
  margin-top: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #092649;
  align-items: center;
}

.info-card h3 {
  text-align: left;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #444;
}

.info-card p {
  margin: 0.5rem 0 1.5rem;
  color: #444;
  font-size: 0.9rem;
  text-align: left;
}

.card-list {
  text-align: left;
  color: #444;
  line-height: 1.6;
  font-size: 0.75rem;
  margin: 0;
  padding-left: 1.25rem;
}
/* Blog */
.blog-banner {
  margin-top: 1rem;
  background-color: #f8f9fa;
  padding: 6rem 1rem 3rem; /* ⬅️ más espacio arriba y abajo */
  text-align: center;
}
.blog-card {
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  
}

.blog-card:hover {
  transform: translateY(-6px);
}


.blog-image {
  width: 100%;
  object-position: center; 
  background-color: #f0f0f0; /* para que no quede fondo blanco si es PNG */
}

.blog-content {
  padding: 1.5rem;
  text-align: left;
}
.blog-banner-content h2 {
  text-align: center;
  margin-top: 0;
  font-size: 1.5rem;
  color: #092649;
  margin-bottom: 0.5rem;
  animation: fadeUp 1s ease-out forwards;
}
.blog-banner-content p {
  text-align: center;
  margin: 0.5rem 0 1rem;
  color: #444;
  line-height: 1.6;
  animation: fadeUp 2.5s ease-out forwards;
}

.blog-content h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #092649;
}

/* ✅ Grid de blog, corregido para pantallas móviles */
.blog-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* En pantallas medianas (tablets) muestra 2 por fila */
@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
/* ✅ Grid de blog, corregido para pantallas móviles */
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    max-width: 1100px;
    margin: 0 auto;
  }
}

/* En pantallas grandes (laptops) muestra 3 por fila */
@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* En pantallas muy grandes (desktops grandes) muestra 4 por fila */
@media (min-width: 1440px) {
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.blog-meta {
  color: #888;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
}

.blog-excerpt {
  color: #444;
  margin-bottom: 1rem;
}

.blog-button {
  display: inline-block;
  background-color: #3C62AB;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.blog-button:hover {
  background-color: #2e4d8e;
}


/* Articulos */
.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem;
  font-family: 'Poppins', sans-serif;
  color: #333;
}

.article-header h1 {
  font-size: 2rem;
  color: #092649;
  margin-bottom: 0.5rem;
}

.article-meta {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.back-link {
  margin-top: 2rem;
}

.back-link a {
  color: #3C62AB;
  text-decoration: none;
  font-weight: 500;
}

.back-link a:hover {
  text-decoration: underline;
}

/* Contacto */
.contact-section {
  padding: 4rem 1rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-section h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: #092649;
}
.form-box {
  background-color: #ffffff;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid #e0e0e0;
}


.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #3C62AB;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
}


.form-button {
  background-color: #3C62AB;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-button:hover {
  background-color: #2e4d8e;
}

.form-group.floating {
  position: relative;
  margin-top: 1.5rem;
}

.form-group.floating input,
.form-group.floating textarea,
.form-group.floating select {
  width: 100%;
  padding: 1rem 0.75rem 0.25rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
  outline: none;
}

.form-group.floating label {
  position: absolute;
  top: 1rem;
  left: 0.75rem;
  font-size: 1rem;
  color: #666;
  pointer-events: none;
  transition: 0.2s ease all;
}

/* Cuando el input tiene texto o está enfocado */
.form-group.floating input:focus + label,
.form-group.floating input:not(:placeholder-shown) + label,
.form-group.floating textarea:focus + label,
.form-group.floating textarea:not(:placeholder-shown) + label,
.form-group.floating select:focus + label,
.form-group.floating select:not(:placeholder-shown) + label {
  top: 0.3rem;
  font-size: 0.75rem;
  color: #3C62AB;
  background: white;
  padding: 0 0.25rem;
}


/* === MEDIA QUERIES BASE ADICIONALES === */

/* XS: Teléfonos pequeños (hasta 480px) */
@media (max-width: 480px) {
  /* Ajustes especiales para teléfonos pequeños */
}

/* SM: Teléfonos normales (hasta 768px) */
@media (max-width: 768px) {
  /* Ya tienes varios estilos en este bloque */
}

/* MD: Tablets (769px a 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  /* Para tablets en horizontal o pantallas pequeñas de laptop */
}

/* LG: Escritorios (1024px a 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  /* Ajustes para pantallas normales */
}

/* XL: Pantallas grandes (1200px o más) */
@media (min-width: 1200px) {
  /* Ya estás usando esto para tipografías */
}

/* Orientación vertical (portrait) */
@media (orientation: portrait) {
  /* Si se requiere comportamiento distinto en vertical */
}

/* Orientación horizontal (landscape) */
@media (orientation: landscape) {
  /* Si se requiere comportamiento distinto en horizontal */
}

/* Modo oscuro preferido */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #111;
    color: #eee;
  }
}

/* Accesibilidad: menos movimiento */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}