:root {
  --radius: 6px;
  --shadow-soft: 0 10px 30px rgba(0, 90, 100, 0.08);
  --shadow-lift: 0 16px 42px rgba(0, 90, 100, 0.14);
}

html {
  scroll-padding-top: 86px;
}

body {
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(0, 201, 212, 0.45);
  outline-offset: 3px;
}

nav {
  height: 68px;
  padding: 0 clamp(1rem, 2.5vw, 2.25rem);
}

.nav-logo {
  min-width: max-content;
  white-space: nowrap;
}

.nav-logo img {
  filter: drop-shadow(0 2px 6px rgba(0, 153, 168, 0.18));
}

.nav-links {
  align-items: center;
}

.nav-links a {
  border-radius: 4px;
  line-height: 1;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(0, 153, 168, 0.07);
}

.nav-links a[href="/admin.html"] {
  background: rgba(0, 153, 168, 0.1);
  border: 1px solid rgba(0, 153, 168, 0.18);
  color: var(--cyan-dark);
}

.nav-toggle {
  border-radius: var(--radius);
  line-height: 1;
}

section {
  scroll-margin-top: 0;
}

#hero {
  min-height: calc(100svh - 28px);
  padding: 92px 2rem 78px;
}

#hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 42, 48, 0.18) 100%);
}

.hero-content {
  max-width: 940px;
  padding-inline: 1rem;
}

.hero-content > img {
  width: clamp(88px, 12vw, 132px) !important;
  padding: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-title {
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  text-wrap: balance;
}

.hero-subtitle,
.hero-tagline,
.section-label,
.stat-label,
.tab-btn,
.news-card-tag,
.footer-tagline {
  overflow-wrap: anywhere;
}

.btn-primary,
.btn-ghost,
.tab-btn {
  border-radius: 4px;
}

.btn-primary,
.btn-ghost {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: min(100%, 1100px);
}

.section-title,
.news-hero-title,
.branch-name,
.kit-name,
.social-platform {
  text-wrap: balance;
}

.stat-box,
.mgmt-card,
.branch-card,
.player-card,
.kit-card,
.sum-box,
.news-card,
.social-card,
.president-card,
.news-hero {
  border-radius: var(--radius);
}

.branch-card,
.kit-card,
.news-card,
.social-card,
.president-card {
  box-shadow: var(--shadow-soft);
}

.branch-card:hover,
.kit-card:hover,
.news-card:hover,
.social-card:hover {
  box-shadow: var(--shadow-lift);
}

.fixture-table {
  background: var(--white);
}

.fixture-table th {
  white-space: nowrap;
}

.fixture-table td {
  vertical-align: middle;
}

.news-card {
  display: flex;
  flex-direction: column;
}

.news-card-top {
  flex: 1;
}

.news-card-bottom {
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-grid {
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.gallery-item {
  grid-column: auto !important;
  min-width: 0;
  width: 100%;
  border-radius: var(--radius);
  background: #dce8ea;
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  display: block;
  min-width: 0;
}

.gallery-caption {
  opacity: 1;
  transform: translateY(100%);
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-within .gallery-caption {
  transform: translateY(0);
}

footer {
  background: linear-gradient(180deg, #003a42 0%, #002d33 100%);
}

@media (max-width: 1180px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 68px);
    overflow: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 2px solid var(--cyan-light);
    box-shadow: 0 16px 36px rgba(0, 90, 100, 0.14);
    padding: 12px clamp(1rem, 3vw, 2rem) 16px;
  }

  .nav-links.open {
    display: grid;
  }

  .nav-links a {
    display: block;
    border: 1px solid var(--bg2);
    background: #fff;
    padding: 12px 14px;
    font-size: 0.86rem;
  }
}

@media (max-width: 768px) {
  #hero {
    min-height: 92svh;
    padding: 88px 1rem 58px;
  }

  .hero-title {
    font-size: clamp(3.4rem, 18vw, 6rem);
  }

  .hero-subtitle {
    letter-spacing: 4px;
  }

  .hero-tagline {
    letter-spacing: 3px;
  }

  .about-grid,
  .president-card {
    align-items: stretch;
  }

  #fixture .container {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .fixture-table {
    min-width: 680px;
  }
}

@media (max-width: 640px) {
  .nav-links.open {
    grid-template-columns: 1fr;
  }

  .hero-badge {
    letter-spacing: 2px;
  }

  .hero-cta {
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    width: min(100%, 310px);
  }

  .news-hero-stat {
    width: 100%;
    justify-content: flex-start;
  }

  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  section {
    padding-inline: 0.9rem;
  }

  .about-stats,
  .social-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    grid-column: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  .filter-tabs {
    row-gap: 6px;
  }

  .tab-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
