/* ==========================================================================
   1. RESET Y CONFIGURACIÓN GENERAL
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Paleta de colores */
  --bg-main: #fdfaf5;
  --bg-card: #ffffff;
  --bg-subtle: #f5efe6;
  --bg-dark: #2a1b16;
  --bg-dark-footer: #1e130f;
  
  --text-primary: #2a1b16;
  --text-secondary: #6e5d54;
  --text-light: #fdfaf5;
  --text-muted: #9e8c82;
  
  --accent-brown: #3d2314;
  --accent-gold: #c28b4c;
  --accent-pill: #eedfd2;
  --accent-pill-text: #7c4d25;
  
  /* Fuentes */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, sans-serif;
  
  /* Sombras y Bordes */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 4px 12px rgba(42, 27, 22, 0.04);
  --shadow-md: 0 10px 25px rgba(42, 27, 22, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Tipografía de títulos */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Subtítulos de sección pequeños (badges/etiquetas) */
/* Subtítulos de sección pequeños y badges/burbujas en formato pílula */
section > h3,
.burbujas {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-pill-text);
  background-color: var(--accent-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 12px;
  width: fit-content;
}

/* Alineación de íconos dentro de las burbujas */
.burbujas svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

/* ==========================================================================
   2. HEADER / NAVEGACIÓN
   ========================================================================== */
header {
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.logo div {
    display: flex;
    flex-direction: column;
}

.logo span:first-child {
    font-weight: bold;
    font-size: 1.1rem;
    color: #3d261d;
}

.logo span:last-child {
    font-size: 0.75rem;
    color: #8d7768;
}

nav > a:not(.logo) {
    font-weight: 500;
    font-size: 0.95rem;
    color: #4a3b32;
    transition: color 0.3s ease;
}

nav > a:not(.logo):hover {
    color: #a67c52;
}

/* ==========================================================================
   3. SECCIÓN INICIO (#inicio)
   ========================================================================== */
#inicio {
  max-width: 1200px;
  margin: 40px auto 100px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto auto auto;
  gap: 20px 40px;
  align-items: center;
}

/* Badge de calificación */
#inicio > span:first-child {
  grid-column: 1;
  font-size: 0.85rem;
  font-weight: 600;
  background-color: #f5ebe0;
  color: var(--accent-pill-text);
  padding: 6px 16px;
  border-radius: 50px;
  width: fit-content;
}

/* Título e introducción */
#inicio h1 {
  grid-column: 1;
  font-size: 3.5rem;
  color: var(--accent-brown);
}

#inicio p {
  grid-column: 1;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
}

/* Botones principal y secundario */
#inicio > a[href="#menu"],
#inicio > a[href="#contacto"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  width: fit-content;
}

#inicio > a[href="#menu"] {
  background-color: var(--accent-brown);
  color: var(--text-light);
  margin-right: 12px;
}

#inicio > a[href="#menu"]:hover {
  background-color: #26140a;
}

#inicio > a[href="#contacto"] {
  border: 1.5px solid #d8cdbe;
  color: var(--text-primary);
}

#inicio > a[href="#contacto"]:hover {
  background-color: var(--bg-subtle);
}

/* Contenedor de estadísticas (100% Ecuatoriano, Diario, +85pts) */
#inicio > div:nth-of-type(1),
#inicio > div:nth-of-type(2),
#inicio > div:nth-of-type(3) {
  display: inline-block;
  margin-top: 20px;
  margin-right: 30px;
}

#inicio > div:nth-of-type(1) p:first-child,
#inicio > div:nth-of-type(2) p:first-child,
#inicio > div:nth-of-type(3) p:first-child {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-brown);
}

#inicio > div:nth-of-type(1) p:last-child,
#inicio > div:nth-of-type(2) p:last-child,
#inicio > div:nth-of-type(3) p:last-child {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Contenedor de Imagen de Banner Hero */
#inicio > div:last-child {
  grid-column: 2;
  grid-row: 1 / span 5;
  position: relative;
}

#inicio > div:last-child img {
  width: 100%;
  height: 520px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background-color: #e5d8ca; /* Placeholder si no hay src */
}

/* Badge superior sobre la imagen hero */
#inicio > div:last-child > span {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-brown);
}

