/* home.css — homepage specific styles */
.hero-section {
  padding: var(--space-12) 0 var(--space-7) 0;
  text-align: center;
  background: linear-gradient(90deg, #f6f7fb 35%, #e9effc 100%);
}
.hero-content {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}
.hero-title {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-1);
  color: var(--color-primary);
}
.hero-subtitle {
  font-size: var(--font-size-4);
  color: var(--color-neutral-700);
  margin-bottom: var(--space-6);
}

.search-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  max-width: 420px;
  margin: 0 auto;
  border: 1px solid var(--color-neutral-300);
}
.search-bar input[type='search'] {
  padding: var(--space-4) var(--space-5);
  border: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  font-size: var(--font-size-4);
  line-height: 1.5;
  width: 100%;
  background: none;
  outline: none;
}
.search-bar button {
  padding: var(--space-4) var(--space-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-primary);
  border: none;
  color: #fff;
  font-size: 1.25rem;
  transition: background var(--transition-base);
  cursor: pointer;
}
.search-bar button:focus-visible {
  outline: var(--focus-outline);
}

.quick-sections {
  margin-top: var(--space-9);
  margin-bottom: var(--space-8);
}
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-5);
  justify-items: center;
}
.section-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-4);
  background: #fff;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  transition: box-shadow var(--transition-fast), color var(--transition-fast), background var(--transition-base);
}
.section-link:hover,
.section-link:focus-visible {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.section-icon {
  font-size: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-features {
  margin-bottom: var(--space-10);
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-7);
}
.card.feature {
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
  border-left: 8px solid var(--color-primary);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}
.card.feature:hover,
.card.feature:focus-within {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-lg);
}
.feature-title {
  margin-bottom: var(--space-3);
  color: var(--color-primary);
}

/* Newsletter Form */
.newsletter-form label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.newsletter-input-group {
  display: flex;
  gap: var(--space-3);
}
.newsletter-input-group input[type='email'] {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-sm);
  margin-bottom: 0;
}
.newsletter-input-group .button {
  flex-shrink: 0;
  padding-left: var(--space-5);
  padding-right: var(--space-5);
}

/* Header & Responsive Nav */
.main-header {
  background: var(--color-surface);
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--space-2) 0;
}
.header-inner {
  justify-content: space-between;
  align-items: center;
  min-height: 56px;
}
.site-title {
  font-size: 1.55rem;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -1px;
}
.site-title:focus-visible {
  outline: var(--focus-outline);
}
.site-nav {
  position: relative;
}
.nav-toggle {
  background: none;
  border: none;
  display: none;
  cursor: pointer;
  padding: var(--space-2);
  margin-left: var(--space-2);
}
.nav-toggle-icon {
  width: 28px;
  height: 3px;
  display: block;
  background: var(--color-primary);
  position: relative;
}
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  display: block;
  position: absolute;
  width: 28px;
  height: 3px;
  background: var(--color-primary);
  left: 0;
}
.nav-toggle-icon::before { top: -9px; }
.nav-toggle-icon::after { top: 9px; }
.nav-list {
  display: flex;
  gap: var(--space-5);
}
.nav-list li a {
  font-weight: 600;
  font-size: var(--font-size-5);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.nav-list li a:hover,
.nav-list li a:focus-visible {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
  outline: var(--focus-outline);
}

@media (max-width: 900px) {
  .nav-list {
    gap: var(--space-3);
  }
  .main-features {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .main-header {
    padding: var(--space-1) 0;
  }
  .nav-toggle {
    display: block;
  }
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    flex-direction: column;
    min-width: 170px;
    padding: var(--space-3) 0;
    z-index: 20;
  }
  .nav-list.open {
    display: flex;
  }
  .nav-list li a {
    font-size: 1rem;
    padding: var(--space-3) var(--space-5);
    width: 100%;
  }
  .header-inner {
    min-height: 48px;
  }
}

/* Footer */
.site-footer {
  background: var(--color-neutral-100);
  color: var(--color-neutral-700);
  margin-top: var(--space-8);
  padding: var(--space-8) 0 var(--space-5) 0;
  font-size: var(--font-size-6);
  box-shadow: var(--shadow-xs) inset 0 1px 0 0;
  position: relative;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-9);
  flex-wrap: wrap;
}
.footer-about {
  max-width: 220px;
}
.footer-site-title {
  font-size: var(--font-size-3);
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: var(--space-1);
  display: inline-block;
}
.footer-description {
  margin-bottom: 0;
}
.footer-nav ul,
.footer-legal ul {
  list-style: none;
  padding: 0;
}
.footer-nav ul li,
.footer-legal ul li {
  margin-bottom: var(--space-2);
}
.footer-nav a, .footer-legal a {
  color: var(--color-neutral-700);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-nav a:hover, .footer-legal a:hover,
.footer-nav a:focus-visible, .footer-legal a:focus-visible {
  color: var(--color-primary);
  text-decoration: underline;
  outline: var(--focus-outline);
}
.footer-bottom {
  text-align: center;
  margin-top: var(--space-5);
  color: var(--color-neutral-500);
}

.cookie-consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.98);
  box-shadow: 0 -1px 10px rgba(44,45,66,0.05);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  gap: var(--space-5);
  font-size: var(--font-size-5);
  transition: transform .3s ease, opacity .3s ease;
}
.cookie-consent[hidden],
.cookie-consent.inactive {
  display: none;
  pointer-events: none;
}
.cookie-message {
  max-width: 420px;
  margin-right: var(--space-5);
  color: var(--color-neutral-700);
}
.cookie-actions {
  display: flex;
  gap: var(--space-3);
}
.button.button-outline {
  background: #fff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.button.button-outline:hover,
.button.button-outline:focus-visible {
  background: var(--color-primary-hover);
  color: #fff;
}

/* Homepage New Sections Styles */

/* Game of the Week Styles */
.game-of-week {
  position: relative;
  overflow: hidden;
}

.game-of-week::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(46, 74, 58, 0.1), rgba(232, 162, 92, 0.1));
  pointer-events: none;
}

