/********** El Caribe 2024 Envios - Custom Styles **********/
:root {
    --primary: #0056B3;
    --primary-dark: #00234B;
    --primary-light: #00A3E0;
    --accent: #FF6B00;
    --accent-hover: #E55D00;
    --dark: #00234B;
    --light: #F0F4F8;
    --white: #FFFFFF;
    --gray: #6C757D;
    --gray-light: #F8F9FA;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
}

a {
    text-decoration: none;
    transition: color .3s;
}

/* Spinner */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all .3s;
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, .3);
}

/* Navbar */
.navbar {
    transition: box-shadow .3s;
}

.navbar .nav-link {
    font-weight: 500;
    transition: color .3s;
}

.navbar .nav-link:hover {
    color: var(--accent) !important;
}

/* Topbar */
.topbar-small {
    background: var(--gray-light);
    border-bottom: 1px solid #eee;
}

/* Hero Carousel Overlay */
.hero-overlay {
    background: linear-gradient(135deg, rgba(0, 35, 75, .88), rgba(0, 86, 179, .4));
}

/* Imagen de cada diapositiva del hero */
.hero-slide-img {
    width: 100%;
    height: 80vh;
    min-height: 450px;
    max-height: 700px;
    object-fit: cover;
}

/* Logo circular dentro del contenido de cada diapositiva */
#heroCarousel .hero-slide-logo {
    display: block;
    width: 180px;
    height: 180px;
    padding: 18px;
    box-sizing: border-box;
    margin: 0 0 20px;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 35, 75, .35);
}
#heroCarousel .hero-slide-logo img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
}

/* KPI Section */
.kpi-box {
    text-align: center;
    padding: 25px 15px;
}

.kpi-box h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 5px;
}

.kpi-box p {
    color: var(--gray);
    font-size: 14px;
    text-transform: uppercase;
    margin: 0;
    font-weight: 500;
}

/* Service Card */
.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform .3s, box-shadow .3s;
    height: 100%;
    border: 1px solid #eee;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}

.service-icon {
    width: 75px;
    height: 75px;
    background: rgba(0, 86, 179, .1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    color: var(--primary);
    transition: background .3s, color .3s;
}

.service-card:hover .service-icon {
    background: var(--accent);
    color: #fff;
}

/* Process Step */
.process-step {
    text-align: center;
    padding: 30px 20px;
}

.process-step .step-number {
    width: 60px;
    height: 60px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
    transition: background .3s;
}

.process-step:hover .step-number {
    background: var(--accent);
}

/* Coverage */
.coverage-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: border-color .3s;
}

.coverage-item:hover {
    border-color: var(--primary);
}

.coverage-item i {
    color: var(--accent);
    font-size: 20px;
    margin-right: 12px;
}

/* Testimonial */
.testimonial-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    border-left: 4px solid var(--accent);
    height: 100%;
    box-shadow: 0 2px 15px rgba(0, 0, 0, .05);
}

/* FAQ */
.faq-question {
    padding: 18px 20px;
    background: var(--gray-light);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: background .3s;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question i {
    transition: transform .3s;
    color: var(--primary);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s, padding .3s;
    color: var(--gray);
    font-size: 14px;
    line-height: 1.7;
}

.faq-answer.open {
    max-height: 300px;
    padding: 0 20px 18px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

/* Dark Section */
.dark-section {
    background: var(--dark);
    color: #fff;
}

/* Footer */
.footer {
    background: var(--dark);
}

.footer a {
    color: rgba(255, 255, 255, .6);
    transition: color .3s;
}

.footer a:hover {
    color: var(--accent);
}

/* Language Toggle */
.lang-toggle {
    display: inline-flex;
    border: 2px solid var(--primary);
    border-radius: 50px;
    overflow: hidden;
}

.lang-toggle button {
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s;
    background: transparent;
    color: var(--primary);
}

.lang-toggle button.active {
    background: var(--primary);
    color: #fff;
}

/* Section Titles */
.section-title {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* Carousel stacking — controls always above content */
#heroCarousel .carousel-indicators { z-index: 10; }
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next { z-index: 10; }

/* Back to Top */
.back-to-top {
    position: fixed;
    display: none;
    align-items: center;
    justify-content: center;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all .3s;
}

.back-to-top:hover {
    background: var(--primary);
    color: #fff;
}

/* Floating Buttons */
.floating-buttons {
    position: fixed;
    right: 30px;
    bottom: 100px;
    z-index: 98;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    transition: transform .3s, box-shadow .3s;
    position: relative;
}

.float-btn:hover {
    transform: translateY(-4px) scale(1.05);
    color: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
}

.float-whatsapp {
    background: #25D366;
    animation: pulse-wa 2s infinite;
}

.float-whatsapp:hover {
    background: #1ebe5d;
    animation: none;
}

.float-brochure {
    background: linear-gradient(135deg, #0056B3, #FF6B00);
}

.float-brochure:hover {
    background: linear-gradient(135deg, #FF6B00, #0056B3);
}

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .5); }
    70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Big WhatsApp CTA button */
.btn-whatsapp-big {
    background: linear-gradient(45deg, #1ebe5d, #25D366);
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
    color: #fff;
    transition: all .3s;
    position: relative;
    overflow: hidden;
}

.btn-whatsapp-big:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(37, 211, 102, .6);
    color: #fff;
    background: linear-gradient(45deg, #25D366, #2fd473);
}

.btn-whatsapp-big::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -80%; }
    60% { left: 120%; }
    100% { left: 120%; }
}

/* ========== Gallery (Nuestras Operaciones) ========== */
.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 35, 75, .1);
    cursor: pointer;
    background: #eee;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 35, 75, 0) 45%, rgba(0, 35, 75, .55) 100%);
    opacity: 0;
    transition: opacity .3s;
}

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

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.7);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 107, 0, .92);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    transition: opacity .3s, transform .3s;
    z-index: 2;
}

