/* -------------------------------------------------------------
   EL BESSÓ - PREMIUM RESTAURANT STYLESHEET
   Inspired by Gaio Club (gaio.club) - Bold & Elegant Foodie Web
------------------------------------------------------------- */

/* Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&family=Syne:wght@700;800&display=swap');

/* CSS Custom Properties / Design System */
:root {
  /* Colors */
  --color-bg-dark: #0c0d0f;
  --color-bg-card-dark: #141518;
  --color-bg-light: #faf8f5;
  --color-bg-card-light: #ffffff;
  
  --color-primary: #cfa853;       /* Bronze Gold */
  --color-primary-hover: #e5be6b; /* Muted yellow gold */
  --color-terracotta: #b45742;    /* Warm accent */
  --color-accent-dark: #aa8434;
  
  --color-text-light: #f5f2eb;
  --color-text-dark: #1b1c1e;
  --color-text-muted-light: #9e9c96;
  --color-text-muted-dark: #6e6d68;
  --color-border-dark: rgba(207, 168, 83, 0.2);
  --color-border-light: rgba(180, 87, 66, 0.15);
  
  /* Fonts */
  --font-serif: 'Cormorant Garamond', serif;
  --font-title: 'Syne', sans-serif;
  --font-logo: 'Cinzel', serif;
  --font-body: 'Outfit', sans-serif;
  
  /* Layout & Transitions */
  --container-width: 1200px;
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.2s ease;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
  touch-action: manipulation; /* Evitar zoom automático por doble clic */
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  overflow-x: hidden;
  max-width: 100%;
  line-height: 1.6;
  touch-action: manipulation;
}

/* Prevenir zoom táctil por doble clic rápido en elementos interactivos móviles */
a, button, input, select, textarea, .menu-tab-btn, .gallery-item, .carousel-control, .footer-social-link, #envelope-stamp, .back-to-top {
  touch-action: manipulation;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.font-serif-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
}

.text-gold {
  color: var(--color-primary);
}

.text-terracotta {
  color: var(--color-terracotta);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border: 2px solid var(--color-bg-dark);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}

/* -------------------------------------------------------------
   REUSABLE COMPONENTS & DECORATIONS
------------------------------------------------------------- */

/* Button styles */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--color-bg-dark);
  border: 1px solid var(--color-primary);
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-dark);
  color: var(--color-primary);
  z-index: -1;
  transform: translateY(100%);
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-primary:hover::after {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-outline::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  z-index: -1;
  transform: translateY(100%);
  transition: var(--transition-smooth);
}

.btn-outline:hover {
  color: var(--color-bg-dark);
}

.btn-outline:hover::after {
  transform: translateY(0);
}

/* Greek Key Pattern Separator */
.greek-divider {
  height: 18px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='18' viewBox='0 0 60 18'%3E%3Cpath d='M0 9h12v-5h-8v3h5v-1h-2V5h4V2H2v8h14v5H0V9zm20-5h12v-5h-8v3h5v-1h-2V0h4V-3H18v8h14v5H20v-5zm20 10h12v-5h-8v3h5v-1h-2V9h4V6H38v8h14v5H40v-5z' fill='%23cfa853' fill-opacity='0.65'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.85;
}

.greek-divider.light {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='18' viewBox='0 0 60 18'%3E%3Cpath d='M0 9h12v-5h-8v3h5v-1h-2V5h4V2H2v8h14v5H0V9zm20-5h12v-5h-8v3h5v-1h-2V0h4V-3H18v8h14v5H20v-5zm20 10h12v-5h-8v3h5v-1h-2V9h4V6H38v8h14v5H40v-5z' fill='%23b45742' fill-opacity='0.65'/%3E%3C/svg%3E");
}

/* Marquee Text Ticker (Vance-style marquee) */
.ticker-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--color-bg-dark);
  border-top: 1px solid var(--color-border-dark);
  border-bottom: 1px solid var(--color-border-dark);
  padding: 0.8rem 0;
}

.ticker-wrap.light {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.ticker {
  display: flex;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
}

.ticker-item {
  display: inline-block;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-primary);
  padding-right: 2rem;
  letter-spacing: 0.1em;
}

.ticker-wrap.light .ticker-item {
  color: var(--color-terracotta);
}

