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

/*-----Estilo General Header (DEFAULT Desktop)-----*/

body {
    margin-top: 80px;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
}

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px; 
    background-color: #ffffff; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 0 30px;
    z-index: 1000;
}

.logo {
    height: 80px;
    width: auto;
    display: flex;
}

.main-nav {
    flex-grow: 1;
    text-align: center;
}

.nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
}

.nav-list > li {
    margin: 0 15px;
}

.nav-list a {
    text-decoration: none;
    color: #2C3E50; 
    font-weight: bold;
    padding: 25px 0; 
    display: block;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: #C0392B; 
}

/*-----Botón de Emergencia en Header (Desktop View)-----*/
.emergency-button-desktop {
    background-color: #C0392B; 
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
}
.emergency-button-desktop i {
    margin-right: 8px;
}
.emergency-button-desktop:hover {
    background-color: #A93226; 
    border-color: #C0392B;
    transform: scale(1.03);
}

/*Oculta el botón de hamburguesa por defecto*/
.menu-toggle {
    display: none; 
}

/*Oculta el botón de emergencia flotante por defecto*/
.emergency-button-float {
    display: none;
}

/*Clase que oculta botón flotante*/
.emergency-button-float .btn-text {
    display: none;
}


/* Animación de latido */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


/*Media Query (Móvil y Tablet)*/

@media (max-width: 850px) {
    
    /*Configuración de header en móvil*/
    .main-header {
        height: 60px; /*Header más delgado*/
        padding: 0 15px;
    }
    .logo {
        height: 50px; /*Logo más pequeño*/
    }

    /*Oculta el botón del header (Desktop)*/
    .emergency-button-desktop {
        display: none !important;
    }
    
    /*Botón flotante (Móvil y Tablet) */
    .emergency-button-float {
        display: flex; 
        position: fixed;
        bottom: 15px;
        right: 15px;
        z-index: 10000;
        
        background-color: #C0392B;
        color: white;
        text-decoration: none;
        padding: 15px; 
        border-radius: 50%; 
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
        font-size: 1.5em; 
        
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s, transform 0.2s;
    }
    .emergency-button-float:hover {
        background-color: #A93226; 
        transform: scale(1.1);
    }
    
    /*Oculta texto*/
    .emergency-button-float .btn-text {
        display: none; 
    }
    .emergency-button-float i {
        margin: 0; 
    }

    /*Mostrar botón de hamburguesa*/
    .menu-toggle {
        display: block; 
        order: 3;
        font-size: 1.8em;
        line-height: 1;
        padding: 5px;
        background: none;
        border: none;
        color: #2C3E50; 
        cursor: pointer;
        transition: color 0.2s, transform 0.2s;
    }
    .menu-toggle:hover {
        color: #C0392B; 
        transform: rotate(90deg); /*Animación de giro sutil*/
    }

    /*Oculta la navegación en línea*/
    .main-nav {
        display: none; 
        flex-grow: initial;
        
        position: absolute;
        top: 60px; 
        left: 0;
        width: 100%;
        background-color: #2C3E50; 
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    /*Clase para mostrar el menú con JavaScript*/
    .main-nav.is-open {
        display: block; 
    }

    .nav-list {
        flex-direction: column;
        padding: 0;
        margin: 0;
        text-align: left;
    }

    .nav-list > li {
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Separador sutil */
    }
    
    .nav-list a {
        padding: 15px 20px;
        color: white; 
        font-weight: normal;
    }

    .nav-list a:hover {
        background-color: #C0392B; /*Resaltar con el color de emergencia al hacer hover/tocar*/
        color: white;
    }
}


/*------Efecto Vista Principal Scroll------*/

.parallax {
    height: 100vh;
    background-image: url('img/principal1.jpg');
    background-attachment: fixed; 
    background-position: center; 
    background-repeat: no-repeat; 
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: -80px; 
}

.overlay {
    /*Superposición crea la capa oscura*/
    background-color: rgba(0, 0, 0, 0.45); 
    padding: 80px 200px; /*Padding alto para escritorio*/
    color: white; 
    max-width: 800px;
    border-radius: 10px;
}

.overlay h1 {
    font-size: 3em;
    margin-bottom: 15px;
}

.overlay h2 {
    font-size: 1.1em; 
    font-weight: 300; 
    margin-bottom: 20px;
}

.btn-info {
    background-color: #0a9942;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.1s;
    display: inline-block; 
    animation: pulse 1.5s infinite;
}

.btn-info:hover {
    background-color: #098639;
}

/*---Queries Responsividad---*/

/*Ajustes para tabletas y móviles (768px y menos)*/
@media (max-width: 768px) {
    
    /*Desactiva el efecto Parallax fijo en móvil*/
    .parallax {
        background-attachment: scroll; 
    }
    
    /*Ajuste del Overlay (oscuro)*/
    .overlay {
        /*Reducción del padding horizontal, libera espacio*/
        padding: 40px 30px; 
        max-width: 90%; 
    }

    /*Ajuste título principal*/
    .overlay h1 {
        font-size: 2.2em; 
        margin-bottom: 10px;
    }

    /*Ajuste párrafo*/
    .overlay h2 {
        font-size: 1em; 
        font-weight: 200; 
        margin-bottom: 20px;
    }

    .overlay hr {
        border-color: #0a9942; /* Línea separadora verde */
    }
}

/*Ajustes adicionales para móviles muy pequeños (480px y menos)*/
@media (max-width: 480px) {
    .overlay {
        padding: 30px 20px; /*Padding compacto*/
    }
    
    .overlay h1 {
        font-size: 2em; /*Reducción*/
    }
    
    .btn-info {
        padding: 12px 20px; 
        font-size: 1em;
    }
}

/*Sección Acerca de Nosotros (Misión y Visión)*/

#about-section { 
    background-color: #ffffff; 
    padding: 30px 20px; 
    text-align: center;
    min-height: auto; 
}

