/* ===========================================
   APTOS LACROSSE v9 - HOMEPAGE STYLES
   Imports base and design system, adds homepage-specific styles
   =========================================== */

@import url('base.css?v=13');
@import url('design-system.css?v=13');

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===========================================
   HERO SECTION - Split panels
   =========================================== */

.hero-wrapper {
  position: relative;
  margin-bottom: var(--section-gap);
}

.hero {
  display: flex;
  gap: 2px;
  width: 100%;
  margin-top: 0;
}

.hero-panel {
  flex: 1;
  height: 800px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 24px);
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* Hero hover effect - image glides on y axis */
.hero-panel:hover .hero-image {
  transform: translateY(-24px);
}

/* Trigger hero animation when hovering article cards */
.hero-wrapper:has(.article-card:not(.article-card--right):hover) .hero-panel--boys .hero-image {
  transform: translateY(-24px);
}

.hero-wrapper:has(.article-card--right:hover) .hero-panel--girls .hero-image {
  transform: translateY(-24px);
}

/* Hero panel text overlay for hover effect */
.hero-panel-text {
  position: absolute;
  bottom: 40px;
  left: 40px;
  right: 40px;
  z-index: 5;
  transition: transform var(--transition-slow);
  pointer-events: none;
}

.hero-panel:hover .hero-panel-text {
  transform: translateY(-8px);
}

/* Trigger panel text animation when hovering article cards */
.hero-wrapper:has(.article-card:not(.article-card--right):hover) .hero-panel--boys .hero-panel-text {
  transform: translateY(-8px);
}

.hero-wrapper:has(.article-card--right:hover) .hero-panel--girls .hero-panel-text {
  transform: translateY(-8px);
}

/* Gradient overlays */
.hero-panel::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 574px;
  background: linear-gradient(to top, var(--color-blue-gradient), transparent);
  opacity: 0.9;
  z-index: 1;
}

.hero-panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 358px;
  background: linear-gradient(to bottom, var(--color-white) 24%, transparent);
  z-index: 2;
}

/* ===========================================
   LATEST ARTICLES (OVER HERO)
   =========================================== */

.latest-articles {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--max-width-wide);
  max-width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 40px;
  z-index: 10;
  padding: 0 var(--container-padding);
}

/* ===========================================
   NEXT GAMES SECTION
   =========================================== */

.next-games {
  display: flex;
  gap: 40px;
  align-items: stretch;
  width: var(--max-width-wide);
  max-width: 100%;
  margin: -90px auto 0;  /* -60px cancels section-gap, additional -30px creates overlap */
  padding: 0 var(--container-padding);
  position: relative;
  z-index: 10;
}

.divider {
  width: 1px;
  height: 100px;
  background: var(--color-gray-light);
  flex-shrink: 0;
}

/* ===========================================
   STATS SECTION
   =========================================== */

.stats {
  width: 100%;
  max-width: var(--content-width);
  height: auto;
  margin: var(--section-gap) auto;
  padding: 32px 40px 40px;
  background: var(--color-navy);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xl);
  align-items: center;
  justify-content: center;
}

.stats-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.stats-content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
}

.stats-title {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-white-60);
  text-align: center;
}

.stats-breakdown {
  width: 100%;
  background: var(--color-gray-background);
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm) var(--space-md);
  margin: 0 -40px -40px;
  width: calc(100% + 80px);
}

.stats-breakdown-item {
  font-family: var(--font-label);
  font-size: 14px;
  color: var(--color-navy);
  text-align: center;
}

.stats-breakdown-item strong {
  font-weight: var(--weight-medium);
}

.stats-breakdown-divider {
  color: var(--color-gray-light);
}

/* Hide divider when items wrap to two rows */
@media (max-width: 768px) {
  .stats-breakdown {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .stats-breakdown-divider {
    display: none;
  }
}

/* ===========================================
   PAST SEASONS CTA
   =========================================== */

.past-seasons {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  max-width: var(--content-width);
  height: 432px;
  margin: var(--section-gap) auto 0;
  background: var(--color-navy);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-normal);
}

.past-seasons-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 24px);
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.past-seasons:hover .past-seasons-image {
  transform: scale(1.02) translateY(-12px);
}

.past-seasons::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to top, var(--color-blue-gradient), transparent);
  opacity: 0.9;
  z-index: 1;
}

.past-seasons-content {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  text-align: center;
}

.past-seasons-title,
.past-seasons-description {
  transition: transform var(--transition-slow);
}

.past-seasons:hover .past-seasons-title,
.past-seasons:hover .past-seasons-description {
  transform: translateY(-8px);
}

