/* Importing 'Audiowide' and 'Roboto' fonts */
@import url("https://fonts.googleapis.com/css2?family=Audiowide&family=Roboto:wght@400;700&display=swap");

/* ========================================= */
/* --- 1. Base & Global Styles --- */
/* ========================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #111827;
  color: #f9fafb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  text-align: center;
}

/* Base Typography */
h1 {
  font-family: "Audiowide", sans-serif;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  font-size: 3rem;
}

h2 {
  margin-bottom: 0.5rem;
}

h3 {
  font-size: 1.4rem;
}

h1 span {
  color: #13926a;
}

p {
  color: #d1d5db;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

/* Global Layout */
.portal-container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1rem;
}

/* Footer */
footer {
  padding: 1.5rem;
  margin-top: auto;
  color: #6b7280;
  font-size: 0.9rem;
}

/* ========================================= */
/* --- 2. Components & Modules --- */
/* ========================================= */

/* Main Button Style */
.button {
  background-color: #13926a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  margin-top: 1rem;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: #107a59;
}

/* Country Selector on Index Page */
.country-selector {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.country-button {
  background-color: #13926a;
  color: #ffffff;
  padding: 1rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
  font-size: 1rem;
  border: none;
  cursor: pointer;
}

.country-button:hover {
  background-color: #107a59;
  transform: scale(1.05);
}

/* Search Page Components */
.search-widget {
  max-width: 1200px; /* Adjust width to be consistent */
  margin: 0 auto 3rem auto;
}

.search-form {
  display: flex;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.search-form input[type="text"] {
  flex-grow: 1;
  border: 2px solid #374151;
  background-color: #1f2937;
  color: #f9fafb;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border-right: none;
}

.search-form input[type="text"]:focus {
  outline: none;
  border-color: #13926a;
}

.search-form button {
  background-color: #13926a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  border: 2px solid #13926a;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-form button:hover {
  background-color: #107a59;
}

.search-title {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  color: #d1d5db;
  margin-bottom: 2.5rem;
  font-size: 1.2rem;
}

#search-query-display {
  color: #f9fafb;
  font-weight: bold;
}

.search-item-list {
  max-width: 1200px; /* Adjust width to be consistent */
  margin: 0 auto;
  text-align: left;
}

.result-item {
  background-color: #1f2937;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.result-item h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
}

.result-item a {
  color: #13926a;
  text-decoration: none;
  font-weight: bold;
}

.result-item p {
  color: #d1d5db;
  margin: 0;
  font-size: 0.95rem;
}

/* Indonesia Page Components (Minimalist Design) */
.main-header {
  margin-bottom: 0.5rem;
}

.intro-text {
  max-width: 1200px; /* Adjust width to be consistent */
  margin: 0 auto 3rem auto;
  font-size: 1.2rem;
  color: #d1d5db;
}

.rating-display {
  color: #f9fafb;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.rating-display .star-rating {
  color: #ffd700;
  letter-spacing: 2px;
}

.rating-display .rating-value {
  font-weight: bold;
  color: #13926a;
}

.rating-display .rating-count {
  color: #6b7280;
}

.features-list {
  max-width: 1200px; /* Adjust width to be consistent */
  margin: 3rem auto;
  text-align: left;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background-color: #1f2937;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.feature-icon {
  font-size: 2.5rem;
  color: #13926a;
  flex-shrink: 0;
}

.feature-item h3 {
  font-size: 1.3rem;
  color: #f9fafb;
  margin: 0 0 0.5rem 0;
}

.feature-item p {
  margin: 0;
  color: #d1d5db;
  font-size: 1rem;
}

/* Link Style - Perbaikan di sini */
.green-link {
  color: #13926a; /* Mengubah warna teks */
  text-decoration: none; /* Menghilangkan garis bawah */
  font-weight: bold; /* Membuat teks tebal */
  transition: color 0.2s ease; /* Transisi saat di-hover */
}

.green-link:hover {
  color: #107a59; /* Warna saat di-hover */
  text-decoration: underline; /* Menambahkan garis bawah saat di-hover */
}

/* Call to action at the bottom */
.call-to-action {
  margin-top: 3rem;
}

/* ========================================= */
/* --- 3. Media Queries (Responsive) --- */
/* ========================================= */

/* Desktop (screen width 1024px and above) */
@media (min-width: 1024px) {
  h1 {
    font-size: 4.5rem;
  }
  h2 {
    font-size: 1.8rem;
  }
  p {
    font-size: 1.2rem;
  }
  .country-selector {
    grid-template-columns: repeat(5, 1fr);
  }
  .country-button {
    font-size: 1.1rem;
  }
  .search-title {
    font-size: 1.5rem;
  }
  .result-item h3 {
    font-size: 1.35rem;
  }
  .result-item p {
    font-size: 1.05rem;
  }

  /* CTA Button Adjustments for Desktop */
  .call-to-action {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .call-to-action .country-button {
    display: inline-block;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    margin: 0 auto;
  }

  /* --- Footer --- */
  .site-footer {
    background: #0b0a0d; /* nền tối */
    color: #cfc7d2; /* chữ xám nhạt */
    padding: 56px 16px 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.7;
    font-size: 15px;
  }

  .site-footer .container {
    max-width: 1120px;
    margin: 0 auto;
  }

  .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px; /* giảm từ 40px xuống 20px */
    column-gap: 24px; /* hoặc chỉ rút ngắn khoảng cách ngang */
    row-gap: 20px; /* giữ khoảng cách dọc thoáng hơn */
  }
  .site-footer .container {
    max-width: 960px; /* trước là 1120px, thu hẹp lại */
    margin: 0 auto;
  }
  .footer-title {
    color: #ffffff; /* tiêu đề hơi tím như ảnh */
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 14px;
  }

  .footer-text {
    margin: 0 0 16px;
    color: #ffffff;
  }

  .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .footer-links li + li {
    margin-top: 10px;
  }

  .footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
  }

  .footer-links a:hover,
  .footer-links a:focus {
    color: #ffffff;
    transform: translateX(2px);
  }

  .social-list {
    display: flex;
    gap: 10px;
    padding: 0;
    margin: 14px 0 0;
    list-style: none;
  }

  .social-list a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #1a171f;
    color: #cfc7d2;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  }

  .social-list a:hover,
  .social-list a:focus {
    background: #2a2430;
    color: #ffffff;
    transform: translateY(-2px);
  }

  .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 36px;
    padding-top: 18px;
    text-align: center;
    color: #ffffff;
    font-size: 14px;
  }

  /* Responsive: 4 → 2 → 1 cột */
  @media (max-width: 980px) {
    .footer-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (max-width: 560px) {
    .footer-grid {
      grid-template-columns: 1fr;
    }
  }
}

