/* ==================================== */
/* 1. Variables CSS y Reset Básico      */
/* ==================================== */
:root {
  --primary-color: #2a2a2a;
  --secondary-color: #164d9d;
  --accent-color: #007bff;
  --dark-blue: #004d99;
  --white: #ffffff;
  --light-gray: #f9f9f9;
  --text-color: #555;
  --font-primary: "Roboto", sans-serif;
  --font-secondary: "Montserrat", sans-serif;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding-top: 80px;
  font-family: var(--font-primary);
  color: var(--primary-color);
  line-height: 1.6;
}

/* ==================================== */
/* 2. Header y Navbar                   */
/* ==================================== */
header {
  z-index: 1000;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
  height: 50px;
}

.navbar-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-menu li {
  margin-left: 1.5rem;
}

.navbar-menu a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.navbar-menu a:hover {
  color: var(--secondary-color);
}

/* Estilos para el menú hamburguesa */
.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.hamburger {
  width: 100%;
  height: 3px;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
}

/* ==================================== */
/* 3. Media Queries - Navegación Móvil  */
/* ==================================== */
@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }

  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background-color: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.active {
    right: 0;
  }

  .navbar-menu li {
    margin: 1.5rem 0;
  }

  /* Animación del ícono hamburguesa a "X" */
  .navbar-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .navbar-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
  }

  .navbar-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ==================================== */
/* 4. Hero Section                      */
/* ==================================== */
.hero-section {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../Images/fondo.webp") no-repeat center center/cover;
  z-index: -1;
}

.hero-background::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.featured-services-section {
  padding: 60px 20px;
  text-align: center;
  background-color: #f8f9fa; /* Un gris muy claro */
}

.featured-services-section h2 {
  font-size: 2.5rem;
  color: var(--dark-blue);
  margin-bottom: 10px;
}

.featured-services-section p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 40px;
}

.service-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-content: center;
}

.service-card {
  display: block;
  background-color: #fff;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: #333;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.icon-circle {
  width: 70px;
  height: 70px;
  background-color: var(--accent-color);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.btn-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--accent-color);
  font-weight: bold;
  text-decoration: none;
}

@media (max-width: 768px) {
  .hero-section {
    padding: 80px 20px;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }
}

/* ==================================== */
/* 5. Carrusel de Videos                */
/* ==================================== */
.video-carousel-section {
  padding: 30px 20px;
  text-align: center;
  margin-top: 20px;
  background-color: var(--light-gray);
}

