/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables */
:root {
  --primary-color: #1d4ed8; /* Azul principal */
  --secondary-color: #f8fafc; /* Gris muy claro */
  --text-color: #1f2937; /* Gris oscuro */
  --accent-color: #3b82f6; /* Azul claro */
  --color-de-fondo-gradiante: #1e3d8d; /* Azul oscuro */
}

/* Global Styles */
body {
  font-family: 'Montserrat';
  color: var(--text-color);
  background: linear-gradient(135deg, #1e3d8d, #1d4ed8);
  background-attachment: fixed;
  background-size: cover;
  line-height: 1.6;
  
}

html {
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.header {  
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 0.2rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Estilo para el logo */
#logo {
  width: 250px;  /* Ajusta el tamaño según tu logo */
  height: auto;  /* Mantiene la proporción */
  transition: transform 0.3s ease; /* Efecto de animación */
}

/* Efecto hover para el logo */
#logo:hover {
  transform: scale(1.1);  /* Hace que el logo crezca un poco al pasar el ratón */
}


.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}
/* Estilo inicial */
/* Estilo inicial */
nav a {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

/* Estilo inicial */
nav a {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.3s ease;
}

/* Efecto Hover */
nav a:hover {
  color: #007bff; /* Color de texto cuando pasa el ratón */
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #007bff; /* Color del subrayado */
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%; /* Ancho total cuando el ratón pasa sobre el enlace */
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
}




/* ¿Quienes Somos? seccion */
.about {
  padding: 80px 0;
  background: linear-gradient(to right, #0000c3, #110967);
  position: relative;
  overflow: hidden;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 50px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1 1 45%;
  z-index: 2;
}

.about-text h2 {
  font-size: 30px;
  margin-bottom: 20px;
  color: #11318f;
  display: inline-block;
  font-style: italic;
  font-weight: bold;
  border-radius: 5px;
  padding: 0; /* Quita el padding del h2 */
}

.titulo-titulo {
  background: url('../images/Brocha-2.png') no-repeat left center;
  background-size: 100% 70%; /* Altura completa, ancho proporcional */
  background-position: 5px center; /* Mueve el brochazo hacia la izquierda */
  background-repeat: no-repeat;
  padding: 70px 60px; /* Más espacio alrededor del texto */ /* Aumenta el espacio para que se vea el brochazo */
  display: inline-block;
  transition: background-size 1s ease-out;
}

.titulo-titulo.animar-brochazo {
  animation: brochazo 1s forwards;
}

.about-text p {
  font-size: 18px;
  line-height: 1.6;
  color: #ffffff;
  text-align: justify;
}

.resaltado {
  font-weight: bold;
  font-style: italic;
  color: #ffffff;
}

.mensaje-final {
  font-weight: bold;
  font-style: italic;
  color: #ffffff;
  font-size: 20px;
  text-align: center;
  margin-top: 30px;
  position: relative;
}

.linea-imagen {
  display: block;
  margin: 10px auto 0 auto;
  max-width: 300px;
  height: auto;
  pointer-events: none;
}

.about-image.carrusel {
  width: 100%;
  max-width: 500px;
  height: 300px;
  overflow: hidden;
  border-radius: 15px;
  margin: auto;
  position: relative;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image .slides {
  display: flex;
}

.about-image .slides.animar {
  animation: deslizar 18s infinite;
}

.about-image .slides img {
  max-height: 100%;
  max-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  border-radius: 15px;
  background-color: #0053a0;
  margin: auto;
  display: block;
}


@keyframes deslizar {
  0%   { transform: translateX(0%); }
  20%  { transform: translateX(0%); }
  25%  { transform: translateX(-100%); }
  45%  { transform: translateX(-100%); }
  50%  { transform: translateX(-200%); }
  70%  { transform: translateX(-200%); }
  75%  { transform: translateX(-300%); }
  95%  { transform: translateX(-300%); }
  100% { transform: translateX(0%); }
}

@keyframes brochazo {
  0% {
    background-size: 0% 70%;
  }
  100% {
    background-size: 100% 70%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-text, .about-image {
    flex: 1 1 100%;
  }

  .about-text h2 {
    font-size: 28px;
  }

  .about-text p {
    font-size: 16px;
  }

  .about-image img {
    width: 90%;
    max-width: 400px;
  }
}


/* Hero Section */
.hero {
  color: white;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  box-sizing: border-box;
  background-image: url('../images/back.jpg'); /* Ruta a tu imagen */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  z-index: 0;
  height: 500px;
}

.hero-container {
  display: flex;
  align-items: center;
  max-width: none;
  margin: 0 auto;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.hero-image {
  flex: 1.2;
  min-width: 350px;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  transform: translateY(45px);
}

.hero-content {
  flex: 2.5;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-texts h1 {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: normal;
  transform: translateY(-40px);
  line-height: 1.2;
}

.hero-texts h1 span {
  font-weight: bold;
  font-style: italic;
}

.hero-texts h2 {
  font-size: 22px;
  margin-bottom: 10px;
  font-weight: bold;
  margin-top: 20px;
  margin-left: 30px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px 30px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.service-item img {
  width: 50px; /* MÁS grande */
  height: 50px;

}

.service-text {
  display: flex;
  flex-direction: column;
}

.service-text .main-text {
  margin: 0;
  font-size: 14px; /* Más grande */
  font-weight: bold;
}

.service-text .sub-text {
  margin: 0;
  font-size: 14px; /* Más chiquito */
  font-weight: normal;
}

.highlighted-text {
  display: inline-block;
  position: relative;
  margin-left: 20px;
  font-weight: bold;
  font-style: italic;
  padding-bottom: 20px; /* agrega espacio para la imagen debajo */
}

.highlighted-text .underline-image {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
}

@media (max-width: 768px) {
  /* Oculta la imagen del hombre */
  .hero-image {
    display: none;
  }

  .hero {
    height: auto;
    padding: 40px 20px;
    text-align: center;
  }

  .hero-container {
    flex-direction: column;
    gap: 30px;
    justify-content: center;
  }

  .hero-content {
    flex: 1;
    align-items: center;
  }

  .hero-texts h1 {
    font-size: 20px;
    transform: none;
    margin-bottom: 10px;
  }

  .hero-texts h2 {
    font-size: 18px;
    margin-left: 0;
  }

  .highlighted-text {
    margin-left: 0;
    padding-bottom: 15px;
  }

  /* Servicios como bloques */
  .services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .service-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    width: 130px;
  }

  .service-item img {
    width: 40px;
    height: 40px;
  }

  .service-text .main-text {
    font-size: 15px;
  }

  .service-text .sub-text {
    font-size: 12px;
  }
}


/* Servicios */

.hover-services {
  padding-top: 1rem;   /* Ajusta solo el espacio superior */
  padding-bottom: 5rem; /* Ajusta el espacio inferior */
  padding-left: 1rem;
  padding-right: 1rem;
  background: linear-gradient(to right, #000081, #1809d9);
  text-align: center;
}

.hover-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.hover-card {
  position: relative;
  height: 280px;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: transform 0.4s ease;
  cursor: pointer;
}

.hover-card:hover {
  transform: scale(1.05);
}

.titulo-servicios{
  font-size: 30px;
  margin-bottom: 20px;
  color: #11318f;
  display: inline-block;
  font-style: italic;
  font-weight: bold;
  border-radius: 5px;
}

.hover-front,
.hover-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hover-front {
  background: var(--primary-color);
  color: white;
  z-index: 1;
  background-size: cover;         /* Ajusta la imagen para cubrir el contenedor */
  background-position: center;    /* Centra la imagen */
  background-repeat: no-repeat;   /* Evita que se repita */
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  z-index: 2;
  position: relative;
}

.hover-front img {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
}

.hover-front span {
  font-size: 18px;
  font-weight: bold;
  z-index: 2;
  position: relative;
}

.hover-back {
  background: white;
  color: var(--text-color);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}

.hover-card:hover .hover-back {
  opacity: 1;
  pointer-events: all;
}

.hover-card:hover .hover-front {
  opacity: 0;
}

.hover-back img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

.hover-back h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 20px;
}

.hover-back p {
  font-size: 14px;
  margin-bottom: 15px;
  padding: 0 10px;
}

.hover-btn {
  background: var(--accent-color);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.hover-btn:hover {
  background: #2563eb; /* tono más fuerte de azul */
}
.hover-front .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Degradado azul sutil */
  background: linear-gradient(to bottom right, rgba(29, 78, 216, 0.5), rgba(30, 61, 141, 0.5));
  z-index: 1;
  pointer-events: none;
  border-radius: 16px;
}

.hover-card.active .hover-front {
  opacity: 0;
}
.hover-card.active .hover-back {
  opacity: 1;
  pointer-events: all;
}

@media (max-width: 768px) {
  .mod-title {
    font-size: 28px;
  }
  .mod-subtitle {
    font-size: 16px;
  }
}


:root {
  --color-text-white: #ffffff;
  --color-blue-primary: #007bff;
  --color-blue-hover: #0056b3;
  --color-green-whatsapp: #25d366;
  --color-green-hover: #1ebc57;
  --bg-overlay-dark: rgba(0, 0, 0, 0.75); 
}

.ubicacion-section {
  position: relative;
  padding: 4rem 0;
  background-image: url('../images/8.jpg'); 
  background-size: cover;
  background-position: center;
  /* Eliminada la propiedad font-family para heredar del sitio */
  overflow: hidden;
  color: var(--color-text-white);
}

/* Video y Overlay */
.video-fondo {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}

.ubicacion-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: var(--bg-overlay-dark);
  z-index: 1;
}

.relative-content {
  position: relative;
  z-index: 2;
}

/* Título con Subrayado Decorativo */
.section-title {
  text-align: center;
  font-size: 3.5rem; /* Ajustado al tamaño de tu ejemplo original */
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--color-text-white);
  line-height: 1.1;
}

.subrayado-svg {
  position: relative;
  display: inline-block;
}

.subrayado-svg .underline-image {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  max-height: 20px; /* Ajuste original */
  height: auto;
  pointer-events: none;
  z-index: 1;
}

/* Grid Layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.ubicacion-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Mapa */
.map-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.map-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
}

.map-responsive iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}

/* Info */
.info-column {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #e0e0e0;
}

.icon-wrapper {
  flex-shrink: 0;
  color: var(--color-text-white);
  margin-top: 2px;
}

.info-text.bold {
  font-weight: bold;
  color: var(--color-text-white);
  font-size: 1.2rem;
}

.info-text.address {
    text-transform: uppercase;
}

.info-link {
  color: #64b5f6;
  text-decoration: none;
  font-weight: bold;
}

.info-link:hover {
  color: #9be7ff;
  text-decoration: underline;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  color: white;
  width: 100%;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn svg {
  fill: currentColor;
}

.btn-blue { background-color: var(--color-blue-primary); }
.btn-blue:hover { transform: translateY(-2px); background-color: var(--color-blue-hover); }

.btn-green { background-color: var(--color-green-whatsapp); }
.btn-green:hover { transform: translateY(-2px); background-color: var(--color-green-hover); }

/* Responsive */
@media (max-width: 768px) {
  .ubicacion-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-title {
    font-size: 2.5rem;
  }
  
  .subrayado-svg .underline-image {
    max-height: 12px;
  }
}

/* Footer */
.footer {
  background-image: url('../images/footerimg.jpg');
  background-size: cover;
  background-position: right center; /* <-- Este es el cambio clave */
  background-repeat: no-repeat;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
}

#whatsapp-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
}

#whatsapp-toggle {
  width: 60px;
  height: 60px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#whatsapp-toggle img {
  width: 30px;
  height: 30px;
}

#whatsapp-window {
  display: none; /* ← Esconde completamente */
  width: 360px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  padding: 0;
  margin-bottom: 10px;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

#whatsapp-window.open {
  display: block; /* ← Muestra la ventana */
}

