/* Source style block: block-1 */
/* ============================================================
       INDEX PAGE STYLE
       Scope: home/index page hero + level cards only.
       Navbar/sidebar/footer are controlled by component CSS files.
       ============================================================ */

    /* ------------------------------
       1) Hero / Welcome panel
       ------------------------------ */
    .index-welcome {
      position: relative;
      overflow: hidden;
      color: #fff;
      text-align: center;
      padding: 20px 15px;
      margin-bottom: 25px;
      border-radius: var(--radius-lg);
      box-shadow: var(--shadow);
      background: linear-gradient(135deg, #4361ee, #4CAF50, #ff9800, #9c27b0, #4361ee);
      background-size: 300% 300%;
      animation:
        welcome-float 8s ease-in-out infinite,
        welcome-gradient 15s ease-in-out infinite;
    }

    html.dark-mode .index-welcome {
      background: linear-gradient(135deg, #1c3f94, #2e7d32, #c66900, #6a1b9a, #1c3f94);
      background-size: 300% 300%;
    }

    .index-welcome::after {
      content: "";
      position: absolute;
      inset: -20%;
      z-index: 0;
      pointer-events: none;
      background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15), transparent 40%);
      animation: welcome-blobs 20s infinite;
    }

    .welcome-inner {
      position: relative;
      z-index: 2;
    }

    .welcome-inner h2 {
      font-size: 1.7rem;
      margin-bottom: 6px;
      font-weight: 900;
      text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .welcome-inner p {
      font-size: 1.05rem;
      font-weight: 500;
      margin-bottom: 0;
      text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    /* ------------------------------
       2) Statistics cards
       ------------------------------ */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
      margin-top: 15px;
    }

    .stat-card {
      background: rgba(255,255,255,0.2);
      padding: 12px 10px;
      border-radius: 12px;
      border: 1px solid rgba(255,255,255,0.1);
      box-shadow: 0 4px 15px rgba(0,0,0,0.05);
      backdrop-filter: blur(8px);
    }

    .stat-card i {
      font-size: 1.1rem;
    }

    .stat-number {
      font-size: 1.4rem;
      font-weight: 900;
      margin: 6px 0 2px;
    }

    .stat-label {
      font-size: 0.85rem;
      font-weight: 700;
      line-height: 1.2;
      opacity: 0.95;
    }

    /* ------------------------------
       3) Level cards
       ------------------------------ */
    .index-levels {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
    }

    .level-card {
      --track-color: var(--color-pri);
      --track-header-end: #388e3c;
      --track-soft: rgba(76, 175, 80, 0.15);
      --track-hover: rgba(76, 175, 80, 0.1);
      --track-shadow: rgba(76, 175, 80, 0.15);

      background: var(--white);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
      border: 1px solid rgba(0,0,0,0.03);
      transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

    html.dark-mode .level-card {
      border-color: rgba(255,255,255,0.05);
    }

    .card-secondary {
      --track-color: var(--color-sec);
      --track-header-end: #7b1fa2;
      --track-soft: rgba(156, 39, 176, 0.15);
      --track-hover: rgba(156, 39, 176, 0.1);
      --track-shadow: rgba(156, 39, 176, 0.15);
    }

    .card-middle {
      --track-color: var(--color-mid);
      --track-header-end: #f57c00;
      --track-soft: rgba(255, 152, 0, 0.15);
      --track-hover: rgba(255, 152, 0, 0.1);
      --track-shadow: rgba(255, 152, 0, 0.15);
    }

    .card-primary {
      --track-color: var(--color-pri);
      --track-header-end: #388e3c;
      --track-soft: rgba(76, 175, 80, 0.15);
      --track-hover: rgba(76, 175, 80, 0.1);
      --track-shadow: rgba(76, 175, 80, 0.15);
    }

    .level-header {
      padding: 18px;
      color: #fff;
      text-align: center;
      font-size: 1.25rem;
      font-weight: 800;
      background: linear-gradient(90deg, var(--track-color), var(--track-header-end));
    }

    .level-links {
      padding: 15px;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    /* ------------------------------
       4) Level buttons
       - PC: hover effect.
       - Mobile: JS adds .is-touch-press so tap feels like PC hover.
       - Blue browser tap rectangle is removed.
       ------------------------------ */
    .level-link {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 62px;
      padding: 12px 62px;
      background: var(--bg-light);
      border: 1px solid transparent;
      border-radius: 12px;
      color: var(--text-main);
      font-size: 1.08rem;
      font-weight: 700;
      text-align: center;
      transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        color 0.25s ease;
      -webkit-tap-highlight-color: transparent;
      -webkit-user-select: none;
      user-select: none;
      touch-action: manipulation;
    }

    .level-link:focus {
      outline: none;
    }

    .level-link:focus-visible {
      outline: 2px solid var(--track-color);
      outline-offset: 3px;
    }

    .link-text {
      display: block;
      width: 100%;
      text-align: center;
      line-height: 1.35;
    }

    .link-icon {
      position: absolute;
      top: 50%;
      width: 36px;
      height: 36px;
      display: grid;
      place-items: center;
      border-radius: 50%;
      background: var(--track-soft);
      color: var(--track-color);
      font-size: 1.1rem;
      font-weight: 900;
      line-height: 1;
      transform: translateY(-50%);
      transition: transform 0.25s ease;
    }

    html[dir="rtl"] .link-icon {
      right: 14px;
      left: auto;
    }

    html[dir="ltr"] .link-icon {
      left: 14px;
      right: auto;
    }

    /* Number glyph alignment:
       Tajawal digits can sit visually high.
       Desktop stays neutral; mobile has a specific override below. */
    .link-icon-number {
      display: block;
      line-height: 1;
      transform: translateY(0);
      font-variant-numeric: lining-nums tabular-nums;
    }

    @media (hover: hover) and (pointer: fine) {
      .level-card .level-link:hover {
        background: var(--track-hover);
        color: var(--track-color);
        border-color: var(--track-color);
        transform: translateY(-3px);
        box-shadow: 0 4px 12px var(--track-shadow);
      }
    }

    .level-card .level-link.is-touch-press {
      background: var(--track-hover);
      color: var(--track-color);
      border-color: var(--track-color);
      transform: translateY(-3px);
      box-shadow: 0 4px 12px var(--track-shadow);
    }

    /* ------------------------------
       5) Animations
       ------------------------------ */
    @keyframes welcome-gradient {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }

    @keyframes welcome-float {
      0% { transform: translateY(-3px); }
      50% { transform: translateY(3px); }
      100% { transform: translateY(-3px); }
    }

    @keyframes welcome-blobs {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1) translate(10px, 10px); }
    }

    @media (prefers-reduced-motion: reduce) {
      .index-welcome,
      .index-welcome::after,
      .stat-card,
      .level-link {
        animation: none !important;
        transition: none !important;
      }
    }

    /* ------------------------------
       6) Mobile
       ------------------------------ */
    @media (max-width: 768px) {
      .index-welcome {
        padding: 14px 12px;
        margin-bottom: 18px;
        border-radius: 14px;
      }

      .welcome-inner h2 {
        font-size: 1.4rem;
        margin-bottom: 4px;
      }

      .welcome-inner p {
        font-size: 0.95rem;
      }

      .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 12px;
      }

      .stat-card {
        padding: 10px 8px;
        border-radius: 10px;
      }

      .stat-card i {
        font-size: 0.9rem;
        margin-bottom: 2px;
      }

      .stat-number {
        font-size: 1.15rem;
        margin: 2px 0;
      }

      .stat-label {
        font-size: 0.75rem;
      }

      .level-header {
        padding: 14px;
        font-size: 1.15rem;
      }

      .level-links {
        padding: 12px;
        gap: 8px;
      }

      .level-link {
        min-height: 56px;
        padding: 10px 56px;
        font-size: 1rem;
        border-radius: 10px;
      }

      .link-text {
        line-height: 1.3;
      }

      .link-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
      }

      html[dir="rtl"] .link-icon {
        right: 12px;
        left: auto;
      }

      html[dir="ltr"] .link-icon {
        left: 12px;
        right: auto;
      }

      .link-icon-number {
        transform: translateY(3px);
      }
    }
