/* ============================================================
   POULTRY.MA v7 — Landing animations + hero slider
   Complement a public.css
   ============================================================ */

/* ============================================================
   HERO SLIDER — 3 slides rotatifs
   ============================================================ */
.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 580px;
    background: linear-gradient(135deg, #FAF6EC 0%, #F0E8D3 100%);
}

[dir="rtl"] .hero-slider { direction: rtl; }

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    padding: 60px 0;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-slide-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .hero-slide-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-slider { min-height: 680px; }
}

.hero-slide.active .hero-slide-text > * {
    animation: slideInLeft 0.8s ease-out backwards;
}
.hero-slide.active .hero-slide-text > *:nth-child(1) { animation-delay: 0.1s; }
.hero-slide.active .hero-slide-text > *:nth-child(2) { animation-delay: 0.25s; }
.hero-slide.active .hero-slide-text > *:nth-child(3) { animation-delay: 0.4s; }
.hero-slide.active .hero-slide-text > *:nth-child(4) { animation-delay: 0.55s; }
.hero-slide.active .hero-slide-text > *:nth-child(5) { animation-delay: 0.7s; }

.hero-slide.active .hero-slide-visual {
    animation: zoomFadeIn 1s ease-out 0.3s backwards;
}

[dir="rtl"] .hero-slide.active .hero-slide-text > * {
    animation-name: slideInRight;
}

.hero-slide-eyebrow {
    display: inline-block;
    background: var(--ocre, #A0522D);
    color: var(--blanc, #fff);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 18px;
}

.hero-slide-title {
    font-family: 'Outfit', 'Tajawal', sans-serif;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 900;
    line-height: 1.15;
    color: var(--terre, #3E2723);
    margin: 0 0 18px;
}

.hero-slide-title .highlight {
    color: var(--ocre, #A0522D);
    position: relative;
    display: inline-block;
}

.hero-slide-title .highlight::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 4px;
    height: 10px;
    background: var(--or-light, #E4C676);
    opacity: 0.5;
    z-index: -1;
    border-radius: 4px;
}

.hero-slide-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--terre-cl, #6B4226);
    line-height: 1.6;
    margin: 0 0 26px;
    max-width: 560px;
}

.hero-slide-ctas {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

@media (max-width: 768px) {
    .hero-slide-ctas { justify-content: center; }
}

.hero-slide-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-slide-stats { justify-content: center; }
}

.hero-slide-stat strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--ocre, #A0522D);
    line-height: 1;
}

.hero-slide-stat span {
    font-size: 13px;
    color: var(--terre-cl, #6B4226);
}

/* Visual - big animated icon */
.hero-slide-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide-visual-circle {
    width: 320px;
    height: 320px;
    max-width: 90%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, var(--or-light, #E4C676) 0%, var(--or, #C8A45A) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(200, 164, 90, 0.35);
    animation: pulseGlow 3s ease-in-out infinite;
}

.hero-slide-visual-icon {
    font-size: 140px;
    line-height: 1;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.2));
    animation: floatIcon 3s ease-in-out infinite;
}

.hero-slide-visual-badge {
    position: absolute;
    background: var(--blanc, #fff);
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--terre, #3E2723);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    animation: floatBadge 3s ease-in-out infinite;
}

.hero-slide-visual-badge.top    { top: 10%;    right: -5%; animation-delay: 0s; }
.hero-slide-visual-badge.middle { top: 50%;    left: -10%; animation-delay: 1s; }
.hero-slide-visual-badge.bottom { bottom: 10%; right: 5%;  animation-delay: 2s; }

[dir="rtl"] .hero-slide-visual-badge.top    { top: 10%;    left: -5%;  right: auto; }
[dir="rtl"] .hero-slide-visual-badge.middle { top: 50%;    right: -10%; left: auto; }
[dir="rtl"] .hero-slide-visual-badge.bottom { bottom: 10%; left: 5%;   right: auto; }

/* Dots navigation */
.hero-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(62, 39, 35, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.hero-dot.active {
    background: var(--ocre, #A0522D);
    width: 32px;
    border-radius: 5px;
}

/* Arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--terre, #3E2723);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-arrow:hover {
    background: var(--ocre, #A0522D);
    color: var(--blanc, #fff);
    transform: translateY(-50%) scale(1.1);
}

.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }

[dir="rtl"] .hero-arrow.prev { left: auto; right: 20px; }
[dir="rtl"] .hero-arrow.next { right: auto; left: 20px; }

@media (max-width: 640px) {
    .hero-arrow { display: none; }
}

/* Progress bar (autoplay indicator) */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--ocre, #A0522D);
    z-index: 10;
    width: 0;
    transition: width 0.1s linear;
}

/* ============================================================
   ANIMATIONS KEYFRAMES
   ============================================================ */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes zoomFadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(200, 164, 90, 0.35); }
    50%      { box-shadow: 0 20px 80px rgba(200, 164, 90, 0.55); }
}

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-10px) rotate(-3deg); }
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3); }
    50%  { opacity: 1; transform: scale(1.05); }
    70%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ============================================================
   SCROLL ANIMATIONS (intersection observer driven)
   ============================================================ */
