/* MARK: Esilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: white;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body{
    background-repeat: no-repeat;
    width: 100vw;
    min-height: 100vh;
    height: calc(100vh + 4rem);
}

a {
    text-decoration: none;
    color: white;
    color: inherit;
}

:root {
    --blue-mai: #203167;
}

/* MARK: Fonts */
@font-face {
    font-family: 'Lato';
    src: url(../fonts/Lato-Regular.ttf);
}

@font-face {
    font-family: 'Roboto';
    src: url(../fonts/Roboto.ttf) format('truetype');
    font-weight: 100 900; 
    font-style: normal;
}

/* MARK: Main hero */

#main-hero {
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
}

#main-hero-img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 700px;
    width: 100%;
    overflow: hidden;
}

#main-hero-img img {
    width: auto; /* Prevents stretching */
    height: 100%; /* Ensures it maintains its aspect ratio */
    min-width: 100%; /* Ensures it covers the full width */
    object-fit: cover;
    filter: brightness(0.5) blur(2px);
    transform: scale(1.03);
}

#main-hero-title-ctn {
    width: 100%;
    position: absolute;
    display: flex;
    justify-content: flex-start; /* Aligns content to the left */
    padding: 10%;
}

#main-hero-title {
    font-family: 'Roboto';
    font-weight: 300;
    display: block;
    color: rgb(255, 255, 255);
    z-index: 1;
    font-size: clamp(2rem, 5vw, 2.9rem);
    max-width: 800px;
}

/* MARK: Second hero */
/* section de quienes somos, modificacion de tamaño de la img */
#second-hero-img {
    display: flex;
    justify-content: center;
    align-items: center;

}

#second-hero-img img{
   max-width: 100%;
   max-height: 150%;
   width: 200px;
   height: auto;
   display: block;
   margin-top: 50px;
   margin-bottom: 35px;
   background-color: white;
   backdrop-filter: blur(5px);
  border-radius: 3px;
}

#second-hero p, h2, h3{
    color: #333;
    font-family: "Roboto";
}

#second-hero-text-ctn{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#second-hero-first {
    width: clamp(300px, 50vw, 500px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 auto;
}

#second-hero-first p { 
    font-size: clamp(1rem, 1.5vw, 1.5rem);
}

.second-hero-title {
    font-weight: 100;
    font-size: 3rem;
    color: #333;
    margin-bottom: 10px;
    font-family: sans-serif;
}

#second-hero-last {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    margin-bottom: 50px;
}

.second-hero-subtitle {
    margin-top: 15px;
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 400;
}

#second-hero-last img{
    width: 70px;
}

.tarjeta-1{
    background: white;
    border-radius: 16px;
    padding: 24px;
    color: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    text-align: center;
    width: clamp(300px, 40vw, 400px);
}

.tarjeta-1:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.397);
    border-color: rgba(0, 0, 0, 0.0);
}

/* MARK: Third hero */
/* Estilos para la sección de Servicios y Productos */
#third-hero {
    background-color: #eeeeee;
    padding: 40px 20px;
    text-align: center;
}

.third-hero-ctn {
    margin-bottom: 40px;
}

.third-hero-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
    font-family: sans-serif;
}

.third-hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    font-family: sans-serif;
}

.services-grid {
    display: flex;
    flex-wrap: wrap; 
    gap: 20px;
    margin-bottom: 30px;
    margin-left: 6px;
    justify-content: center; 
}

.service-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1 1 100%;
    max-width: 100%;
    cursor: pointer;
}

@media (min-width: 600px) {
    .service-card {
        flex: 1 1 calc(50% - 20px);
        max-width: calc(50% - 20px); 
    }
}

@media (min-width: 900px) {
    .service-card {
        flex: 1 1 calc(25% - 20px);
        max-width: calc(25% - 20px);
    }
}

.service-title {
    font-size: 3rem;
    color: #333;
    margin-bottom: 10px;
    font-family: sans-serif;
}

.service-description {
    font-size: 2rem;
    color: #666;
    font-family: sans-serif;
}

.services-description {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.services-description p {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.services-description ul {
    list-style-type: disc;
    margin-left: 20px;
}

.services-description li {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
}


/* MARK: Products*/

/* Estilos para los iconos */
.service-icon {
    width: 50px; /* Tamaño del icono */
    height: 50px;
    margin-bottom: 15px; 
}

/* Estilos para las tarjetas de servicios */
.service-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px); /* Efecto de elevación al pasar el mouse */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.service-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 10px;
}

.service-description {
    font-size: 1rem;
    color: #666;
}

/* Estilos para el carrusel */
.carousel {
    position: relative;
    max-width: 600px; /* Ancho máximo del carrusel */
    margin: 0 auto; /* Centrar el carrusel */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    aspect-ratio: 16 / 9; /* Relación de aspecto */
}