@keyframes marquee {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* -------------------------------------------------------------
   HEADER & NAVIGATION
------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: rgba(12, 13, 15, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-dark);
  transition: var(--transition-smooth);
}

.header.scrolled {
  padding: 0.5rem 0;
  background-color: rgba(12, 13, 15, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Twin Faces Logo */
.logo-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--color-text-light);
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  transition: var(--transition-fast);
}

.logo-container {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
  border: 1.5px solid var(--color-primary);
  transition: var(--transition-smooth);
}

.logo-img-header {
  width: 90%;
  height: 90%;
  object-fit: contain;
}

.logo-link:hover .logo-container {
  transform: rotate(15deg) scale(1.1);
  border-color: var(--color-primary-hover);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.2rem;
  align-items: center;
}

.nav-link {
  color: var(--color-text-light);
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.4rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--color-primary);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 110;
}

.hamburger-line {
  display: block;
  width: 25px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--color-text-light);
  transition: var(--transition-smooth);
}

/* -------------------------------------------------------------
   HERO SECTION
------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 4rem 1.5rem;
  background-color: var(--color-bg-dark);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(20, 21, 24, 0.4) 0%, rgba(12, 13, 15, 0.95) 80%);
  z-index: 1;
}

.hero-container {
  max-width: var(--container-width);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.25em;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-dark);
  padding-bottom: 0.5rem;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 0.95;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--color-text-light);
}

.hero-title span {
  display: block;
}

.hero-title .font-serif-title {
  font-size: 5rem;
  text-transform: none;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--color-text-muted-light);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
}

/* Asymmetric Hero Image Showcase */
.hero-image-showcase {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
}

.hero-img-container {
  position: absolute;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
  border: 4px solid var(--color-primary);
}

.hero-img-main {
  width: 380px;
  height: 460px;
  transform: rotate(-3deg);
  z-index: 2;
  transition: var(--transition-smooth);
}

.hero-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-secondary {
  width: 240px;
  height: 240px;
  bottom: 10px;
  left: -20px;
  transform: rotate(6deg);
  z-index: 3;
  transition: var(--transition-smooth);
}

.hero-img-secondary img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-img-main:hover {
  transform: rotate(0deg) scale(1.02);
  z-index: 4;
}

.hero-img-secondary:hover {
  transform: rotate(0deg) scale(1.05);
  z-index: 4;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-muted-light);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: var(--transition-fast);
}

.scroll-indicator:hover {
  color: var(--color-primary);
}

.scroll-mouse {
  width: 22px;
  height: 38px;
  border: 2px solid var(--color-border-dark);
  border-radius: 12px;
  position: relative;
}

.scroll-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel-anim 1.5s ease-out infinite;
}

@keyframes scroll-wheel-anim {
  0% { top: 6px; opacity: 1; }
  100% { top: 22px; opacity: 0; }
}

/* -------------------------------------------------------------
   HISTORY / PHILOSOPHY SECTION (Contrast Light Section)
------------------------------------------------------------- */
.history {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  padding: 8rem 1.5rem;
  position: relative;
}

.history-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6rem;
  align-items: center;
}

.history-images {
  position: relative;
  height: 520px;
}

.history-img-frame {
  position: absolute;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 8px solid var(--color-bg-card-light);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.history-img-1 {
  width: 320px;
  height: 400px;
  left: 0;
  top: 0;
  transform: rotate(-2deg);
  z-index: 1;
}

.history-img-2 {
  width: 280px;
  height: 320px;
  right: 0;
  bottom: 0;
  transform: rotate(4deg);
  z-index: 2;
}

.history-img-1 img, .history-img-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-img-1:hover {
  transform: rotate(0deg) scale(1.03);
  z-index: 3;
}

.history-img-2:hover {
  transform: rotate(0deg) scale(1.03);
  z-index: 3;
}

.history-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.section-tag {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-terracotta);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 3.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 2rem;
  color: var(--color-text-light); /* Default is light text on dark background */
}

.section-title span {
  display: block;
}

.section-title .font-serif-title {
  text-transform: none;
  font-weight: 300;
  font-size: 4rem;
}

.history-text {
  font-size: 1.05rem;
  color: var(--color-text-muted-dark);
  margin-bottom: 2rem;
}

.history-text p {
  margin-bottom: 1.2rem;
}

