/* ═══════════════════════════════════════════
   GP/SP ANIMATIONS — Scroll & Interaction
═══════════════════════════════════════════ */

/* ── BASE: elements hidden until observed ── */
.anim {
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(.22,1,.36,1), transform 0.7s cubic-bezier(.22,1,.36,1);
}
.anim.anim-visible {
  opacity: 1;
}

/* ── VARIANTS ── */
.anim-fade-up {
  transform: translateY(40px);
}
.anim-fade-up.anim-visible {
  transform: translateY(0);
}

.anim-fade-down {
  transform: translateY(-40px);
}
.anim-fade-down.anim-visible {
  transform: translateY(0);
}

.anim-fade-left {
  transform: translateX(-50px);
}
.anim-fade-left.anim-visible {
  transform: translateX(0);
}

.anim-fade-right {
  transform: translateX(50px);
}
.anim-fade-right.anim-visible {
  transform: translateX(0);
}

.anim-scale {
  transform: scale(0.85);
}
.anim-scale.anim-visible {
  transform: scale(1);
}

.anim-scale-up {
  transform: scale(0.7) translateY(30px);
}
.anim-scale-up.anim-visible {
  transform: scale(1) translateY(0);
}

.anim-flip {
  transform: perspective(600px) rotateY(25deg);
}
.anim-flip.anim-visible {
  transform: perspective(600px) rotateY(0);
}

.anim-rotate-in {
  transform: rotate(-8deg) scale(0.9);
}
.anim-rotate-in.anim-visible {
  transform: rotate(0) scale(1);
}

/* ── STAGGER DELAYS ── */
.anim-delay-1 { transition-delay: 0.08s !important; }
.anim-delay-2 { transition-delay: 0.16s !important; }
.anim-delay-3 { transition-delay: 0.24s !important; }
.anim-delay-4 { transition-delay: 0.32s !important; }
.anim-delay-5 { transition-delay: 0.40s !important; }
.anim-delay-6 { transition-delay: 0.48s !important; }
.anim-delay-7 { transition-delay: 0.56s !important; }
.anim-delay-8 { transition-delay: 0.64s !important; }
.anim-delay-9 { transition-delay: 0.72s !important; }
.anim-delay-10 { transition-delay: 0.80s !important; }

/* ── HERO ANIMATIONS ── */
@keyframes heroSlideUp {
  from { opacity: 0; transform: translateY(50px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.04; }
  50%      { transform: scale(1.08); opacity: 0.08; }
}
@keyframes scrollCueBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}
.hero-scroll-cue {
  animation: heroFadeIn 0.8s ease 1.2s both, scrollCueBounce 2s ease-in-out 2s infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-scroll-cue { animation: none !important; }
}
@media (max-width: 680px) {
  .hero-scroll-cue { display: none; }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes borderGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43,37,35,0); }
  50%      { box-shadow: 0 0 20px 2px rgba(43,37,35,0.15); }
}

.hero-anim-1 {
  animation: heroSlideUp 0.8s cubic-bezier(.22,1,.36,1) 0.1s both;
}
.hero-anim-2 {
  animation: heroSlideUp 0.8s cubic-bezier(.22,1,.36,1) 0.3s both;
}
.hero-anim-3 {
  animation: heroSlideUp 0.8s cubic-bezier(.22,1,.36,1) 0.5s both;
}
.hero-anim-4 {
  animation: heroSlideUp 0.8s cubic-bezier(.22,1,.36,1) 0.7s both;
}
.hero-anim-float {
  animation: heroFloat 4s ease-in-out infinite;
}
.hero-stat-anim {
  animation: heroSlideUp 0.7s cubic-bezier(.22,1,.36,1) both;
}
.hero-stat-anim:nth-child(1) { animation-delay: 0.6s; }
.hero-stat-anim:nth-child(2) { animation-delay: 0.8s; }
.hero-stat-anim:nth-child(3) { animation-delay: 1.0s; }

/* Hero background orbs */
.hero::before {
  animation: heroPulse 6s ease-in-out infinite !important;
}
.hero::after {
  animation: heroPulse 8s ease-in-out infinite 2s !important;
}

/* ── COUNTER ANIMATION ── */
.counter-animated {
  display: inline-block;
}

