/* ================================
   RESET E VARIAVEIS
   ================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #96542b;
  --color-secondary: #a79884;
  --color-white: #ffffff;
  --color-black: #000000;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --footer-height: 70px;
  --vh: 1vh; /* Valor por defeito, será atualizado por JS */
}

html {
  height: 100%;
  background: var(--color-black);
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body);
  background: var(--color-black);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ================================
   FEED - SCROLL SNAP CONTAINER
   ================================ */
.feed {
  height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
}

.feed::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* ================================
   SLIDE - CADA PRATO
   ================================ */
.slide {
  height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow: hidden;
}

/* Video fullscreen */
.slide__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Alterado para cover para preencher o ecra estilo TikTok */
  background: var(--color-black);
}

/* Overlay com gradiente para legibilidade do texto */
.slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    transparent 25%,
    transparent 50%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 1.5rem calc(var(--footer-height) + 1.5rem); /* Padding extra para não sobrepor o footer fixo */
  pointer-events: none;
  z-index: 10;
}

/* Informacao do prato */
.slide__info {
  max-width: 85%;
}

.slide__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 7vw, 2.8rem);
  font-weight: 700;
  color: var(--color-white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.slide__subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 3.5vw, 1.1rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
}

/* ================================
   SLIDE DE CONTACTOS (ultimo slide)
   ================================ */
.slide--contact {
  background: linear-gradient(135deg, var(--color-primary), #7a4422);
}

.contact-section {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 70px) 2rem calc(var(--footer-height) + 2rem);
  gap: 1.2rem;
  overflow-y: auto;
  text-align: center;
  color: var(--color-white);
}

.contact__logo {
  width: 120px;
  height: auto;
  margin-bottom: 0.5rem;
}

.contact__block h3 {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.3rem;
}

.contact__block a,
.contact__block p {
  color: var(--color-white);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
}

.contact__block a:hover {
  text-decoration: underline;
}

.contact__block small {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 0.2rem;
}

.contact__closed {
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
  font-size: 0.9rem;
}

.contact__social {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.contact__social a {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.contact__social a:hover {
  opacity: 1;
}

/* ================================
   HEADER FIXO
   ================================ */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 1rem 12px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
}

.language-selector,
.brand {
  pointer-events: auto;
}

.language-selector {
  display: flex;
  gap: 4px;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lang-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.brand-logo {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ================================
   FOOTER (CTA) - SEMPRE VISIVEL
   ================================ */
.bottom-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--footer-height);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 12px 1rem calc(env(safe-area-inset-bottom, 0px) + 12px);
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.btn-sound {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.btn-sound:hover {
  background: rgba(255, 255, 255, 0.25);
}

.btn-cta {
  flex: 1;
  padding: 14px 0;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-cta:active {
  transform: scale(0.97);
}

.btn-cta--secondary {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-cta--secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ================================
   SWIPE HINT (animacao no primeiro slide)
   ================================ */
.swipe-hint {
  position: absolute;
  bottom: calc(var(--footer-height) + 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 20;
  animation: swipeHintBounce 2s ease-in-out infinite;
  opacity: 1;
  transition: opacity 0.5s ease;
}

.swipe-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.swipe-hint__text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.05em;
}

.swipe-hint__arrow svg {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
}

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

/* ================================
   RESPONSIVIDADE
   ================================ */
@media (min-width: 768px) {
  .feed {
    max-width: 500px;
    margin: 0 auto;
  }

  .bottom-cta {
    max-width: 500px;
    margin: 0 auto;
  }

  .top-bar {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
  }
}
