/* ─── Scroll anchor offset (évite que la navbar fixe cache les titres) ─── */
html {
  scroll-padding-top: 80px; /* Hauteur navbar (~59px) + marge de confort */
}

/* ─── Ecosystem Pill Cards ─── */
.ecosystem-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1rem 0.75rem;
  text-align: center;
  color: #fff;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
  height: 100%;
}

a:hover .ecosystem-pill {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-4px);
}

/* ─── Featured Module Cards (DzCloud / DzForge) ─── */
.featured-module-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  height: 100%;
}

.featured-module-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.12);
}

.featured-module-card__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 20px;
}

.featured-module-card__icon {
  width: 72px;
  height: 72px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.featured-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* ─── Digital Hero Section ─── */
.digital-hero {
  background: linear-gradient(45deg, #0d47a1 0%, #1a237e 100%) !important;
  color: #fff;
  position: relative;
  overflow: hidden;
  /* To contain pseudo-elements */
}

/* Optional: Add some subtle animated shapes for a more "digital" feel */
.digital-hero::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  animation: float 15s infinite linear;
}

.digital-hero::after {
  content: '';
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 45%;
  animation: float 20s infinite linear reverse;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0);
  }

  50% {
    transform: translateY(-20px) translateX(20px);
  }

  100% {
    transform: translateY(0) translateX(0);
  }
}


/* Glassmorphism Card */
/* Glassmorphism Card */
.hero-card {
  background: rgba(255, 255, 255, 0.1);
  /* Note: We keep a specific transparent white for the hero to blend with the blue gradient, 
     but we use modern radius and transition vars */
  border-radius: var(--radius-lg, 16px);
  padding: 1.5rem;
  /* Reduced from 2rem for better fit */
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition_subtle, all 0.3s ease);
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.hero-card .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hero-card .card-title {
  font-weight: 600;
  word-break: break-word;
  /* Prevents overflow for long words */
}

.hero-card .btn-outline-light {
  border-width: 2px;
  font-weight: 600;
  transition: all 0.3s ease;
  margin-top: auto;
  /* Pushes button to the bottom */
}

.hero-card .btn-outline-light:hover {
  background: #fff;
  color: #1a237e;
}

/* Card locked / coming-soon state */
.hero-card--coming-soon {
  opacity: 0.65;
  cursor: default;
}
.hero-card--coming-soon:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* MOBILE SCROLL SNAP (Horizontal Carousel) */
@media (max-width: 767.98px) {
    .mobile-scroll-container {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem; /* Space for scrollbar or shadow */
        margin-left: -0.75rem; /* Break out of container padding */
        margin-right: -0.75rem;
        padding-left: 0.75rem; /* Restore padding visually */
        padding-right: 0.75rem;
    }

    .mobile-scroll-container::-webkit-scrollbar {
        display: none; /* Hide scrollbar for cleaner look */
    }

    .mobile-scroll-item {
        flex: 0 0 85%; /* Shows 85% of the card, hinting at more content */
        max-width: 85%;
        scroll-snap-align: center;
    }
}