/* ===============================
   RESET & BASE
================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  font-family: Arial, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

p {
  margin: 0;
}

/* ===============================
   TYPOGRAPHY
================================ */

.nombre {
  font-family: "Atma";
  font-size: 56px;
  font-weight: 600;
  color: #fff;
}

.res-title {
  font-family: "Atma", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(36px, 5vw, 68px);
  color: #fff;
  text-align: center;
  margin: 0;
}

/* ===============================
   BUTTONS
================================ */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.4px;
  color: #fff;
  background: rgba(0,0,0,0.75);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(0,0,0,0.85);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.reservar-btn {
  min-width: 240px;
  max-width: 320px;
  padding: 16px 32px;
  font-size: 20px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #2d8a5d, #1a5d3e);
  border: none;
  box-shadow: 0 8px 22px rgba(45, 138, 93, 0.4);
  margin-top: 8px;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #34a16f, #1f7049);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(45, 138, 93, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(45, 138, 93, 0.4);
}

/* ===============================
   MODAL
================================ */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.modal-content {
  position: relative;
  width: min(92vw, 560px);
  background: #0f1a1e;
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  animation: slideUp 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0 0 12px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.modal-close:hover {
  transform: scale(1.1);
  color: #ff6b6b;
}

/* ===============================
   FORMS
================================ */

.res-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label {
  font-size: 14px;
  color: #d6e3ea;
}

.input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  transition: all 0.15s ease;
}

.input::placeholder {
  color: #b9c6cc;
}

.input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.input:invalid:not(:placeholder-shown) {
  border-color: #ff6b6b;
}

.input:valid:not(:placeholder-shown) {
  border-color: #51cf66;
}

/* ===== Date Input ===== */

input[type="date"] {
  cursor: pointer;
  position: relative;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  z-index: 2;
}

input[type="date"]::after {
  content: "📅";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 18px;
}

/* ===== Phone Input ===== */

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-input .prefix {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #b9c6cc;
  font-size: 14px;
}

.phone-input .input {
  flex: 1;
}

/* ===== Person Counter ===== */

.persons-picker {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
}

.stepper {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.stepper:active {
  transform: scale(0.95);
}

.stepper:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

#personas-display {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  min-width: 30px;
  text-align: center;
}

/* ===== Time Picker ===== */

.time-picker-custom {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.time-step-label {
  font-size: 14px;
  color: #d6e3ea;
  margin: 0 0 10px 0;
  font-weight: 600;
}

.time-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.time-btn {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.time-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.time-btn:active {
  transform: translateY(0);
}

.time-btn.active {
  background: rgba(45, 138, 93, 0.3);
  border-color: #2d8a5d;
  color: #51cf66;
  box-shadow: 0 0 0 3px rgba(45, 138, 93, 0.2);
}

.hour-selection,
.minute-selection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===============================
   HEADER — ICONOS & CONTACTO
================================ */

.contact {
  display: flex;
  align-items: center;
}

.socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.imgfb,
.imgig,
.imgtripadv {
  width: 32px;
  height: auto;
  display: block;
  transition: transform 0.15s ease;
}

.imgfb:hover,
.imgig:hover,
.imgtripadv:hover {
  transform: scale(0.95);
}

.imgfb:active,
.imgig:active,
.imgtripadv:active {
  transform: scale(0.9);
}

.num {
  font-size: 18px;
  color: #fff;
  text-align: left;
}

.num a {
  color: inherit;
  text-decoration: none;
}

.num a:hover {
  text-decoration: underline;
}

/* ===============================
   UTILITIES
================================ */

.desktop-only { display: flex; }
.mobile-only { display: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===============================
   ANIMATIONS
================================ */

@keyframes fade {
  0% { opacity: 0; }
  5% { opacity: 1; }
  25% { opacity: 1; }
  30% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

@keyframes menuPanelPrev {
  0%, 24.9% {
    background-image: url("../imagenes/tacos.jpeg");
  }
  25%, 49.9% {
    background-image: url("../imagenes/tostada.jpeg");
  }
  50%, 74.9% {
    background-image: url("../imagenes/camarones.jpeg");
  }
  75%, 100% {
    background-image: url("../imagenes/pulpoparrilla.jpeg");
  }
}

/* ===============================
   LOADING STATE
================================ */

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner 0.6s linear infinite;
}

/* ===============================
   MOBILE ADJUSTMENTS
================================ */

@media (max-width: 768px) {
  .modal-content {
    width: 95vw;
    padding: 16px;
    max-height: 85vh;
  }

  .modal-title {
    font-size: 20px;
  }

  .persons-picker {
    justify-content: center;
  }

  .stepper {
    width: 32px;
    height: 32px;
  }

  #personas-display {
    font-size: 20px;
  }

  .time-buttons {
    gap: 8px;
  }
  
  .time-btn {
    padding: 10px 8px;
    font-size: 14px;
  }
}

/* ===============================
   MOBILE LANDSCAPE - PHONE FIX
================================ */

@media (max-width: 900px) and (orientation: landscape) {
  .num {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-top: 4px;
    white-space: normal !important;
  }
  
  .num a {
    white-space: normal !important;
  }
}