/* css/blocks/hero.css */

.sp-hero {
    position: relative;
    padding-top: 60px;
    padding-bottom: 80px;
    background-color: var(--bg-global);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 20px;
    position: relative;
    z-index: 2;
    min-height: 500px;
    align-items: center; /* Locks left and right text to the vertical center of the image */
}
/* --- Top Left Section --- */
.hero-left {
    margin-top: -100px;
}

.hero-tag {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-heading);
    margin-bottom: 20px;
    display: block;
}

.hero-pagination {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 30px;
}

.hero-pagination .active {
    border-bottom: 2px solid var(--text-heading);
    padding-bottom: 4px;
    margin-right: 15px;
}

.hero-pagination .muted {
    color: var(--text-muted);
}

.hero-title {
    font-size: 4.5rem; /* Scaled up */
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1.5px; /* Pulls large text slightly tighter for a premium look */
}

.hero-desc {
    font-size: 1.15rem; /* Scaled up */
    color: var(--text-body);
    line-height: 1.6;
    max-width: 320px; /* Widened to fit the larger text properly */
}
/* --- Center Circular Graphic --- */
.hero-center {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center; /* Changed to center */
}

.hero-circle {
    position: absolute;
    top: 30%; /* Pushes top edge to middle */
    left: 50%; /* Pushes left edge to middle */
    transform: translate(-50%, -50%); /* Pulls exactly into the center */
    width: 600px; /* Scaled up */
    height: 600px; /* Scaled up */
    background: var(--siren-red);
    border-radius: 50%;
    z-index: -1;
}

.hero-main-img {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
    margin-top: 20px;
    z-index: 1;
}

/* --- Bottom 3-Card Grid --- */
.hero-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1000px; /* Keeps them tightly grouped under the phone */
    margin: -60px auto 0 auto; /* Pulls cards up over the circle */
    position: relative;
    z-index: 10;
    padding: 0 24px;
}

.sp-feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-surface);
    padding: 20px 24px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--text-border);
    text-decoration: none;
    transition: var(--transition);
    overflow: hidden;
}

.sp-feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--siren-red);
    box-shadow: 0 20px 40px rgba(229, 62, 62, 0.12);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: #FEF2F2;
    color: var(--siren-red);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.sp-feature-card:hover .card-icon {
    background: var(--siren-red);
    color: #FFFFFF;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-content h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
}

/* Slide-in arrow on hover */
.card-arrow {
    color: var(--siren-red);
    font-size: 1.2rem;
    font-weight: 800;
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
}

.sp-feature-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}
.badge-text span {
    color: var(--text-muted);
}

.badge-text strong {
    color: var(--text-heading);
    font-weight: 700;
}

.badge-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* --- Top Right Metrics --- */
.hero-right {
    padding-top: 0; /* Removed */
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 50px; /* Slightly increased gap for breathing room */
    margin-top: -100px;
}

.hero-stat h3 {
    font-size: 3.5rem; /* Scaled up */
    margin-bottom: 5px;
    line-height: 1;
}

.hero-stat p {
    font-size: 1rem; /* Scaled up */
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Bottom 3 Overlapping Cards --- */
.hero-bottom-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: -80px; /* Pulls cards up over the circle */
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
}

.slider-arrow {
    background: var(--bg-surface);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--text-heading);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.slider-arrow:hover {
    background: var(--text-heading);
    color: var(--bg-surface);
}

.hero-cards-wrapper {
    display: flex;
    gap: 24px;
    flex: 1;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;  
    scrollbar-width: none;
}

.hero-cards-wrapper::-webkit-scrollbar { 
    display: none; 
}

.sp-feature-card {
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 24px;
    min-width: 300px;
    flex: 1;
    display: flex;
    justify-content: space-between;
    box-shadow: var(--shadow-md);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-content h4 {
    font-size: 1rem;
    font-weight: 800;
}

.card-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-content h2 {
    font-size: 2rem;
    margin: 10px 0;
}

.card-btn {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-heading);
    border: 1px solid var(--text-heading);
    padding: 6px 16px;
    border-radius: 20px;
    width: fit-content;
    transition: var(--transition);
}

.card-btn:hover {
    background: var(--siren-red);
    color: var(--bg-surface);
    border-color: var(--siren-red);
}

.card-img-placeholder {
    width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
}

/* --- Responsive Adjustments --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-left, .hero-right {
        text-align: center;
        padding-top: 0;
        margin-top: 0;
    }

    .hero-features-grid {
        grid-template-columns: 1fr; /* Stack into a single column */
        margin-top: 40px; /* Push down below the phone instead of overlapping */
        max-width: 400px;
    }

    .hero-desc {
        margin: 0 auto;
    }

    .hero-bottom-slider {
        margin-top: 40px;
    }
    
    .slider-arrow {
        display: none;
    }
    .hero-circle{
        top: 40%;
    }
    .sp-hero {
        padding: 20px 0px;
    }
}

@media (max-width: 768px){
.hero-title{
    font-size: 4rem;
}
}
@media (max-width: 350px){
.hero-title{
    font-size: 3.5rem;
}
}


/* =========================================
   UPDATED: ASSET-BASED FIRECRACKER ANIMATION 
========================================= */
.scroll-firecracker {
    position: fixed; 
    left: 0; 
    top: 0; 
    z-index: 9999; 
    will-change: transform;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: 100px;
    
    /* NEW: Keeps it hidden during the split-second page load */
    opacity: 0; 
    transition: opacity 0.3s ease-in; 
}

/* The Rocket Image */
.scroll-firecracker .rocket {
    display: block;
    width: 60px; /* Adjust based on your SVG size */
    height: auto;
    transition: opacity 0.1s;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.3)); /* Adds a dynamic shadow */
}

/* The Blast Image (Hidden initially) */
.scroll-firecracker .blast {
    display: none; 
    position: absolute;
    width: 150px; /* Make the blast larger than the rocket */
    height: auto;
    opacity: 0;
}

/* --- THE EXPLODING STATE --- */
.scroll-firecracker.exploding .rocket {
    opacity: 0; 
}

.scroll-firecracker.exploding .blast {
    display: block;
    /* Slower duration (1.2s) and smoother ease-out */
    animation: boom 1.2s ease-out forwards;
}

/* The Explosion Animation */
@keyframes boom {
    0% { transform: scale(0.3); opacity: 0; }
    20% { transform: scale(1.1); opacity: 1; }
    60% { transform: scale(1.3); opacity: 1; } /* Holds size for a moment */
    100% { transform: scale(1.6); opacity: 0; }
}