/* productos.css */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
}

.navbar-section {
    background: linear-gradient(135deg, #000000 0%, #0f2066 100%);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #0dd30e;
}

.list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    margin: 0 15px;
}

.nav-link a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link a:hover {
    background-color: rgba(13, 211, 14, 0.1);
    color: #0dd30e;
    transform: translateY(-2px);
}

.Tittle {
    margin-bottom: 1rem;
    text-align: center;
    color: #0f2066;
    font-size: 2.5rem;
    font-weight: bold;
}

.main-section {
    background-image: url(img/DataCenter.jpeg);
    width: 100%;
    height: 100vh; 
    background-repeat: no-repeat;
    background-size: cover;
    background-color: #0f2066; 
    background-attachment: fixed;
    position: relative; 
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    padding: 20px 20px;
}

.videoServicios {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: -1;
    margin: 0;
}

.main-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.main-section .Tittle,
.main-section p {
    position: relative;
    z-index: 2;
}

.main-section .Tittle {
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-size: 3rem;
}

.main-section p {
    color: #ffffff;
    font-size: 1.5rem;
    max-width: 700px;
    margin-top: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    text-align: center;
}

/* Sección de categorías: antes dependía de un selector de atributo
   que nunca coincidía por un espacio faltante en el inline style */
.info-section {
    background-color: #ffffff;
    padding: 60px 20px 40px;
    border-top: 5px solid #0dd30e;
}

.section-title {
    color: #000000;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

.category-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.category-link {
    color: #0f2066;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 15px 25px;
    border: 2px solid #0dd30e;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: #f4f4f4;
}

.category-link:hover {
    background-color: #0dd30e;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 211, 14, 0.3);
}

/* ===== CARRUSEL ===== */
.submain-section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #0f2066;
}

.slide-enfriamiento { background-image: url(img/Enfriamiento.jpeg); }
.slide-gabinetes    { background-image: url(img/Gabinetes.jpeg); }
.slide-trifasico    { background-image: url(img/Trifasico.jpeg); }
.slide-pdu          { background-image: url(img/PDU.jpeg); }

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.45) 60%,
        rgba(0, 0, 0, 0.2) 100%
    );
}

.carousel-content {
    position: absolute;
    bottom: 18%;
    left: 8%;
    max-width: 540px;
    color: #ffffff;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.7s ease 0.3s, opacity 0.7s ease 0.3s;
}

.carousel-slide.active .carousel-content {
    transform: translateY(0);
    opacity: 1;
}

.carousel-tag {
    display: inline-block;
    background-color: #0dd30e;
    color: #0a1a0a;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 14px;
    border-radius: 4px;
    margin-bottom: 18px;
}

.carousel-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.carousel-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.88);
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Flechas de navegación */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #ffffff;
    font-size: 2.2rem;
    line-height: 1;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease, border-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(13, 211, 14, 0.25);
    border-color: #0dd30e;
}

.carousel-btn--prev { left: 24px; }
.carousel-btn--next { right: 24px; }

/* Puntos indicadores */
.carousel-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    padding: 0;
}

.carousel-dot.active {
    background: #0dd30e;
    border-color: #0dd30e;
    transform: scale(1.3);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto 0;
}

.image-item {
    position: relative;
    overflow: hidden; 
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.image-item:hover {
    transform: translateY(-10px);
}

.image-item img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-item:hover img {
    transform: scale(1.03);
}

.overlay-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4));
    color: #ffffff;
    padding: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    text-align: center;
}

.overlay-text h3 {
    margin: 0 0 10px 0;
    color: #0dd30e;
    font-size: 1.2rem;
}

.overlay-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.overlay-text a {
    color: #0f2066;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.overlay-text a:hover {
    color: #ffffff;
}

.image-item:hover .overlay-text {
    opacity: 1;
    transform: translateY(0);
}

.footer-section {
    background: linear-gradient(135deg, #000000 0%, #0f2066 100%);
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.footer-info, .footer-social, .footer-legal {
    flex: 1;
    min-width: 200px;
}

.footer-info h3, .footer-social h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #0dd30e;
}

.footer-info p, .footer-social a, .footer-legal p, .footer-legal a {
    margin: 5px 0;
    font-size: 14px;
    text-decoration: none;
    color: #ffffff;
}

.footer-social a:hover {
    color: #0dd30e;
}

.footer-legal a {
    color: #cccccc;
}

.footer-legal a:hover {
    color: #0dd30e;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .main-section {
        height: 80vh;
    }

    .submain-section {
        height: 85vh;
    }

    .carousel-content {
        max-width: 460px;
    }

    .carousel-content h2 {
        font-size: 2.3rem;
    }
}

@media (max-width: 768px) {

    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }

    .list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .nav-link {
        margin: 0 8px;
    }

    .main-section {
        height: 50vh;
        padding: 20px;
        background-attachment: scroll;
    }
    
    .main-section .Tittle {
        font-size: 2.5rem;
    }
    
    .main-section p,
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .info-section {
        padding: 40px 15px 30px;
    }

    .section-title {
        font-size: 2rem;
    }

    .category-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .category-link {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .submain-section {
        height: 75vh;
        padding: 40px 20px;
    }

    .carousel-content {
        left: 5%;
        right: 5%;
        max-width: 100%;
        bottom: 22%;
    }

    .carousel-content h2 {
        font-size: 1.8rem;
    }

    .carousel-content p {
        font-size: 0.95rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
    }

    .carousel-btn--prev { left: 12px; }
    .carousel-btn--next { right: 12px; }
    
    .image-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .image-item img {
        height: 200px;
    }
    
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    
    .footer-info, .footer-social, .footer-legal {
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {

    .logo a {
        font-size: 20px;
    }

    .nav-link a {
        padding: 8px 10px;
        font-size: 14px;
    }

    .main-section {
        height: 45vh;
        padding: 15px;
    }

    .main-section .Tittle {
        font-size: 1.9rem;
    }

    .main-section p,
    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .category-link {
        padding: 12px 18px;
        font-size: 1rem;
    }

    .submain-section {
        height: 65vh;
    }

    .carousel-content {
        bottom: 18%;
    }

    .slide-enfriamiento { background-image: url(img/Enfiramiento_mobile.png); }
    .slide-gabinetes    { background-image: url(img/Gabinetes_mobile.png); }
    .slide-trifasico    { background-image: url(img/Trifasico_mobile.png); }
    .slide-pdu          { background-image: url(img/PDU_mobile.png); }

    .carousel-tag {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .carousel-content h2 {
        font-size: 1.4rem;
    }

    .carousel-content p {
        font-size: 0.85rem;
    }

    .carousel-btn {
        width: 34px;
        height: 34px;
        font-size: 1.3rem;
    }

    .carousel-dots {
        bottom: 20px;
    }

    .image-item img {
        height: 170px;
    }

    .overlay-text h3 {
        font-size: 1rem;
    }

    .overlay-text p {
        font-size: 0.85rem;
    }

    .footer-section {
        padding: 25px 15px;
    }

    .footer-info p, .footer-social a, .footer-legal p, .footer-legal a {
        font-size: 13px;
    }
}