.carousel-inner {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Animación suave suavecito */
}

.carousel-item {
    min-width: 100%; /* Cada imagen ocupa el 100% del contenedor */
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000; /* Fondo negro para evitar bordes blancos tuve pruqeños inconvenientes */
}

.carousel-item img {
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* Escala y recorta la imagen para que cubra el espacio */
    display: block;
}

/* Botones de control del carrusel */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.0); /* Fondo semi-transparente */
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.carousel-control:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control.prev {
    left: 10px; 
}

.carousel-control.next {
    right: 10px; 
}


.services-description {
    display: flex;
    align-items: center; 
    gap: 40px; /* Espacio entre el carrusel y el texto */
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px; /* Espaciado interno */
}

.services-text {
    flex: 1; 
}

.services-text p {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
    font-family: sans-serif;
}

.services-text ul {
    list-style-type: disc;
    margin-left: 20px;
    font-family: sans-serif; 
}

.services-text li {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/*MARK: FOURTH section*/
#fourth-hero {
    background-color: white;
    padding: 50px 20px;
    text-align: center;
}

.contact-ctn{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.contactcards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tarjeta {
    background: white;
    border-radius: 16px;
    padding: 20px;
    color: #1a1a1a;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.tarjeta:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.397);
    border-color: rgba(0, 0, 0, 0.0);
}

.tarjeta img {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    filter: none;
}

.tarjeta h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    color: #2d2d2d;
    text-align: center;
}

.tarjeta div {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}

.tarjeta a {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
}
/*MARK: FOURTH section*/


#whatsapp-ctn:hover #whatsapp {
    filter: brightness(0) saturate(100%) invert(57%) sepia(84%) saturate(416%) hue-rotate(90deg) brightness(99%) contrast(93%);
    transition: 0.2s;
}

#whatsapp-ctn #whatsapp{
    transition: 0.5s;
}

#telef-ctn:hover #telef {
    filter: brightness(0) saturate(100%) invert(28%) sepia(74%) saturate(746%) hue-rotate(190deg) brightness(97%) contrast(95%);
    transition: 0.2s;
}

#telef-ctn #telef{
    transition: 0.5s;
}

#correo-ctn:hover img#correo {
    filter: brightness(0) saturate(100%) invert(10%) sepia(100%) saturate(6000%) hue-rotate(350deg) brightness(60%) contrast(140%) !important;
    transition: filter 0.2s ease-in-out;
}

#correo-ctn img#correo {
    transition: filter 0.5s ease-in-out;
}




/*MARK: Modal*/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.modal-body {
    padding: 20px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    padding: 0 10px;
    transition: color 0.2s ease;
}

.close:hover {
    color: #000;
}

.modal-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 10px;
}

.image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

.image-container:hover {
    transform: translateY(-5px);
}

.modal-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.image-caption {
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
    font-family: sans-serif;
}

@keyframes closeModal {
    0% {
        transform: scale(1); /* Tamaño original */
        opacity: 1;
    }
    100% {
        transform: scale(0.7); /* Se reduce a la mitad */
        opacity: 0; /* Se desvanece */
    }
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    transform: scale(0.7);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal.closeing .modal-content {
    animation: closeModal 0s forwards; /* Aplica la animación de cierre */
}

/* MARK: Queries */

@media (max-width: 960px) {

   .services-description {
       flex-direction: column; 
   }

   .carousel {
       order: -1; 
       width: 100%;
       max-width: 400px; 
       margin: 0 auto;
   }

   .carousel img {
       width: 100%; 
       height: auto;
   }

   .services-text {
    width: 85%;
   }

   #insumos-last {
       display: flex;
       justify-content: center;
       align-items: center;
   }

   
}


@media (max-width: 768px) {
    .services-text {
        width: 100%;
       }
    
    #contacto {
        grid-template-columns: 1fr;
        width: 95%;
    }

    .contactcards {
        grid-template-columns: 1fr;
    }

    .tarjeta {
        height: 220px;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }

    .modal-images {
        grid-template-columns: 1fr;
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-images img {
        height: 150px;
    }

    #second-hero-last {
        display: flex;
        justify-content: center;
        flex-direction: column;
        margin-top: 20px;
        margin-bottom: 30px;
    }
}

@media (max-height: 758px) {
    #contacto {
        padding: 1rem;
    }

    .tarjeta {
        height: 250px;
        padding: 1.2rem;
    }

    .tarjeta img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .tarjeta {
        height: 200px;
        padding: 1rem;
    }

    .tarjeta img {
        width: 50px;
        height: 50px;
    }

    .tarjeta h1 {
        font-size: 1.3rem;
    }

    .tarjeta div {
        font-size: 1rem;
    }
}


/* Animación para el scroll */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/*MARK: Modal*/