/* -------------------------------------------------------------
   MENU / CARTA INTERACTIVA SECTION (Dark)
------------------------------------------------------------- */
.menu-section {
  padding: 8rem 1.5rem;
  background-color: var(--color-bg-dark);
}

.menu-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

.menu-header .section-tag {
  color: var(--color-primary);
}

/* Section title color overrides based on background theme */
.history .section-title,
.gallery-section .section-title,
.contact-section .section-title {
  color: var(--color-text-dark);
}

/* Tabs Navigation */
.menu-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 4rem;
  list-style: none;
}

.menu-tab-btn {
  background: transparent;
  color: var(--color-text-muted-light);
  border: 1px solid var(--color-border-dark);
  padding: 0.8rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: var(--transition-fast);
  border-radius: 0;
}

.menu-tab-btn:hover, .menu-tab-btn.active {
  color: var(--color-bg-dark);
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Menu Grid Layout */
.menu-container {
  max-width: var(--container-width);
  margin: 0 auto;
}

.menu-pane {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.menu-pane.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 4rem;
  opacity: 1;
  transform: translateY(0);
}

.menu-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed rgba(207, 168, 83, 0.15);
  transition: var(--transition-smooth);
}

.menu-item:hover {
  transform: translateX(5px);
  border-bottom-color: var(--color-primary);
}

.menu-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.menu-item-name {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-text-light);
  letter-spacing: 0.01em;
}

.menu-item-dots {
  flex-grow: 1;
  border-bottom: 1px dotted rgba(207, 168, 83, 0.3);
}

.menu-item-price-badge {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-primary);
  background-color: rgba(207, 168, 83, 0.1);
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--color-border-dark);
}

.menu-item-description {
  font-size: 0.95rem;
  color: var(--color-text-muted-light);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

.menu-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.allergen-icons {
  display: flex;
  gap: 0.5rem;
}

.allergen-icon {
  width: 22px;
  height: 22px;
  background-color: #1a1c20;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--color-primary);
  cursor: help;
  position: relative;
}

.allergen-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: #1e2024;
  color: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  white-space: nowrap;
  border-radius: 3px;
  border: 1px solid var(--color-primary);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-fast);
  z-index: 10;
}

.allergen-icon:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.menu-note {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid var(--color-border-dark);
  background-color: rgba(20, 21, 24, 0.4);
}

/* -------------------------------------------------------------
   GALERÍA FOODIE SECTION (Contrast Light)
------------------------------------------------------------- */
.gallery-section {
  padding: 8rem 1.5rem;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

/* Carrusel Elegante Estilo Saona */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.carousel-viewport {
  width: 100%;
  height: 520px;
  overflow: hidden;
  position: relative;
}

.carousel-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-item {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 440px;
  margin-left: -160px;
  margin-top: -220px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 4px solid var(--color-bg-card-light); /* Marco de foto tipo lienzo premium */
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  visibility: hidden;
}

/* Efecto destacado para la foto activa */
.gallery-item.active-slide {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35), 0 0 30px rgba(207, 168, 83, 0.25);
  border-color: var(--color-primary); /* Marco de oro en la activa */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(180, 87, 66, 0.85); /* Terracota overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: var(--transition-smooth);
  color: var(--color-text-light);
  padding: 1.5rem;
  text-align: center;
}

.gallery-overlay i {
  font-size: 1.8rem;
  margin-bottom: 0.8rem;
  transform: translateY(10px);
  transition: var(--transition-smooth);
}

.gallery-overlay span {
  font-family: var(--font-title);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transform: translateY(15px);
  transition: var(--transition-smooth);
}

/* Hover effects for items */
.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay i,
.gallery-item:hover .gallery-overlay span {
  transform: translateY(0);
}

/* Controles de Navegación */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background-color: var(--color-bg-card-light);
  color: var(--color-text-dark);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 15;
  transition: var(--transition-smooth);
}

.carousel-control:hover {
  background-color: var(--color-terracotta);
  color: var(--color-text-light);
  border-color: var(--color-terracotta);
  transform: translateY(-50%) scale(1.08);
}

.carousel-control.prev {
  left: 8%;
}

.carousel-control.next {
  right: 8%;
}

/* Dots Indicadores */
.carousel-dots {
  display: flex;
  gap: 0.7rem;
  margin-top: 2rem;
  z-index: 10;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(27, 28, 30, 0.15);
  cursor: pointer;
  transition: var(--transition-fast);
}