/* ── CARD ENHANCED HOVER ── */
.news-card, .prog-card, .domain-item, .impact-card, .impact-item, .pub-item, .pub-card, .partenaire-item {
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s cubic-bezier(.22,1,.36,1), border-color 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.prog-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 14px 36px rgba(0,0,0,0.1);
}

.domain-item:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 10px 28px rgba(43,37,35,0.15);
}

.impact-item, .impact-card {
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), background 0.35s ease, box-shadow 0.35s ease;
  animation: impactGlow 3s ease-in-out infinite;
}
.impact-item:hover, .impact-card:hover {
  transform: translateY(-6px) scale(1.06) rotate(-1deg);
  background: rgba(255,255,255,0.16);
  box-shadow: 0 0 0 1px rgba(209,25,28,.4), 0 14px 34px rgba(209,25,28,.35);
}
.impact-item:nth-child(2n), .impact-card:nth-child(2n) { animation-delay: 1s; }
.impact-item:nth-child(3n), .impact-card:nth-child(3n) { animation-delay: 2s; }

@keyframes impactGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 0 0 rgba(209,25,28,0); }
  50%      { box-shadow: 0 0 0 1px rgba(255,255,255,.16), 0 0 22px rgba(209,25,28,.25); }
}
@keyframes impactShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -20% 0; }
}

/* ── IMPACT CARD ENTRANCE (bouncy pop, overrides generic .anim-scale-up) ── */
.impact-grid .anim-scale-up {
  opacity: 0;
  transform: scale(.4) rotate(-10deg);
  transition: none;
}
.impact-grid .anim-scale-up.anim-visible {
  animation: impactPop .9s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes impactPop {
  0%   { opacity: 0; transform: scale(.4) rotate(-10deg); }
  55%  { opacity: 1; transform: scale(1.12) rotate(4deg); }
  75%  { transform: scale(.95) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .impact-item, .impact-card { animation: none !important; }
  .impact-item .big, .impact-card .big { animation: none !important; }
  .impact-grid .anim-scale-up.anim-visible { animation: none !important; opacity: 1 !important; transform: none !important; }
}

.pub-item:hover {
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(43,37,35,0.1);
}

/* ── SECTION HEADER ANIMATION ── */
.section-header .accent-bar {
  transition: width 0.6s cubic-bezier(.22,1,.36,1);
  width: 0;
}
.section-header.anim-visible .accent-bar {
  width: 44px;
}

/* ── BUTTON RIPPLE ── */
.btn-primary, .btn-blue, .btn-outline {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}
.btn-primary:hover, .btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.btn-primary:active, .btn-blue:active {
  transform: translateY(0);
}

/* ── ICON HOVER BOUNCE ── */
.domain-icon i, .news-icon i, .prog-icon i {
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}
.domain-item:hover .domain-icon i,
.news-card:hover .news-icon i,
.prog-card:hover .prog-icon i {
  transform: scale(1.25) rotate(-5deg);
}

/* ── NAV LINK UNDERLINE ── */
.nav-menu a {
  position: relative;
}
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: width 0.3s ease, left 0.3s ease;
}
.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 60%;
  left: 20%;
}

/* ── STAT CARD GLOW ── */
.stat-card {
  transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}