/* Tarjeta superpuesta sobre la imagen hero */
#inicio > div:last-child > div {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background-color: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  max-width: 280px;
  border: 1px solid rgba(0,0,0,0.05);
}

#inicio > div:last-child > div p:nth-child(1) {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

#inicio > div:last-child > div p:nth-child(2) {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-brown);
  margin: 4px 0;
}

#inicio > div:last-child > div p:nth-child(3) {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   4. SECCIÓN MENÚ (#menu)
   ========================================================================== */
#menu {
  max-width: 1200px;
  margin: 100px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Centrado exclusivo del encabezado de la sección menú */
#menu > h3,
#menu > .burbujas,
#menu > h2,
#menu > p {
  grid-column: 1 / -1;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

#menu > h2 {
  font-size: 2.4rem;
  color: var(--accent-brown);
  margin-top: -8px;
}

#menu > p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 600px;
}

#menu > h2 {
  font-size: 2.4rem;
  color: var(--accent-brown);
  margin-top: -8px;
}

#menu > p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 600px;
}

/* Tarjetas de productos (articles) */
#menu article {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.03);
}

#menu article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* Etiqueta flotante superior */
#menu article > span:nth-of-type(1) {
  position: absolute;
  top: 28px;
  left: 28px;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(4px);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  color: var(--accent-brown);
}

#menu article img {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  background-color: #ebdcd0; /* Placeholder */
}

/* Etiquetas de ingredientes/categorías */
#menu article > span:nth-of-type(2),
#menu article > span:nth-of-type(3) {
  display: inline-block;
  font-size: 0.75rem;
  background-color: var(--bg-subtle);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 4px;
  margin-right: 6px;
  margin-bottom: 12px;
  width: fit-content;
}

#menu article h3 {
  font-size: 1.25rem;
  color: var(--accent-brown);
  margin-bottom: 8px;
}

#menu article p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

#menu article > span:last-child {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-brown);
}

/* ==========================================================================
   5. SECCIÓN HISTORIA (#historia)
   ========================================================================== */
#historia {
  max-width: 1200px;
  margin: 120px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

/* Columna de la Imagen */
#historia > div:first-child {
  position: relative;
}

#historia > div:first-child img {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background-color: #d8c2b0; /* Placeholder */
}

/* Cita destacada sobre la imagen */
#historia > div:first-child > div {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background-color: rgba(42, 27, 22, 0.88);
  backdrop-filter: blur(8px);
  padding: 24px;
  border-radius: var(--radius-md);
  color: var(--text-light);
}

#historia > div:first-child > div p:first-child {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

#historia > div:first-child > div p:last-child {
  font-size: 0.8rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Columna de Texto */
#historia > div:last-child h2 {
  font-size: 2.4rem;
  color: var(--accent-brown);
  margin-bottom: 20px;
}

#historia > div:last-child p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1rem;
}

/* Estadísticas inferiores de Historia */
#historia > div:last-child > div {
  display: inline-block;
  margin-top: 24px;
  margin-right: 28px;
  padding-top: 16px;
  border-top: 1px solid #e2d7c9;
}

#historia > div:last-child > div p:first-child {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-brown);
  margin-bottom: 0;
}

#historia > div:last-child > div p:last-child {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   6. SECCIÓN EXPERIENCIA / POR QUÉ ELEGIRNOS (#experiencia)
   ========================================================================== */
#experiencia {
  max-width: 1200px;
  margin: 120px auto;
  padding: 0 24px;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

#experiencia > h3,
#experiencia > h2,
#experiencia > p {
  grid-column: 1 / -1;
  margin-left: auto;
  margin-right: auto;
}

#experiencia > h2 {
  font-size: 2.4rem;
  color: var(--accent-brown);
}

#experiencia > p {
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 30px;
}

/* Tarjetas de Experiencia (articles) */
#experiencia article {
  background-color: var(--bg-card);
  padding: 32px 24px;
  border-radius: var(--radius-md);
  text-align: left;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.03);
}

#experiencia article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background-color: var(--bg-subtle);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-brown);
  margin-bottom: 20px;
}

#experiencia article h3 {
  font-size: 1.2rem;
  color: var(--accent-brown);
  margin-bottom: 12px;
}

