/* Grandes Torneos - Homepage */
:root {
  --gtd-green-dark: #0f3d24;
  --gtd-green: #1a5c34;
  --gtd-green-mid: #2d7a4a;
  --gtd-green-light: #8bc34a;
  --gtd-green-pill: #e8f5e9;
  --gtd-green-pill-text: #2e7d32;
  --gtd-purple: #7b1fa2;
  --gtd-purple-light: #9c27b0;
  --gtd-blue-brand: #1565c0;
  --gtd-blue-dark: #0d2d5c;
  --gtd-sidebar-width: 280px;
  --gtd-topbar-height: 72px;
  --gtd-font: "Inter", system-ui, -apple-system, sans-serif;
  --gtd-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --gtd-radius: 12px;
  --gtd-radius-lg: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

.gtd-body {
  font-family: var(--gtd-font);
  background: #f5f7f6;
  color: #333;
  overflow-x: hidden;
}

.gtd-wrapper {
  min-height: 100vh;
}

/* Overlay (mobile sidebar) */
.gtd-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gtd-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* Sidebar */
.gtd-sidebar {
  width: var(--gtd-sidebar-width);
  min-width: var(--gtd-sidebar-width);
  background: #fff;
  border-right: 1px solid #e8ece9;
  padding: 1.5rem 1rem 2rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1050;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.gtd-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.5rem 1.5rem;
  border-bottom: 1px solid #eef1ef;
  margin-bottom: 1rem;
}

.gtd-sidebar__logo {
  flex-shrink: 0;
}

.gtd-sidebar__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gtd-blue-dark);
  line-height: 1.2;
}

.gtd-sidebar__tagline {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5c6b7a;
  margin-top: 2px;
}

.gtd-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gtd-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  color: #4a5568;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gtd-nav-item i:first-child {
  font-size: 1.15rem;
  width: 1.25rem;
  text-align: center;
}

.gtd-nav-item:hover {
  background: #f4f6f5;
  color: var(--gtd-green);
}

.gtd-nav-item--active {
  background: var(--gtd-green-pill);
  color: var(--gtd-green-pill-text);
  font-weight: 600;
}

.gtd-nav-chevron {
  margin-left: auto;
  font-size: 0.85rem;
  transition: transform 0.25s ease;
}

.gtd-nav-group--open .gtd-nav-chevron {
  transform: rotate(180deg);
}

.gtd-nav-submenu {
  display: none;
  flex-direction: column;
  padding-left: 0.5rem;
  margin: 0.25rem 0 0.5rem;
}

.gtd-nav-group--open .gtd-nav-submenu {
  display: flex;
}