.game-card-interactive {
  transition: all 0.3s ease;
}

.game-randomizer:hover {
  background: #d4944a !important;
  transform: translateY(-2px);
}

/* Statistics Section */
.stats-showcase {
  position: relative;
}

.stats-grid {
  animation: fadeInUp 0.6s ease-out;
}

.stat-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(232, 162, 92, 0.2), transparent);
  transition: left 0.5s ease;
}

.stat-card:hover::before {
  left: 100%;
}

.stat-number {
  transition: color 0.3s ease;
}

.stat-card:hover .stat-number {
  color: #E8A25C !important;
}

/* News Carousel */
.carousel-container {
  position: relative;
}

.carousel-track {
  transition: transform 0.5s ease;
}

.news-item {
  transition: opacity 0.3s ease;
}

.news-item:not(.active) {
  opacity: 0.7;
}

.carousel-prev,
.carousel-next {
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.carousel-prev:hover,
.carousel-next:hover {
  background: rgba(232, 162, 92, 1) !important;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Community Highlights */
.community-highlights {
  position: relative;
}

.community-grid {
  animation: slideInUp 0.8s ease-out;
}

.community-card {
  transition: all 0.3s ease;
  position: relative;
}

.community-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.activity-stats span {
  font-weight: 700;
  color: #E8A25C !important;
  transition: all 0.3s ease;
}

.activity-stats p:hover span {
  transform: scale(1.1);
  display: inline-block;
}

/* Game Finder */
.game-finder-widget {
  transition: all 0.3s ease;
}

.game-finder-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(46, 74, 58, 0.15);
}

.form-group label {
  transition: color 0.3s ease;
}

.form-group:hover label {
  color: #E8A25C !important;
}

.complexity-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E8A25C;
  cursor: pointer;
  border: 2px solid #2D4A3A;
  transition: all 0.3s ease;
}

.complexity-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(232, 162, 92, 0.5);
}

.finder-search:hover {
  background: #1a2e22 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 74, 58, 0.3);
}

.finder-result {
  animation: slideInDown 0.5s ease-out;
}

/* Events Calendar */
.events-grid {
  animation: fadeIn 0.8s ease-out;
}

.event-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(232, 162, 92, 0.05), rgba(46, 74, 58, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.event-card:hover::before {
  opacity: 1;
}

.event-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.event-card.upcoming {
  animation: pulse 2s infinite;
}

.event-join {
  transition: all 0.3s ease;
}

.event-join:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 10px rgba(46, 74, 58, 0.3);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 162, 92, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(232, 162, 92, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(232, 162, 92, 0);
  }
}

/* Responsive Design for New Sections */
@media (max-width: 768px) {
  .stats-grid,
  .community-grid,
  .events-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .carousel-prev,
  .carousel-next {
    display: none;
  }
  
  .game-finder-widget {
    margin: 0 var(--space-3);
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .game-of-week,
  .stats-showcase,
  .news-carousel,
  .community-highlights,
  .game-finder,
  .events-calendar {
    margin-left: var(--space-3);
    margin-right: var(--space-3);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  .game-stats {
    flex-direction: column;
    gap: var(--space-2) !important;
  }
  
  .stat {
    text-align: center;
  }
}
@media (max-width: 700px) {
  .cookie-consent {
    flex-direction: column;
    gap: var(--space-4);
    font-size: var(--font-size-6);
    padding: var(--space-4) var(--space-3);
    text-align: center;
  }
  .cookie-message {
    margin-right: 0;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-7);
  }
}

/* Accessibility extra - focus state on cards */
.card:focus-within {
  outline: var(--focus-outline);
  outline-offset: 2px;
}