.carousel-dot.active {
  background-color: var(--color-terracotta);
  transform: scale(1.3);
}

/* Responsive Mobile Carousel */
@media (max-width: 992px) {
  .carousel-control.prev {
    left: 2%;
  }
  .carousel-control.next {
    right: 2%;
  }
}

@media (max-width: 768px) {
  .carousel-viewport {
    height: 400px;
  }
  
  .gallery-item {
    width: 240px;
    height: 330px;
    margin-left: -120px;
    margin-top: -165px;
    border-width: 3px;
  }
  
  /* Ocultar flechas en móvil para interactuar por gestos táctiles (swipe) */
  .carousel-control {
    display: none;
  }
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(12, 13, 15, 0.98);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 85%;
  max-height: 85%;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border: 4px solid var(--color-primary);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: -10px;
  background: none;
  border: none;
  color: var(--color-text-light);
  font-size: 2.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--color-primary);
}

.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 21, 24, 0.5);
  border: 1px solid var(--color-border-dark);
  color: var(--color-text-light);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  z-index: 1010;
}

.lightbox-arrow:hover {
  background: var(--color-primary);
  color: var(--color-bg-dark);
  border-color: var(--color-primary);
}

.lightbox-arrow-left {
  left: 2rem;
}

.lightbox-arrow-right {
  right: 2rem;
}

/* -------------------------------------------------------------
   RESERVATIONS (Interactive Postal Envelope Form)
------------------------------------------------------------- */
.reservations-section {
  padding: 8rem 1.5rem;
  background-color: var(--color-bg-dark);
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
}

.envelope-wrapper {
  max-width: 620px;
  margin: 0 auto;
  perspective: 1500px;
  margin-top: 4rem;
}

.envelope {
  position: relative;
  width: 100%;
  height: 380px;
  background-color: #2c2117; /* Dark envelope back background */
  border: 1px solid rgba(207, 168, 83, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  transition: transform 0.8s ease;
  transform-style: preserve-3d;
}

.envelope-front {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
}

/* Simulated folded paper corners using clip paths or linear-gradients */
.envelope-flap {
  position: absolute;
  width: 0;
  height: 0;
  top: 0;
  left: 0;
  border-left: 310px solid transparent;
  border-right: 310px solid transparent;
  border-top: 190px solid #3c2f21; /* Top flap */
  transform-origin: top;
  transition: transform 0.4s ease 0.4s, z-index 0.1s ease 0.4s;
  z-index: 15;
}

.envelope-left-fold {
  position: absolute;
  width: 0;
  height: 0;
  bottom: 0;
  left: 0;
  border-left: 310px solid #231a11;
  border-top: 190px solid transparent;
  border-bottom: 190px solid #231a11;
  z-index: 12;
}

.envelope-right-fold {
  position: absolute;
  width: 0;
  height: 0;
  bottom: 0;
  right: 0;
  border-right: 310px solid #231a11;
  border-top: 190px solid transparent;
  border-bottom: 190px solid #231a11;
  z-index: 12;
}

.envelope-bottom-fold {
  position: absolute;
  width: 0;
  height: 0;
  bottom: 0;
  left: 0;
  border-left: 310px solid transparent;
  border-right: 310px solid transparent;
  border-bottom: 190px solid #1a130c;
  z-index: 13;
}

/* Stamp on the flap */
.envelope-stamp {
  position: absolute;
  top: 150px; /* Centrado en la unión de los pliegues (190px - 40px) */
  left: 50%;
  transform: translateX(-50%);
  width: 80px; /* Sello más grande para que el logo se distinga perfectamente */
  height: 80px;
  background-color: #ffffff; /* Fondo blanco para legibilidad del logotipo circular */
  border: 2.5px solid var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 15px rgba(0,0,0,0.45);
  z-index: 16;
  transition: var(--transition-smooth);
  cursor: pointer;
  pointer-events: auto;
  padding: 4px;
}

.envelope-stamp:hover {
  transform: translateX(-50%) scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(207, 168, 83, 0.4);
  border-color: var(--color-primary-hover);
}

.stamp-logo-img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

/* Interactive card (The Letter) */
.envelope-card {
  position: absolute;
  width: 90%;
  height: 100%;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  top: 5px;
  left: 5%;
  padding: 2.2rem 2.5rem;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0s, z-index 0s ease 0.3s, height 0.6s ease 0s;
  z-index: 5;
  border-radius: 2px;
  overflow: hidden; /* Hide overflowing form content when closed */
}

/* Close button on the card */
.envelope-close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--color-text-muted-dark);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.envelope-close-btn:hover {
  color: var(--color-terracotta);
  background-color: rgba(180, 87, 66, 0.08);
  transform: rotate(90deg);
}

