/* ==========================================================================
   LA PRIMERA FEDERACIÓN - Main Stylesheet
   ========================================================================== */

/* CSS Custom Properties (Variables)
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #1a1a2e;
  --color-secondary: #e94560;
  --color-accent: #0f3460;
  --color-background: #f5f5f5;
  --color-surface: #ffffff;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-text-light: #999999;
  --color-border: #e0e0e0;

  /* Social Media Colors */
  --color-x: #000000;
  --color-instagram: #E4405F;
  --color-tiktok-primary: #000000;
  --color-tiktok-accent: #69C9D0;
  --color-tiktok-secondary: #EE1D52;
  --color-youtube: #FF0000;

  /* Typography */
  --font-heading: 'Roboto Condensed', 'Arial Narrow', sans-serif;
  --font-body: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;

  /* Font Sizes - Modular Scale (1.25) */
  --fs-xs: 0.64rem;
  --fs-sm: 0.8rem;
  --fs-base: 1rem;
  --fs-md: 1.25rem;
  --fs-lg: 1.563rem;
  --fs-xl: 1.953rem;
  --fs-2xl: 2.441rem;
  --fs-3xl: 3.052rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Layout */
  --max-width: 1400px;
  --header-height: 70px;
  --header-height-scrolled: 56px;
  --sidebar-width: 320px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-base); }

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

a:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

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

ul, ol {
  list-style: none;
}

/* Utility Classes
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-md);
  }
}

.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;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  z-index: 1000;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Layout Grid
   ========================================================================== */
.main-content {
  flex: 1;
  /* padding-top is handled by team-slider.css to account for header + red stripe + slider */
}

.layout-with-sidebar {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

@media (min-width: 992px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr var(--sidebar-width);
  }
}

/* Section Styles
   ========================================================================== */
.section {
  padding: var(--space-lg) 0;
}

.section-title {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 3px solid var(--color-secondary);
  display: inline-block;
}

/* Button Styles
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-primary:hover {
  background-color: #d13350;
  color: white;
}

.btn-secondary {
  background-color: var(--color-accent);
  color: white;
}

.btn-secondary:hover {
  background-color: #0a2540;
  color: white;
}

/* Category Tags
   ========================================================================== */
.category-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--color-secondary);
  color: white;
  border-radius: var(--radius-sm);
}

.category-tag--liga { background-color: var(--color-accent); }
.category-tag--grupo-a { background-color: #2e7d32; }
.category-tag--grupo-b { background-color: #1565c0; }
.category-tag--editorial { background-color: #6a1b9a; }
.category-tag--noticias { background-color: var(--color-secondary); }

/* Breadcrumbs
   ========================================================================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) 0;
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item::after {
  content: '›';
  margin-left: var(--space-xs);
  color: var(--color-text-light);
}

.breadcrumb-item:last-child::after {
  display: none;
}

.breadcrumb-item a {
  color: var(--color-text-muted);
}

.breadcrumb-item a:hover {
  color: var(--color-secondary);
}

/* Meta Information
   ========================================================================== */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-separator {
  color: var(--color-text-light);
}

/* Ad Containers
   ========================================================================== */
.ad-container {
  background-color: var(--color-surface);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: var(--space-md) 0;
}

.ad-container--leaderboard {
  max-width: 728px;
  margin-left: auto;
  margin-right: auto;
}

.ad-container--mpu {
  width: 300px;
  min-height: 250px;
}

.ad-placeholder {
  color: var(--color-text-light);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Responsive Images with Aspect Ratio
   ========================================================================== */
.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Focus Visible for Accessibility
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Print Styles
   ========================================================================== */
@media print {
  .header,
  .footer,
  .ad-container,
  .share-buttons,
  .sidebar {
    display: none !important;
  }

  .main-content {
    padding-top: 0;
  }

  body {
    background: white;
    color: black;
  }
}
