/* ==========================================================================
   1. GENERAL
   ========================================================================== */
body {
    font-family: 'Segoe UI', sans-serif;
    font-size: 24px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

.main-content {
    flex: 1;
}

/* ==========================================================================
   2. TOP BAR (BARRA SUPERIOR)
   ========================================================================== */
.top-bar {
    background: #212529;
    color: #fff;
    font-size: 14px;
    padding: 5px 0;
}

.top-bar a {
    color: #fff;
    margin-right: 15px;
}

.hover-social:hover {
    color: #ff4d4d !important;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

/* ==========================================================================
   3. NAVBAR (NAVEGACIÓN)
   ========================================================================== */
.navbar {
    min-height: 100px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.logo-img {
    height: 100px;
    width: auto;
    transition: transform 0.3s ease;
    max-width: 100%;
}

@media (max-width: 768px) {
    .logo-img {
        height: 50px;
    }

    .navbar-brand span {
        font-size: 1.1rem;
    }
    
    .navbar-brand {
        display: none !important;
    }
}

.navbar-brand:hover .logo-img {
    transform: rotate(-5deg) scale(1.1);
}

/* Enlaces del navbar con efecto de subrayado */
.nav-link {
    position: relative;
    color: #fff !important;
    font-weight: 500;
    padding-bottom: 5px;
}

.nav-effect {
    display: inline-block;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 4px;
    color: #fff;
}

.nav-effect::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 4px; /* Grosor unificado */
    background: linear-gradient(90deg, #ff0000, #007bff, #00c851, #ff8800);
    transition: width 0.3s ease;
}

.nav-effect:hover::after,
.nav-effect.active::after,
.nav-link.active::after {
    width: 100%;
}

/* Menú Hamburguesa */
.navbar-toggler {
    border: none;
    background: transparent;
    outline: none;
}

.navbar-toggler-icon {
    position: relative;
    width: 24px;
    height: 3px;
    background-color: #ccc;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 24px;
    height: 3px;
    background-color: #ccc;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before { top: -8px; }
.navbar-toggler-icon::after { top: 8px; }

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ==========================================================================
   4. CARRUSEL Y TARJETAS
   ========================================================================== */
#mainCarousel {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
}

#mainCarousel .carousel-item,
#mainCarousel .carousel-item .image-carousel {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    max-height: none;
}

img.d-block.w-100 {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.carousel-caption {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 1rem;
    bottom: 15%;
}

/* CORRECCIÓN LÍNEA 264: Separación de reglas limpia para el cPanel */
.carousel-item img {
    max-height: 450px;
    object-fit: cover;
}

#mainCarousel .carousel-item img {
    max-height: 600px;
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
    background-color: #fff;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   5. SLIDER DE LOGOS
   ========================================================================== */
.slider-logos {
    overflow: hidden;
    position: relative;
}

.slide-track {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.slide {
    width: 200px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.slider-logos .slide img {
    width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.slide img:hover {
    filter: grayscale(0%);
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ==========================================================================
   6. CONTACTO Y SECCIONES
   ========================================================================== */
.form-section {
    background-color: #f8f9fa;
    min-height: 80vh;
    padding: 3rem 0;
}

.object-fit-cover {
    object-fit: cover;
}

div .logo-contact {
    background: #212529;
}

.animate__animated {
    --animate-duration: 1s; /* CORRECCIÓN LÍNEA 355: Variable CSS correcta */
}

.about-section h2, .about-section h4 {
    font-weight: 700;
}

.about-section p, .about-section li {
    font-size: 1.1rem;
}

.about-section ul li {
    margin-bottom: 0.5rem;
}

.about-section img {
    transition: transform 0.3s ease;
}

.about-section img:hover {
    transform: scale(1.02);
}

.aviso {
    display: inline-block;
    color: #eb2907;
    margin-left: 3px;
}

/* ==========================================================================
   7. COOKIE BANNER Y FOOTER
   ========================================================================== */
#cookie-banner {
    border-radius: 0.5rem;
    margin: 0 1rem 1rem 1rem;
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #222;
    color: #fff;
    padding: 15px;
    text-align: center;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.cookie-banner.hide {
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}

.cookie-banner button {
    background-color: #007bff;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.cookie-banner button:hover {
    background-color: #0056b3;
}

.footer .container {
    width: 100%;
    max-width: none;
    padding-left: 2rem;
    padding-right: 2rem;
}

.footer-logo {
    width: 150px;
    height: auto;
}

.footer h5 {
    color: #00bfff;
}

.footer p,
.footer-link {
    color: #ccc;
    margin-bottom: 0.5rem;
    text-decoration: none;
    display: block;
}

.footer-link:hover {
    color: #ff4d4d;
    text-decoration: underline;
}

@media (max-width: 576px) {
    .footer-logo {
        width: 120px;
        margin-bottom: 1rem;
    }

    .footer {
        text-align: center;
    }

    .footer .text-md-start {
        text-align: center !important;
    }

    .footer .d-flex {
        justify-content: center !important;
    }

    .cookie-banner {
        flex-direction: column;
        align-items: center !important;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   8. ESCALA TIPOGRÁFICA UNIFICADA (CORRECCIÓN LÍNEAS DE DUPLICADOS)
   ========================================================================== */
html, body {
    font-size: 18px;
    line-height: 1.6;
    color: #212529;
}

h1, .h1 { font-size: 2.2rem; font-weight: 700; }
h2, .h2 { font-size: 1.9rem; font-weight: 700; }
h3, .h3 { font-size: 1.6rem; font-weight: 600; }
h4, .h4 { font-size: 1.3rem; font-weight: 600; }
h5, .h5 { font-size: 1.1rem; font-weight: 500; }
h6, .h6 { font-size: 1rem; font-weight: 500; }
p, li { font-size: 1.1rem; }
.form-control, .btn { font-size: 1rem; }

/* ==========================================================================
   9. MEDIA QUERY ADAPTATIVA: TELEFONO ARRIBA, ICONOS ABAJO (MÓVIL < 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .top-bar.d-flex {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        padding: 10px 0 !important; /* Controla el espaciado interno superior e inferior */
    }

    .top-bar.d-flex > div:first-child {
        margin: 0 auto 8px auto !important; /* Añade un margen abajo para separar el teléfono de los iconos sin usar gap */
        text-align: center !important;
    }

    .top-bar.d-flex .social-icons.mt-1 {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 0 !important; /* Limpia márgenes conflictivos */
    }

    .top-bar.d-flex .social-icons.mt-1 a {
        margin: 0 10px !important;
    }
}
    
