/* Reset básico */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* Body con scroll principal */
body {
  overflow-y: auto;
  background-color: #f5f7fa;
  /* El padding-top lo controla header.css mediante --header-height */
  margin: 0 !important;
}

/* Header fijo */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #1a365d;
  z-index: 1000;
  border-bottom: none !important;
}

/* Contenedor principal con el menú lateral - Estructura exactamente igual que en partido.html */
#club-layout {
  display: flex;
  flex-direction: row !important;
  min-height: calc(100vh - 60px);
  width: 100%;
}

/* Menú lateral sin scroll propio */
#sidebar-container {
  width: 230px;
  background: #1a365d;
  color: white;
  padding: 0;
  flex-shrink: 0;
  /* Propiedades definitivas para eliminar scroll independiente */
  overflow: visible !important;
  height: auto !important;
  position: relative !important;
  top: 0 !important;
  left: auto !important;
  bottom: auto !important;
  right: auto !important;
  max-height: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Eliminar cualquier comportamiento de scroll interno */
#sidebar {
  height: auto !important;
  overflow: visible !important;
  position: static !important;
  box-shadow: none !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: visible !important;
}

/* Asegurar que la navegación del sidebar también esté sin scroll */
#sidebar .sidebar-nav {
  height: auto !important;
  overflow: visible !important;
  max-height: none !important;
  overflow-y: visible !important;
}

/* Contenido principal */
#club-main {
  flex: 1;
  overflow: visible;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Secciones del menú */
#sidebar-container .menu-section {
  margin-bottom: 15px !important;
  padding: 0 !important;
}

#sidebar-container .menu-section:first-child {
  margin-top: 0 !important;
}

#sidebar-container h3 {
  position: relative !important;
  padding: 10px 15px !important;
  color: #b8c7d8 !important; /* Tono grisáceo como en la página partido */
  background: none !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  margin: 0 0 7px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Items del menú */
#sidebar-container .menu-item {
  display: flex !important;
  align-items: center !important;
  padding: 10px 15px !important;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.95rem !important;
  border-radius: 4px !important;
  margin: 2px 8px !important;
  transition: all 0.2s ease !important;
}

/* Iconos del menú */
#sidebar-container .menu-item i {
  width: 24px !important;
  margin-right: 10px !important;
  text-align: center !important;
  font-size: 1rem !important;
  color: #ffffff !important; /* Emojis blancos en vez de azules */
}

#sidebar-container .menu-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

#sidebar-container .menu-item:hover i {
  color: #fff !important;
}

#sidebar-container .menu-item.active {
  background-color: #2b6cb0 !important;
  color: #fff !important;
  font-weight: 500 !important;
}

#sidebar-container .menu-item.active i {
  color: #fff !important;
}

/* Ocultar item mobile-only en desktop */
.mobile-only {
  display: none !important;
}

/* Estilos para móviles */
@media (max-width: 1024px) {
  /* Mostrar item mobile-only en móviles */
  .mobile-only {
    display: flex !important;
  }
  /* Layout en móviles */
  #club-layout {
    display: block;
  }
  
  /* Menú lateral en móviles */
  #sidebar-container {
    position: fixed;
    left: -230px;
    top: 60px;
    height: calc(100vh - 60px);
    transition: left 0.3s ease;
    z-index: 1000;
    overflow-y: auto; /* Solo en móviles permitimos scroll propio */
    width: 230px;
    padding: 0;
  }
  
  /* Menú lateral visible */
  #sidebar-container.active {
    left: 0;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  }
  
  /* Overlay para el fondo */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }
  
  .sidebar-overlay.active {
    display: block;
    opacity: 1;
  }
  
  /* Botón de toggle */
  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #1a365d;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .sidebar-toggle i {
    font-size: 1.2rem;
  }
  
  /* Contenido principal en móviles */
  #club-main {
    width: 100%;
    margin-left: 0;
    padding: 0 !important;
  }
  
  /* Prevenir scroll cuando el menú está abierto */
  body.sidebar-visible {
    overflow: hidden;
  }
}