#experiencia article p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   7. SECCIÓN GALERÍA (#galeria)
   ========================================================================== */
#galeria {
  max-width: 1200px;
  margin: 120px auto;
  padding: 0 24px;
  text-align: center;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

#galeria > h3,
#galeria > h2,
#galeria > p {
  grid-column: 1 / -1;
  margin-left: auto;
  margin-right: auto;
}

#galeria > h2 {
  font-size: 2.4rem;
  color: var(--accent-brown);
}

#galeria > p {
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 30px;
}

#galeria > div img {
  width: 100%;
  height: 280px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background-color: #ebdcd0; /* Placeholder */
  transition: transform 0.3s ease;
}

#galeria > div img:hover {
  transform: scale(1.02);
}

/* ==========================================================================
   8. SECCIÓN CONTACTO / UBICACIÓN (#contacto)
   ========================================================================== */
#contacto {
  max-width: 1200px;
  margin: 120px auto;
  padding: 0 24px;
}

#contacto > h2 {
  font-size: 2.4rem;
  color: var(--accent-brown);
}

#contacto > p {
  color: var(--text-secondary);
  margin-bottom: 40px;
}

#contacto > div {
  background-color: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  border: 1px solid rgba(0,0,0,0.04);
}

/* Bloques de Dirección, Horarios y Teléfono */
#contacto > div > div p:first-child {
  font-weight: 700;
  color: var(--accent-brown);
  margin-bottom: 6px;
}

#contacto > div > div p:not(:first-child) {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Badges de características adicionales (Pet-friendly, Wifi, etc.) */
#contacto > div > span {
  display: inline-block;
  background-color: var(--bg-subtle);
  color: var(--accent-brown);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 50px;
  text-align: center;
}

/* Botón Cómo llegar */
#contacto > div > a {
  grid-column: 1 / -1;
  background-color: var(--accent-brown);
  color: var(--text-light);
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-top: 10px;
}

#contacto > div > a:hover {
  background-color: #26140a;
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
footer {
  background-color: var(--bg-dark);
  color: var(--text-light);
  padding: 80px 24px 30px;
  margin-top: 100px;
}

footer > div {
  max-width: 1200px;
  margin: 0 auto;
}

/* Banner superior CTA del Footer */
footer > div:nth-child(1) {
  text-align: center;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 60px;
}

footer > div:nth-child(1) h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  color: #fff;
}

footer > div:nth-child(1) p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Bloques de la parte media del Footer */
footer > div:nth-child(2) {
  float: left;
  width: 50%;
  margin-bottom: 40px;
}

footer > div:nth-child(2) p:first-child {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

footer > div:nth-child(2) p:last-child {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 400px;
}

footer > div:nth-child(3) {
  float: right;
  width: 20%;
  margin-bottom: 40px;
}

footer > div:nth-child(3) p:first-child {
  font-weight: 700;
  margin-bottom: 6px;
}

footer > div:nth-child(3) p:nth-child(2) {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

footer > div:nth-child(3) a {
  display: inline-block;
  margin-right: 16px;
  color: var(--accent-gold);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Pie de página final */
footer > div:last-child {
  clear: both;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

footer > div:last-child nav {
  padding: 0;
  gap: 20px;
}

footer > div:last-child nav a {
  color: var(--text-muted);
  font-size: 0.8rem;
}

footer > div:last-child nav a:hover {
  color: #fff;
}

/* ==========================================================================
   10. RESPONSIVE DESIGN (Pantallas pequeñas y Móviles)
   ========================================================================== */
@media (max-width: 992px) {
  #inicio {
    grid-template-columns: 1fr;
  }
  
  #inicio > div:last-child {
    grid-column: 1;
    grid-row: auto;
    margin-top: 40px;
  }

  #menu, #experiencia {
    grid-template-columns: repeat(2, 1fr);
  }

  #historia {
    grid-template-columns: 1fr;
  }

  #contacto > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  #inicio h1 {
    font-size: 2.4rem;
  }

  #menu, #experiencia, #galeria {
    grid-template-columns: 1fr;
  }

  footer > div:nth-child(2),
  footer > div:nth-child(3) {
    float: none;
    width: 100%;
  }

  footer > div:last-child {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}