.video-carousel-section h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.video-carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  width: 90%;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-slide {
  flex: 0 0 auto;
  width: 100%;
  margin-right: 20px;
  scroll-snap-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-slide:last-child {
  margin-right: 0;
}

.video-slide iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.carousel-navigation {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.carousel-navigation button {
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.carousel-navigation button:hover {
  background-color: #0056b3;
}

.carousel-navigation button i {
  margin: 0;
}

/* ==================================== */
/* 6. Media Queries - Carrusel de Videos*/
/* ==================================== */
@media (max-width: 768px) {
  .video-carousel-section {
    padding: 20px 0px;
  }

  .video-carousel-container {
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .video-slide {
    width: 100vw;
    margin-right: 0px;
    scroll-snap-align: start;
    padding: 0 10px;
  }

  .video-slide:last-child {
    margin-right: 0;
  }

  .video-slide iframe {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .video-carousel-section h2 {
    font-size: 1.5rem;
  }
  .carousel-navigation {
    margin-top: 20px;
  }
  .carousel-navigation button {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* ==================================== */
/* 7. Especialidades Section (Unificada)*/
/* ==================================== */
.especialidades-section {
  padding: 80px 20px;
  background-color: var(--light-gray);
  text-align: center;
}

.especialidades-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.section-description {
  margin-bottom: 40px;
  color: var(--text-color);
}

.especialidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  
}

.especialidad-card {
  background-color: var(--white);
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.especialidad-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.especialidad-card i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.especialidad-card h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.especialidad-card p {
  font-size: 1rem;
  color: var(--text-color);
}

.especialidad-card .medico {
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.especialidades-cta {
  text-align: center;
  margin-top: 70px;
}

.especialidades-cta .btn-primary {
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  color: var(--white);
  font-weight: bold;
  background-color: var(--primary-color);
}

.especialidades-cta .btn-primary i {
  margin-left: 8px;
}

@media (max-width: 768px) {
  .especialidades-cta {
    margin-top: 60px;
  }
}

/* ==================================== */
/* 8. Footer                            */
/* ==================================== */
#footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 40px 20px;
  font-size: 0.9rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  margin-bottom: 20px;
}

.footer-column h3 {
  margin-top: 0;
  margin-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 5px;
}

.footer-brand .footer-logo {
  max-width: 150px;
  margin-bottom: 10px;
}

.footer-contact p {
  margin-bottom: 10px;
}

.footer-contact i {
  margin-right: 8px;
  color: var(--accent-color);
}

.footer-social .social-icons a {
  display: inline-block;
  margin-right: 15px;
  font-size: 1.5rem;
  color: var(--white);
  transition: color 0.3s ease;
}

.footer-social .social-icons a:hover {
  color: var(--accent-color);
}

/* ==================================== */
/* 9. Sección Acerca de Nosotros        */
/* ==================================== */
/* Sección Quienes Somos con Cuadrícula */
.about-info-section {
  padding: 60px 0;
  background-color: #f8f9fa;
}
.info-cards-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.info-card{
  background-color: #fff;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.info-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    justify-content: center;
}


.info-card-header i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-right: 15px;
}

.info-card-header h3 {
    font-size: 1.5rem;
    color: var(--dark-blue);
    margin: 0;
}

.info-card p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    text-align: center;
}

/* Contenedor del Carrusel */
.gallery-section {
    padding: 60px 0;
    text-align: center;
}

.gallery-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: var(--dark-blue);
    margin-bottom: 40px;
}

.gallery-container {
    position: relative;
    max-width: 800px;
    max-height: 600px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.gallery-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-item {
    width: 100%;
    height: auto;
    flex-shrink: 0;
    object-fit: cover;
}

/* Botones de navegación */
.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-prev {
  left: 10px;
}
.gallery-next {
  right: 10px;
}

.gallery-prev:hover,
.gallery-next:hover {
  background-color: rgba(0, 0, 0, 0.7);
}

/* Estilos para Misión y Visión */
.mission-vision-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 60px;
  justify-content: center;
}

.mission-card,
.vision-card {
  flex: 1;
  min-width: 300px;
  background-color: #f0f4f7;
  border-radius: 15px;
  padding: 40px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  border-left: 5px solid #007bff;
  transition: transform 0.3s ease;
}

.mission-card:hover,
.vision-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.mission-card h3,
.vision-card h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  color: var(--dark-blue);
  margin-bottom: 15px;
}

.mission-card p,
.vision-card p {
  font-size: 1rem;
  color: #555;
}

/* Estilos para Principios y Valores (Cuadrícula) */
.principles-values-grid {
  margin-bottom: 60px;
  text-align: center;
}

.section-description {
  font-style: italic;
  color: #777;
  margin-bottom: 40px;
}

.principles-list,
.values-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.principle-card,
.value-card {
  background-color: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.principle-card:hover,
.value-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.principle-card i,
.value-card i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.principle-card h4,
.value-card h4 {
  font-size: 1.3rem;
  color: var(--dark-blue);
  margin-bottom: 10px;
}

.principle-card p,
.value-card p {
  font-size: 0.95rem;
  color: #555;
}

/* Responsive */
@media (max-width: 768px) {
  .about-us-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ==================================== */
/* 10. Sección de Contacto              */
/* ==================================== */
.contacto-section {
  padding: 80px 20px;
  background-color: var(--light-gray);
}

.contacto-section h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  text-align: center;
}

.section-description {
  margin-bottom: 40px;
  color: var(--text-color);
  text-align: center;
}

.contacto-content {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.formulario-contacto,
.informacion-contacto {
  flex: 1;
  min-width: 300px;
}

.formulario-contacto .form-group {
  margin-bottom: 20px;
}

.formulario-contacto label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: var(--primary-color);
}

.formulario-contacto input,
.formulario-contacto textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.formulario-contacto textarea {
  resize: vertical;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--white);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.informacion-contacto h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.contacto-list {
  list-style: none;
  padding: 0;
}

.contacto-list li {
  margin-bottom: 15px;
  color: var(--text-color);
}

.contacto-list i {
  color: var(--secondary-color);
  margin-right: 10px;
}

.mapa {
  margin-top: 20px;
}

.mapa iframe {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: 10px;
}

/* Responsive Design para Contacto */
@media (max-width: 768px) {
  .contacto-content {
    flex-direction: column;
  }
}

/* Sección de tipo consulta contacto */
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  background-color: var(--white);
  color: var(--primary-color);
}

.form-group select:focus {
  border-color: var(--secondary-color);
  outline: none;
}
/* ==================================== */
/* Sección de búsqueda */
.search-container {
  display: flex;
  max-width: 600px;
  margin: 0 auto 40px;
}

#search-input {
  flex-grow: 1;
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 50px 0 0 50px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

#search-input:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

#search-button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0 25px; 
    border-radius: 0 50px 50px 0;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

#search-button i {
    margin: 0;
}

#search-button:hover {
  background-color: #0056b3;
}
