/* ============================================================
   Variables de tema (basadas en shadcn/ui y personalizadas)
   ============================================================ */
:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: oklch(0.145 0 0);
  --card: #ffffff;
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: #030213;
  --primary-foreground: oklch(1 0 0);
  --secondary: oklch(0.95 0.0058 264.53);
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --radius: 0.625rem;
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: #030213;
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
  --font-weight-medium: 500;
  --font-weight-normal: 400;
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --sidebar: oklch(0.205 0 0);
  --sidebar-foreground: oklch(0.985 0 0);
  --sidebar-primary: oklch(0.488 0.243 264.376);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.269 0 0);
  --sidebar-accent-foreground: oklch(0.985 0 0);
  --sidebar-border: oklch(0.269 0 0);
  --sidebar-ring: oklch(0.439 0 0);
}

/* ============================================================
   Estilos base
   ============================================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Cormorant Garamond', georgia, serif;
  background-color: #ffffff;
  color: rgb(59, 35, 20);
  line-height: 1.5;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
}

/* ============================================================
   Clases que agregamos en las últimas modificaciones y que NO
   existen en tailwind.css (ese archivo viene precompilado y solo
   trae las clases del diseño original). Las declaramos aquí para
   que sí tengan efecto.
   ============================================================ */
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.text-\[16px\] { font-size: 16px; }
.text-\[40px\] { font-size: 40px; }
.navbar-logo { width: 120px; height: 120px; }

@media (min-width: 768px) {
  .md\:w-16 { width: 4rem; }
  .md\:h-16 { height: 4rem; }
  .md\:w-20 { width: 5rem; }
  .md\:h-20 { height: 5rem; }
  .md\:text-\[40px\] { font-size: 40px; }
  .navbar-logo { width: 160px; height: 160px; }
}

#root {
  height: 100%;
}

/* ============================================================
   Componentes personalizados
   ============================================================ */

/* Tamaños de texto personalizados (no dependen del tailwind.css precompilado) */
.topbar-text {
  font-size: 16px;
  line-height: 24px;
}
.menu-title {
  font-size: 36px;
}
@media (min-width: 768px) {
  .topbar-text { font-size: 17px; }
  .menu-title { font-size: 40px; }
}

/* Cards de reseñas */
.review-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Botones sociales del footer */
.social-btn {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}
.social-btn:hover {
  background-color: rgb(159, 106, 51);
  border-color: rgb(159, 106, 51) !important;
  color: white !important;
}

/* Cuadros de fotos en loop (Nosotros, Sala de Lectura y Reservar Sala) */
.leading-body {
  line-height: 28px;
}
.photo-loop-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.photo-loop-img.active {
  opacity: 1;
}
.photo-loop-img--contain {
  object-fit: contain;
  background-color: rgb(240, 232, 220);
}
.photo-loop--auto {
  aspect-ratio: 4 / 3; /* respaldo hasta que cargue la primera foto y JS ajuste la proporción real */
}

/* Botones de descarga del menú y de WhatsApp */
.menu-download-btn,
.whatsapp-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.menu-download-btn:hover,
.whatsapp-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  opacity: 0.95;
}

/* Teléfono del footer */
.footer-phone-link:hover {
  color: rgb(196, 138, 80);
}

/* Ajustes para el footer y otros */
footer a {
  transition: color 0.3s;
}
footer a:hover {
  color: white;
}

/* Compensar el header fijo */
#root > div {
  padding-top: 5rem; /* 80px = h-20 */
}

/* ============================================================
   Navegación móvil
   ============================================================ */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}
.nav-toggle:hover {
  background-color: rgba(59, 35, 20, 0.06);
}

#mobile-nav {
  position: fixed;
  top: 5rem;
  left: 0;
  right: 0;
  z-index: 199;
  background: white;
  border-bottom: 1px solid rgb(232, 232, 232);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1.25rem 1rem;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#mobile-nav.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-link {
  display: block;
  padding: 0.85rem 0;
  font-family: 'Oswald', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 15px;
  color: rgb(59, 35, 20);
  text-decoration: none;
  border-bottom: 1px solid rgb(240, 232, 220);
}
.mobile-nav-link:last-child {
  border-bottom: none;
}

#mobile-nav-overlay {
  position: fixed;
  inset: 0;
  top: 5rem;
  z-index: 198;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  #mobile-nav, #mobile-nav-overlay { display: none !important; }
}
@media (max-width: 767px) {
  .nav-desktop { display: none; }
}
@media (max-width: 380px) {
  .brand-name { display: none; }
}