.past-seasons .btn {
  position: relative;
  z-index: 3;
}

.past-seasons-title {
  color: var(--color-white);
  white-space: nowrap;
}

.past-seasons-description {
  font-size: var(--text-p1);
  color: var(--color-white-66);
  letter-spacing: var(--tracking-normal);
}

.past-seasons-badge {
  display: inline-block;
  background: #c9a227;
  color: var(--color-navy);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 2px;
  margin-top: var(--space-md);
  align-self: flex-start;
}

/* ===========================================
   RECENT ARTICLES SECTION
   =========================================== */

.recent-articles {
  margin: var(--section-gap) 0 0;
  padding: var(--section-gap) var(--container-padding) var(--space-6xl);
  background: var(--color-gray-background);
}

.recent-articles-inner {
  display: flex;
  gap: 81px;
  width: var(--max-width-wide);
  max-width: 100%;
  margin: 0 auto;
}

.recent-articles-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recent-articles-header {
  color: var(--color-navy);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-black);
}

/* See All Articles button */
.btn-see-all {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: var(--space-lg);
  padding: 14px 24px;
  background: var(--color-navy);
  color: var(--color-white);
}

/* ===========================================
   ALL SEASONS LINK GRID
   =========================================== */

.all-seasons {
  width: 100%;
  max-width: var(--content-width);
  margin: var(--section-gap) auto 0;
  padding: 0 var(--container-padding) var(--space-6xl);
}

.all-seasons-header {
  color: var(--color-navy);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.all-seasons-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.all-seasons-group h3 {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--color-gray-medium);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-gray-light);
}

.all-seasons-links {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.all-seasons-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  text-decoration: none;
  background: var(--color-gray-background);
  border-radius: 3px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.all-seasons-links a:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

.all-seasons-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-gray-light);
}

.all-seasons-archive {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--color-navy);
  text-decoration: none;
  padding: 8px 16px;
  background: var(--color-gray-background);
  border-radius: 3px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.all-seasons-archive:hover {
  background: var(--color-navy);
  color: var(--color-white);
}

/* ===========================================
   RESPONSIVE STYLES
   =========================================== */

/* Desktop at 1440px and below */
@media (max-width: 1440px) {
  .navigation,
  .next-games,
  .latest-articles {
    width: 100%;
    max-width: 100%;
    padding: 0 var(--container-padding);
  }

  .latest-articles {
    width: calc(100% - 80px);
  }

  .article-card {
    width: auto;
    flex: 1;
    max-width: 50%;
  }
}

/* Scale thumbnails at 1300px */
@media (max-width: 1300px) {
  .article-thumbnail {
    width: 90px;
    height: 120px;
  }

  .next-game-content {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
  }

  .game-details {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    align-items: flex-start;
  }
}

/* Wrap thumbnails at 1200px */
@media (max-width: 1200px) {
  .article-card .article-content,
  .article-card--right .article-content {
    flex-direction: column !important;
    gap: var(--space-md);
  }

  .article-card .article-thumbnail,
  .article-card--right .article-thumbnail {
    width: 75px;
    height: 100px;
    order: -1;
  }

  .article-card .article-content {
    align-items: flex-start;
  }

  .article-card--right .article-content {
    align-items: flex-end;
  }

  .article-card--right .article-text {
    text-align: right;
  }

  .article-card {
    max-width: 45%;
  }

  .article-title {
    font-size: var(--text-h3);
  }

  .next-game {
    flex: 1;
    min-width: 280px;
  }

  .game-opponent {
    min-width: 180px;
  }
}

