@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700&display=swap');

/* ====================================
   RESET + GLOBAL
==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Exo 2", sans-serif;
}

body {
  background: linear-gradient(135deg, #ffffff, #e3f2fd);
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

main { 
  flex: 1;
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s ease;
}

a:hover {
  opacity: 0.9;
}

/* ====================================
   REMOVE DEFAULT BLUE CLICK/FOCUS OUTLINE
==================================== */
a,
button,
input {
  outline: none;
  -webkit-tap-highlight-color: transparent; /* Removes blue tap effect on mobile */
}

a:focus {
  outline: none;
  box-shadow: none;
}

/* ====================================
   HERO SECTION
==================================== */
.hero-bases {
  position: relative;
  text-align: center;
  padding: 110px 20px 15px;
  height: 300px;
  color: #fff;
  animation: fadeIn 0.8s ease-in-out;
  overflow: hidden;
}

.hero-bases .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  filter: blur(3px);
  transform: scale(1.05);
  z-index: 0;
}

.hero-bases::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-bases h1 {
  position: relative;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  z-index: 2;
}

/* ====================================
   CONTROLS (Filter/Sort/Tabs)
==================================== */
.controls {
  max-width: 1000px;
  margin: 20px auto;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
}

/* Centered Tabs */
.tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: #222;
  transition: 0.2s ease;
}

.tab-btn.active {
  background: linear-gradient(90deg, #f5c542, #f9a602);
  color: #111;
  border-color: transparent;
  transform: scale(1.05);
}

/* Divider Lines */
.divider {
  border: none;
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 12px;
}

 /* ====================================
   CONTROLS
==================================== */
.levels-section,
.filters-section,
.district-section,
.district-levels-section,
.sort-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;      
  justify-content: center;
  gap: 10px 12px;
}

.section-label {
  font-weight: 600;
  color: #222;
}

.levels-container,
.filter-buttons,
.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.levels-container button,
.levels-container .level-btn,
.filter-btn,
.sort-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.levels-container button:hover,
.levels-container .level-btn:hover,
.filter-btn:hover,
.sort-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.levels-container button.active,
.levels-container .level-btn.active,
.filter-btn.active,
.sort-btn.active {
  background: linear-gradient(90deg, #f5c542, #f9a602);
  color: #111;
  border-color: transparent;
  transform: scale(1.05);
}

@media (max-width: 600px) {
  .levels-container button,
  .levels-container .level-btn,
  .filter-btn,
  .sort-btn {
    font-size: 0.8rem;
    padding: 5px 8px;
  }
}

/* ====================================
   GRID AND CARD LAYOUT
==================================== */

.grid-wrap {
  max-width: 1200px;
  margin: 18px auto 0;
  padding: 0 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 100%;
  margin: 0 auto;
}

.empty {
  padding: 40px;
  text-align: center;
  color: #555;
}

.base-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 15px;
  height: 200px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(3, 169, 244, 0.06);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.base-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(3, 169, 244, 0.1);
}

/* Image Container */
.base-card .thumb {
  width: 100%;
  height: 160px;
  overflow: hidden;
  display: block;
}

.base-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.base-card:hover .thumb img {
  transform: scale(1.05);
}


/* ===============================
   Star Rating System
=============================== */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px 12px;
  font-size: 0.9rem;
}

/* ===============================
   Smooth Fractional Star Fill (Final)
=============================== */
.smooth-stars {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.smooth-stars .stars-bg,
.smooth-stars .stars-fill {
  display: flex;
  gap: 2px;
}

.smooth-stars .stars-bg {
  color: #fff; /* white empty stars */
  -webkit-text-stroke: 0.8px #ccc; /* light grey border */
  text-stroke: 0.8px #ccc;
}

.smooth-stars .stars-fill {
  color: #f7c948; /* golden yellow for filled stars */
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  transition: width 0.3s ease;
  -webkit-text-stroke: 0.8px #ccc; /* same grey outline for consistency */
  text-stroke: 0.8px #ccc;
}

.views {
  display: flex;
  align-items: center;
  color: #666;
  font-size: 0.6rem;
  gap: 4px;
}

.views i.fa-eye {
  color: #666;
  font-size: 0.6rem;
}

.views i {
  color: #666;
}

/* ====================================
   PAGINATION SECTION 
==================================== */
.pagination-section {
  text-align: center;
  margin: 2rem 0;
}

.pagination-info {
  font-weight: 500;
  font-size: 0.8rem;
  color: #808080;
  padding-bottom: 10px;
}

.pagination-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.page-btn {
  background: #14213d;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-btn:hover {
  background: #1f2e5a;
  border-color: rgba(255, 255, 255, 0.25);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ====================================
   DESCRIPTION SECTION 
==================================== */

.base-description {
  max-width: 1100px;
  margin: 60px auto 40px;
  padding: 0 20px;
  line-height: 1.25;
  color: #cfcfcf;
}

.base-description h2 {
  font-size: 17px;
  margin-bottom: 14px;
  text-align: left;
  color: #000;
}

.base-description p {
  font-size: 15.5px;
  margin-bottom: 12px;
  text-align: left;
  color: #000;
}


/* ====================================
   TOAST NOTIFICATION
==================================== */
.site-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: rgba(4, 120, 87, 0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  z-index: 4000;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
}

.site-toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* ====================================
   RESPONSIVE MEDIA QUERIES
==================================== */

@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0 0;
  }
}


/* ====================================
   ANIMATIONS
==================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===============================
   VISIBILITY CONTROL CLASSES
=============================== */
.hidden {
  display: none !important;
}

.visible {
  display: flex !important;
}