/* Tablet (screen width 768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  h1 {
    font-size: 4rem;
  }
  h2 {
    font-size: 1.4rem;
  }
  h3 {
    font-size: 1.2rem;
  }
  p {
    font-size: 1rem;
  }
  .country-selector {
    grid-template-columns: repeat(3, 1fr);
  }
  .country-button {
    font-size: 1.1rem;
    gap: 0.75rem;
  }
  .search-title {
    font-size: 1.4rem;
  }
  .result-item h3 {
    font-size: 1.25rem;
  }
  .result-item p {
    font-size: 1rem;
  }
}

/* Mobile (screen width 767px and below) */
@media (max-width: 767px) {
  h2 {
    font-size: 1.2rem;
  }
  h3 {
    font-size: 1.1rem;
  }
  p {
    font-size: 0.9rem;
  }

  /* Search Form Responsive Fix */
  .search-form {
    flex-direction: column;
    overflow: visible;
    border-radius: 0;
    gap: 0.75rem;
  }
  .search-form input[type="text"] {
    border-radius: 8px;
    border-right: 2px solid #374151;
  }
  .search-form button {
    border-radius: 8px;
  }

  /* Minimalist Feature List Responsive Fix */
  .feature-item {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
  .feature-item h3 {
    text-align: center;
  }
  .feature-item p {
    text-align: center;
  }
}

.main-header a {
  text-decoration: none;
}

/* =================================================================== */
/* === BỔ SUNG Ở CUỐI FILE – KHÔNG CHẠM CODE GỐC PHÍA TRÊN ============ */
/* =================================================================== */

/* 1) Sửa lỗi lồng @media: đưa responsive footer ra ngoài để luôn chạy */
@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* 2) Override căn giữa toàn site để footer không bị center */
.site-footer {
  text-align: left;
}
/* --- Base footer --- */
.site-footer {
  background: #0b0a0d;
  color: #cfc7d2;
  padding: 56px 16px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.7;
  font-size: 15px;
}
.site-footer .container {
  max-width: 960px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 20px;
}

