/* =========================================
   VARIABLES GLOBALES
   ========================================= */
:root {
    --color-primario: #f9ed32;
    --color-secundario: #000000;
}

/* =========================================
   RESETEO BÁSICO Y TIPOGRAFÍA GENERAL
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #ffffff;
    color: #333333;
}

/* Contenedor general para centrar el contenido */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   TIPOGRAFÍA - ESCRITORIO (Default)
   ========================================= */
h1 { font-size: 50px; font-weight: 600; }
h2 { font-size: 40px; font-weight: 600; }
h3 { font-size: 35px; font-weight: 600; }
p  { font-size: 18px; font-weight: 400; }

/* =========================================
   PREHEADER
   ========================================= */
.preheader {
    background-color: var(--color-secundario);
    color: var(--color-primario);
    font-size: 16px;
    padding: 10px 0;
}

.preheader-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 30px;
}

.contact-item i {
    margin-right: 8px;
    font-size: 18px;
}

/* =========================================
   HEADER PRINCIPAL
   ========================================= */
.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Primera Columna: Logo --- */
.logo {
    max-height: 50px;
    width: auto;
    display: block;
}

/* --- Segunda Columna: Navegación y Botón --- */
.navbar {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #4a4a4a;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-secundario);
    font-weight: 600;
}

/* --- Botón Escríbenos --- */
.btn-outline {
    display: inline-block;
    text-decoration: none;
    color: var(--color-secundario);
    background-color: transparent;
    border: 2px solid var(--color-secundario);
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--color-secundario);
    color: #ffffff;
}

/* Ocultar el botón de menú hamburguesa en escritorio */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-secundario);
    cursor: pointer;
}

/* =========================================
   MEDIA QUERIES - CELULARES (Hasta 768px)
   ========================================= */
@media (max-width: 768px) {
    
    /* Ajustes tipográficos para celular */
    h1 { font-size: 40px; }
    h2 { font-size: 30px; }
    h3 { font-size: 25px; }
    /* 'p' se mantiene en 18px */

    /* Ocultar el preheader en móviles */
    .preheader {
        display: none;
    }

    /* Ocultar menú y botón de escritorio */
    .nav-menu, 
    .btn-outline {
        display: none; 
    }

    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: block;
    }
}

/* =========================================
   SECCIÓN HÉROE
   ========================================= */
.hero-section {
    background-image: url('https://landing.bateriaadomiciliomedellin.com/imagenes/fondo-virtual.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 0; /* Espaciado superior e inferior generoso */
    color: #ffffff;
    position: relative;
    overflow: hidden; /* Para que las baterías no sobresalgan en móvil */
}

/* Contenedor principal de la fila héroe */
.hero-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; /* Espacio entre columnas */
}

/* Columnas */
.hero-col {
    flex: 1; /* Repartir el espacio equitativamente */
}

/* --- Columna 1: Título (Imagen) y Botón --- */
.hero-text-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Alinear a la izquierda */
}

.hero-title-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 30px; /* Margen inferior para separar del botón */
}

/* Botón Primario (Amarillo) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Espacio entre icono y texto */
    text-decoration: none;
    color: var(--color-secundario); /* Texto negro */
    background-color: var(--color-primario); /* Fondo amarillo */
    border-radius: 50px; /* Bordes totalmente redondeados */
    padding: 14px 30px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(249, 237, 50, 0.2); /* Sombra suave amarilla */
    border: 2px solid transparent; /* Para el hover */
}

.btn-primary i {
    font-size: 22px;
}

/* Efecto hover del botón */
.btn-primary:hover {
    background-color: transparent;
    color: var(--color-primario);
    border: 2px solid var(--color-primario);
    box-shadow: 0 5px 15px rgba(249, 237, 50, 0.4);
}

/* --- Columna 2: Foto de Baterías --- */
.hero-batteries-img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   MEDIA QUERIES - CELULARES (Hasta 768px)
   ========================================= */
/* Este bloque debe ir al final de tus media queries existentes */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-row {
        flex-direction: column; /* Cambiar a columna en móvil */
        text-align: center;
        gap: 30px;
    }
    
    .hero-text-col {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centrar elementos en la columna de texto */
    }

    .hero-title-img {
        margin-bottom: 20px;
    }
    
    .btn-primary {
        padding: 12px 26px;
        font-size: 16px;
    }

    /* Opcional: Centrar la imagen de las baterías en móvil */
    .hero-image-col {
        display: flex;
        justify-content: center;
    }
}

/* =========================================
   SECCIÓN POST-HÉROE (VIDEO DE FONDO)
   ========================================= */
.post-hero-section {
    position: relative;
    width: 100%;
    min-height: 400px; /* Altura mínima para asegurar que se vea bien, ajustable */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Para evitar que el video se salga de los bordes */
    padding: 80px 20px;
}

/* Configuración del video para que cubra todo el fondo */
.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%); /* Centra el video perfectamente */
    object-fit: cover; /* Asegura que cubra todo el espacio sin deformarse */
    z-index: -2; /* Lo envía al fondo */
}

