/* ======================================================
   VARIABLES DE COLOR Y RECURSOS
====================================================== */
:root {
    --color-green-main: rgba(117, 189, 6, 0.78);
    --color-green-hover: #5EA504;
    --color-black: #000000;
    --color-gray-dark: #2F2F2F;
    --color-gray-medium: #CCCCCC;
    --color-white: #FFFFFF;

    /* Iconos */
    --icon-ambiental: url('https://cdn-icons-png.flaticon.com/512/5495/5495928.png');
    --icon-higiene: url('https://cdn-icons-png.flaticon.com/512/949/949333.png');
    --icon-calidad: url('https://cdn-icons-png.flaticon.com/512/4866/4866974.png');
    --icon-farma: url('https://cdn-icons-png.flaticon.com/512/387/387557.png');
    --icon-alimentaria: url('https://cdn-icons-png.flaticon.com/512/4939/4939099.png');
    --icon-mision: url('https://cdn-icons-png.flaticon.com/512/3233/3233474.png');
    --icon-vision: url('https://cdn-icons-png.flaticon.com/512/1934/1934044.png');
}

/* ======================================================
   GLOBAL RESET / AJUSTES
====================================================== */
html, body {
    overflow-x: hidden;
    width: 100%;
}

* {
    box-sizing: border-box;
    max-width: 100%;
}

ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style-type: disc;
    list-style-position: outside;
}

/* ======================================================
   HEADER Y NAVBAR
====================================================== */
.header-bg {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.bg-img {
    width: 100%;
    height: 100vh;
    object-fit: cover;
}

.dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.header-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem;
    text-align: center;
    z-index: 2;
}

.overlay-logo {
    width: 500px;
    height: auto;
}

.overlay-text {
    color: #fff;
    font-weight: 600;
    font-size: 2rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    margin: 0;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler-icon {
    filter: invert(0.5);
}

.navbar-brand {
    margin: 0 auto;
}

.logo-navbar {
    max-height: 60px;
    height: auto;
}

/* ======================================================
   TITULOS / TEXTOS / BOTONES
====================================================== */
.custom-underline-border {
    position: relative;
    display: inline-block;
    color: #333;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.custom-underline-border::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--color-green-hover);
    border-radius: 2px;
}

.texto-destacado {
    font-size: 1.1rem;
    color: #333;
}

.btn-grad {
    background-image: linear-gradient(to right, #5EA504, #7cd832);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    transition: 0.3s ease;
}

.btn-grad:hover {
    transform: scale(1.03);
    opacity: 0.9;
}

/* ======================================================
   SECCIÓN SERVICIOS
====================================================== */
#section-servicios {
    position: relative;
    z-index: 1;
}

#section-servicios h3 {
    color: #fff; /* Texto blanco */
    font-weight: 700;
    font-size: 3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    text-align: center;
    position: relative;
    z-index: 3;
}

#section-servicios ul,
#section-servicios p {
    position: relative;
    z-index: 2;
}

.servicio-banner,
.carousel,
.carousel-inner,
.carousel-item {
    position: relative;
    z-index: 5;
}

.servicio-banner {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(60%);
}

.banner-overlay {
    position: absolute; /* Para aparecer encima de la imagen */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

/* ✅ Bullets visibles y verdes */
#section-servicios ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
    line-height: 1.6;
    font-size: 1rem;
    color: #333;
    list-style-type: disc;
    list-style-position: outside;
}

#section-servicios li {
    color: #2d2d2d;
    margin-bottom: 0.4rem;
}

#section-servicios ul li::marker {
    color: #37b24d;
}

/* ======================================================
   CARRUSEL CLIENTES
====================================================== */
.carousel-inner img {
    height: 350px;
    object-fit: cover;
}

#section-clientes {
    background-color: #fff;
}

#section-clientes img {
    max-height: 80px;
    object-fit: contain;
    transition: transform 0.5s ease, filter 0.5s ease;
}

#section-clientes img:hover {
    transform: scale(1.08);
}

/* ======================================================
   LOGOS LEGALES / CONTACTO
====================================================== */
.logos-contacto .logo-item {
    text-align: center;
}

.logos-contacto .logo-item img {
    max-height: 70px;
    object-fit: contain;
    margin-bottom: 5px;
}

.logos-contacto .logo-item p {
    font-size: 0.9rem;
    color: #333;
    margin: 0;
}

/* ======================================================
   FOOTER
====================================================== */
.footer {
    border-top: 3px solid var(--color-green-hover);
    background-color: #fff;
    color: #000;
}

.footer a {
    color: #000;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--color-green-hover);
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #000;
}

.footer ul li {
    color: #000;
}

/* ======================================================
   WHATSAPP BUTTON
====================================================== */
.whatsapp-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    z-index: 1000;
}

.whatsapp-icon img {
    width: 100%;
    height: auto;
    animation: bounce 1.5s infinite;
}

.carousel-control-prev,
.carousel-control-next {
    z-index: 10 !important; /* por encima de overlays e imágenes */
    width: 5%;              /* ancho visible sin cubrir todo el borde */
    opacity: 0.8;           /* un poco translúcido */
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Asegurar que los íconos sean visibles sobre fondos claros */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
}

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 992px) {
    .overlay-logo {
        width: 400px;
        height: auto;
    }
}

@media (max-width: 768px) {

    #carousel-ambiental-div,
    #carousel-seguridad-div,
    #carousel-qa-div,
    #carousel-farma-div,
    #carousel-seguridad-alimentaria-div {
        display: none;
    }

    .footer {
        text-align: center;
    }


    .footer .container {
        flex-direction: column; /* Apila los divs verticalmente */
        align-items: center;    /* Centra los elementos */
        gap: 2rem;              /* Espacio entre secciones */
        text-align: center;     /* Centra textos y listas */
    }

    .footer .footer-logo,
    .footer .datos-contacto,
    .footer .footer-social,
    .footer .footer-horarios {
        width: 100%;            /* Ocupa todo el ancho disponible */
    }

    .footer .datos-contacto ul,
    .footer .footer-horarios ul {
        padding-left: 0;        /* Ajusta el padding de las listas */
    }
    .overlay-logo {
        width: 350px;
    }

    .overlay-text {
        font-size: 2rem;
    }

    .header-overlay {
        gap: 0.4rem;
        padding: 0.25rem 0.5rem;
        top: 60%;
        transform: translate(-50%, -60%);
    }

    .overlay-text-servicios {
        font-size: 1.6rem;
    }

    .carousel img {
        height: 250px;
    }

    #section-clientes img {
        max-height: 60px;
    }

    .logos-contacto .logo-item img {
        max-height: 55px;
    }
}

[id^="section-"] {
    scroll-margin-top: 90px; /* ajusta según la altura real de tu navbar */
}
/* Ícono de WhatsApp oculto por defecto */
.whatsapp-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    display: none; /* 👈 Oculto por defecto */
}

.whatsapp-icon img {
    width: 100%;
    height: auto;
    animation: bounce 1.5s infinite;
}

.dropdown-menu{
    min-width: 15rem;
}

.scroll-effect {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-effect.visible {
    opacity: 1;
    transform: translateY(0);
}
