/* ============================================
    HERO SECTION BACKGROUND
============================================ */
.hero-section-world {
    background: url("/assets/images/backgrounds/bg-world-map.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin-top: -20px;
}

/* ============================================
    STATISTICS CARDS & ANIMATIONS
============================================ */

/* Stats container layout */
.stats-container {
    justify-content: center;
}

/* Individual stat card styling */
.stat-card {
    flex: 1;
    min-width: 110px;
    max-width: 150px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.stat-card.rounded-3 {
    border-radius: 0.75rem !important;
}

/* Counter number and symbol styling */
.stat-card .fs-1 {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
}

.counter {
    transition: all 0.3s ease;
    position: relative;
}

.counter.finished {
    animation: pulseFinished 0.5s ease;
}

.counter-symbol {
    font-size: 0.6em;
    vertical-align: super;
    margin-left: 2px;
    opacity: 0.8;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInSymbol 0.5s ease forwards;
    animation-delay: 1s; /* Wait for counter to finish */
}

/* Counter animations */
@keyframes fadeInSymbol {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseFinished {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ============================================
    HERO CAROUSEL STYLES
============================================ */

/* Carousel container */
.hero-carousel-container {
    position: relative;
}

.hero-carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.75rem;
}

.hero-carousel-container.loading::before {
    opacity: 1;
}

/* Carousel main element */
#heroCarousel {
    height: 100%;
    width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
}

/* Carousel inner container */
#heroCarousel .carousel-inner {
    height: 100%;
    width: 100%;
}

/* Carousel items */
#heroCarousel .carousel-item {
    height: 100%;
    width: 100%;
}

#heroCarousel .carousel-item > div {
    height: 100%;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Carousel images */
#heroCarousel .carousel-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Carousel indicators */
#heroCarousel .carousel-indicators {
    margin-bottom: 0rem;
}

#heroCarousel .carousel-indicators [data-bs-target] {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    margin: 0 5px;
    border: 2px solid rgba(0, 0, 0, 0.8);
    background-color: transparent;
}

#heroCarousel .carousel-indicators .active {
    background-color: var(--primary-color);
}

/* Carousel navigation controls */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    opacity: 0.9;
}

#heroCarousel .carousel-control-prev {
    left: 1rem;
}

#heroCarousel .carousel-control-next {
    right: 1rem;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    background-size: 1.5rem;
    background-position: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#heroCarousel .carousel-control-prev-icon:hover,
#heroCarousel .carousel-control-next-icon:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

/* Carousel captions */
#heroCarousel .carousel-caption {
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    max-width: 80%;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
}

/* ============================================
    GENERAL COMPONENT STYLES
============================================ */

/* Image hover effects */
img {
    transition: transform 0.3s ease;
}

img:hover {
    transform: scale(1.02);
}

/* Button enhancements */
.btn-lg {
    transition: all 0.3s ease;
}

.btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Modal trigger cursor */
[data-bs-toggle="modal"] {
    cursor: pointer;
}

/* ============================================
    UTILITY CLASS ENHANCEMENTS
============================================ */

/* Border radius utilities */
.rounded {
    border-radius: 0.375rem !important;
}

.rounded-3 {
    border-radius: 0.75rem !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}

.rounded-pill {
    border-radius: 50rem !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

/* Icon circle styling */
.bg-primary.bg-opacity-10.p-2.rounded-circle {
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image styling */
.step-image.rounded {
    border-radius: 0.75rem !important;
}

/* Shadow utility */
.shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* ============================================
    LAYOUT & SPACING
============================================ */

.hero-content {
    padding-right: 2rem;
}

/* Desktop-specific layout */
@media (min-width: 992px) {
    .align-items-stretch > div {
        display: flex;
        flex-direction: column;
    }

    .align-items-stretch .hero-content {
        flex: 1;
    }
}

/* ============================================
    RESPONSIVE ADJUSTMENTS
============================================ */

/* Tablet (992px - 1199px) */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .hero-carousel-container {
        height: 480px;
    }

    #heroCarousel .carousel-item > div {
        padding: 1rem;
    }
}

/* Tablet carousel height adjustments */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .hero-carousel-container {
        min-height: 450px;
    }
}

/* Desktop carousel height */
@media (min-width: 1200px) {
    .hero-carousel-container {
        min-height: 500px;
    }
}

/* Mobile (up to 768px) - Stats cards */
@media (max-width: 768px) {
    .stats-container {
        gap: 10px !important;
    }

    .stat-card {
        flex: 0 0 calc(33.333% - 7px); /* Fit 3 per row */
        min-width: auto;
        max-width: none;
        padding: 0.75rem !important;
    }

    .stat-card .fs-1 {
        font-size: 1.75rem !important;
    }
}

/* Tablet & Mobile (up to 991px) */
@media (max-width: 991.98px) {
    .hero-content {
        padding-right: 0;
        text-align: center;
    }

    .cta-buttons .ms-2 {
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }

    /* Mobile-specific image */
    .row.d-lg-none .col-12 img {
        max-height: 300px;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }
}