.gallery-item:hover .gallery-zoom {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== Video (Conócenos) ========== */
/* El video es vertical (9:16, trae rotación 90° en el contenedor): el marco
   se ajusta a su tamaño y se limita por altura para que entre en pantalla. */
.video-wrapper {
    position: relative;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 18px 45px rgba(0, 35, 75, .25);
}

.video-wrapper video {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 80vh;
}

/* ========== Aliados Estratégicos ========== */
.partner-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 28px 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform .3s, box-shadow .3s;
}

.partner-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}

.partner-card img {
    max-width: 100%;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* ========== Lightbox ========== */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 70px;
    background: rgba(0, 18, 40, .94);
}

#lightbox.open {
    display: flex;
}

#lightbox .lb-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
    object-fit: contain;
}

#lightbox .lb-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    text-align: center;
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    padding: 0 20px;
}

#lightbox .lb-close,
#lightbox .lb-prev,
#lightbox .lb-next {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}

#lightbox .lb-close:hover,
#lightbox .lb-prev:hover,
#lightbox .lb-next:hover {
    background: var(--accent);
}

#lightbox .lb-close {
    top: 18px;
    right: 22px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    padding-bottom: 4px;
}

#lightbox .lb-prev,
#lightbox .lb-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 20px;
}

#lightbox .lb-prev { left: 18px; }
#lightbox .lb-next { right: 18px; }

body.lb-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .kpi-box h2 {
        font-size: 32px;
    }
    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    .floating-buttons {
        right: 18px;
        bottom: 92px;
        gap: 12px;
    }
    .back-to-top {
        right: 18px;
        bottom: 24px;
        width: 42px;
        height: 42px;
    }
    #lightbox {
        padding: 56px 12px;
    }
    #lightbox .lb-prev,
    #lightbox .lb-next {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    #lightbox .lb-prev { left: 8px; }
    #lightbox .lb-next { right: 8px; }
    #lightbox .lb-close {
        top: 10px;
        right: 12px;
        width: 40px;
        height: 40px;
        font-size: 26px;
    }
    .video-wrapper {
        border-radius: 10px;
    }

    /* Carrusel en movil */
    #heroCarousel .hero-slide-logo {
        width: 180px;
        height: 180px;
        padding: 18px;
        margin-bottom: 16px;
    }
    .hero-slide-img {
        height: 82vh;
        min-height: 480px;
        max-height: 640px;
    }
    #heroCarousel .carousel-caption {
        padding-top: 1rem !important;
        padding-bottom: 3.25rem !important;
    }
    #heroCarousel .carousel-caption h1.display-4 {
        font-size: 1.55rem;
        line-height: 1.2;
    }
    #heroCarousel .carousel-caption p.fs-5 {
        font-size: .9rem !important;
    }
    #heroCarousel .carousel-caption .badge {
        font-size: 11px !important;
        margin-bottom: .5rem !important;
    }
    #heroCarousel .carousel-caption .btn {
        padding: .6rem 1.15rem !important;
        font-size: .88rem !important;
        margin-bottom: .25rem;
    }
    #heroCarousel .hero-booking-title {
        font-size: 1.08rem !important;
        margin-bottom: .5rem !important;
    }
}