.footer-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 14px;
  color: #fff;
}

.footer-text {
  margin: 0 0 16px;
  color: #fff;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li + li {
  margin-top: 10px;
}
.footer-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: #13926a;
}

.social-list {
  display: flex;
  gap: 10px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.social-list a {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #1a171f;
  color: #cfc7d2;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.social-list a:hover {
  background: #2a2430;
  color: #fff;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: 36px;
  padding-top: 18px;
  text-align: center;
  font-size: 14px;
  color: #999;
}

/* --- BJ88 Network grid --- */
.network-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.network-grid li a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.network-grid li a:hover {
  color: #13926a;
}
.network-grid li a img {
  width: 16px;
  height: 11px;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

/* --- Responsive --- */

/* Tablet: 2 cột */
@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .network-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile: accordion */
@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.site-footer,
.footer-col,
.footer-links,
.social-list {
  text-align: center;
}
.footer-col {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}
.footer-col:first-child {
  border-top: 0;
  padding-top: 0;
}

/* Toggle button */
.footer-toggle {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 700;
  font-size: 16px;
  color: #d8d0ff;
  text-align: center;
  cursor: pointer;
}
.footer-toggle:focus-visible {
  outline: 2px solid #13926a;
  outline-offset: 2px;
}

.toggle-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: transparent;
  position: relative;
}
.toggle-icon::before,
.toggle-icon::after {
  content: "";
  position: absolute;
  background: #cfc7d2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.toggle-icon::before {
  width: 14px;
  height: 2px;
}
.toggle-icon::after {
  width: 2px;
  height: 14px;
}
.footer-col.is-open .toggle-icon::after {
  display: none; /* thành dấu – */
}

/* nội dung accordion */
.footer-body {
  display: none;
  padding: 10px 0 14px;
}
.footer-col.is-open .footer-body {
  display: block;
}

/* Network */
.network-grid {
  grid-template-columns: 1fr;
}
.network-grid li a {
  justify-content: center;
}
.footer-toggle .toggle-icon {
  display: none !important;
}

/* Desktop: luôn mở */
@media (min-width: 1024px) {
  .footer-toggle {
    all: unset;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
  }
  .toggle-icon {
    display: none !important;
  }
  .footer-body {
    display: block !important;
  }
}
/* Quy tắc tô màu cho logo H1 */

/* Áp dụng cho toàn bộ H1 nếu cần style chung */
h1 {
  font-size: 3rem; /* Ví dụ: Chỉnh kích thước chữ */
  font-weight: bold;
}

/* Tô màu chữ B thành màu trắng */
h1 .logo-b {
  color: white;
}

/* Tô màu chữ J thành màu #e63946 */
h1 .logo-j {
  color: #e63946;
}

/* Tô màu số 88 thành màu #FFD700 (màu vàng gold) */
h1 .logo-88 {
  color: #ffd700;
}
/* Quy tắc CSS cho logo BJ|BoraJogar */

h1 {
  color: white;
  font-size: 3rem;
  font-weight: bold;
  text-align: center;
}

/* === PHẦN QUAN TRỌNG NHẤT === */
/* TÔ MÀU ĐỎ CHO CẢ HAI CHỮ J */
h1 .logo-bj-j,   /* Chữ J trong "BJ" */
h1 .logo-jogar-j {
  /* Chữ J trong "Jogar" */
  color: #e63946;
}

/* Đảm bảo các phần còn lại vẫn là màu trắng */
h1 .logo-b,
h1 .logo-separator,
h1 .logo-bora,
h1 .logo-jogar-ogar {
  color: white;
}

/* Tùy chỉnh dấu | nếu muốn */
h1 .logo-separator {
  margin: 0 0.5rem;
}
h1 {
  letter-spacing: 0;
  word-spacing: 0;
}