.stat-card:hover {
  transform: translateY(-4px) scale(1.03);
  background: rgba(255,255,255,0.16);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ── MISSION ITEM SLIDE ── */
.mission-item {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.mission-item:hover {
  transform: translateX(8px);
  box-shadow: -4px 0 16px rgba(0,0,0,0.06);
}

/* ── PARTNER BADGE ── */
.partner-badge, .partenaire-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.partner-badge:hover, .partenaire-item:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  background: var(--blue-light);
}

/* ── CHART BOX ── */
.chart-box {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.chart-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* ── FOOTER LINKS ── */
.footer-col a {
  transition: color 0.2s ease, transform 0.2s ease;
}
.footer-col a:hover {
  transform: translateX(4px);
}

/* ── SCROLL PROGRESS BAR ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), #E74C3C, var(--blue));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── BACK TO TOP ── */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 46px;
  height: 46px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 200;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.34,1.56,.64,1), background 0.2s ease;
  box-shadow: 0 4px 16px rgba(43,37,35,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  background: var(--blue-dark);
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 24px rgba(43,37,35,0.4);
}

/* ── LOADING SHIMMER ── */
.shimmer-text {
  background: linear-gradient(90deg, currentColor 40%, rgba(255,255,255,0.6) 50%, currentColor 60%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── ALERT BAR PULSE ── */
.alert-tag {
  animation: alertPulse 2s ease-in-out infinite;
}
@keyframes alertPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(209,25,28,0.4); }
  50%      { box-shadow: 0 0 0 6px rgba(209,25,28,0); }
}

/* ── TYPING CURSOR ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}
.typing-cursor::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: var(--red);
  font-weight: 300;
}

/* ── PREFERS REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .anim { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-anim-1, .hero-anim-2, .hero-anim-3, .hero-anim-4, .hero-stat-anim { animation: none !important; opacity: 1 !important; }
  .hero::before, .hero::after { animation: none !important; }
  .alert-tag { animation: none !important; }
  .scroll-progress { display: none; }
  .back-to-top { transition: opacity 0.2s ease; }
}

/* ── NAVBAR SHRUNK ── */
.navbar {
  transition: height 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar-shrunk {
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.navbar-shrunk .container {
  height: 52px;
}
.navbar-shrunk .nav-logo img {
  width: 36px;
  height: 36px;
}
.navbar-shrunk .nav-logo-text strong {
  font-size: 12px;
}
.navbar-shrunk .nav-logo-text span {
  display: none;
}

/* ── DOMAIN ITEMS (hardcoded, no $loop) ── */
.domains-grid .domain-item:nth-child(1) { transition-delay: 0.05s; }
.domains-grid .domain-item:nth-child(2) { transition-delay: 0.10s; }
.domains-grid .domain-item:nth-child(3) { transition-delay: 0.15s; }
.domains-grid .domain-item:nth-child(4) { transition-delay: 0.20s; }
.domains-grid .domain-item:nth-child(5) { transition-delay: 0.25s; }
.domains-grid .domain-item:nth-child(6) { transition-delay: 0.30s; }
.domains-grid .domain-item:nth-child(7) { transition-delay: 0.35s; }
.domains-grid .domain-item:nth-child(8) { transition-delay: 0.40s; }
.domains-grid .domain-item:nth-child(9) { transition-delay: 0.45s; }
.domains-grid .domain-item:nth-child(10) { transition-delay: 0.50s; }

/* ── PARTENAIRES GRID (hardcoded stagger) ── */
.partenaires-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .partenaires-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .partenaires-grid { grid-template-columns: 1fr; }
}
.partenaires-grid .partenaire-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-dark);
  line-height: 1.3;
}
.partenaires-grid .partenaire-item i {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ── NEWS ICON (used in home blade) ── */
.news-icon {
  width: 44px;
  height: 44px;
  background: var(--blue-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--blue);
  margin: 16px 0 0 18px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.news-card:hover .news-icon {
  background: var(--blue);
  color: #fff;
  transform: scale(1.08) rotate(-3deg);
}

/* ── PROG ICON ── */
.prog-icon {
  width: 48px;
  height: 48px;
  background: rgba(43,37,35,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--blue);
  margin-bottom: 12px;
  transition: background 0.3s ease, transform 0.3s ease;
}
.prog-card:hover .prog-icon {
  background: var(--blue);
  color: #fff;
  transform: scale(1.08) rotate(-3deg);
}

/* ── ALERT BANNER (hero) ── */
.alert-banner {
  background: rgba(209,25,28,0.15);
  border: 1px solid rgba(209,25,28,0.3);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  color: #FBEDED;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: heroSlideUp 0.6s cubic-bezier(.22,1,.36,1) 0s both;
}
.alert-banner i {
  color: var(--red);
  animation: alertPulse 2s ease-in-out infinite;
}

/* ── HERO SLOGAN ── */
.hero-slogan {
  font-size: 17px;
  color: #D9D8D7;
  margin-bottom: 8px;
  font-style: italic;
  animation: heroSlideUp 0.7s cubic-bezier(.22,1,.36,1) 0.25s both;
}

/* ── NEWS CARD LAYOUT FIX ── */
.news-card {
  display: flex;
  flex-direction: column;
}
.news-card .news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
}
.news-card .news-body h3 {
  flex: 1;
}
.news-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--blue);
  background: var(--blue-light);
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* ── HERO ROTATOR (animated hero texts) ── */
.hero-rotator { position: relative; min-height: 52px; margin-bottom: 26px; max-width: 480px; }
.hero-rotator-item {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  font-size: 16px;
  color: #D9D8D7;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}
.hero-rotator-item.active { opacity: 1; transform: translateY(0); position: relative; }

/* ── HERO CAROUSEL ENTRANCE ── */
.hero-carousel {
  animation: heroFadeIn 0.9s ease 0.35s both;
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotator-item { transition: none !important; }
  .hero-carousel { animation: none !important; }
  .hc-slide { transition: opacity .3s ease !important; transform: none !important; }
}

/* ══════════════════════════════════════
   STATE-OF-THE-ART UPGRADES
══════════════════════════════════════ */

/* ── SPLIT-TEXT WORD REVEAL (generic, reusable) ── */
[data-split-reveal] .split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px) rotate(4deg);
  animation: splitWordIn .8s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes splitWordIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  [data-split-reveal] .split-word { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── INFINITE TYPEWRITER (hero title) ── */
[data-typewriter] { white-space: normal; }
[data-typewriter] .tw-red { color: var(--red); }
.typewriter-cursor {
  display: inline-block;
  margin-left: 3px;
  font-weight: 400;
  color: #fff;
  animation: caretBlink .85s steps(1) infinite;
}
@keyframes caretBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor { animation: none !important; opacity: 1; }
}

