:root {
  --bg-exampage:#f8fafc;
  --bg-header: linear-gradient(135deg, #79dbbc, #82a5f8);
  --bg-searchbox:#ffffff;
  --bg-card:#fffbfb;
  --text-primary: #050505;
  --text-secondary: #0a0a0a;
  --btn-primary: #38bdf8;
  --btn-text: #0f172a;
  --border:#d3d4cf59;
}
.dark {
  --bg-exampage:#212020;
  --bg-header: linear-gradient(135deg, #101e5f, #5b679f);
  --bg-card:#101010;
  --bg-searchbox:#474444;
  --text-primary: #e5e7eb;
  --text-secondary: #cbd5f5;
  --btn-primary: #60a5fa;
  --btn-text: #020617;
  --border:#a4ad8059;
}

body {
  margin: 0 ;
  font-family: Arial, sans-serif;
}

/* ---------- Header ---------- */
.top-header {
  background: var(--bg-header);
  color: var(--text-primary);
  padding: 60px 20px;
}

.top-header-text {
  width: 90%;
  margin: auto;
  font-size: x-large;
  text-align: center;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-top: 15px;
}

/* --------Contenar Heading----------- */

.heading{
  padding: 20px 15px;
  border: 2px solid var(--border);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  display: flex;
  justify-content: space-between;
}
.heading-text{
  padding: 5px 3px;
  font-size: 28px;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}
.search-box {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 350px;
  background:var(--bg-searchbox) ;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
}

.search-box input {
  border: none;
  outline: none;
  background: none;
  width: 100%;
  font-size: 15px;
  margin-left: 8px;
}

.search-icon {
  font-size: 20px;
  color: #64748b;
}
.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: none;
  font-size: 18px;
}

@media (max-width: 600px) {
  .search-box {
    max-width: 100%;
  }
}
/* -----------------------Main Contenar ----------------*/
.layout {
  display: grid;
  grid-template-columns: 2fr 5fr; 
  min-height: 100vh;
}
@media (max-width: 1000px) {
  .layout{
     grid-template-columns: 2fr 3fr; 
  }
   .dropdown-menu {
    position: static;
    width: 70%;
  }
}
/* ----- Side bar ------ */
.sidebar {
  margin: 5px;
  background: var(--bg-exampage);
  color:var(--text-primary);
  padding: 20px;
  border-right: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.dropdown {
  width: full;
  margin-bottom: 10px;
  position: relative;
}

.dropdown-btn {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: medium;
  font-weight: 500;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}
.dropdown-menu {
  display: none;
  background: var(--bg-exampage);
}

.dropdown-menu div {
  padding: 10px;
  padding-left: 20px;
  cursor: pointer;
  color:var(--text-secondary);
  border-bottom: 2px solid var(--border);
}

.dropdown-menu div:hover {
  background: #516b83;
  
}

/* Open state */
.dropdown.open .dropdown-menu {
  display: block;
}


/* ---------------------- Main Cards sections ----------------- */
.cards-wrapper {
  background:var(--bg-exampage);
  padding: 30px;
  overflow-x: auto;              /* Horizontal scroll */
  overflow-y: hidden;
}

.cards-wrapper::-webkit-scrollbar {
  height: 8px;
}
.cards-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
/* ---------- Track ---------- */
.cards-track {
  display: grid;
  grid-auto-flow: column;        /* IMPORTANT: horizontal flow */
  grid-template-rows: repeat(3, 1fr); /* 3 rows */
  gap: 20px;
  scroll-behavior: smooth;
}

.cards {
  width: 200px;
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  background:var(--bg-card) ;
}

.cards img {
  width: 120px;
  height: 120px;
  background: #a9c6eb;
  object-fit: cover;
  border-radius: 6px;

}

.cards h3 {
  font-size: 16px;
  margin: 10px 0;
}

.cards a {
  text-decoration: none;
  color: #2563eb;
  font-weight: bold;
}




/* Mobile slide-down */
@media (max-width: 700px) {
  .layout{
     grid-template-columns: 1fr; 
  }

  .dropdown-menu {
    position: static;
    width: 100%;
  }
}