/* Hero Section Styles */
.hero {
    position: relative;
    min-height: 380px;
    display: block;
    overflow: hidden;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    color: var(--text-dark);
    /* Ensure text color is inherited or set */
    z-index: 1;
    /* Ensure hero content is above blobs */
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(243, 229, 245, 0.5) 100%);
}

/* Carousel Track & Slides */
.carousel-track {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    height: 100%;
    min-height: 380px;
    overflow: hidden;
}

.carousel-slide {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem 1rem;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator.active {
    background: var(--primary-600);
    width: 30px;
    border-radius: 10px;
}

/* Navigation Arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 90px;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    color: var(--primary-600);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(4px);
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-arrow.prev { left: 0; border-radius: 0 10px 10px 0; }
.hero-arrow.next { right: 0; border-radius: 10px 0 0 10px; }

.hero::before {
    content: '';
    position: absolute;
    /* Changed to absolute to not interfere with flex layout */
    inset: 0;
    background: radial-gradient(1200px 400px at 10% 20%, rgba(111, 66, 193, 0.08), transparent 10%),
        radial-gradient(1000px 360px at 90% 80%, rgba(243, 156, 18, 0.04), transparent 10%);
    pointer-events: none;
    z-index: -1;
    /* Ensure pseudo-element is behind content */
}

.hero-content {
    max-width: 850px;
    padding: 2rem 2rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(123, 31, 162, 0.15);
    border-radius: 32px;
    box-shadow: 0 20px 50px -10px rgba(123, 31, 162, 0.15);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease, background 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.hero-content:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 30px 60px -12px rgba(123, 31, 162, 0.25);
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(123, 31, 162, 0.25);
}

/* Shine effect on hover */
.hero-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.hero-content:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

.hero h1 {
    font-weight: 800;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin-bottom: 0.8rem;
    background: linear-gradient(300deg, #7B1FA2, #D81B60, #8E44AD, #FF4081);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleReveal 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards, gradientFlow 6s ease infinite;
}

.hero p {
    max-width: 780px;
    margin: 0 auto 1.5rem;
    color: var(--muted);
    /* Assuming --muted is defined */
    font-size: 1.1rem;
    line-height: 1.6;
    animation: floatUp 0.8s ease-out 0.2s both;
}

.cta-group {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .7rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary-500), var(--primary-600));
    /* Assuming these vars are defined */
    color: #fff;
    transform: translateZ(0);
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.18);
    animation: pulse-purple 2s infinite;
}

.btn-primary:hover {
    transform: translateY(-3px);
    filter: brightness(.98);
    animation: none;
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(15, 23, 36, 0.06);
    color: var(--primary-600);
}

.btn-secondary:hover {
    background: rgba(15, 23, 36, 0.03);
    transform: translateY(-3px);
}

/* Blobs for background */
.blob {
    position: absolute;
    z-index: -1;
    will-change: transform;
}

.blob::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--primary), var(--accent));
    border-radius: 50%;
    opacity: 0.3;
    filter: blur(80px);
    animation: blob-bounce 10s infinite ease-in-out alternate;
}

.blob-1 {
    width: 250px;
    height: 250px;
    top: 10%;
    left: 5%;
}

.blob-1::after {
    animation-delay: 0s;
}

.blob-2 {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: 10%;
}

.blob-2::after {
    animation-delay: 3s;
}

@keyframes blob-bounce {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse-purple {
    0% {
        box-shadow: 0 10px 30px rgba(111, 66, 193, 0.18), 0 0 0 0 rgba(111, 66, 193, 0.4);
    }

    70% {
        box-shadow: 0 10px 30px rgba(111, 66, 193, 0.18), 0 0 0 15px rgba(111, 66, 193, 0);
    }

    100% {
        box-shadow: 0 10px 30px rgba(111, 66, 193, 0.18), 0 0 0 0 rgba(111, 66, 193, 0);
    }
}

/* Subtle animation for headings and cta-group */
@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero p,
.cta-group {
    animation: floatUp .6s ease both;
}

.cta-group[data-animation-delay] {
    animation-delay: var(--data-animation-delay, 0.4s);
    /* Use CSS variable for delay */
}

/* Responsive adjustments for hero section */
@media (max-width: 760px) {
    .hero {
        min-height: 350px;
        padding: 0;
    }
    .carousel-track { min-height: 350px; }
    .hero-arrow { display: none; } /* Hide arrows on mobile */

    .carousel-slide {
        padding: 2rem 1rem;
    }

    .hero-content {
        padding: 1.5rem 1rem;
        border-radius: 24px;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
        margin-bottom: 0.8rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.2rem;
    }

    .blob-1 {
        width: 150px;
        height: 150px;
    }

    .blob-2 {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .cta-group {
        flex-direction: column;
        /* Stack buttons vertically on very small screens */
    }

    .btn {
        width: 100%;
        /* Full width buttons */
        justify-content: center;
    }
}

/* --- Dark Mode Overrides --- */
body.dark-mode .hero {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(192, 132, 252, 0.1) 100%);
}

body.dark-mode .hero h1 {
    background: linear-gradient(300deg, #c084fc, #f472b6, #a855f7, #e879f9);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .btn-secondary {
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--primary-500);
}

body.dark-mode .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}