/* Capa negra con opacidad */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Color negro con 60% de opacidad. Cambia el 0.6 si la quieres más clara o más oscura */
    z-index: -1; /* Lo sitúa entre el video y el contenido */
}

/* Contenedor de la imagen central */
.post-hero-content {
    position: relative;
    z-index: 1; /* Asegura que la imagen esté por encima de la capa oscura */
    text-align: center;
}

/* Imagen centrada */
.post-hero-img {
    max-width: 100%;
    height: auto;
    max-height: 250px; /* Limita el alto para que no se vea desproporcionada en pantallas grandes */
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); /* Le da una pequeña sombra a la imagen para que resalte más sobre el fondo */
}

/* =========================================
   MEDIA QUERIES - CELULARES (Hasta 768px)
   ========================================= */
/* Agrega esto DENTRO de tu @media (max-width: 768px) existente */
@media (max-width: 768px) {
    .post-hero-section {
        min-height: 300px; /* Reduce un poco la altura en celulares */
        padding: 50px 20px;
    }

    .post-hero-img {
        max-height: 180px; /* Ajusta el tamaño de la imagen para pantallas pequeñas */
    }
}

/* =========================================
   UTILIDADES GENERALES
   ========================================= */
.text-center {
    text-align: center;
}

.section-title {
    margin-bottom: 40px;
    color: var(--color-secundario);
}

/* =========================================
   SECCIÓN DE MARCAS (CARRUSEL INFINITO)
   ========================================= */
.brands-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Pista deslizante (Track) */
.carousel-track {
    display: flex;
    gap: 0; 
    overflow-x: auto;
    scroll-snap-type: x mandatory; 
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
    width: 100%;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Cada marca (Items) */
.carousel-item {
    /* En escritorio: 100% dividido entre 5 elementos */
    flex: 0 0 calc(100% / 5); 
    scroll-snap-align: start; /* Alineación al inicio para un bucle matemático perfecto */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Imágenes fijadas a 222px máximo */
.carousel-item img {
    max-width: 222px; 
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.carousel-item img:hover {
    transform: scale(1.05); /* Efecto zoom al pasar el mouse */
}

/* Flechas de navegación */
.carousel-arrow {
    background-color: var(--color-secundario);
    color: var(--color-primario);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    top: 50%;
    transform: translateY(-50%);
}

.carousel-arrow:hover {
    background-color: var(--color-primario);
    color: var(--color-secundario);
}

.left-arrow {
    left: -20px;
}

.right-arrow {
    right: -20px;
}

/* =========================================
   MEDIA QUERIES - CELULARES (Hasta 768px)
   ========================================= */
@media (max-width: 768px) {
    .brands-section {
        padding: 50px 0;
    }

    .carousel-item {
        /* En celular: 100% dividido entre 3 elementos */
        flex: 0 0 calc(100% / 3); 
    }

    .carousel-arrow {
        display: none; /* Se ocultan las flechas para usar el dedo */
    }
}
/* Pista deslizante (Track) */
.carousel-track {
    display: flex;
    gap: 0; 
    overflow-x: auto;
    scroll-snap-type: x mandatory; 
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 20px 0;
    width: 100%;
    /* Asegúrate de NO tener scroll-behavior: smooth; aquí */
}
/* =========================================
   SECCIÓN DE SERVICIOS
   ========================================= */
.services-section {
    padding: 80px 0;
    background-color: #ffffff;
}

/* Título de la sección (Aseguramos que esté centrado y con margen) */
.section-title {
    margin-bottom: 50px;
    color: var(--color-secundario);
    font-size: var(--h2-size); /* Reutiliza los tamaños globales */
}

/* Cuadrícula de 3 columnas */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px; /* Espacio entre las tarjetas */
}

/* Tarjeta individual */
.service-card {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra el contenido (imagen y botón) */
}

/* Contenedor de la imagen con bordes redondeados y sombra */
.service-img-container {
    width: 100%;
    border-radius: 20px; /* Bordes redondeados como en el diseño */
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08); /* Sombra suave */
    background-color: #f4f4f4; /* Un fondo muy suave por si la imagen tiene transparencias */
    margin-bottom: 25px; /* Espacio entre la imagen y el botón */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto al pasar el mouse por la imagen */
.service-img-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.service-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Ajustes específicos para el botón en esta sección */
.btn-service {
    padding: 12px 30px;
    font-size: 16px;
    /* Al usar .btn-primary hereda el color amarillo, bordes redondeados, hover y el icono */
}

/* =========================================
   MEDIA QUERIES - CELULARES (Hasta 768px)
   ========================================= */
/* Asegúrate de pegar esto DENTRO de tu @media (max-width: 768px) existente al final del archivo */
@media (max-width: 768px) {
    .services-section {
        padding: 50px 0;
    }

    .services-grid {
        grid-template-columns: 1fr; /* Cambia a 1 sola columna en celulares */
        gap: 40px; /* Aumenta un poco el espacio vertical entre servicios */
    }
}