/* =========================================================
   PREMIUM PORTAL UI - SHARED STYLES
   Requires CSS Variables defined in the HTML body or root.
   Default fallback is the gold/yellow palette.
   ========================================================= */

:root {
  --primary-color: #ffb300;
  --primary-light: #ffd566;
  --primary-dark: #ff8f00;
  --hero-grad-start: #1a1a2e;
  --hero-grad-mid: #16213e;
  --hero-grad-end: #0f3460;
  --rgb-primary: 255, 179, 0; /* for rgba uses */
}

/* ---- Hero Section ---- */
.apps-hero {
  background: linear-gradient(135deg, var(--hero-grad-start) 0%, var(--hero-grad-mid) 40%, var(--hero-grad-end) 100%);
  padding: 70px 20px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.apps-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(var(--rgb-primary),0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(var(--rgb-primary),0.05) 0%, transparent 50%);
  pointer-events: none;
}
.apps-hero::after {
  content: '';
  position: absolute;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--rgb-primary),0.06) 0%, transparent 70%);
  top: -80px; left: -80px;
  animation: pulse-orb 6s ease-in-out infinite alternate;
}
@keyframes pulse-orb {
  from { transform: scale(1); opacity: 0.6; }
  to   { transform: scale(1.3); opacity: 1; }
}

.apps-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(var(--rgb-primary),0.15);
  border: 1px solid rgba(var(--rgb-primary),0.35);
  color: var(--primary-color);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
  font-family: 'Rubik', sans-serif;
  backdrop-filter: blur(8px);
  animation: fade-down 0.6s ease both;
  position: relative;
  z-index: 2;
}
.apps-hero-title {
  font-family: 'Rubik', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 14px;
  line-height: 1.25;
  animation: fade-down 0.7s ease both;
  position: relative;
  z-index: 2;
}
.apps-hero-title span {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.apps-hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
  animation: fade-down 0.8s ease both;
  position: relative;
  z-index: 2;
}

/* ---- Search Bar ---- */
.apps-search-bar {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  animation: fade-down 0.9s ease both;
  z-index: 2;
}
.apps-search-bar input {
  width: 100%;
  padding: 14px 20px 14px 50px;
  border-radius: 50px;
  border: 1.5px solid rgba(var(--rgb-primary),0.3);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.95rem;
  font-family: 'Rubik', sans-serif;
  outline: none;
  box-sizing: border-box;
  transition: all 0.3s ease;
  direction: rtl;
}
.apps-search-bar input::placeholder { color: rgba(255,255,255,0.45); }
.apps-search-bar input:focus {
  border-color: var(--primary-color);
  background: rgba(255,255,255,0.12);
  box-shadow: 0 0 0 3px rgba(var(--rgb-primary),0.15);
}
.apps-search-bar .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(var(--rgb-primary),0.7);
  font-size: 1rem;
  pointer-events: none;
}

/* ---- Stats Bar ---- */
.apps-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 24px 20px 0;
  margin-top: 36px;
  animation: fade-down 1s ease both;
  position: relative;
  z-index: 2;
}
.apps-stat { text-align: center; }
.apps-stat-num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: 'Rubik', sans-serif;
  line-height: 1.1;
}
.apps-stat-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  margin-top: 5px;
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-15px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Section Header & Filters ---- */
.apps-section-header {
  text-align: center;
  padding: 50px 20px 20px;
  position: relative;
}
.apps-section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  display: inline-block;
  position: relative;
}
.apps-section-header h2::before,
.apps-section-header h2::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}
.apps-section-header h2::before { right: -55px; }
.apps-section-header h2::after { left: -55px; }

#apps-count-label {
  font-size: 0.9rem;
  color: #6b7280;
  margin-top: 8px;
}

.apps-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 40px;
  max-width: 800px;
  margin: 0 auto;
}
.filter-chip {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'Rubik', sans-serif;
  font-size: 0.85rem;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.3s ease;
}
.filter-chip:hover {
  border-color: rgba(var(--rgb-primary),0.5);
  color: var(--primary-color);
  background: rgba(var(--rgb-primary),0.03);
}
.filter-chip.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(var(--rgb-primary),0.25);
  font-weight: 500;
}

/* ---- Footer ---- */
.apps-footer {
  padding: 40px 20px;
  background: linear-gradient(to top, #111827, #1f2937);
  text-align: center;
  border-top: 3px solid var(--primary-color);
  color: #d1d5db;
  font-family: 'Rubik', sans-serif;
  margin-top: 50px;
}
.apps-footer-supervisor {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 5px;
}
.apps-footer-role {
  font-size: 1rem;
  color: #9ca3af;
  margin: 0 0 20px;
}
.apps-footer-divider {
  width: 50px; height: 2px;
  background: rgba(255,255,255,0.1);
  margin: 0 auto 20px;
}
.apps-footer-credit {
  font-size: 0.9rem;
  margin: 0;
}
.apps-footer-credit strong {
  color: #fff;
  font-weight: 600;
}

/* ---- No Results & Cards Layout Fixes ---- */
.no-results {
  width: 100%;
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
  font-size: 1.1rem;
  display: none;
}
.no-results i {
  font-size: 2.5rem;
  color: #d1d5db;
  display: block;
  margin-bottom: 15px;
}
.ts-box {
  animation: zoom-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}
@keyframes zoom-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* Set up staggered animation delays for cards (assuming max 20 per visible page for animation) */
.ts-box:nth-child(1) { animation-delay: 0.05s; }
.ts-box:nth-child(2) { animation-delay: 0.1s; }
.ts-box:nth-child(3) { animation-delay: 0.15s; }
.ts-box:nth-child(4) { animation-delay: 0.2s; }
.ts-box:nth-child(5) { animation-delay: 0.25s; }
.ts-box:nth-child(6) { animation-delay: 0.3s; }
.ts-box:nth-child(7) { animation-delay: 0.35s; }
.ts-box:nth-child(8) { animation-delay: 0.4s; }
.ts-box:nth-child(9) { animation-delay: 0.45s; }
.ts-box:nth-child(10) { animation-delay: 0.5s; }

/* Remove default link underline inside feature boxes */
.ts-box a, .feat-box a {
    text-decoration: none;
}

/* ==========================================================================
   Premium Navigation Bar
   ========================================================================== */
.header-area .links li a {
    color: #f1f5f9 !important;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    opacity: 0.85;
}

.header-area .links li a:hover,
.header-area .links li a.active {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary-color, #ffb300) !important;
}

/* The elegant underline effect */
.header-area .links li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary-color, #ffb300);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 8px var(--primary-color, #ffb300);
}

.header-area .links li a:hover::after,
.header-area .links li a.active::after {
    width: 70%;
}

/* Animate the icons slightly on hover for extra premium feel */
.header-area .links li a i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.header-area .links li a:hover i {
    transform: translateY(-2px);
    color: var(--primary-color, #ffb300);
}

.header-area .links li a i.home-icon {
    color: var(--primary-color, #ffb300);
}
