/*
====================================
COFICO AUTOMOTORES — entregas.css
====================================
*/

/* ==================== HERO ==================== */
.entregas-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2d1010 100%);
    overflow: hidden;
    margin-top: 80px;
}

.entregas-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('imagenes/COFICO-AUTOMOTORES-LOGO.png') center/300px no-repeat;
    opacity: 0.04;
}

.entregas-hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(220,38,38,0.15) 0%, transparent 70%);
}

.entregas-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 3rem 2rem;
    max-width: 700px;
}

.entregas-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(220,38,38,0.15);
    border: 1px solid rgba(220,38,38,0.4);
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    animation: fadeInDown 0.6s ease;
}

.entregas-hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    animation: fadeInUp 0.7s ease 0.1s both;
}

.entregas-hero-content h1 .highlight { color: #dc2626; }

.entregas-hero-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin: 0 auto;
    animation: fadeInUp 0.7s ease 0.2s both;
}

/* ==================== GALERÍA / CARRUSEL ==================== */
.entregas-galeria {
    padding: 5rem 0 3rem;
    background: #fff;
}

.carrusel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 2.5rem;
}

.carrusel-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 16px;
}

.carrusel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carrusel-slide {
    flex: 0 0 calc(33.333% - 1rem);
    margin-right: 1rem;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.carrusel-slide::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
    border-radius: 12px;
}

.carrusel-slide:hover::after {
    background: rgba(0,0,0,0.4);
    color: #fff;
}

.carrusel-slide img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    -webkit-user-drag: none;
    pointer-events: none;
}

.carrusel-slide:hover img {
    transform: scale(1.04);
}

/* Botones carrusel */
.carrusel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #dc2626;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.carrusel-btn:hover { background: #b91c1c; transform: translateY(-50%) scale(1.08); }
.carrusel-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: default; transform: translateY(-50%); }
.carrusel-prev { left: -24px; }
.carrusel-next { right: -24px; }

/* Dots */
.carrusel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.carrusel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e5e7eb;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.carrusel-dot.active {
    background: #dc2626;
    transform: scale(1.3);
}

/* Empty & Loading */
.entregas-empty {
    text-align: center;
    padding: 5rem 0;
    color: #9ca3af;
}

.entregas-empty i {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
    color: #e5e7eb;
}

.entregas-loading {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

/* ==================== LIGHTBOX ==================== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}

.lightbox-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    max-height: 92vh;
}

.lightbox-inner img {
    max-width: 92vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    animation: zoomIn 0.3s ease;
}

.lightbox-counter {
    margin-top: 0.8rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.lightbox-close {
    position: fixed;
    top: 1.2rem;
    right: 1.2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 10000;
}

.lightbox-close:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    z-index: 10000;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.lightbox-prev { left: 1.2rem; }
.lightbox-next { right: 1.2rem; }

/* ==================== CTA ==================== */
.entregas-cta {
    background: #f9fafb;
    padding: 4rem 0;
}

.cta-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d1010 100%);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: space-between;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.cta-icon {
    width: 70px;
    height: 70px;
    background: rgba(220,38,38,0.15);
    border: 2px solid rgba(220,38,38,0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cta-icon i { font-size: 1.8rem; color: #dc2626; }
.cta-text { flex: 1; min-width: 200px; color: #fff; }
.cta-text h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.3rem; }
.cta-text p  { color: rgba(255,255,255,0.7); font-size: 0.95rem; }
.cta-card .btn { white-space: nowrap; display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

/* ==================== ANIMACIONES ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
    .carrusel-slide { flex: 0 0 calc(50% - 0.5rem); }
}

@media (max-width: 768px) {
    .entregas-hero { min-height: 300px; margin-top: 70px; }
    .entregas-hero-content h1 { font-size: 2rem; }
    .cta-card { flex-direction: column; text-align: center; padding: 2rem 1.5rem; }
    .cta-icon { margin: 0 auto; }
    .carrusel-prev { left: -16px; }
    .carrusel-next { right: -16px; }
    .carrusel-btn  { width: 38px; height: 38px; font-size: 0.85rem; }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}

@media (max-width: 520px) {
    .carrusel-slide { flex: 0 0 100%; margin-right: 0; }
}