﻿/* ========= Base ========= */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

/* Accesibilidad foco */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* Scrollbar opcional */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px grey;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(230,52,62,.6);
    border-radius: 5px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(230,52,62,1);
    }

/* ========= Contenedores a 1000px en desktop, fluid en móvil =========
   (con esto header, contenido y footer quedan del mismo ancho) */
.container-fluid,
.default-container,
.image-container-text,
.slider,
.service-container,
.copyright-footer .copyright-text,
.data-footer-container {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* ========= Navbar / branding ========= */
.brand-logo {
    height: 48px;
}

/* ========= HERO ========= */
.image-container {
    background-image: url(../media/banner.webp);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-color: rgba(0,0,0,.4);
    background-blend-mode: color;
    min-height: 40vh;
    display: flex;
    align-items: flex-end;
}

.image-container-text {
    color: #fff;
    padding: 1.25rem 0;
    font-weight: 600;
    /* Tamaño fluido: 28–80px */
    font-size: clamp(28px, 6vw, 80px);
}

/* ========= Slider de logos ========= */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 6));
    }
}

.slider {
    height: 100px;
    overflow: hidden;
    position: relative;
}

    .slider .slide-track {
        animation: scroll 40s linear infinite;
        display: flex;
        width: calc(250px * 12);
    }

    .slider .slide {
        height: 100px;
        width: 250px;
        align-content: center;
        margin: auto;
    }

    .slider img {
        height: 80%;
        width: 80%;
        object-fit: contain;
        display: block;
        margin: auto;
        filter: grayscale(100%);
    }

/* ========= Sección servicios (tu layout actual) ========= */
.service-container {
    height: 400px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

    .service-container .service-column {
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

        .service-container .service-column p {
            text-align: justify;
        }

    .service-container .service-row {
        width: 100%;
    }

.service-img-home {
    background-position: center;
    background-repeat: no-repeat;
    background-size: 100%;
    background-color: rgba(0,0,0,.3);
    background-blend-mode: color;
    height: 100%;
    transition: background-size 1s ease;
    cursor: pointer;
}

    .service-img-home:hover {
        background-size: 120%;
    }

.service-img-text {
    width: 100%;
    color: #fff;
    height: 100%;
    font-size: clamp(22px, 4vw, 50px);
    align-content: end;
    padding: 20px;
    font-weight: 600;
}

/* ========= Footer ========= */
.footer {
    width: 100%;
    line-height: 40px;
    background-color: #fff;
    z-index: 1;
}

.copyright-footer {
    background-color: rgba(34,67,98,1);
}

    .copyright-footer .copyright-text {
        color: #fff;
    }

/* Bloque de columnas del footer */
.data-footer-container {
    height: 280px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

    .data-footer-container .data-footer-column {
        width: 30%;
        height: 100%;
        display: flex;
        flex-direction: column;
        padding: 20px;
    }

.data-footer-column span {
    font-weight: 600;
}

/* ========= Utilidades de color ========= */
.btn-primary {
    color: #fff;
    background-color: rgba(34,67,98,.9);
    border-color: rgba(34,67,98,.9);
}

span, span i {
    color: rgba(34,67,98,.9);
}

/* ========= RESPONSIVE ========= */

/* <= 1200px: baja un poco alturas y gaps */
@media (max-width: 1200px) {
    .service-container {
        height: auto;
    }

    .service-img-home {
        min-height: 260px;
    }
}

/* <= 992px: servicios apilados, textos e imágenes cómodos */
@media (max-width: 992px) {
    .service-container {
        flex-direction: column;
        gap: 12px;
        padding-inline: 1rem;
    }
        /* tus w-50 / h-50 no romperán en móvil */
        .service-container .service-column,
        .service-container .service-row {
            width: 100% !important;
            height: auto !important;
        }

    .service-img-home {
        min-height: 240px;
    }

    .slider {
        height: 80px;
    }

        .slider .slide {
            width: 180px;
            height: 80px;
        }
}

/* <= 576px: margenes y tipografías más compactas */
@media (max-width: 576px) {
    .image-container {
        min-height: 32vh;
    }

    .service-img-home {
        min-height: 200px;
    }

    .data-footer-container {
        height: auto;
        flex-direction: column;
        gap: 8px;
    }

        .data-footer-container .data-footer-column {
            width: 100%;
            padding: 12px 0;
        }
}

/* Tono/estilo de links del navbar */
.navbar .nav-link {
    color: #224362;
    font-weight: 600;
}

    .navbar .nav-link:hover {
        color: rgba(34,67,98,.8);
    }

/* Offcanvas más cómodo en móviles */
@media (max-width: 992px) {
    .offcanvas {
        width: 80%;
        max-width: 320px;
    }

        .offcanvas .nav-link {
            padding: .6rem 0;
        }

        .offcanvas .btn {
            width: 100%;
        }
}

/* Contenedor central con tu ancho clásico */
.container-1000 {
    max-width: 1000px;
    margin-inline: auto;
    padding-inline: 1rem;
}

/* Hero */
.image-container {
    background-image: url('/media/banner.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: rgba(0,0,0,.4);
    background-blend-mode: color;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
}

.image-container-text {
    color: #fff;
    font-weight: 700;
    padding: 20px;
    line-height: 1;
    /* tamaño fluido, no rompe en móvil */
    font-size: clamp(2rem,6vw,4.5rem);
}

/* Tarjeta visual del servicio (imagen de fondo) */
.service-photo {
    width: 100%;
    min-height: 220px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
    transition: transform .35s ease;
}

    .service-photo:hover {
        transform: scale(1.02);
    }

/* Espaciados en mobile/tablet */
@media (min-width: 992px) {
    .service-photo {
        min-height: 260px;
    }
}

/* Tarjeta simple para contactos */
.contact-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.04);
}

    .contact-card i {
        color: rgba(34,67,98,.9);
    }

/* Contenedor central que ya usamos en páginas previas */
.container-1000 {
    max-width: 1000px;
    margin-inline: auto;
    padding-inline: 1rem;
}

/* Ajuste de párrafos a la izquierda en desktop y cómodo en móvil */
.text-justify {
    text-align: justify;
}

.object-fit-cover {
    object-fit: cover;
}

/* Hace visible los bloques con fondo */
.service-img-services {
    width: 100%;
    height: 100%; /* ocupa la altura del contenedor padre */
    min-height: 220px; /* garantiza altura si el padre es auto */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover; /* o contain según el caso */
    border-radius: 5px;
    display: block;
}

/* En móviles, que no se deshaga: */
@media (max-width: 992px) {
    .service-img-services {
        min-height: 200px;
    }
}