* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --fondo: #121212;
  --panel: #1e1e1e;
  --texto: #f5f5f5;
  --suave: #9e9e9e;
  --acento: #ff9800;
}

html, body { height: 100%; }

body {
  background: var(--fondo);
  color: var(--texto);
  font-family: system-ui, sans-serif;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

/* ===== Barra superior: hora | fecha | clima ===== */
.barra-superior {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.2vh 3vw;
  background: var(--panel);
}

.reloj {
  justify-self: start;
  font-size: 4.5vh;
  font-weight: 700;
}

.fecha {
  justify-self: center;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.8vw;
  align-items: center;
}
.fecha-numero {
  grid-row: 1 / 3;
  font-size: 6vh;
  font-weight: 800;
  line-height: 1;
  color: var(--acento);
}
.fecha-dia { font-size: 2.4vh; font-weight: 700; align-self: end; }
.fecha-mes { font-size: 1.9vh; color: var(--suave); align-self: start; }

.clima {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.clima-lugar { font-size: 1.9vh; color: var(--suave); }
.clima-estado { font-size: 3.4vh; font-weight: 700; }

/* ===== Layout principal ===== */
.contenido {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: minmax(0, 1fr);
  gap: 2vw;
  padding: 2vh 2vw;
  min-height: 0;
}

/* ===== Carrusel ===== */
.carrusel {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
}
.carrusel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.carrusel img.activa { opacity: 1; }

/* ===== Calendario sobre la foto ===== */
.calendario {
  position: absolute;
  top: 2vh;
  right: 2vh;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(7, 4vh);
  gap: 0.4vh;
  padding: 1.5vh;
  text-align: center;
  font-size: 1.9vh;
  line-height: 3.2vh;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 12px;
}
.calendario .dia-semana { color: rgba(255, 255, 255, 0.7); font-weight: 700; }
.calendario .pasado { color: rgba(255, 255, 255, 0.35); }
.calendario .hoy {
  background: var(--acento);
  color: #000;
  border-radius: 6px;
  font-weight: 700;
}

/* ===== Especial del día ===== */
.especial {
  background: var(--panel);
  border-radius: 16px;
  padding: 2vh 2vw;
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
  min-height: 0;
  overflow: hidden;
}

.titulo {
  font-size: 5vh;
  color: var(--acento);
  text-transform: uppercase;
  border-bottom: 3px solid var(--acento);
  padding-bottom: 1vh;
}

/* Lista: el tamaño de letra lo ajusta JavaScript; los espacios usan em para escalar con él */
.platillos {
  list-style: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  font-size: 4vh;
}
.platillos li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1vw;
  border-bottom: 1px dashed #333;
  padding-bottom: 0.25em;
}
.platillos .vacio {
  color: var(--suave);
  border: none;
  justify-content: center;
}
.precio {
  color: var(--acento);
  font-weight: 700;
  white-space: nowrap;
}

/* ===== Paginación ===== */
.platillos { transition: opacity 0.4s ease; }
.platillos.oculta { opacity: 0; }

.paginas {
  display: flex;
  justify-content: center;
  gap: 0.8vh;
  min-height: 1.2vh;
}
.paginas .punto {
  width: 1.2vh;
  height: 1.2vh;
  border-radius: 50%;
  background: #444;
  transition: background 0.3s ease;
}
.paginas .punto.activo { background: var(--acento); }

/* ===== Marca del negocio ===== */
.marca {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 1vw;
  min-width: 0;
}
.logo {
  height: 7vh;
  max-width: 14vh;
  object-fit: contain;
}
.marca-texto {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.nombre-negocio,
.eslogan {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nombre-negocio { font-size: 3.6vh; font-weight: 800; }
.eslogan { font-size: 1.8vh; color: var(--suave); }

/* ===== Hora y fecha al centro ===== */
.tiempo {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 1.5vw;
}
.tiempo .fecha {
  padding-left: 1.5vw;
  border-left: 2px solid #333;
}

/* ===== Powered by Tezkai ===== */
.powered-by {
  position: absolute;
  right: 2vh;
  bottom: 2vh;
  z-index: 2;
  padding: 0.6vh 1.2vh;
  font-size: 1.4vh;
  color: rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.powered-by strong { color: rgba(255, 255, 255, 0.9); }

/* ===== Efecto Ken Burns: zoom lento en la foto activa ===== */
.carrusel img {
  transform: scale(1);
  transition: opacity 1s ease, transform 7s linear;   /* 7 s: un poco más que lo que dura cada foto */
  will-change: transform, opacity;
}
.carrusel img.activa {
  transform: scale(1.12);
}
/* Las fotos pares, además, se desplazan un poco para que no todas se muevan igual */
.carrusel img.activa:nth-of-type(even) {
  transform: scale(1.12) translate(-2%, -1%);
}

/* Respeta a quien tiene activada la opción de reducir movimiento en su sistema */
@media (prefers-reduced-motion: reduce) {
  .carrusel img,
  .carrusel img.activa { transform: none; transition: opacity 1s ease; }
}

/* ===== Título con ola ===== */
.titulo span { display: inline-block; }
.titulo.ola span {
  animation: ola 0.7s ease-in-out both;
  animation-delay: calc(var(--i) * 45ms);   /* Cada letra arranca un poco después */
}
@keyframes ola {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-0.22em); }
}

/* ===== Platillo nuevo: entra deslizándose y parpadea resaltado ===== */
.platillos li { position: relative; }
.platillos li.nuevo {
  isolation: isolate;                        /* Para que el resaltado quede detrás del texto */
  animation: entrar 0.6s ease-out both;
}
.platillos li.nuevo::before {
  content: '';
  position: absolute;
  inset: -0.1em 0;
  z-index: -1;
  background: rgba(255, 152, 0, 0.22);
  border-radius: 8px;
  animation: resaltar 1s ease-in-out 8 alternate both;
}
@keyframes entrar {
  from { opacity: 0; transform: translateX(1.5em); }
  to   { opacity: 1; transform: none; }
}
@keyframes resaltar {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .titulo.ola span,
  .platillos li.nuevo,
  .platillos li.nuevo::before { animation: none; }
}
