/* ===========================
   QuedaCancha - Style Global
   =========================== */

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-family: 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  color: #222;
  background: #f9fafb;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===========================
   Layout
   =========================== */

header {
  background: #006d77;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header img {
  height: 40px;
}

header nav a {
  margin-left: 1.5rem;
  font-weight: 500;
  color: #fff;
  transition: opacity 0.2s;
}

header nav a:hover {
  opacity: 0.8;
}

main {
  padding: 2rem;
  min-height: calc(100vh - 80px);
}

/* ===========================
   Botones
   =========================== */

.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: #118ab2;
  color: #fff;
}

.btn-primary:hover {
  background: #0e7a9e;
}

.btn-secondary {
  background: #e0e0e0;
  color: #222;
}

.btn-secondary:hover {
  background: #d5d5d5;
}

/* ===========================
   Tarjetas (cards)
   =========================== */

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.15s;
}

.card:hover {
  transform: translateY(-2px);
}

/* ===========================
   Formularios
   =========================== */

form {
  display: grid;
  gap: 1rem;
  max-width: 500px;
}

label {
  font-weight: 500;
  margin-bottom: 0.3rem;
  display: block;
}

input, select, textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
  border-color: #118ab2;
  outline: none;
}

/* ===========================
   Listas de recursos/canchas
   =========================== */

.resource-list {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.resource-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.resource-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.resource-card p {
  font-size: 0.9rem;
  color: #555;
}

/* ===========================
   Tablas (ej: dashboard club)
   =========================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 0.9rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #f1f5f9;
  font-weight: 600;
}

tr:hover {
  background: #f9f9f9;
}

/* ===========================
   Mensajes y alertas
   =========================== */

.alert {
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 500;
}

.alert-success {
  background: #e0f7e9;
  color: #137c3a;
}

.alert-error {
  background: #fdecea;
  color: #c62828;
}

/* ===========================
   Footer
   =========================== */

footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 1.2rem;
  margin-top: 2rem;
  font-size: 0.9rem;
}


/* ===========================
   Menú Responsive
=========================== */
.main-header {
  background: #ffffff;
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 1rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-btn {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

.nav a:hover {
  color: #007bff;
}

/* Responsive: mostrar botón menú en móviles */
@media (max-width: 768px) {
  .menu-btn {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 60px;
    right: 10px;
    width: 200px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    z-index: 1000;
  }

  .nav.active {
    display: flex;
  }
}

/* ===========================
   Notificaciones
=========================== */
.notifications {
  position: relative;
  margin-left: 1rem;
}

.notif-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

.notif-box {
  display: none;
  position: absolute;
  top: 30px;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  width: 250px;
  padding: 1rem;
  z-index: 1000;
}

.notif-box.active {
  display: block;
}

.notif-box p {
  margin: 0;
  color: #555;
}
