/* =============================================
   HERO 4-BOX GRID CAROUSEL
   2x2 grid with directional entry animations
   ============================================= */

/* CTA Button Styling */
.cta-button {
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: linear-gradient(135deg, #ff8c42, #ff6b35);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.cta-button:hover i {
    transform: translateX(4px);
}


.hero-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 700px;
    aspect-ratio: 1;
    position: relative;
}

/* Individual box */
.hero-box {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-box:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

/* Box carousel container */
.box-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.box-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ========================================
   ENTRY ANIMATIONS FROM 4 DIRECTIONS
   ======================================== */

/* Initial off-screen positions */
.hero-box[data-direction="top-left"] {
    transform: translate(-120%, -120%);
}

.hero-box[data-direction="top-right"] {
    transform: translate(120%, -120%);
}

.hero-box[data-direction="bottom-left"] {
    transform: translate(-120%, 120%);
}

.hero-box[data-direction="bottom-right"] {
    transform: translate(120%, 120%);
}

/* Slide-in animation */
.hero-box {
    animation: slideInToGrid 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInToGrid {
    to {
        transform: translate(0, 0);
    }
}

/* Staggered timing for dramatic effect */
.hero-box[data-index="0"] {
    animation-delay: 0.1s;
}

.hero-box[data-index="1"] {
    animation-delay: 0.2s;
}

.hero-box[data-index="2"] {
    animation-delay: 0.3s;
}

.hero-box[data-index="3"] {
    animation-delay: 0.4s;
}

/* Loading/placeholder state */
.box-slide[src=""],
.box-slide:not([src]) {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 968px) {
    .hero-grid-container {
        max-width: 580px;
    }

    .hero-box {
        border-radius: 14px;
    }
}

@media (max-width: 768px) {
    .hero-grid-container {
        max-width: 100%;
        gap: 12px;
    }

    .hero-box {
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .hero-grid-container {
        gap: 8px;
    }

    .hero-box {
        border-radius: 10px;
    }

    .hero-box:hover {
        transform: scale(1.02);
    }
}

/* Dark mode support */
[data-theme="dark"] .hero-box {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero-box:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}