/* =========================================================
   CLUB SUD AMÉRICA — DESIGN FOUNDATION
   ========================================================= */

:root{

  /* =====================================================
     COLORS
     ===================================================== */

  --color-primary: #0b3d2e;
  --color-primary-hover: #11523e;
  --color-primary-dark: #082d22;

  --color-accent: #1fbf84;

  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-surface-alt: #f8faf9;

  --color-border: rgba(0,0,0,0.08);

  --color-text: #122117;
  --color-text-soft: rgba(0,0,0,0.72);
  --color-text-muted: rgba(0,0,0,0.54);

  --color-success: #27ae60;
  --color-danger: #d64545;
  --color-warning: #f2b94b;

  /* =====================================================
     TYPOGRAPHY
     ===================================================== */

  --font-sans:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Arial,
    sans-serif;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-md: 15px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;

  /* =====================================================
     SPACING
     ===================================================== */

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 40px;

  /* =====================================================
     RADIUS
     ===================================================== */

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  /* =====================================================
     SHADOWS
     ===================================================== */

  --shadow-sm:
    0 1px 2px rgba(0,0,0,0.04);

  --shadow-md:
    0 8px 24px rgba(0,0,0,0.08);

  --shadow-lg:
    0 20px 40px rgba(0,0,0,0.12);

  /* =====================================================
     LAYOUT
     ===================================================== */

  --container-width: 1280px;

  --sidebar-width: 280px;
  --sidebar-collapsed-width: 76px;

  --header-height: 78px;

  /* =====================================================
     TRANSITIONS
     ===================================================== */

  --transition-fast: 140ms ease;
  --transition-base: 180ms ease;
  --transition-slow: 260ms ease;
}

/* =========================================================
   RESET / BASE
   ========================================================= */

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

html{
  scroll-behavior: smooth;
}

html,
body{
  margin: 0;
  padding: 0;

  width: 100%;
  min-height: 100%;

  font-family: var(--font-sans);

  background: var(--color-bg);
  color: var(--color-text);

  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */

h1,h2,h3,h4,h5,h6{
  margin-top: 0;
  letter-spacing: -0.02em;
}

p{
  margin-top: 0;
}

/* =========================================================
   MEDIA
   ========================================================= */

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

/* =========================================================
   LINKS
   ========================================================= */

a{
  color: inherit;
}

/* =========================================================
   SELECTION
   ========================================================= */

::selection{
  background: rgba(31,191,132,0.25);
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar{
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track{
  background: rgba(0,0,0,0.04);
}

::-webkit-scrollbar-thumb{
  background: rgba(11,61,46,0.35);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover{
  background: rgba(11,61,46,0.5);
}

/* =========================
   Site Footer
   ========================= */

.siteFooter {
  margin-top: 72px;
  background:
    radial-gradient(circle at top left, rgba(31,191,132,.12), transparent 34%),
    linear-gradient(180deg, #0b3d2e 0%, #06281e 100%);

  color: #ffffff;
  border-top: 1px solid rgba(255,255,255,.08);
}

.siteFooter__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(3, minmax(160px, 1fr));
  gap: 34px;

  padding: 46px 42px;
}

.siteFooter__brand {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.siteFooter__logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;

  display: grid;
  place-items: center;

  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
  flex: 0 0 auto;
}

.siteFooter__logo img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.siteFooter__brand h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.siteFooter__brand p {
  max-width: 440px;
  margin: 10px 0 0;

  color: rgba(255,255,255,.68);
  font-size: 14px;
  line-height: 1.55;
}

.siteFooter__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.siteFooter__col h3 {
  margin: 0 0 8px;

  color: rgba(255,255,255,.96);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.siteFooter__col a,
.siteFooter__col p {
  margin: 0;

  color: rgba(255,255,255,.66);
  font-size: 14px;
  text-decoration: none;
}

.siteFooter__col a {
  transition: color .18s ease, transform .18s ease;
}

.siteFooter__col a:hover {
  color: #ffffff;
  transform: translateX(3px);
}

.siteFooter__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;

  padding: 16px 42px;

  border-top: 1px solid rgba(255,255,255,.08);

  color: rgba(255,255,255,.54);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .siteFooter__inner {
    grid-template-columns: 1fr 1fr;
  }

  .siteFooter__brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .siteFooter__inner {
    grid-template-columns: 1fr;
    padding: 34px 22px;
  }

  .siteFooter__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 22px;
  }
}

/* =========================================
   FOOTER MOBILE PREMIUM
========================================= */

@media (max-width: 768px) {

  .siteFooter {
    margin-top: 54px;

    border-top:
      1px solid rgba(255,255,255,.06);
  }

  .siteFooter__inner {
    display: flex;
    flex-direction: column;

    gap: 28px;

    padding: 34px 20px 26px;
  }

  .siteFooter__brand {
    flex-direction: column;
    align-items: flex-start;

    gap: 14px;
  }

  .siteFooter__logo {
    width: 54px;
    height: 54px;

    border-radius: 18px;
  }

  .siteFooter__brand h2 {
    font-size: 28px;
    line-height: .95;
  }

  .siteFooter__brand p {
    max-width: 100%;

    font-size: 14px;
    line-height: 1.55;
  }

  .siteFooter__col {
    gap: 10px;
  }

  .siteFooter__col h3 {
    margin-bottom: 4px;

    font-size: 11px;
    letter-spacing: .12em;
  }

  .siteFooter__col a,
  .siteFooter__col p {
    font-size: 14px;
  }

  .siteFooter__bottom {
    flex-direction: column;
    align-items: flex-start;

    gap: 6px;

    padding: 16px 20px 22px;

    font-size: 11px;
  }
}

/* =========================================
   RESPONSIVE FOUNDATION
========================================= */

:root {
  --page-gutter: clamp(14px, 3vw, 32px);
  --section-gap: clamp(34px, 6vw, 72px);

  --fluid-title-xl: clamp(32px, 7vw, 56px);
  --fluid-title-lg: clamp(28px, 5vw, 42px);
  --fluid-title-md: clamp(22px, 4vw, 32px);

  --touch-size: 44px;
}

/* Mejor experiencia táctil */
button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* Evita scroll horizontal accidental */
html,
body {
  overflow-x: hidden;
}

/* Scroll horizontal más app-like */
.quickAccess__grid,
.sportsWidgets,
.newsSideList {
  scrollbar-width: none;
}

.quickAccess__grid::-webkit-scrollbar,
.sportsWidgets::-webkit-scrollbar,
.newsSideList::-webkit-scrollbar {
  display: none;
}

/* Reduce animaciones pesadas en mobile/touch */
@media (hover: none) {
  .homeHero:hover,
  .quickAccessCard:hover,
  .sportsWidget:hover,
  .matchPreview:hover,
  .newsFeature:hover,
  .newsCompact:hover,
  .institutionalPanel:hover,
  .siteFooter__col a:hover {
    transform: none !important;
  }
}

/* Accesibilidad motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================
   MOBILE VISUAL PERFORMANCE
========================================= */

@media (max-width: 768px) {

  .homeHero:hover,
  .quickAccessCard:hover,
  .sportsWidget:hover,
  .matchPreview:hover,
  .newsFeature:hover,
  .newsCompact:hover,
  .institutionalPanel:hover,
  .siteFooter__col a:hover {
    transform: none;
  }

  .newsFeature__media img,
  .newsCompact__media img {
    transition-duration: .35s;
  }
}

@media (prefers-reduced-motion: reduce) {

  .quickAccess__grid,
  .sportsWidgets,
  .newsSideList {
    scroll-behavior: auto;
  }
}