/* Custom properties */
:root {
    --color-bg: #0a0a0c;
    --color-surface: #131316;
    --color-primary: #ff4d4d;
    --color-primary-hover: #ff3333;
    --color-text: #ffffff;
    --color-text-muted: #a0a0ab;
    --color-glass: rgba(255, 255, 255, 0.05);
    --color-glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 100px 0;
}

.highlight {
    color: var(--color-primary);
}

/* Glassmorphism utility */
.glass {
    background: var(--color-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Image Object Fits para Assets */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    max-height: 80px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

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

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.nav-links a:hover {
    color: var(--color-text);
}

.nav-links a.btn-primary-small {
    background: var(--color-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
}

.nav-links a.btn-primary-small:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 77, 77, 0.3);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-heading);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 77, 77, 0.4);
}

.btn-secondary {
    display: inline-block;
    background: var(--color-glass);
    border: 1px solid var(--color-glass-border);
    color: white;
    backdrop-filter: blur(10px);
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.bg-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.3);
    /* Aumenta el brillo nativo del video */
}

.hero-bg-media::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 10, 12, 0.5) 0%, rgba(10, 10, 12, 0.15) 50%, rgba(10, 10, 12, 0.7) 100%);
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 5%;
    text-align: center;
    z-index: 10;
}

.hero-logo-wrapper {
    margin-bottom: 30px;
}

.hero-top-img {
    max-height: 180px;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* Grid Services */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    padding: 40px;
    text-align: left;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 77, 77, 0.3);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.img-wrapper.small {
    height: 150px;
    margin-top: auto;
    overflow: hidden;
    border-radius: 8px;
}

/* Productos Layout */
.products-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.product-visual img {
    max-width: 400px;
    border-radius: 12px;
}

.products-container {
    flex: 1;
}

/* Responsive */
@media (max-width: 992px) {
    .products-layout {
        flex-direction: column;
        align-items: center;
    }

    .product-visual img {
        max-width: 100%;
    }
}





/* About Section */
.about-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-content {
    padding: 50px;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.about-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    min-height: 500px;
}

.about-img-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    grid-auto-rows: 250px;
}

.gallery-item.tall {
    grid-row: span 2;
}

.gallery-item.wide {
    grid-column: span 2;
}

.gallery-item {
    transition: var(--transition);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover {
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Contact Section */
.footer-contact {
    position: relative;
}

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px;
    text-align: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.contact-info>p {
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid transparent;
    width: 100%;
}

.contact-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 77, 77, 0.2);
    transform: translateX(5px);
}

.contact-link .icon {
    font-size: 2rem;
    background: rgba(255, 77, 77, 0.1);
    padding: 15px;
    border-radius: 12px;
    color: var(--color-primary);
    min-width: 60px;
    text-align: center;
}

.contact-link div {
    flex: 1;
}

.contact-link strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--color-text);
}

.contact-link span {
    color: var(--color-text-muted);
}

/* Footer */
.footer-bottom {
    text-align: center;
    padding: 30px;
    border-top: 1px solid var(--color-glass-border);
    color: var(--color-text-muted);
}

/* Animations & Reveal */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--color-text);
    transition: var(--transition);
    border-radius: 3px;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 400px;
        height: 100vh;
        background: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        border-left: 1px solid var(--color-glass-border);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .products-container,
    .about-flex {
        grid-template-columns: 1fr;
    }

    .product-visual,
    .about-image {
        min-height: 300px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item.tall {
        grid-row: span 1;
        min-height: 250px;
    }

    .contact-card {
        padding: 30px 20px;
    }

    .contact-link {
        flex-direction: column;
        text-align: center;
    }
}

/* Productos */
.products-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.product-visual img {
    max-width: 520px;
    /* 400px + 30% ≈ 520px */
    border-radius: 12px;
}


.products-container {
    flex: 1;
}

/* Productos */
.products-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 40px;
}

.product-visual img {
    max-width: 520px;
    /* imagen 30% más grande */
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-visual img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5);
}

.products-container {
    flex: 1;
}

/* Lista de productos */
.products-list {
    list-style-type: none;
    padding-left: 0;
    color: var(--color-text-muted);
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.products-list li {
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border-left: 3px solid var(--color-primary);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    font-size: 1.05rem;
}

.products-list .icon {
    font-size: 1.5rem;
    line-height: 1;
}

/* Título de suministro */
.suministro-title {
    text-align: center;
    font-size: clamp(1.6rem, 3vw, 2rem);
    /* tamaño balanceado */
    margin-bottom: 25px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
}

/* Responsive */
@media (max-width: 992px) {
    .products-layout {
        flex-direction: column;
        align-items: center;
    }

    .product-visual img {
        max-width: 100%;
        height: auto;
    }
}

//* Bloque Distribuidor */
.distribuidor-block {
    padding: 50px;
    margin: 0 auto;
    /* centra el bloque */
    max-width: 800px;
    /* limita el ancho para que no se extienda demasiado */
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
}


/* Título Distribuidor */
.distribuidor-title {
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    /* más pequeño y balanceado */
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text);
}

/* Texto */
.distribuidor-block p {
    font-size: 0.9rem;
    /* texto más pequeño */
    color: var(--color-text-muted);
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Lista de marcas simple */
.brands-list {
    list-style-type: disc;
    padding-left: 20px;
    display: inline-block;
    /* centra la lista */
    text-align: left;
    /* viñetas alineadas */
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.brands-list li {
    margin-bottom: 6px;
}

/* Responsive Carousel */
.carousel-section {
    padding: 20px 0 100px 0; /* Menos padding top para acercarlo a servicios */
    overflow: hidden;
}

.carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 20px 5% 40px 5%; /* Padding bottom para sombra */
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.carousel-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.carousel-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.carousel-item {
    flex: 0 0 calc(12.5% - 17.5px); /* 8 items on desktop */
    min-width: 140px;
    height: 110px;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    border: 1px solid var(--color-glass-border);
    background: rgba(255, 255, 255, 0.02); /* sutil fondo para logos transparentes */
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 77, 77, 0.2);
}

.carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.3s ease;
}

.carousel-item:hover img {
    transform: scale(1.05);
}

@media (max-width: 1024px) {
    .carousel-item {
        flex: 0 0 calc(16.666% - 16.66px); /* 6 items */
        min-width: 130px;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        flex: 0 0 calc(25% - 15px); /* 4 items */
        min-width: 120px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        flex: 0 0 calc(33.333% - 13.33px); /* 3 items */
        min-width: 100px;
        height: 90px;
        scroll-snap-align: start; 
    }
}