#about-section h2 {
    color: #2C3E50; 
    font-size: 2.5em; 
    margin-bottom: 20px;
}

#about-section h3 {
    max-width: 950px; 
    margin: 0 auto 30px auto; 
    text-align: center; 
    line-height: 1.6; 
    color: #555;
}


/*------Contenedor Misión y Visión (Diseño y Configuración)------*/
.mission-vision {
    display: flex;
    flex-direction: column; /*Apilar las tarjetas Misión y Visión verticalmente*/
    max-width: 1200px; 
    margin: 0 auto;
    gap: 30px;
}

.card-mission, .card-vision { 
    display: flex; 
    flex-direction: column; 
    align-items: stretch;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); 
    overflow: hidden; 
    min-height: auto; 
}

.card-vision {
    flex-direction: column-reverse; /*Texto arriba e imagen abajo*/
}

.image-container { 
    width: 100%; 
    height: 250px; 
}

.image-container img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}

.text-content { 
    width: 100%; 
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left; 
}

.text-content h4 {
    color: #C0392B; 
    font-size: 1.6em; 
    margin-top: 0; 
    margin-bottom: 8px;
    text-align: left;
}
.text-content p {
    text-align: justify;
    line-height: 1.5;
    margin-bottom: 0;
    color: black;
}

/*Media Query (Móvil)*/

@media (max-width: 767px) {
    .card-mission, .card-vision {
        min-height: auto;
    }
    
    .image-container {
        height: 180px; 
    }
}

/*Media Query (Desktop)*/

@media (min-width: 768px) {
    .mission-vision {
        flex-direction: row;
    }
    
    .card-mission, .card-vision {
        flex: 1 1 50%;
    }
    
    .image-container {
        height: 300px; 
    }
}

/*------Sección Servicios------*/
#services-section {
  background-color: #f9f9f9;
  padding: 60px 20px;
  text-align: center;
}

#services-section h2 {
  color: #2C3E50;
  font-size: 2.8em;
  margin-bottom: 20px;
}

#services-section p {
  color: #555;
  font-size: 1.1em;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto 50px auto;
  text-align: justify;
}

.services-three {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  flex: 1 1 300px;
  max-width: 350px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden; 
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

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

.service-card p {
  color: black;
  line-height: 1.5;
  text-align: justify;
  padding: 0 25px 25px 25px;
  margin: 0;
  flex-grow: 1;
}

.service-image-container {
  position: relative;
  width: 100%;
  height: 200px; 
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden; 
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0; 
}

.service-image-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); 
  z-index: 1;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.service-title-overlay {
  position: relative; 
  z-index: 2; 
  color: #ffffff;
  font-size: 1.3em;
  margin: 0;
  padding: 0 15px;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
}

@media (max-width: 900px) {
  .service-card {
    flex: 1 1 45%; 
    max-width: 45%;
  }
}

@media (max-width: 600px) {
  .service-card {
    flex: 1 1 100%; 
    max-width: 100%;
  }
  .service-title-overlay {
    font-size: 1.4em;
  }
  .service-image-container {
    height: 180px;
  }
}

/*------Sección Contacto------*/
#contact-section {
    background-color: #ffffff; 
    padding: 60px 20px;
    text-align: center;
}

#contact-section h2 {color: #2C3E50; font-size: 2.5em; margin-bottom: 30px; }

