@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --primary:       #1b4332;
  --primary-light: #2d6a4f;
  --primary-glow:  #40916c;
  --accent:        #b08d57;
  --accent-light:  #d4aa6b;
  --bg:            #faf8f4;
  --bg-alt:        #f0ebe0;
  --text:          #1c1c1c;
  --text-light:    #5a5a5a;
  --text-muted:    #8a8a8a;
  --card:          #ffffff;
  --border:        #e2d9cc;
  --shadow-sm:     0 2px 10px rgba(0,0,0,0.07);
  --shadow-md:     0 6px 24px rgba(0,0,0,0.12);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.18);
  --radius:        10px;
  --tr:            0.3s ease;
  --menu-width:    260px;
}

[data-theme="dark"] {
  --primary:       #52b788;
  --primary-light: #74c69d;
  --primary-glow:  #95d5b2;
  --accent:        #c8a96e;
  --accent-light:  #dfc08a;
  --bg:            #0d1f18;
  --bg-alt:        #152d22;
  --text:          #eae6df;
  --text-light:    #b0a898;
  --text-muted:    #7a7268;
  --card:          #1a2e24;
  --border:        #2a3d32;
  --shadow-sm:     0 2px 10px rgba(0,0,0,0.35);
  --shadow-md:     0 6px 24px rgba(0,0,0,0.45);
  --shadow-lg:     0 12px 48px rgba(0,0,0,0.55);
}

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background var(--tr), color var(--tr);
}

.loader {
  position: fixed;
  inset: 0;
  background: #2d6a4f;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  color: white;
}

.loader-icon {
  font-size: 3.5rem;
  margin-bottom: 18px;
  display: block;
  animation: sway 2s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(-8deg); }
  50%       { transform: rotate(8deg); }
}

.loader-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-weight: 700;
  color: white;
  letter-spacing: 5px;
  margin-bottom: 6px;
}

.loader-sub {
  font-family: 'Nunito', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 44px;
}

.loader-bar-track {
  width: 200px;
  height: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  margin: 0 auto;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--accent-light);
  border-radius: 2px;
  animation: loadFill 0.6s ease forwards;
}

@keyframes loadFill {
  from { width: 0%; }
  to   { width: 100%; }
}


.top-controls {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  height: 42px;
  min-width: 42px;
  border-radius: 21px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr);
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
}

.btn-icon:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dark-btn { font-size: 18px; }

/* Dropdown idioma */
.lang-dropdown { position: relative; }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
  min-width: 130px;
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background var(--tr);
}

.lang-option:hover { background: var(--bg-alt); color: var(--primary); }
.lang-option.active { color: var(--primary); }

.menu-container {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1002;
  width: 44px;
  height: 44px;
}

.hamburger,
.close-menu-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  background: #2d6a4f;
  color: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all var(--tr);
}

.hamburger:hover,
.close-menu-icon:hover {
  background: var(--primary-light);
  transform: scale(1.06);
}

.close-menu-icon { opacity: 0; pointer-events: none; }

body.menu-open .hamburger     { opacity: 0; pointer-events: none; }
body.menu-open .close-menu-icon { opacity: 1; pointer-events: auto; }

/* Menú lateral */
.side-menu {
  border-right: 1px solid rgba(176,141,87,0.18);
  position: fixed;
  top: 0;
  left: 0;
  width: var(--menu-width);
  height: 100%;
  background: #2d6a4f;
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 90px 0 40px;
  overflow: hidden;
}

.side-menu::after {
  content: '🌿';
  position: absolute;
  bottom: 30px;
  right: 20px;
  font-size: 80px;
  opacity: 0.06;
  pointer-events: none;
}

.side-menu.open {
  transform: translateX(0);
  box-shadow: var(--shadow-lg);
}

.side-menu a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: none;
  padding: 14px 32px;
  transition: all 0.22s ease;
  border-left: 3px solid transparent;
}

/* El primer enlace vacío que es intencional para el menú */
.side-menu a:first-child {
  display: none;
}

.side-menu a:hover {
  color: white;
  border-left-color: var(--accent-light);
  background: rgba(255,255,255,0.06);
  padding-left: 42px;
}

/* Overlay oscuro al abrir menú */
body.menu-open::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: url('../img/mantel.jpg') no-repeat center center / cover;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(27,67,50,0.65) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 20px;
  opacity: 0;
  animation: growIn 1.5s ease forwards;
}

@keyframes growIn {
  0% { 
    opacity: 0; 
    transform: scale(0.5); 
  }
  30% { 
    opacity: 1; 
    transform: scale(0.5); /* Mantiene el tamaño pequeño mientras aparece */
  }
  100% { 
    opacity: 1; 
    transform: scale(1);   /* Se agranda al final */
  }
}

.logo-principal {
  display: block;
  margin: 0 auto 20px;
  max-width: 300px;
  max-height: 200px;
  height: auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.5));
}

.hero p {
  color: rgba(255,255,255,0.82);
  font-size: 0.9rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
}

.lugar-destacado { color: var(--accent-light); }

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.55);
  font-size: 22px;
  animation: bounce 2.6s ease-in-out infinite;
  z-index: 1;
  cursor: pointer;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(-9px); }
}