.gtd-nav-subitem {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 1rem 0.45rem 2.5rem;
  font-size: 0.875rem;
  color: #64748b;
  text-decoration: none;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.gtd-nav-subitem:hover {
  color: var(--gtd-green);
  background: #f8faf9;
}

.gtd-nav-subitem i {
  font-size: 0.75rem;
}

/* Main content offset */
.gtd-main {
  margin-left: var(--gtd-sidebar-width);
  width: calc(100% - var(--gtd-sidebar-width));
}

/* Top bar */
.gtd-topbar {
  display: flex;
  align-items: center;
  min-height: var(--gtd-topbar-height);
  padding: 0.75rem 1.25rem;
  background: linear-gradient(90deg, var(--gtd-green-dark), var(--gtd-green));
  position: sticky;
  top: 0;
  z-index: 1030;
}

.gtd-topbar__menu {
  display: flex;
  align-items: center;
  border: none;
  line-height: 1;
  flex-shrink: 0;
}

.gtd-wrapper.sidebar-collapsed .gtd-sidebar {
  transform: translateX(-100%);
}

.gtd-wrapper.sidebar-collapsed .gtd-main {
  margin-left: 0;
  width: 100%;
}

.gtd-search__wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.gtd-search__input {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 3rem 0.75rem 1.25rem;
  font-size: 0.95rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.gtd-search__input:focus {
  box-shadow: 0 0 0 3px rgba(139, 195, 74, 0.35);
}

.gtd-search__btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--gtd-green);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.gtd-search__btn:hover {
  background: var(--gtd-green-mid);
}

.gtd-topbar__link {
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.gtd-btn-login {
  padding: 0.5rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
}

.gtd-btn-login:hover {
  background: #fff;
  color: var(--gtd-green) !important;
}

/* Hero */
.gtd-hero {
  background:
    linear-gradient(135deg, rgba(15, 61, 36, 0.92) 0%, rgba(26, 92, 52, 0.88) 50%, rgba(15, 61, 36, 0.9) 100%),
    url("../images/hero-stadium.jpg") center / cover no-repeat;
  color: #fff;
}

.gtd-hero__welcome {
  color: var(--gtd-green-light);
  font-size: 1.1rem;
  font-weight: 600;
}

.gtd-hero__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.gtd-hero__desc {
  font-size: 1.05rem;
  opacity: 0.95;
  max-width: 520px;
  line-height: 1.6;
}

.gtd-stat {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gtd-stat__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.gtd-stat strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

.gtd-stat span {
  font-size: 0.8rem;
  opacity: 0.9;
  line-height: 1.3;
}

.gtd-hero__crest {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.gtd-hero__org-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gtd-hero__location {
  font-size: 0.95rem;
  opacity: 0.95;
}

.gtd-hero__champ {
  font-size: 0.95rem;
  font-weight: 500;
}

.gtd-hero__sports {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.gtd-social__link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}

.gtd-social__link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: #fff;
}

/* Featured section */
.gtd-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gtd-green-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gtd-section-title i {
  color: var(--gtd-green-mid);
}

.gtd-link-all {
  color: var(--gtd-green);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.gtd-link-all:hover {
  color: var(--gtd-green-dark);
  text-decoration: underline;
}

/* Tournament grid */
.gtd-tournaments-grid > [class*="col-"] {
  display: flex;
}

/* Tournament cards */
.gtd-tournament-card {
  width: 100%;
  background: #fff;
  border-radius: var(--gtd-radius-lg);
  overflow: hidden;
  box-shadow: var(--gtd-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gtd-tournament-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.gtd-tournament-card__img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.gtd-tournament-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gtd-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
}

.gtd-badge--active {
  background: var(--gtd-green-mid);
}

.gtd-badge--upcoming {
  background: var(--gtd-purple);
}

.gtd-tournament-card__sport-icon {
  position: absolute;
  bottom: -12px;
  left: 16px;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

.gtd-tournament-card__body {
  padding: 1.25rem 1rem 1rem;
  padding-top: 1.5rem;
}

.gtd-tournament-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.15rem;
}

.gtd-tournament-card__year {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
}

.gtd-tournament-card__meta li {
  font-size: 0.8rem;
  color: #4b5563;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.gtd-tournament-card__meta i {
  color: #9ca3af;
}

.gtd-tournament-card--soccer .gtd-tournament-card__btn {
  background: var(--gtd-green);
  border-color: var(--gtd-green);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

.gtd-tournament-card--soccer .gtd-tournament-card__btn:hover {
  background: var(--gtd-green-dark);
  border-color: var(--gtd-green-dark);
  color: #fff;
}

.gtd-tournament-card--volley .gtd-tournament-card__btn {
  background: var(--gtd-purple);
  border-color: var(--gtd-purple);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
}

.gtd-tournament-card--volley .gtd-tournament-card__btn:hover {
  background: #6a1b9a;
  border-color: #6a1b9a;
  color: #fff;
}

/* Responsive */
@media (max-width: 991.98px) {
  .gtd-sidebar {
    transform: translateX(-100%);
  }

  .gtd-sidebar.is-open {
    transform: translateX(0);
  }

  .gtd-main {
    margin-left: 0;
    width: 100%;
  }

  .gtd-topbar__menu {
    display: block;
  }

}

@media (max-width: 575.98px) {
  .gtd-topbar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .gtd-search {
    order: 3;
    width: 100%;
    margin: 0 !important;
  }

  .gtd-search__wrap {
    max-width: none;
  }

  .gtd-hero__stats .col-sm-4 {
    margin-bottom: 0.5rem;
  }
}
