/* Handball Team Design System - Athletic & Dynamic */

:root {
  /* Colors */
  --background: #ffffff;
  --foreground: #212529;
  /* Dark gray for text */

  --primary: #0066cc;
  /* Montbui Blue */
  --primary-foreground: #ffffff;

  --secondary: #ff3399;
  /* Montbui Pink */
  --secondary-foreground: #ffffff;

  --muted: #f8f9fa;
  --muted-foreground: #6c757d;

  --border: #e9ecef;

  /* Gradients */
  --hero-gradient: linear-gradient(135deg, hsl(210, 100%, 50%), hsl(330, 100%, 60%));
  --card-gradient: linear-gradient(145deg, #ffffff, #f8f9fa);
  --accent-gradient: linear-gradient(135deg, hsl(330, 100%, 60%), hsl(55, 100%, 60%));

  /* Shadows */
  --shadow-elegant: 0 4px 20px -2px rgba(33, 37, 41, 0.1);

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --container-padding: 2rem;
  --header-height: 5rem;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.hidden {
  display: none;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.text-center {
  text-align: center;
}

.text-gradient {
  background: linear-gradient(to right, hsl(210, 100%, 50%), hsl(330, 100%, 60%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  /* Fallback */
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, 1fr);
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}



/* Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1.1rem;
  min-width: 200px;
}

.btn-hero {
  background: var(--hero-gradient);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(0, 118, 255, 0.39);
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 118, 255, 0.23);
}

.btn-sport {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(255, 165, 0, 0.39);
}

.btn-sport:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 165, 0, 0.23);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  height: var(--header-height);
}

.nav-link {
  font-weight: 500;
  transition: color 0.2s;
  font-size: 1rem;
}

.nav-link:hover {
  color: var(--primary);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  padding-top: var(--header-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-gradient);
  opacity: 0.85;
  z-index: -1;
}

.text-gradient {
  background: linear-gradient(to right, hsl(210, 100%, 50%), hsl(330, 100%, 60%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  /* Fallback */
}

/* ... */

.hero-title {
  font-size: 5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  opacity: 0.9;
  font-weight: 500;
}

/* Cards */
.card {
  background: var(--card-gradient);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-elegant);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Decorative Elements */
/* Decorative Elements */
.decorative-circle {
  position: absolute;
  border-radius: 50%;
  z-index: 2;
  opacity: 0.4;
  pointer-events: none;
}

.circle-top-left {
  width: 60px;
  height: 60px;
  top: -15px;
  left: -15px;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
}

.circle-bottom-right {
  width: 90px;
  height: 90px;
  bottom: -22px;
  right: -22px;
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

/* Sections */
section {
  padding: 6rem 0;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--muted-foreground);
  font-size: 1.25rem;
  margin-bottom: 3rem;
}

/* Footer */
footer {
  background: var(--foreground);
  color: var(--background);
  padding: 4rem 0 2rem;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s;
}

.footer-link:hover {
  color: white;
}

/* Mobile Menu */
.mobile-menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  flex-direction: column;
  gap: 1rem;
}

.mobile-menu.open {
  display: flex;
}

/* Responsive Utilities - Placed at the end for correct cascade specificity */
@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:hidden {
    display: none;
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .md\:text-xl {
    font-size: 1.25rem;
  }

  .md\:text-2xl {
    font-size: 1.5rem;
  }

  .md\:text-3xl {
    font-size: 2rem;
  }

  .md\:text-5xl {
    font-size: 3rem;
  }

  .md\:text-7xl {
    font-size: 5.5rem;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Social Hub Section */
.social-hub-section {
  background: linear-gradient(to bottom, #ffffff, #f8f9fa);
  overflow: hidden;
}

.btn-text {
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.2s;
}

.btn-text:hover {
  gap: 0.75rem;
  text-decoration: underline;
}

/* Reels Scroller */
.reels-scroller {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reels-scroller::-webkit-scrollbar {
  display: none;
}

.reel-card {
  flex: 0 0 280px;
  /* Fixed width for reels */
  aspect-ratio: 9/16;
  border-radius: 1rem;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-elegant);
}

.reel-card:hover {
  transform: translateY(-5px);
}

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: white;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.reel-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
}

.reel-card:hover .reel-play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* YouTube Grid */
.youtube-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .youtube-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

.youtube-main {
  aspect-ratio: 16/9;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-elegant);
  position: relative;
}

.youtube-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.youtube-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.youtube-list-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: white;
  transition: background 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.youtube-list-item:hover {
  background: var(--muted);
}

.youtube-thumb-small {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 0.5rem;
  object-fit: cover;
}

.youtube-info-small h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.youtube-meta {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

/* Skeletons */
.reel-skeleton {
  flex: 0 0 280px;
  aspect-ratio: 9/16;
  border-radius: 1rem;
  background: #eee;
  animation: pulse 1.5s infinite;
}

.skeleton-video {
  width: 100%;
  height: 100%;
  background: #eee;
  animation: pulse 1.5s infinite;
}

.skeleton-item {
  height: 80px;
  background: #eee;
  border-radius: 0.75rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 0.8;
  }

  100% {
    opacity: 0.6;
  }
}

/* Lightbox */
.zoomable-image {
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.zoomable-image:hover {
  transform: scale(1.02);
}

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
  backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  border-radius: 8px;
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  z-index: 2001;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}