/* Card Header */
.card-header-logo {
  text-align: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-img-card {
  height: 70px;
  width: auto;
  object-fit: contain;
  display: block;
}

.envelope-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  position: relative;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-muted-dark);
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.form-input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  border: none;
  border-bottom: 1px solid #c2beb6;
  background: transparent;
  padding: 0.4rem 0;
  color: var(--color-text-dark);
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-bottom-color: var(--color-terracotta);
}

.form-submit-btn {
  grid-column: 1 / -1;
  background-color: var(--color-terracotta);
  color: var(--color-bg-light);
  border: none;
  padding: 0.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  margin-top: 0.8rem;
  box-shadow: 0 4px 10px rgba(180, 87, 66, 0.25);
}

.form-submit-btn:hover {
  background-color: #9d4532;
  box-shadow: 0 6px 15px rgba(180, 87, 66, 0.4);
}

/* Trigger styles when envelope is opened */
.envelope.open .envelope-flap {
  transform: rotateX(180deg);
  z-index: 2;
  transition: transform 0.4s ease 0s, z-index 0.1s ease 0s;
}

.envelope.open {
  transform: translateY(120px); /* Shift envelope down when open to give breathing room */
}

.envelope.open .envelope-card {
  transform: translateY(-280px);
  z-index: 20;
  height: 560px; /* Increased height to prevent submit button cut-off */
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) 0.3s, z-index 0s ease 0.3s, height 0.6s ease 0.3s;
  overflow: visible; /* Show form contents and tooltips when fully open */
}

