/* ===== HERO CAROUSEL ===== */
.hero {
    padding: 100px 0 80px;
    background: var(--dark);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated background that changes per slide */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* Base layer: subtle mesh */
.hero::before {
    background: radial-gradient(ellipse 80% 60% at 20% 40%, rgba(79, 143, 255, 0.12) 0%, transparent 70%),
                radial-gradient(ellipse 60% 80% at 80% 70%, rgba(6, 214, 160, 0.08) 0%, transparent 70%);
}

/* Dynamic glow layer - transitions per slide */
.hero::after {
    opacity: 1;
    background: radial-gradient(ellipse 50% 70% at 50% 50%, rgba(79, 143, 255, 0.18) 0%, transparent 70%);
}

/* Slide 1: Blue glow (default) */
.hero.hero--bg-0::after {
    background: radial-gradient(ellipse 60% 60% at 30% 50%, rgba(79, 143, 255, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse 40% 50% at 80% 80%, rgba(59, 111, 217, 0.1) 0%, transparent 60%);
}

/* Slide 2: Teal / Emerald glow */
.hero.hero--bg-1::after {
    background: radial-gradient(ellipse 60% 60% at 70% 40%, rgba(6, 214, 160, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse 40% 50% at 20% 70%, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
}

/* Slide 3: Purple / Violet glow */
.hero.hero--bg-2::after {
    background: radial-gradient(ellipse 60% 60% at 50% 40%, rgba(139, 92, 246, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse 40% 50% at 20% 80%, rgba(79, 143, 255, 0.1) 0%, transparent 60%);
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero__carousel {
    position: relative;
}

/* All slides stacked via absolute, crossfade as a whole block */
.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(12px) scale(0.99);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.hero__slide.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    z-index: 2;
}

/* Exiting slide goes up + fades */
.hero__slide.leaving {
    opacity: 0;
    transform: translateY(-12px) scale(0.99);
    pointer-events: none;
    z-index: 1;
}

/* --- Text styles --- */
.hero__badge {
    display: inline-block;
    background: rgba(79, 143, 255, 0.15);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(79, 143, 255, 0.25);
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Dots navigation --- */
.hero__dots {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 36px;
    position: relative;
    z-index: 3;
}

.hero__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.hero__dot.active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.2);
}

.hero__dot:hover {
    border-color: var(--white);
}

/* ===== SECTION BACKGROUNDS ===== */

/* Subtle glow variants */
.section--glow-blue,
.section--glow-teal,
.section--glow-purple,
.section--stats,
.section--divider {
    position: relative;
}

.section--glow-blue::before,
.section--glow-teal::before,
.section--glow-purple::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.section--glow-blue::before {
    background: radial-gradient(ellipse 50% 60% at 10% 30%, rgba(79, 143, 255, 0.06) 0%, transparent 70%);
}

.section--glow-teal::before {
    background: radial-gradient(ellipse 50% 60% at 90% 40%, rgba(6, 214, 160, 0.05) 0%, transparent 70%);
}

.section--glow-purple::before {
    background: radial-gradient(ellipse 50% 60% at 50% 70%, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
}

/* Stats: gradient band */
.section--stats {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-card) 50%, var(--bg-dark) 100%);
}

/* Divider line between sections */
.section--divider::after {
    content: '';
    display: block;
    width: 100%;
    max-width: 600px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, rgba(79, 143, 255, 0.25), transparent);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: var(--reveal-delay, 0s);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero__slide {
        transition: none;
        transform: none;
    }

    .hero__slide.leaving {
        transform: none;
    }
}

/* ===== SERVICE CARDS GLOW ===== */
.card--service {
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.card--service:hover {
    border-left-color: var(--primary);
}

.card--service:hover .card__icon {
    box-shadow: 0 0 20px rgba(79, 143, 255, 0.4);
}

/* ===== WHY CHOOSE US - CARD STYLE ===== */
.why-us__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.why-us__item {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    transition: var(--transition);
}

.why-us__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.why-us__icon {
    width: 64px;
    height: 64px;
    background: rgba(79, 143, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
    color: var(--primary);
    transition: var(--transition);
}

.why-us__item:hover .why-us__icon {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.why-us__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.why-us__text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ===== PROJET CARDS - OVERLAY HOVER ===== */
.projet-card__img {
    position: relative;
    overflow: hidden;
}

.projet-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(79, 143, 255, 0.3));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.projet-card__overlay i {
    font-size: 1.8rem;
    color: var(--white);
    transform: translateX(-10px);
    transition: transform 0.3s ease;
}

.projet-card:hover .projet-card__overlay {
    opacity: 1;
}

.projet-card:hover .projet-card__overlay i {
    transform: translateX(0);
}

/* ===== RECENT PROJECTS PREVIEW ===== */
.projects-preview__footer {
    text-align: center;
    margin-top: 40px;
}

/* ===== TIMELINE PROCESS ===== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Vertical center line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(79, 143, 255, 0.2);
    transform: translateX(-50%);
}

.timeline__item {
    position: relative;
    width: 50%;
    padding: 0 40px 40px;
}

/* Alternate left/right */
.timeline__item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 60px;
    padding-left: 0;
}

.timeline__item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 60px;
    padding-right: 0;
}

.timeline__content {
    background: var(--bg-lighter);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 4px);
    padding: 28px 24px;
    transition: var(--transition);
}

.timeline__content:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.timeline__number {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    position: absolute;
    top: 4px;
    z-index: 2;
    border: 4px solid var(--bg-card);
}

/* Number position on center line */
.timeline__item:nth-child(odd) .timeline__number {
    right: -22px;
}

.timeline__item:nth-child(even) .timeline__number {
    left: -22px;
}

.timeline__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.timeline__text {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* ===== FAQ ACCORDION ===== */
.faq__list {
    max-width: 760px;
    margin: 0 auto;
}

.faq__item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq__item:hover {
    border-color: rgba(79, 143, 255, 0.2);
}

.faq__question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-card);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    text-align: left;
    transition: var(--transition);
}

.faq__question:hover {
    background: var(--bg-lighter);
}

.faq__icon {
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
    font-size: 0.9rem;
}

.faq__item.active .faq__icon {
    transform: rotate(180deg);
}

.faq__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq__answer-inner {
    padding: 0 24px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

.faq__item.active .faq__answer {
    max-height: 300px;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
    }

    /* Timeline mobile: single column, numbers inline in cards */
    .timeline::before {
        display: none;
    }

    .timeline__item,
    .timeline__item:nth-child(odd),
    .timeline__item:nth-child(even) {
        width: 100%;
        left: 0;
        text-align: left;
        padding: 0 0 20px;
    }

    .timeline__item:nth-child(odd) .timeline__number,
    .timeline__item:nth-child(even) .timeline__number {
        position: static;
        margin-bottom: 14px;
    }
}