/* ── CUSTOM MAGNETIC CURSOR (desktop only) ── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; border-radius: 50%; pointer-events: none; z-index: 10000;
}
.cursor-dot {
  width: 8px; height: 8px; background: var(--red);
  transition: width .2s ease, height .2s ease, background .2s ease;
}
.cursor-ring {
  width: 34px; height: 34px; border: 1.5px solid rgba(209,25,28,.55);
  transition: width .25s cubic-bezier(.22,1,.36,1), height .25s cubic-bezier(.22,1,.36,1), border-color .25s ease, background .25s ease;
}
.cursor-dot.cursor-hover { width: 0; height: 0; }
.cursor-ring.cursor-hover { width: 60px; height: 60px; background: rgba(209,25,28,.14); border-color: rgba(209,25,28,.85); }
.cursor-dot.cursor-hidden, .cursor-ring.cursor-hidden { opacity: 0; }
body.custom-cursor-active { cursor: none; }
body.custom-cursor-active a, body.custom-cursor-active button, body.custom-cursor-active [role="button"] { cursor: none; }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ── 3D TILT CARDS (JS sets --tilt-x / --tilt-y custom props on mousemove) ── */
.domain-item, .prog-card, .news-card, .podcast-thumb, .impact-item, .impact-card, .partenaires-grid .partenaire-item, .pub-card {
  --tilt-x: 0deg; --tilt-y: 0deg;
}
.domain-item:hover {
  transform: perspective(800px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-3px) scale(1.03);
}
.prog-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-5px) scale(1.01);
}
.news-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-6px);
}
.podcast-thumb:hover {
  transform: perspective(700px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
}
.impact-item:hover, .impact-card:hover {
  transform: perspective(700px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-6px) scale(1.06);
}
.partenaires-grid .partenaire-item:hover {
  transform: perspective(700px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-3px) scale(1.04);
}
.pub-card:hover {
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-4px);
}
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
  .domain-item:hover, .prog-card:hover, .news-card:hover, .podcast-thumb:hover,
  .impact-item:hover, .impact-card:hover, .partenaires-grid .partenaire-item:hover, .pub-card:hover {
    transform: none;
  }
}

/* ── MAGNETIC BUTTONS (JS applies inline transform on mousemove) ── */
.btn-primary, .btn-outline, .btn-donate, .btn-blue {
  will-change: transform;
}

/* ── SCROLL PROGRESS GLOW ── */
.scroll-progress {
  box-shadow: 0 0 10px rgba(209,25,28,.6), 0 0 2px rgba(209,25,28,.8);
}

/* ── PROG META ── */
.prog-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--gray-mid);
  margin-bottom: 12px;
}
.prog-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.prog-meta i {
  color: var(--blue);
  font-size: 12px;
}