.hero-inner {
  position: relative;
  min-height: 38vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../img/mantel.jpg') no-repeat center center / cover;
  overflow: hidden;
  text-align: center;
}

.hero-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(27,67,50,0.72) 100%);
}

.hero-inner .hero-content {
  opacity: 1;
  animation: none;
}

.hero-inner h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 6vw, 3.8rem);
  font-weight: 700;
  color: white;
  letter-spacing: 4px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  margin-bottom: 10px;
}

.hero-inner p {
  color: rgba(255,255,255,0.75);
  font-size: 0.82rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-weight: 600;
}

.section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-header { margin-bottom: 48px; }

.section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--primary);
  display: inline-block;
  position: relative;
  margin-bottom: 16px;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--accent);
  border-radius: 0;
}

.section-intro {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-top: 20px;
  max-width: 600px;
}

.galeria-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.galeria-fotos img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
  cursor: pointer;
}

.galeria-fotos img:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: all var(--tr);
}

.info-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.info-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
}

.info-card p { color: var(--text-light); margin-bottom: 8px; }

/* Mapa */
.mapa-iframe {
  width: 100%;
  height: 380px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-top: 24px;
}

.postres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-top: 48px;
}

.postre-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.postre-item:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-glow);
}

.postre-item img {
  width: 100%;
  height: 185px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.postre-item:hover img { transform: scale(1.06); }

.postre-item-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.postre-item h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.precio-postre {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary);
  margin-top: auto;
}

.carta-layout {
  max-width: 820px;
  margin: 0 auto;
  padding: 60px 20px;
}

.carta-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 48px;
  box-shadow: var(--shadow-sm);
}

.menu-section { margin-bottom: 44px; }
.menu-section:last-child { margin-bottom: 0; }

.menu-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.vinos-subtitulo {
  font-family: 'Nunito', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 800;
  margin: 22px 0 12px;
}

.menu-content ul {
  list-style: none;
}

.menu-content li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--border);
  border-radius: 6px;
  transition: background var(--tr);
}

.menu-content li:last-child { border-bottom: none; }

.menu-content li:hover { background: var(--bg-alt); }

.menu-content li span {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.45;
}

.menu-content li .precio {
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  white-space: nowrap;
  text-align: right;
  min-width: 72px;
}

.menu-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  margin-top: 44px;
  letter-spacing: 1px;
}

.menu-content h2:first-child { margin-top: 0; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-content {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal.open .modal-content { transform: scale(1); }

.close-modal {
  position: absolute;
  top: 18px;
  right: 26px;
  color: white;
  font-size: 38px;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
  line-height: 1;
}

.close-modal:hover { opacity: 1; }

footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  text-align: center;
  padding: 36px 20px;
  font-size: 0.88rem;
}

.footer-carta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.footer-logo {
  width: 72px;
  height: auto;
}

footer p:last-child {
  color: rgba(255,255,255,0.4);
  font-size: 0.78rem;
  margin-top: 6px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

@media (max-width: 900px) {
  .carta-card { padding: 32px 28px; }
}

@media (max-width: 768px) {
  .logo-principal { max-width: 240px; }

  .section { padding: 60px 16px; }

  .postres-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .galeria-fotos { grid-template-columns: 1fr; }
  .galeria-fotos img { height: 200px; }

  .hero-inner { min-height: 32vh; }

  .side-menu { width: 78%; }

  .carta-card { padding: 24px 18px; }
}

@media (max-width: 480px) {
  .postres-grid { grid-template-columns: 1fr; }

  .top-controls { gap: 6px; }

  .btn-icon {
    height: 38px;
    min-width: 38px;
    font-size: 11px;
  }

  .dark-btn { font-size: 16px; }

  .carta-card { padding: 20px 14px; }

  .menu-content li { flex-direction: column; gap: 4px; }
  .menu-content li .precio { text-align: left; }
}

footer a.footer-iafidi-link {
  color: rgba(255,255,255,0.88);
  text-decoration: underline wavy #4caf50;
  transition: color var(--tr), opacity var(--tr);
}

footer a.footer-iafidi-link:hover {
  color: white;
  opacity: 1;
}

[data-theme="dark"] footer a.footer-iafidi-link {
  color: var(--bg);
}

[data-theme="dark"] footer a.footer-iafidi-link:hover {
  color: var(--bg-alt);
}

.alerg-icons {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  vertical-align: middle;
  margin-left: 4px;
}

/* Cada icono */
.alerg-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: inline-block;
  cursor: help;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.postre-item .alerg-icon {
  width: 32px;
  height: auto;
  object-fit: unset;
}

.alerg-icon:hover {
  transform: scale(1.35);
  position: relative;
  z-index: 10;
}

.postre-item-info {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.postre-item-info .name-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.postre-item h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin: 0;
}

.menu-content li {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-bottom: 1px dashed var(--border);
  border-radius: 6px;
  transition: background var(--tr);
}

.menu-content li > span:not(.precio):not(.alerg-icons) {
  flex: 1;
  font-size: 1rem;
  color: var(--text);
  line-height: 1.45;
}

.menu-content li > .alerg-icons {
  flex-shrink: 0;
  margin-left: 0;
}

.menu-content li .precio {
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  white-space: nowrap;
  text-align: left;
  min-width: 72px;
  margin-left: 0;
}