.wa-header {
  background-color: #19826a; /* todo el header verde */
  color: white;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.wa-body {
  padding: 15px;
  font-size: 14px;
  color: #333;
  text-align: center;              /* ✅ Centra el texto */
  display: flex;
  flex-direction: column;
  gap: 10px; 
}

.wa-button {
  display: block;
  margin: 10px 15px 15px 15px;
  padding: 10px;
  background-color: #25D366;
  color: white;
  text-align: center;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  animation: bounce 1.5s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}


/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  nav {
    flex-direction: column;
    background: #11318f;
    position: fixed;
    top: 60px;
    right: 0;
    width: 100vw;
    height: calc(100vh - 60px);
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;

    /* Animación con transform y opacity */
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none; /* Para que no pueda clickear cuando esté oculto */
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  nav.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  nav a {
    font-size: 1.8rem;
    padding: 15px 30px;
    color: white !important;
  }
}

.contenedor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: auto;
  padding: 10px 5% 10px;
  box-sizing: border-box;
  background: linear-gradient(to right, #000081, #3b3bf0) !important; /* Añade esta línea */
}


.mision {
  width: 80%;              /* Más ancho para ocupar el centro */
  text-align: center;
  margin-bottom: 40px;     /* Espacio entre misión y galería */
}

.mision h2 {
  font-size: 38px;
  margin-bottom: -10px;
  color: #11318f;
  display: inline-block;
  padding: 10px 20px;
  font-style: italic;
  font-weight: bold;
  border-radius: 5px;
}

.mision p {
  font-size: 22px;
  line-height: 1.6;
  color: #ffffff;
  text-align: center;
  margin-bottom: 30px;
  text-align: justify;
}

.gallery {
  display: flex;
  justify-content: center;
  width: 60%;
  height: 250px;
  border-radius: 20px;
}

.panel {
  background-size: cover;
  background-position: center;
  flex: 1;
  margin: 0 5px;
  border-radius: 30px;
  position: relative;
  cursor: pointer;
  transition: flex 0.5s ease, background-size 0.5s ease;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.panel p {
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 10px;
  width: 100%;
  text-align: center;
  display: none;
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.panel .icon {
  position: absolute;
  bottom: 10px;
  background: rgba(14, 13, 13, 0.8);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.4);
}

.panel:hover {
  flex: 4;
}
.panel:hover p {
  display: block;
}
.icon img{
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.4));
}

@media (max-width: 768px) {
  .gallery {
    width: 100%;
    height: auto;
    overflow-x: auto;
     scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    display: flex;
    gap: 10px;
    padding: 10px;
    border-radius: 0;
  }

  .panel {
    min-width: 80%;
    height: 200px;
    flex: 0 0 80%;
    scroll-snap-align: center;
    border-radius: 20px;
  }

  .panel:hover {
    flex: 0 0 auto; /* Desactiva efecto hover que estira */
  }

  .panel .icon {
    width: 40px;
    height: 40px;
    bottom: 8px;
  }

  .icon img {
    width: 24px;
    height: 24px;
  }
}