@import url("https://fonts.googleapis.com/css2?family=Merienda:wght@400;700&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Poppins:wght@100;200;300;400;600;800&family=Sofia+Sans:wght@300&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Poppins, sans-serif;
}

body {
  background-color: rgb(247, 247, 247);
  min-height: 100vh;
}

/* Navigation */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  background-color: #1f1f1f;
  flex-wrap: wrap;
  gap: 8px;
}

.navbar a {
  color: #ffffff;
  text-decoration: none;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 400;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #a6a6ff !important;
}

.navbar a.active {
  color: #a6a6ff;
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.50);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  color: #ffffff;
  font-size: 34px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero p {
  color: #ffffff;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.9;
}

/* Page Hero (smaller for subpages) */
.page-hero {
  min-height: 200px;
  padding: 40px 20px;
}

.page-hero h1 {
  font-size: 28px;
}

/* Form Section */
.form-section {
  max-width: 1200px;
  margin: -40px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.form-container {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 2px 0 rgba(48, 48, 48, .30), 0 1px 3px 1px rgba(48, 48, 48, .15);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: end;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #1f1f1f;
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  height: 3rem;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: Poppins, sans-serif;
  color: #1f1f1f;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #1976d2;
}

.form-group input::placeholder {
  color: #999;
}

/* Search Section */
.search-section {
  max-width: 1200px;
  margin: 53px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 9fr 6fr;
  gap: 16px;
  align-items: center;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  height: 3rem;
  padding: 0 14px 0 44px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: Poppins, sans-serif;
  color: #1f1f1f;
  background: #fff;
  outline: none;
  box-shadow: 0 1px 2px 0 rgba(48, 48, 48, .30), 0 1px 3px 1px rgba(48, 48, 48, .15);
}

.search-box input:focus {
  border-color: #1976d2;
}

.search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  cursor: pointer;
  z-index: 1;
}

.category-select {
  width: 75%;
  height: 3rem;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  font-size: 1rem;
  font-family: Poppins, sans-serif;
  color: #1f1f1f;
  background: #fff;
  outline: none;
  box-shadow: 0 1px 2px 0 rgba(48, 48, 48, .30), 0 1px 3px 1px rgba(48, 48, 48, .15);
}

.category-select:focus {
  border-color: #1976d2;
}

/* Banner Cards Grid - 2 COLUMNS (same as original h5gameonline.com) */
.cards-section {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 24px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Banner Card */
.banner-card {
  position: relative;
  border-radius: 11px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.banner-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Image - matches original: height calc(100vw/4) maxHeight 198px */
.banner-card .card-image {
  width: 100%;
  height: calc(100vw / 4);
  max-height: 198px;
  object-fit: cover;
  display: block;
  border-radius: 11px;
}

/* Download button - TOP corner, white bg (same as original) */
.banner-card .download-btn {
  position: absolute;
  top: 0;
  right: 0;
  margin: 5px;
  background: #ffffffbd;
  border: none;
  border-radius: 22px;
  padding: 6px 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}

.banner-card .download-btn:hover {
  background: #ffffffe6;
}

.banner-card .download-btn svg {
  width: 20px;
  height: 20px;
}

/* Name/Designation overlay - BOTTOM, right-aligned (same as original) */
.banner-card .card-overlay {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 64%), transparent);
  padding-top: 60px;
  text-align: end;
  border-radius: 0 0 11px 11px;
}

.banner-card .card-info {
  color: #fff;
}

.banner-card .card-info .card-name {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-right: 10px;
}

.banner-card .card-info .card-designation {
  font-size: 11px;
  font-weight: 300;
  opacity: 0.85;
  display: block;
  margin-right: 10px;
  margin-bottom: 10px;
}

/* Skeleton Loading */
.skeleton-card {
  background: #e0e0e0;
  border-radius: 11px;
  height: calc(100vw / 4);
  max-height: 198px;
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  padding: 30px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* No More Data */
.no-more-data {
  text-align: center;
  padding: 30px;
  color: #999;
  font-size: 14px;
}

/* Footer */
.footer {
  background-color: #1f1f1f;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

.footer a {
  color: #ffffff;
  text-decoration: none;
  padding: 6px 16px;
  font-size: 13px;
  transition: color 0.3s;
}

.footer a:hover {
  color: #a6a6ff !important;
}

.footer .copyright {
  color: #999;
  font-size: 12px;
  margin-top: 12px;
}

/* Content Pages */
.page-content {
  max-width: 900px;
  margin: 40px auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 2px 0 rgba(48, 48, 48, .15);
}

.page-content h2 {
  font-size: 24px;
  color: #1f1f1f;
  margin-bottom: 16px;
  font-weight: 600;
}

.page-content h3 {
  font-size: 18px;
  color: #1f1f1f;
  margin: 24px 0 12px;
  font-weight: 600;
}

.page-content p {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
  margin-bottom: 12px;
}

.page-content ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

.page-content ul li {
  font-size: 15px;
  color: #444;
  line-height: 1.8;
}

.page-content a {
  color: #1976d2;
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .hero h1 {
    font-size: 26px;
  }
  .search-section {
    grid-template-columns: 1fr;
    margin-top: 65px;
  }
  .category-select {
    width: 100%;
  }
  .form-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 22px;
  }
  .hero p {
    font-size: 14px;
  }
  .form-container {
    grid-template-columns: 1fr;
  }
  .search-section {
    margin-top: 60px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .banner-card .card-image {
    height: calc(100vw / 2);
    max-height: 250px;
  }
  .skeleton-card {
    height: calc(100vw / 2);
    max-height: 250px;
  }
  .page-content {
    padding: 20px;
    margin: 20px 10px;
  }
  .category-select {
    width: 100%;
  }
}