.envelope.open .envelope-stamp {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Adjust section padding because card slides out of envelope top boundary */
.reservations-section {
  padding-bottom: 15rem; /* Increased padding to allow the envelope to slide down elegantly */
}

/* Intro banner above envelope */
.reservation-banner {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 3rem auto;
}

/* -------------------------------------------------------------
   CONTACT & LOCALIZATION SECTION (Contrast Light)
------------------------------------------------------------- */
.contact-section {
  padding: 8rem 1.5rem;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

.contact-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-info .section-tag {
  color: var(--color-terracotta);
}

.contact-info .section-title {
  color: var(--color-text-dark);
  margin-bottom: 2.5rem;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 3rem;
}

.hours-table tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.hours-table td {
  padding: 0.8rem 0;
  font-size: 1rem;
}

.hours-table td.day-name {
  font-weight: 600;
  font-family: var(--font-body);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--color-text-dark);
}

.hours-table td.time-range {
  text-align: right;
  color: var(--color-text-muted-dark);
}

.hours-table tr.highlighted {
  border-bottom: 2px solid var(--color-terracotta);
}

.hours-table tr.highlighted td {
  color: var(--color-terracotta);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.contact-actions .btn-primary, .contact-actions .btn-outline {
  flex: 1 1 200px;
}

/* Map Integration */
.contact-map-wrapper {
  height: 100%;
  min-height: 450px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  /* Premium filter to mute the map slightly to match the aesthetic */
  filter: grayscale(0.2) contrast(1.1) brightness(0.95);
}

/* -------------------------------------------------------------
   FOOTER (Dark)
------------------------------------------------------------- */
.footer {
  background-color: var(--color-bg-dark);
  border-top: 1px solid var(--color-border-dark);
  padding: 5rem 1.5rem 2rem 1.5rem;
  color: var(--color-text-light);
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand h4 {
  font-family: var(--font-logo);
  font-size: 1.6rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--color-text-light);
}

.footer-brand p {
  color: var(--color-text-muted-light);
  max-width: 320px;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-social-link {
  width: 40px;
  height: 40px;
  background-color: var(--color-bg-card-dark);
  border: 1px solid var(--color-border-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-social-link:hover {
  background-color: var(--color-primary);
  color: var(--color-bg-dark);
  transform: translateY(-3px);
}

.footer-links-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-link {
  color: var(--color-text-muted-light);
  text-decoration: none;
  transition: var(--transition-fast);
  font-size: 0.95rem;
}

.footer-link:hover {
  color: var(--color-text-light);
  transform: translateX(3px);
}

.footer-bottom {
  max-width: var(--container-width);
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-text-muted-light);
  font-size: 0.85rem;
  text-align: center;
}

.footer-bottom a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-bottom a:hover {
  color: var(--color-primary-hover);
}

/* -------------------------------------------------------------
   SCROLL REVEAL ANIMATIONS
------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Specific offsets/delay classes */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* -------------------------------------------------------------
   RESPONSIVE MEDIA QUERIES
------------------------------------------------------------- */
@media (max-width: 1024px) {
  /* Hide scroll down mouse indicator on tablets/mobile */
  .scroll-indicator {
    display: none !important;
  }

  .hero-title {
    font-size: 3.5rem;
  }
  .hero-title .font-serif-title {
    font-size: 3.8rem;
  }
  .hero-container {
    gap: 2rem;
  }
  .history-container {
    gap: 4rem;
  }
  .section-title {
    font-size: 3rem;
  }
  .section-title .font-serif-title {
    font-size: 3.2rem;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal stretch on all main mobile sections */
  .hero, .history, .menu-section, .gallery-section, .contact-section, .reservations-section {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
  }

  /* Header burger menu */
  .hamburger {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--color-bg-dark);
    border-left: 1px solid var(--color-border-dark);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    z-index: 100;
    transition: var(--transition-smooth);
    padding: 2rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Hero Section Mobile */
  .hero {
    padding-top: 5.5rem; /* Ajuste para subir el texto inicial hacia la cabecera */
    padding-bottom: 2.5rem;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-content {
    align-items: center;
  }

  .hero-title {
    font-size: 2.1rem;
    line-height: 1.1;
  }
  
  .hero-title .font-serif-title {
    font-size: 2.5rem;
  }

  .hero-description {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .hero-image-showcase {
    height: 380px;
  }

  .hero-img-main {
    width: 75vw;
    max-width: 280px;
    height: auto;
    aspect-ratio: 280/340;
  }

  .hero-img-secondary {
    width: 50vw;
    max-width: 180px;
    height: auto;
    aspect-ratio: 1;
    left: -10px;
  }

  /* History Section Mobile */
  .history-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .history-images {
    height: 400px;
    order: 2;
  }

  .history-img-1 {
    width: 240px;
    height: 300px;
  }

  .history-img-2 {
    width: 200px;
    height: 240px;
  }

  /* Menu Section Mobile */
  .menu-pane.active {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  /* Gallery Section Mobile */
  .carousel-control {
    display: flex;
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
  
  .carousel-control.prev {
    left: 10px;
  }
  
  .carousel-control.next {
    right: 10px;
  }

  /* Contact Section Mobile */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .section-title {
    font-size: 2.1rem;
    line-height: 1.1;
  }
  
  .section-title .font-serif-title {
    font-size: 2.5rem;
  }

  .hours-table, 
  .hours-table tbody, 
  .hours-table tr, 
  .hours-table td {
    display: block;
    width: 100%;
    text-align: left;
  }
  
  .hours-table tr {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }
  
  .hours-table td {
    padding: 0.2rem 0;
    border: none;
  }
  
  .hours-table td.day-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-text-dark);
    margin-bottom: 0.2rem;
  }
  
  .hours-table td.time-range {
    text-align: left;
    color: var(--color-text-muted-dark);
    font-size: 0.95rem;
  }

  .hours-table tr.highlighted {
    border-bottom: 2px solid var(--color-terracotta);
  }
  
  .hours-table tr.highlighted td.day-name,
  .hours-table tr.highlighted td.time-range {
    color: var(--color-terracotta);
  }

  .contact-actions {
    flex-direction: column;
    gap: 1rem;
  }

  .contact-actions .btn-primary, 
  .contact-actions .btn-outline {
    flex: 1 1 auto;
    width: 100%;
    text-align: center;
  }

  .contact-map-wrapper {
    min-height: 300px;
  }

  /* Reservations Envelope Mobile */
  .reservations-section {
    padding: 5rem 1rem 8rem 1rem;
  }

  .envelope-wrapper {
    width: 300px;
    margin: 0 auto;
  }

  .envelope {
    height: 200px;
    transition: height 0.6s ease, transform 0.6s ease;
  }

  .envelope.open {
    height: 650px;
    transform: translateY(10px);
  }

  .envelope-card {
    padding: 1.5rem 1.2rem;
    width: 100%;
    left: 0;
    overflow: hidden;
  }

  .envelope-form {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .card-header-logo {
    margin-bottom: 0.8rem;
  }

  .logo-img-card {
    height: 50px;
  }

  .envelope-flap {
    border-left-width: 150px;
    border-right-width: 150px;
    border-top-width: 110px;
  }

  .envelope-left-fold, .envelope-right-fold {
    border-left-width: 150px;
    border-right-width: 150px;
    border-top-width: 100px;
    border-bottom-width: 100px;
  }

  .envelope-bottom-fold {
    border-left-width: 150px;
    border-right-width: 150px;
    border-bottom-width: 100px;
  }

  .envelope-stamp {
    top: 65px; /* Centrado vertical en el sobre móvil (100px - 35px) */
    width: 70px;
    height: 70px;
    border-width: 2px;
  }

  .envelope.open .envelope-card {
    transform: translateY(-20px);
    height: 650px;
    overflow: visible !important;
  }

  /* Footer Mobile */
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Modales de Textos Legales */
.legal-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(12, 13, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.legal-modal.active {
  opacity: 1;
  visibility: visible;
}

.legal-modal-content {
  background-color: var(--color-bg-card-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: 12px;
  width: 90%;
  max-width: 650px;
  max-height: 80vh;
  padding: 2.5rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateY(-20px);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.legal-modal.active .legal-modal-content {
  transform: translateY(0);
}

.legal-modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--color-text-muted-light);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition-fast);
}

.legal-modal-close:hover {
  color: var(--color-terracotta);
}

.legal-modal-title {
  font-family: var(--font-title);
  color: var(--color-primary);
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.legal-modal-body {
  overflow-y: auto;
  padding-right: 0.5rem;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Personalizar barra de scroll de los textos legales */
.legal-modal-body::-webkit-scrollbar {
  width: 6px;
}

.legal-modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

.legal-modal-body::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.legal-modal-body p {
  margin-bottom: 1.2rem;
}

.legal-modal-body strong {
  color: var(--color-primary-hover);
}

@media (max-width: 768px) {
  .legal-modal-content {
    padding: 2rem 1.5rem 1.5rem;
    max-height: 85vh;
  }
  .legal-modal-title {
    font-size: 1.5rem;
  }
}

/* Botón Volver Arriba (Back to Top) */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background-color: var(--color-bg-card-dark);
  color: var(--color-primary);
  border: 1px solid var(--color-border-dark);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
  z-index: 99;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.back-to-top:hover {
  background-color: var(--color-primary);
  color: var(--color-bg-dark);
  border-color: var(--color-primary);
  transform: translateY(-3px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    font-size: 0.9rem;
  }
}

/* Contenedor y Tarjetas de Notificaciones Flotantes (Toasts) */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11000;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 90%;
  max-width: 420px;
  pointer-events: none; /* Dejar pasar eventos si no hay toasts */
}

.toast {
  pointer-events: auto; /* Permitir interacción con el toast */
  background: rgba(20, 21, 24, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85);
  transform: scale(0.9) translateY(-10px);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.toast.show {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.toast-icon {
  color: var(--color-primary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-message {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0;
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-muted-light);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: var(--transition-fast);
  line-height: 1;
  align-self: center;
}

.toast-close:hover {
  color: var(--color-primary-hover);
}

/* Responsividad para móviles del sistema de avisos (Centrado en pantalla) */
@media (max-width: 768px) {
  .toast-container {
    max-width: 360px;
  }

  .toast {
    padding: 1.2rem;
    gap: 0.8rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.9);
  }

  .toast-message {
    font-size: 0.95rem;
  }
}

/* Validación visual de campos obligatorios vacíos (Estilo rojo Terracota) */
.envelope-form.was-validated .form-input:invalid {
  border-color: var(--color-terracotta) !important;
  background-color: rgba(180, 87, 66, 0.04) !important;
  box-shadow: 0 0 6px rgba(180, 87, 66, 0.25) !important;
}
