/* ====== Thiết lập cơ bản ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --color-bg: #021b2e;          /* xanh nền chính (gần màu logo) */
  --color-bg-alt: #061f33;
  --color-surface: #ffffff;
  --color-primary: #e53935;     /* đỏ chi tiết tốc độ */
  --color-primary-soft: rgba(229, 57, 53, 0.12);
  --color-accent: #ffb300;
  --color-text-main: #1f2933;
  --color-text-light: #f9fafb;
  --color-muted: #9ca3af;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.35);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-pill: 999px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #0f172a;
  color: var(--color-text-main);
  line-height: 1.6;
}

/* ====== Containers & Sections ====== */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background-color: #020617;
}

.section-header {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-header h2 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  color: #e5e7eb;
}

.section-header p {
  margin: 0;
  color: var(--color-muted);
}

.section-footer {
  text-align: center;
  margin-top: 2.5rem;
}

/* ====== Header & Navigation ====== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #021b2e;
  color: var(--color-text-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  display: block;
  height: 54px;
  width: auto;
}

/* Nav */

.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text-light);
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 0.2rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  transition: width 0.22s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ====== Hero ====== */

.hero {
  background: radial-gradient(circle at top left, #0f172a, var(--color-bg));
  color: var(--color-text-light);
  padding: 4.5rem 0 4rem;
}

.hero-inner {
  display: grid;
  /* text  = 1.4, image = 2  (image rộng hơn) */
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr);
  gap: 2.25rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(1.9rem, 3vw, 2.3rem); /* nhỏ hơn một chút */
  margin: 0 0 0.75rem;
}

.hero-content p {
  margin: 0 0 1.25rem;
  color: #e5e7eb;
  font-size: 0.95rem; /* chữ mô tả nhỏ hơn */
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Danh sách hoạt động dưới đoạn mô tả */
.hero-activities {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: #e5e7eb;
}

.hero-activities li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.35rem;
}

.hero-activities li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
}

/* Cột hình ảnh hero */

.hero-media {
  /* giờ chỉ còn 1 ảnh lớn (slideshow) */
}

.hero-photo {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #020617;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* no extra scale, keep natural mapping */
  transform: none;
  transition: transform 0.35s ease;
}

.hero-photo:hover img {
  transform: none; /* hoặc scale(1.01) nếu vẫn muốn hiệu ứng rất nhẹ */
}

/* Slideshow hero: 1 ảnh lớn chạy slide */
.hero-slider {
  border-radius: 18px;
  min-height: 280px;      /* hoặc 320px nếu bạn muốn */
  aspect-ratio: 16 / 9;
}

.hero-slider img {
  transform: none;
}

.hero-slider:hover img {
  transform: none;
}

/* Overlay text trên ảnh */
.hero-slide-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.8rem 1rem 1rem;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0)
  );
  color: #f9fafb;
}

.hero-slide-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.hero-slide-caption {
  margin: 0;
  font-size: 0.85rem;
  color: #e5e7eb;
}

/* Ảnh lớn (class cũ, hiện không dùng nhưng giữ lại nếu sau này cần) */
.hero-photo-main {
  min-height: 200px;
}

/* Caption cho ảnh lớn (cũ) */
.hero-photo-caption {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  color: #f9fafb;
  font-size: 0.8rem;
}

/* Lưới 3 ảnh nhỏ (cũ, không còn dùng, có thể xoá nếu muốn) */
.hero-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.hero-photo-small {
  min-height: 90px;
}

.hero-photo-small figcaption {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  right: 0.6rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #f9fafb;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* ====== Buttons ====== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    box-shadow 0.18s ease, transform 0.12s ease;
}

.primary-btn {
  background: linear-gradient(to right, var(--color-primary), #f97316);
  color: #fff;
  box-shadow: 0 10px 20px rgba(229, 57, 53, 0.45);
}

.primary-btn:hover {
  box-shadow: 0 14px 28px rgba(229, 57, 53, 0.55);
  transform: translateY(-1px);
}

.secondary-btn {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.7);
}

.secondary-btn:hover {
  background: rgba(15, 23, 42, 0.45);
}

/* ====== Intro section ====== */

.section#intro {
  background: #020617;
}

.section#intro .section-header h2 {
  color: #e5e7eb;
}

.section#intro .section-header p {
  color: var(--color-muted);
}

.intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.intro-card {
  background: #0b1120;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.intro-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #e5e7eb;
}

.intro-card p {
  margin: 0;
  color: var(--color-muted);
}

/* ====== Card grid (Giải đấu) ====== */

.section-alt#events {
  background: #020617;
}

.section-alt#events .section-header h2 {
  color: #e5e7eb;
}

.section-alt#events .section-header p {
  color: var(--color-muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.card {
  background: #0b1120;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.8);
  border-top: 3px solid var(--color-primary);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  color: #e5e7eb;
}

.card p {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
}

.card-link {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--color-accent);
}

.card-link:hover {
  text-decoration: underline;
}

/* ====== News list ====== */

.section#news {
  background: #020617;
}

.section#news .section-header h2 {
  color: #e5e7eb;
}

.section#news .section-header p {
  color: var(--color-muted);
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.news-item {
  background: #0b1120;
  border-radius: var(--radius-md);
  padding: 1.3rem 1.3rem 1.1rem;
  border-left: 3px solid var(--color-accent);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.7);
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.news-title {
  margin: 0.35rem 0 0.4rem;
  font-size: 1rem;
  color: #e5e7eb;
}

.news-summary {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  color: var(--color-muted);
}

.news-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-accent);
}

.news-link:hover {
  text-decoration: underline;
}

/* ====== Contact section ====== */

.section-alt#contact {
  background: #020617;
}

.section-alt#contact .section-header h2 {
  color: #e5e7eb;
}

.section-alt#contact .section-header p {
  color: var(--color-muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 2.25rem;
  align-items: flex-start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  color: #e5e7eb;
}

.contact-list li {
  margin-bottom: 0.5rem;
}

.contact-list a {
  color: var(--color-accent);
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Contact form */

.contact-form {
  background: #0b1120;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.contact-form h3 {
  margin-top: 0;
  color: #e5e7eb;
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.2rem;
  color: #e5e7eb;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #334155;
  font: inherit;
  background: #020617;
  color: #e5e7eb;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(229, 57, 53, 0.6);
}

.contact-form button {
  margin-top: 0.3rem;
}

.form-note {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* ====== Footer ====== */

.site-footer {
  background: #000814;
  color: #e5e7eb;
  padding: 1.3rem 0;
  margin-top: 1rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ====== Responsive ====== */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-media {
    margin-top: 1.25rem;
  }

  .intro-grid,
  .card-grid,
  .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .header-inner {
    padding: 0.6rem 0;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: #02101f;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1.5rem 1rem;
    gap: 0.6rem;
  }

  .main-nav a {
    padding: 0.2rem 0;
  }

  .main-nav.nav-open {
    opacity: 1;
    pointer-events: auto;
  }

  .section {
    padding: 3rem 0;
  }

  .intro-grid,
  .card-grid,
  .news-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-photo-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
