* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: url('assets/img/pasto.jpg');
  background-size: cover;
  background-attachment: fixed;
  color: #333;
}

.rubik-spray-paint-regular {
  font-family: "Rubik Spray Paint", system-ui;
  font-weight: 400;
  font-style: normal;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header {
  background-color: rgba(0, 0, 0, 0.8);
  text-align: center;
  padding: 1.5rem;
  color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Estilos del Calendario */
.calendar {
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar h2 {
  color: #2E7D32;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

.calendar table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.calendar th {
  background-color: #2E7D32;
  color: white;
  padding: 0.8rem;
  font-weight: 500;
}

.calendar td {
  padding: 0.8rem;
  text-align: center;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
}

.calendar td.available {
  background-color: #E8F5E9;
  color: #2E7D32;
  cursor: pointer;
}

.calendar td.available:hover {
  background-color: #C8E6C9;
  transform: scale(1.05);
}

.calendar td.has-reservations {
  background-color: #FFF3E0;
  position: relative;
}

.calendar td.has-reservations::after {
  content: '•';
  position: absolute;
  top: 2px;
  right: 2px;
  color: #FFA726;
  font-size: 1.2rem;
}

.calendar td.selected {
  background-color: #2E7D32;
  color: white;
  font-weight: bold;
}

/* Estilos de los Slots */
.timeslots {
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.timeslots h2 {
  color: #2E7D32;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

.timeslots button {
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  background-color: white;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeslots button:hover:not(:disabled) {
  border-color: #2E7D32;
  background-color: #E8F5E9;
}

.timeslots button.selected {
  background-color: #2E7D32;
  color: white;
  border-color: #2E7D32;
}

.timeslots button:disabled {
  background-color: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* Estilos del Resumen */
.summary {
  background-color: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.summary h3 {
  color: #2E7D32;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

.summary p {
  margin: 0.8rem 0;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
}

/* Estilos del Formulario */
#reservaForm {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#reservaForm input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

#reservaForm input:focus {
  border-color: #2E7D32;
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.btn-crear-reserva {
  width: 100%;
  padding: 1rem;
  background-color: #2E7D32;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.btn-crear-reserva:hover {
  background-color: #1B5E20;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-crear-reserva:active {
  transform: translateY(0);
}

/* Estilos del Banner de Últimas Reservas */
.banner-reservas {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.banner-reservas h2 {
  color: #2E7D32;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  text-align: center;
}

.ultimas-reservas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 1rem;
}

.ultima-reserva {
  background-color: white;
  padding: 1.5rem;
  border-radius: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.ultima-reserva:hover {
  transform: translateY(-5px);
}

.ultima-reserva h4 {
  color: #2E7D32;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.ultima-reserva p {
  margin: 0.5rem 0;
  color: #666;
}

.contador-reservas {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #2E7D32;
  color: white;
  border-radius: 0.8rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
}

/* Estilos de los Botones de Acción */
.acciones {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.acciones button {
  flex: 1;
  padding: 0.8rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-editar {
  background-color: #2196F3;
  color: white;
}

.btn-editar:hover {
  background-color: #1976D2;
}

.btn-eliminar {
  background-color: #F44336;
  color: white;
}

.btn-eliminar:hover {
  background-color: #D32F2F;
}

/* Estilos de los Badges */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
}

.badge-pendiente {
  background-color: #FFA726;
  color: white;
}

.badge-confirmada {
  background-color: #4CAF50;
  color: white;
}

.badge-cancelada {
  background-color: #F44336;
  color: white;
}

/* Estilos de los Filtros */
.filtros {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.8rem;
  flex-wrap: wrap;
}

.filtros input,
.filtros select {
  flex: 1;
  min-width: 200px;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.filtros input:focus,
.filtros select:focus {
  border-color: #2E7D32;
  outline: none;
}

/* Estilos de los Slots */
.slot-button {
  width: 100%;
  padding: 1rem;
  margin: 0.5rem 0;
  border: 2px solid #e0e0e0;
  border-radius: 0.5rem;
  background-color: white;
  color: #333;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slot-button:hover:not(.disabled) {
  border-color: #2E7D32;
  background-color: #E8F5E9;
}

.slot-button.selected {
  background-color: #2E7D32;
  color: white;
  border-color: #2E7D32;
}

.slot-button.disabled {
  background-color: #e0e0e0;
  color: #9e9e9e;
  cursor: not-allowed;
  border-color: #bdbdbd;
  opacity: 0.7;
  pointer-events: none;
}

.slot-button.disabled:hover {
  background-color: #e0e0e0;
  transform: none;
  box-shadow: none;
}

.slot-button.confirmada {
  background-color: #4CAF50;
  color: white;
  border-color: #388E3C;
  opacity: 0.8;
}

.slot-button.confirmada:hover {
  background-color: #4CAF50;
  transform: none;
  box-shadow: none;
}

.slot-button.confirmada::after {
  content: '✓';
  margin-left: 5px;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 0;
    margin: 0;
  }

  header {
    padding: 1rem;
    position: relative;
  }

  .rubik-spray-paint-regular {
    font-size: 1.8rem;
  }

  main {
    margin: 0.5rem;
    padding: 1rem;
    gap: 1rem;
  }

  /* Calendario móvil */
  .calendar {
    padding: 1rem;
    overflow-x: auto;
  }

  .calendar table {
    min-width: 300px;
    width: 100%;
  }

  .calendar th,
  .calendar td {
    padding: 0.6rem 0.3rem;
    font-size: 0.9rem;
    min-width: 40px;
  }

  /* Slots móvil */
  .timeslots {
    padding: 1rem;
  }

  .slot-button {
    width: 100%;
    padding: 0.8rem;
    margin: 0.4rem 0;
    font-size: 0.95rem;
    min-height: 50px;
  }

  /* Summary móvil */
  .summary {
    padding: 1rem;
  }

  .summary p {
    font-size: 0.9rem;
    margin: 0.6rem 0;
    padding: 0.6rem;
  }

  /* Formulario móvil */
  #reservaForm {
    padding: 1rem;
    margin-top: 1rem;
  }

  #reservaForm input {
    padding: 0.8rem;
    font-size: 16px; /* Evita zoom en iOS */
    border-radius: 8px;
  }

  .btn-crear-reserva {
    padding: 1rem;
    font-size: 1rem;
    min-height: 50px;
  }

  /* Banner reservas móvil */
  .banner-reservas {
    margin: 0.5rem;
    padding: 1rem;
  }

  .banner-reservas h2 {
    font-size: 1.5rem;
  }

  .ultimas-reservas {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ultima-reserva {
    padding: 1rem;
  }

  /* Reservas container móvil */
  .reservas-container {
    padding: 1rem;
    margin: 0.5rem;
  }

  .reservas-container h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  /* Filtros móvil */
  .filtros {
    flex-direction: column;
    gap: 0.8rem;
    padding: 1rem;
  }

  .filtros input,
  .filtros select {
    width: 100%;
    padding: 0.8rem;
    font-size: 16px;
    border-radius: 8px;
  }

  /* Cards de reserva móvil */
  .reserva-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .reserva-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .reserva-card p {
    font-size: 0.9rem;
    margin: 0.4rem 0;
  }

  /* Acciones móvil */
  .acciones {
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .acciones button {
    width: 100%;
    padding: 0.8rem;
    font-size: 0.9rem;
    min-height: 44px; /* Tamaño mínimo táctil */
  }

  /* Modal móvil */
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 15px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-content h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
  }

  .reserva-details {
    padding: 1rem;
    border-radius: 10px;
  }

  .reserva-details p {
    font-size: 0.95rem;
    margin: 0.6rem 0;
  }

  /* Datos transferencia móvil */
  .datos-transferencia {
    padding: 1rem;
    border-radius: 10px;
  }

  .datos-transferencia h4 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
  }

  .datos-transferencia p {
    font-size: 0.9rem;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-start;
    padding: 0.5rem 0;
  }

  .datos-transferencia strong {
    min-width: auto;
    display: block;
  }

  /* Botones móvil */
  .btn-whatsapp,
  .btn-copiar {
    padding: 1rem;
    font-size: 1rem;
    min-height: 50px;
    border-radius: 10px;
  }

  /* Badges móvil */
  .badge {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  .rubik-spray-paint-regular {
    font-size: 1.5rem;
  }

  main {
    margin: 0.25rem;
    padding: 0.8rem;
  }

  .calendar,
  .timeslots,
  .summary,
  .reservas-container {
    padding: 0.8rem;
  }

  .calendar th,
  .calendar td {
    padding: 0.4rem 0.2rem;
    font-size: 0.8rem;
    min-width: 35px;
  }

  .slot-button {
    padding: 0.7rem;
    font-size: 0.9rem;
    margin: 0.3rem 0;
  }

  .summary p {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  #reservaForm input {
    padding: 0.7rem;
  }

  .modal-content {
    margin: 0.5rem;
    padding: 1rem;
  }

  .datos-transferencia {
    padding: 0.8rem;
  }

  .datos-transferencia p {
    font-size: 0.85rem;
  }

  .reserva-card {
    padding: 0.8rem;
  }

  .reserva-card p {
    font-size: 0.85rem;
  }

  .acciones button {
    padding: 0.7rem;
    font-size: 0.85rem;
  }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
  .calendar th,
  .calendar td {
    padding: 0.3rem 0.1rem;
    font-size: 0.75rem;
    min-width: 30px;
  }

  .slot-button {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  .modal-content {
    margin: 0.25rem;
    padding: 0.8rem;
  }

  .datos-transferencia {
    padding: 0.6rem;
  }

  .datos-transferencia p {
    font-size: 0.8rem;
  }

  .btn-whatsapp,
  .btn-copiar {
    padding: 0.8rem;
    font-size: 0.9rem;
  }
}

/* Mejoras para landscape en móviles */
@media (max-height: 600px) and (orientation: landscape) {
  main {
    margin: 0.5rem;
    padding: 0.8rem;
  }

  .banner-reservas {
    padding: 0.8rem;
  }

  .modal-content {
    margin: 0.5rem auto;
    max-height: 85vh;
    padding: 1rem;
  }

  .calendar,
  .timeslots,
  .summary {
    padding: 0.8rem;
  }
}

/* Mejoras de usabilidad táctil */
@media (pointer: coarse) {
  .slot-button,
  .btn-crear-reserva,
  .btn-whatsapp,
  .btn-copiar,
  .acciones button {
    min-height: 44px; /* Tamaño mínimo recomendado para elementos táctiles */
  }

  .calendar td.available {
    min-height: 44px;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.calendar, .timeslots, .summary, .reserva-card, .ultima-reserva {
  animation: fadeIn 0.5s ease-out;
}

/* Estilos del Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
}

.modal-content {
  background-color: white;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 1rem;
  max-width: 500px;
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  color: #2E7D32;
  margin-bottom: 1.5rem;
  text-align: center;
  font-size: 1.8rem;
}

.reserva-details {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin-bottom: 1.5rem;
}

.reserva-details p {
  margin: 0.8rem 0;
  font-size: 1.1rem;
}

.reserva-details strong {
  color: #2E7D32;
}

.pago-instructions {
  margin-bottom: 1.5rem;
}

.pago-instructions h3 {
  color: #2E7D32;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.pago-instructions ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.pago-instructions li {
  margin: 0.5rem 0;
  font-size: 1.1rem;
}

.advertencia {
  background-color: #FFF3E0;
  color: #E65100;
  padding: 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-align: center;
  margin: 1rem 0;
}

.btn-whatsapp {
  width: 100%;
  padding: 1rem;
  background-color: #25D366;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:active {
  transform: translateY(0);
}

/* Responsive para el Modal */
@media (max-width: 768px) {
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }

  .modal-content h2 {
    font-size: 1.5rem;
  }

  .reserva-details {
    padding: 1rem;
  }

  .reserva-details p {
    font-size: 1rem;
  }

  .pago-instructions li {
    font-size: 1rem;
  }

  .btn-whatsapp {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

.no-horarios {
  text-align: center;
  color: #f44336;
  padding: 1rem;
  margin: 1rem 0;
  background-color: #ffebee;
  border-radius: 0.5rem;
  font-weight: 500;
}

.datos-transferencia {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin: 1rem 0;
  border: 1px solid #e0e0e0;
}

.datos-transferencia h4 {
  color: #2E7D32;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  text-align: center;
}

.datos-transferencia p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  padding: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.datos-transferencia p:last-child {
  border-bottom: none;
}

.datos-transferencia strong {
  color: #2E7D32;
  min-width: 150px;
}

@media (max-width: 768px) {
  .datos-transferencia {
    padding: 1rem;
  }

  .datos-transferencia p {
    font-size: 1rem;
    flex-direction: column;
    gap: 0.3rem;
  }

  .datos-transferencia strong {
    min-width: auto;
  }
}

.btn-copiar {
  width: 100%;
  padding: 1rem;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-copiar:hover {
  background-color: #1976D2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.btn-copiar:active {
  transform: translateY(0);
}

.btn-copiar.copiado {
  background-color: #4CAF50;
}

.btn-copiar.copiado:hover {
  background-color: #388E3C;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

@media (max-width: 768px) {
  .btn-copiar {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

/* Estilos para la sección de reservas */
.reservas-container {
  color: white;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.reservas-container h2 {
  color: white;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-align: center;
}

/* Asegurar que todos los elementos dentro tengan texto blanco */
.reservas-container * {
  color: white;
}

/* Estilos para los filtros */
.reservas-container .filtros {
  background-color: rgba(255, 255, 255, 0.1);
}

.reservas-container .filtros input,
.reservas-container .filtros select {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1px solid #666;
}

.reservas-container .filtros input::placeholder {
  color: #666;
}

/* Estilos para las tarjetas de reserva */
.reserva-card {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.reserva-card h3 {
  color: white;
  margin-bottom: 1rem;
}

.reserva-card p {
  color: white;
  margin: 0.5rem 0;
} 