.anim-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.anim-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

.anim-on-scroll.delay-1 { transition-delay: 0.1s; }
.anim-on-scroll.delay-2 { transition-delay: 0.2s; }
.anim-on-scroll.delay-3 { transition-delay: 0.3s; }
.anim-on-scroll.delay-4 { transition-delay: 0.4s; }
.anim-on-scroll.delay-5 { transition-delay: 0.5s; }

.anim-scale.anim-on-scroll {
    transform: scale(0.9);
}
.anim-scale.anim-on-scroll.in-view {
    transform: scale(1);
}

.anim-left.anim-on-scroll {
    transform: translateX(-40px);
}
.anim-left.anim-on-scroll.in-view {
    transform: translateX(0);
}

.anim-right.anim-on-scroll {
    transform: translateX(40px);
}
.anim-right.anim-on-scroll.in-view {
    transform: translateX(0);
}

[dir="rtl"] .anim-left.anim-on-scroll  { transform: translateX(40px); }
[dir="rtl"] .anim-right.anim-on-scroll { transform: translateX(-40px); }

/* ============================================================
   POURQUOI POULTRY — Restructure
   ============================================================ */
.why-section {
    padding: 80px 20px;
    background: #fff;
    position: relative;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto 50px;
}

.why-card {
    background: var(--blanc, #fff);
    border: 2px solid #F0E8D3;
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.why-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--or-light, #E4C676) 0%, var(--ocre, #A0522D) 100%);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

.why-card > * { position: relative; z-index: 1; }

.why-card:hover {
    transform: translateY(-6px);
    border-color: var(--ocre, #A0522D);
    box-shadow: 0 14px 32px rgba(160, 82, 45, 0.2);
}

.why-card:hover::before { opacity: 0.08; }

.why-card-icon {
    font-size: 52px;
    display: inline-block;
    margin-bottom: 14px;
    transition: transform 0.4s;
}

.why-card:hover .why-card-icon {
    transform: scale(1.2) rotate(-5deg);
}

.why-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--terre, #3E2723);
    line-height: 1.4;
    margin: 0;
}

/* Solution highlight */
.why-solution {
    background: linear-gradient(135deg, #C8A45A 0%, #A0522D 100%);
    color: var(--blanc, #fff);
    padding: 50px 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 1100px;
    margin: 0 auto;
    box-shadow: 0 20px 50px rgba(160, 82, 45, 0.25);
    position: relative;
    overflow: hidden;
}

.why-solution::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotateBg 15s linear infinite;
}

.why-solution > * { position: relative; z-index: 1; }

@keyframes rotateBg {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.why-solution h3 {
    font-size: clamp(22px, 3vw, 30px);
    margin: 0 0 10px;
    color: var(--blanc, #fff);
}

.why-solution-intro {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-bottom: 24px;
}

.why-solution-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    text-align: start;
    max-width: 900px;
    margin: 0 auto;
}

.why-solution-feature {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    font-weight: 600;
    font-size: 14px;
}

/* ============================================================
   COUNTER ANIMATION
   ============================================================ */
.counter {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: clamp(28px, 4vw, 42px);
    color: var(--ocre, #A0522D);
    line-height: 1;
    display: inline-block;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .anim-on-scroll { opacity: 1; transform: none !important; }
}