/* Mobile (960px) */
@media (max-width: 960px) {
  .header {
    padding-top: 32px;
    padding-bottom: 20px;
  }

  .logo {
    width: 160px;
    height: 84px;
  }

  .nav-titles {
    display: none;
  }

  .navigation {
    padding: 0 var(--container-padding-mobile);
  }

  .nav-links {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: nowrap;
  }

  .nav-team-select {
    display: block;
  }

  .nav-group {
    gap: var(--space-sm);
    flex-wrap: nowrap;
    justify-content: center;
  }

  .nav-link,
  .team-select {
    font-size: 11px;
    letter-spacing: 0.06em;
  }

  .nav-group:last-child {
    display: none;
  }

  .navigation {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    padding: var(--container-padding-mobile) var(--container-padding-mobile) 0 !important;
    margin: 0 auto var(--space-xl);
  }

  .hero-wrapper {
    position: relative;
    margin-bottom: var(--space-xl);
  }

  .hero {
    display: none;
  }

  .latest-articles {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    flex-direction: column;
    gap: 0;
    padding: 0;
    padding-bottom: var(--space-md);
    background: transparent;
    width: 100%;
  }

  .article-card,
  .article-card--right {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-lg) var(--container-padding-mobile);
    gap: var(--space-sm);
    background: var(--color-navy);
    width: 100%;
    max-width: 100%;
  }

  .article-card {
    background: linear-gradient(var(--color-navy-80), var(--color-navy-80)),
                url('../images/boys-team.jpg') center bottom / cover no-repeat;
  }

  .article-card--right {
    background: linear-gradient(var(--color-navy-80), var(--color-navy-80)),
                url('../images/girls-team.jpg') center bottom / cover no-repeat;
  }

  .article-card .article-content,
  .article-card--right .article-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: var(--space-md);
    flex: 1;
  }

  .article-card .article-thumbnail,
  .article-card--right .article-thumbnail {
    width: 64px;
    height: 84px;
    flex-shrink: 0;
    order: 1;
    margin: 0;
  }

  .article-card .article-text,
  .article-card--right .article-text {
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .article-card .btn,
  .article-card--right .btn {
    align-self: flex-start;
    margin: 0;
    font-size: 11px;
    padding: 8px 14px;
  }

  .article-card--right .article-text {
    text-align: left;
  }

  .article-title {
    font-size: 20px;
    line-height: 1;
  }

  .article-description {
    font-size: 13px;
    line-height: 1.4;
  }

  .next-games {
    flex-direction: column;
    padding: 0 var(--container-padding-mobile);
    margin-top: 0;  /* Reset negative margin from desktop */
    gap: var(--space-xl);
  }

  .next-game {
    width: 100%;
    max-width: 100%;
    padding: 20px;
  }

  .game-opponent {
    min-width: auto;
  }

  .next-game-content {
    grid-template-columns: 48px 1fr auto;
    grid-template-rows: auto;
    gap: 4px 10px;
  }

  .opponent-logo {
    grid-row: 1;
    width: 48px;
    height: 48px;
  }

  .opponent-name {
    font-size: 20px;
  }

  .opponent-venue {
    font-size: 13px;
  }

  .game-time {
    font-size: 18px;
  }

  .game-date {
    font-size: 12px;
  }

  .game-badge {
    font-size: 10px;
    padding: 3px 8px;
  }

  .game-date-row {
    gap: 6px;
  }

  .opponent-info {
    grid-column: 2;
    grid-row: 1;
  }

  .game-details {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-items: flex-end;
  }

  .divider {
    width: 100%;
    height: 1px;
  }

  .stats {
    width: 100%;
    height: auto;
    padding: var(--space-xl) var(--container-padding-mobile) 0;
    gap: var(--space-lg);
  }

  .stats-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 1px;
    width: 100%;
  }

  .stat-item {
    padding: var(--space-sm) var(--space-md);
  }

  .stat-item:last-child {
    grid-column: span 2;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .stat-value {
    font-size: 28px;
  }

  .stat-label {
    font-size: 10px;
    margin-top: 6px;
  }

  .stats-breakdown {
    margin: 0 -20px;
    width: calc(100% + 40px);
    padding: 14px 16px;
  }

  .stats-breakdown-item {
    font-size: 12px;
  }

  .past-seasons {
    width: 100%;
    height: 360px;
  }

  .past-seasons-title {
    font-size: 28px;
    white-space: normal;
  }

  .past-seasons-description {
    font-size: 14px;
  }

  .past-seasons-content {
    bottom: 24px;
    left: 24px;
    right: 24px;
  }

  .past-seasons .btn {
    font-size: 12px;
    padding: 10px 18px;
  }

  .past-seasons-badge {
    display: block;
    background: none;
    color: rgba(255,255,255,0.66);
    text-align: center;
    margin-top: var(--space-sm);
    padding: 0;
    font-size: 10px;
  }

  .recent-articles {
    padding: var(--section-gap) var(--container-padding-mobile) var(--space-6xl);
  }

  .recent-articles-inner {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3xl);
  }

  .recent-articles-column {
    width: 100%;
    max-width: 640px;
  }

  .all-seasons {
    padding: 0 var(--container-padding-mobile) var(--space-4xl);
  }

  .all-seasons-links {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer {
    padding: var(--space-2xl) 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: 0 var(--container-padding-mobile);
  }

  .footer-logo {
    height: 72px;
  }

  .footer-links {
    justify-content: flex-start;
    gap: var(--space-md) var(--space-xl);
  }

  .footer-credit {
    margin-top: var(--space-xl);
    padding-top: var(--space-md);
  }

  .footer-seasons {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm) var(--space-lg);
  }
}
/* Footer styles are in design-system.css */