/**
 * ARKACENTRO - Estilos del Index (CORREGIDO)
 * Archivo: assets/css/index.css
 */

/* ============================================
   HERO VIDEO SECTION
   ============================================ */

.hero-video {
    position: relative;
    width: 100%;
    height: 48vh;
    min-height: 300px;
    overflow: hidden;
}

.hero-video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-image-fallback::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.274);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    width: 90%;
    max-width: 600px;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-title-top {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    letter-spacing: 2px;
}

.hero-title-bottom {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffe600;
    line-height: 1;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--white);
    font-weight: 500;
    animation: fadeInUp 1s ease 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   BRANDS CAROUSEL SECTION
   ============================================ */

.brands-carousel-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 50px;
}

/* Wrapper del carousel con flechas */
.carousel-wrapper {
    position: relative;
    margin-bottom: 30px;
    padding: 0 80px;
}

/* Container del carousel */
.brands-carousel {
    overflow: hidden;
    padding: 20px 15px;
    position: relative;
}

/* Track del carousel */
.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Items del carousel */
.brand-item {
    min-width: calc(25% - 22.5px);
    max-width: calc(25% - 22.5px); /* ⭐ AGREGADO - Evita expansión */
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    display: block;
}

.brand-item:hover {
    text-decoration: none;
}

/* Flechas de navegación */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 100;
}

.carousel-arrow:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(200, 200, 200, 0.5);
}

.carousel-arrow:disabled:hover {
    transform: translateY(-50%);
    background: rgba(200, 200, 200, 0.5);
    color: var(--primary-color);
}

.carousel-arrow.prev {
    left: 10px;
}

.carousel-arrow.next {
    right: 10px;
}

/* Indicadores de puntos */
.carousel-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d0d0d0;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: #b0b0b0;
    transform: scale(1.3);
}

.carousel-dot.active {
    background: var(--accent-color);
    width: 28px;
    border-radius: 5px;
}

/* ⭐ BRAND CARD - CORREGIDO */
.brand-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 400px; /* Altura fija */
    width: 100%; /* ⭐ Ocupa todo el ancho del contenedor */
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* ⭐ IMAGEN - CORREGIDO - Cubre completamente */
.brand-image {
    position: relative;
    width: 100%;
    height: 200px; /* Altura fija */
    flex-shrink: 0;
    overflow: hidden;
    background: #ffffff;
    border-bottom: 3px solid var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ⭐ Cubre todo el espacio sin dejar huecos */
    object-position: center;
    display: block;
    flex-shrink: 0;
}

.brand-image.contain img {
    object-fit: fill;
}

.brand-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: var(--text-light);
}

.brand-placeholder i {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* ⭐ INFO - CORREGIDO */
.brand-info {
    padding: 20px 15px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* ⭐ Previene expansión */
    width: 100%; /* ⭐ Respeta el ancho */
}

/* ⭐ TÍTULO - CORREGIDO - Trunca o hace wrap */
.brand-info h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
    color: var(--primary-color);
    line-height: 1.3;
    width: 100%; /* ⭐ Respeta el ancho */
    word-wrap: break-word; /* ⭐ Permite romper palabras largas */
    overflow-wrap: break-word; /* ⭐ Compatibilidad */
    hyphens: auto; /* ⭐ Guiones automáticos */
    
    /* Limita a 2 líneas máximo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* ⭐ Propiedad estándar */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-category {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* ⭐ No expande */
}

.brands-cta {
    text-align: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--accent-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.btn-primary span {
    transition: var(--transition);
}

.btn-primary i {
    opacity: 0;
    width: 0;
    transition: all 0.3s ease;
    margin-left: 0;
}

.btn-primary:hover {
    background: #cc9a03;
    padding: 15px 28px;
}

.btn-primary:hover i {
    opacity: 1;
    width: auto;
    margin-left: 10px;
}

.no-brands {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 40px 0;
}

/* ============================================
   INFO SECTION
   ============================================ */

.info-section {
    padding: 60px 0;
    background: var(--white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.info-card {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.info-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.info-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.info-card p {
    color: var(--text-light);
}

/* ============================================
   SEPARADOR ENTRE SECCIONES
   ============================================ */

.section-divider {
    height: 1px;
    background: #ddd;
    margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .brand-item {
        min-width: calc(33.333% - 20px);
        max-width: calc(33.333% - 20px); /* ⭐ CORREGIDO */
    }
    
    .carousel-wrapper {
        padding: 0 60px;
    }
}

@media (max-width: 968px) {
    .brand-item {
        min-width: calc(50% - 15px);
        max-width: calc(50% - 15px); /* ⭐ CORREGIDO */
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .carousel-wrapper {
        padding: 0 50px;
    }
}

@media (max-width: 768px) {
    .hero-title-top {
        font-size: 1.5rem;
    }
    
    .hero-title-bottom {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .brand-item {
        min-width: 100%;
        max-width: 100%; /* ⭐ CORREGIDO */
    }
    
    .brand-card {
        height: 370px;
    }
    
    .brand-image {
        height: 190px;
    }
    
    .brand-info {
        padding: 15px;
    }
    
    .brand-info h3 {
        font-size: 1.05rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .carousel-wrapper {
        padding: 0 20px;
    }
    
    .carousel-arrow.prev {
        left: 5px;
    }

    .carousel-arrow.next {
        right: 5px;
    }
}