/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Variables */
:root {
  --bg: #f9f8f4;
  --text: #22221c;
  --accent: #4e84a7;
  --green: #66bb6a;
  --red: #ef5350;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  position: relative; /* para posicionar capa oscura si es necesario */
  background-image: url('../img/index.jpg');
  background-size: cover;      /* ocupa toda la pantalla manteniendo proporción */
  background-position: center; /* centrado */
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Capa oscura encima del fondo */
body::before {
  content: '';
  position: fixed;       /* cubre toda la pantalla */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* capa negra con 40% de opacidad */
  z-index: 0;            /* debajo del contenido */
  pointer-events: none;  /* para que no interfiera con clicks */
}


.container {
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 16px;
}

/* Topbar / Logo */
.topbar {
  display: flex;
  justify-content: center; /* logo centrado horizontal */
  padding: 16px 0;
}

.logo-area img.logo {
  height: 80px;
  display: block;
  margin: 0 auto;
}

/* Service Info */
.service-info {
  text-align: center;
  margin: 24px 0;
}

.service-info h1 {
  font-size: 28px;
  margin-bottom: 12px;
  color: #fff;
}

.service-info .lead {
  font-size: 1.15rem;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.5;
  color: #fff;
}

/* Pricing */
.pricing {
  text-align: center;
  margin: 24px 0;
}

.pricing h2 {
  margin-bottom: 12px;
  color: #fff;
}

.price-list p {
  margin: 6px 0;
  color: #fff;
}

.price-list .note {
  font-size: 13px;
  color: #fff;
  margin-top: 8px;
}

/* Calendar Legend */
.calendar-legend {
  text-align: center;
  margin-top: 24px;
  color: #fff;
}

.legend {
  display: flex;
  flex-direction: column;        /* apila verticalmente los elementos */
  justify-content: center;
  align-items: center;
  gap: 12px;                     /* espacio entre fila de swatches y nota */
  padding: 6px 14px;
  background-color: rgba(255, 255, 255, 0.85); /* fondo blanco semi-transparente */
  border: 1px solid rgba(0,0,0,0.2);          /* borde delicado */
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);    /* sombra ligera */
  text-align: center;
  max-width: 480px;              /* opcional, limita ancho del recuadro */
  margin: 12px auto 0 auto;      /* centrado horizontal y espacio arriba */
  color: #22221c;    
}

.swatch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: block;
}

.disponible { background: var(--green); }
.reservado { background: var(--red); }

.legend-note {
  font-style: italic;
  font-size: 0.9rem;
  color: #22221c;               /* texto oscuro para contraste */
  width: 100%;                  /* ocupa todo el ancho del recuadro */
}

.hidden-login {
  text-decoration: none;
  color: inherit;
}

/* Calendar Area */
.calendar-area {
  margin: 32px auto;
  max-width: 720px; /* más estrecho en desktop */
}

#calendar-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #fff;
}

#calendar-controls button {
  background: transparent;
  border: 1px solid #ddd;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
}

#calendar-controls button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

#monthLabel {
  font-weight: 700;
  font-size: 1.1rem;
}

.weekday-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 0;
}

.weekday-names div {
  font-weight: 600;
  color: #fff;
  padding-bottom: 4px;
}

/* Calendar Grid estilo tradicional */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.day {
  position: relative;
  padding: 20px 0;
  border-right: 2px solid #ccc;
  border-bottom: 2px solid #ccc;
  background: var(--card);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80px;
  cursor: pointer;
}

.day.empty {
  background: var(--bg);
  border: none;
  cursor: default;
}

.dateNum {
  font-weight: 600;
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  transition: background 0.3s;
}

.day.disponible .dateNum {
  background-color: var(--green);
  color: #fff;
}

.day.reservado {
  background-color: #e0e0e0; /* gris claro */
}

.day.reservado .dateNum {
  background-color: var(--red);
  color: #fff;
}

.day .label,
.day .actions,
.day .btn-reserve {
  display: none;
}

/* Admin */
.admin-badge {
  font-size: 12px;
  color: #fff;
  background: #333;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-block;
}

.container,
.topbar,
.service-info,
.pricing,
.calendar-area {
  position: relative;
  z-index: 1;
}

h1, h2,
.lead, .price-list p, .legend, .admin-actions {
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
}

/* ===============================
   LOGIN PAGE STYLES
   =============================== */
body.login-page {
  background-image: url('../img/index.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  color: #fff;
}

/* capa oscura + blur */
body.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0,0,0,0.45);
  backdrop-filter: blur(8px); /* desenfoque elegante */
  z-index: 0;
}

/* Caja de login */
.login-box {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  text-align: center;
}

/* Título */
.login-box h2 {
  font-weight: 600;
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: #fff;
}

/* Alertas de error */
.alert {
  background-color: rgba(239, 83, 80, 0.15);
  color: #ffb3b3;
  border: 1px solid rgba(239, 83, 80, 0.4);
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}

/* Campos de entrada */
.login-box label {
  display: block;
  text-align: left;
  margin-bottom: 6px;
  font-size: 0.95rem;
  color: #eee;
}

.login-box input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 1rem;
  padding: 8px 4px;
  margin-bottom: 22px;
  transition: all 0.3s ease;
}

.login-box input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 4px 8px rgba(78,132,167,0.2);
}

/* Botón */
.login-box .btn {
  width: 100%;
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.login-box .btn:hover {
  background-color: #3d6c87;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(78,132,167,0.35);
}

/* === ADMIN ACTIONS (sección de cerrar sesión) === */
.admin-actions {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1.5rem 2rem;
  border-radius: 16px;
  max-width: 500px;
  margin: 3rem auto;
  text-align: center;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.6s ease;
}

/* Link de cerrar sesión */
.admin-actions a {
  display: inline-block;
  margin-left: 0.5rem;
  background: linear-gradient(135deg, #d84e4e, #ff6b6b);
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.admin-actions a:hover {
  background: linear-gradient(135deg, #ff7a7a, #ffb3b3);
  transform: translateY(-2px);
}

/* Animación suave de aparición */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}


/* Responsive */
@media (max-width: 768px) {
  .service-info .lead,
  .pricing {
    text-align: left;
  }

  .calendar-area {
    max-width: 100%;
  }

  .day {
    min-height: 70px;
    padding: 12px 0 36px 0;
  }

  .dateNum {
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
  }

  .day .btn-reserve {
    font-size: 0.9rem;
  }

   .login-box {
    padding: 32px 24px;
    max-width: 90%;
  }

  .login-box h2 {
    font-size: 1.4rem;
  }
}