.contact-info-container {
    display: flex;
    flex-wrap: wrap; /*Para que los elementos se apilen en móvil*/
    justify-content: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    flex: 1 1 200px; /*Flexibilidad 3 a 4 columnas*/
    max-width: 250px;
    background-color: #f8f8f8; 
    border-radius: 10px;
    padding: 25px 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.contact-card a {
    text-decoration: none;
    color: #555; 
    font-weight: bold;
    display: block;
}

.contact-card i {
    font-size: 2.5em;
    color: #C0392B; 
    margin-bottom: 15px;
    transition: color 0.3s;
}

.contact-card a:hover i {
    color: #A93226;
}

/*Responsividad sección de contacto*/
@media (max-width: 600px) {
    .contact-card {
        flex: 1 1 100%; /*Una columna en móvil*/
        max-width: 100%;
    }
}

/*------CARRUSEL (Swiper)------*/
#carousel-section.image-carousel-container {
    padding: 40px 0;
    background-color: #f8f8f8; 
    text-align: center;
}
        
#carousel-section h2{ color: #2C3E50; font-size: 1.8em;margin-bottom: 10px; padding: 0 15px; }
#carousel-section p { max-width: 800px; margin: 0 auto 30px auto; text-align: justify; line-height: 1.6; color: #555; }

/*Contenedor principal de Swiper*/
.swiper.mySwiper {
    width: 90%;
    height: auto; /* Altura automática */
    aspect-ratio: 16/9;
    max-width: 900px; /*Ancho máximo para el carrusel*/
    margin: 20px auto;
    border-radius: 12px; 
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset; 
    background: linear-gradient(135deg, #1f1f1f 0%, #300000 100%); 
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    height: 350px; 
}

@media (min-width: 768px) {
    .swiper.mySwiper {
    height: 550px; /*Altura más grande en escritorio*/
    }
}

.swiper-slide {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*Medios (Imágenes/Videos)*/
.swiper-slide img, .swiper-slide video.slide-video {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    background: linear-gradient(135deg, #1f1f1f 0%, #300000 100%);
    transition: opacity 0.5s ease-in-out;
    opacity: 0; 
}

/*Visibilidad (Activada por JS al cargar)*/
.swiper-slide img.swiper-lazy-loaded, .swiper-slide video.slide-video.swiper-lazy-loaded {
    opacity: 1;
}

.swiper-pagination-bullet { background: white; opacity: 0.5; }
.swiper-pagination-bullet-active { background: #098639; opacity: 1; }

.swiper-lazy-preloader {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #098639; 
    width: 40px;
    height: 40px;
    z-index: 10;
}



/*------Emergencia Médica------*/
        
/*Contenedor Principal*/
.call-box { 
    width: 70%; /* Requisito: 70% del ancho del contenedor padre */
    margin: 2rem auto; /* Centrado horizontal (auto) con margen vertical */
    text-align: center;
    padding: 1.5rem; 
    background-color: #C0392B; 
    border-radius: 0.75rem; 
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.call-box:hover {
    transform: translateY(-5px) scale(1.01); 
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
}

.call-box h3 { font-size: 1.75rem; font-weight: 700; color: #FFFFFF; margin-bottom: 0.5rem; }
.call-box p { font-size: 1rem; color: #F8F9F9; margin-bottom: 1.5rem; }

/*Botón de Llamada*/
.call-button {
    display: inline-block;
    padding: 0.75rem 2rem; 
    background-color: #E74C3C;
    color: #FFFFFF;
    font-weight: 600; 
    font-size: 1rem; 
    border-radius: 0.5rem; 
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    text-decoration: none;
}

.call-button:hover { background-color: #C0392B; }

/*Botón de Términos*/
.contentTP-button { 
    margin-top: 1rem; 
    display: block; 
    font-size: 0.8rem; 
    color: #E0E0E0;
    text-decoration: underline;
    background: none; border: none; cursor: pointer; padding: 0;
    transition: color 0.15s;
}

.contentTP-button:hover { color: #FFFFFF; }

/*Términos full-screen */
.box-overlay { 
/*Cubrimiento de todo el viewport*/
    position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh; 
    background-color: rgba(0, 0, 0, 0.7);
    display: none; justify-content: center; align-items: center; 
    z-index: 1000; padding: 1rem; overflow-y: auto;
}
        
.box-content { 
    background: #FFFFFF; padding: 1.5rem; 
    border-radius: 0.75rem; 
    max-width: 90%; 
    width: 600px;
    position: relative; 
    animation: fadeIn 0.3s ease-out;
}
        
.box-close { 
    position: absolute; top: 10px; right: 20px; 
    font-size: 28px; cursor: pointer; color: #7F8C8D; 
    transition: color 0.2s;
}

.box-close:hover { color: #C0392B; }

.boxx-title { font-size: 1.5rem; font-weight: 700; color: #34495E; margin-bottom: 0.75rem; border-bottom: 1px solid #ECF0F1; padding-bottom: 0.5rem; }
.box-container { text-align: left; color: #34495E; max-height: 70vh; overflow-y: auto; padding-right: 0.5rem; }
.box-container h4 { font-size: 1.1rem; font-weight: 600; margin-top: 1rem; margin-bottom: 0.5rem; color: #2C3E50; }
.box-container p { color: #34495E; margin-bottom: 1rem; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}