:root {
  --bg-color: #3b82f6;
  --navy-light: #fbbf24;
  --navy-dark: #1e3a5f;
  --card-bg: #ffffff;
  --card-header-bg: #f8fafc;
  --text-main: #334155;
  --text-muted: #64748b;
  --primary: #fbbf24;
  --primary-hover: #f59e0b;
  --success: #10b981;
  --border-radius: 16px;
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

h2, h3 {
  font-family: 'Montserrat', sans-serif;
}

body {
  background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('images/real_soccer_field.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  position: relative;
  width: 100%;
  background: #1e3a5f; /* Azul escuro sólido */
  text-align: center;
  padding: 1.2rem 0; /* Aproximado do card */
  z-index: 100;
  border-bottom: 2px solid #fbbf24;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-datetime {
  position: absolute;
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.digital-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.logo-part-1, .logo-part-2 {
  font-family: 'Impact', sans-serif;
  color: #ffffff;
  -webkit-text-stroke: 0.5px #1e3a8a; /* Contornado fino de 0.5px */
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo-part-1 {
  font-size: 2.65rem;
}

.logo-part-2 {
  font-size: 1.95rem;
  margin-top: -4px;
}

/* Main Layout */
main {
  margin-top: 0.15rem; /* Cartão extremamente perto do header */
  padding: 0.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.25); /* Glassmorphism */
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 600px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  overflow: hidden;
  display: none;
  animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.card.active {
  display: block;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  background: #1e3a5f; /* Solid dark blue */
  padding: 1.8rem 1.5rem; /* Symmetrical 1.8rem top and bottom breathing room */
  border-bottom: 2px solid #fbbf24;
}

.card-header h2 {
  text-transform: uppercase;
  color: #fbbf24;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
  font-size: 1.8rem;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.5px;
}

.card-body {
  padding: 1.5rem;
  padding-top: 0.5rem;
}

#card-2 .card-body {
  padding-top: 0.5rem;
}

/* Search Container */
.search-container {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}
.search-container input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  background-color: rgba(255, 255, 255, 0.5);
  color: var(--navy-dark);
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.search-container input::placeholder {
  color: #64748b;
  font-weight: 500;
}
.search-container input:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

/* Promo Box */
.promo-box {
  background: rgba(251, 191, 36, 0.15);
  border: 2px dashed var(--primary);
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.promo-box p {
  margin: 0;
  color: #1e3a5f;
  font-weight: 700;
  font-size: 1.05rem;
}
.promo-box p span {
  color: #ef4444;
  font-size: 1.3rem;
  font-weight: 900;
}
.promo-box hr {
  border: 0;
  border-top: 1px solid rgba(30, 58, 95, 0.2);
  margin: 0.8rem 0;
}

/* Carousel */
.carousel-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.carousel-track img {
  flex: 0 0 100%;
  width: 100%;
  height: 250px;
  object-fit: cover;
  scroll-snap-align: center;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  color: var(--navy-dark);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}
.carousel-btn:hover {
  background: #ffffff;
  transform: translateY(-50%) scale(1.1);
}
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Food Gallery Diagram */
.food-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}
.food-item {
  background: rgba(255,255,255,0.6);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}
.food-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}
.food-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.food-item span {
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy-dark);
  text-align: center;
}

/* Form */
.subtitle {
  font-size: 0.95rem;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Custom Calendar */
.calendar-wrapper {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 0.5rem; /* Reduzido para aproximar da barra de quantidade */
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 800;
  color: #1e3a5f;
  font-size: 1.1rem;
}
.calendar-header button {
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #1e3a5f;
  font-weight: 900;
  font-size: 1.2rem;
  cursor: pointer;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  transition: var(--transition);
}
.calendar-header button:hover {
  color: #fbbf24;
}
.calendar-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #334155;
  margin-bottom: 0.5rem;
}
.calendar-grid-header span:nth-child(6),
.calendar-grid-header span:nth-child(7) {
  color: #9333ea; /* Roxo para Sexta e Sábado */
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  color: #334155;
  position: relative;
  padding: 0.85rem 0; /* Estica verticalmente no desktop */
}
.calendar-day:not(.empty):nth-child(7n+6),
.calendar-day:not(.empty):nth-child(7n) {
  color: #ffffff;
  background: rgba(147, 51, 234, 0.85); /* Preenchimento Roxo Sólido */
  border: none;
}
.calendar-day:hover {
  background: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.calendar-day.empty {
  background: transparent;
  cursor: default;
}
.calendar-day.empty:hover {
  transform: none;
  box-shadow: none;
}
.calendar-day.selected {
  background: #fbbf24;
  color: #000;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.6);
  font-weight: 800;
  transform: scale(1.05);
}

/* Dias Selecionados nos Fins de Semana (Fundo Roxo) */
.calendar-day.selected:nth-child(7n+6),
.calendar-day.selected:nth-child(7n) {
  background: rgba(147, 51, 234, 0.85); /* Mantém o fundo roxo no hover e selected */
  color: #ffffff;
}
.calendar-day.selected:nth-child(7n+6):hover,
.calendar-day.selected:nth-child(7n):hover {
  background: rgba(147, 51, 234, 0.85); /* Sem preencher de amarelo ou mudar o hover */
}

/* Dia limite da Promoção */
.calendar-day.promo-deadline {
  background-color: #2563eb !important; /* Azul escuro brilhante */
  color: #ffffff !important; /* Letras brancas */
  font-weight: 900 !important;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.7);
}
.calendar-day.promo-deadline::after {
  content: 'PROMO';
  font-size: 0.55rem;
  color: #fbbf24; /* Ouro/Amarelo */
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* Caixa do preço promocional */
.price-display-box {
  margin-top: 0.25rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: #fbbf24; /* Amarelo */
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  background: #1e3a5f; /* Azul escuro */
  padding: 0.6rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(30, 58, 95, 0.45);
  border: 2px solid #fbbf24;
}
.price-currency {
  color: #fbbf24; /* Sifrão em amarelo */
  margin-right: 0.1rem;
}
.price-value {
  color: #ffffff; /* Valor em branco */
}

/* Cardápio info box */
.menu-info-box {
  margin-top: 1.5rem;
  background: rgba(30, 58, 95, 0.85); /* Navy dark semi-transparente premium */
  border: 2px solid #fbbf24; /* Borda amarela premium */
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.menu-info-box h3 {
  color: #fbbf24; /* Títulos em amarelo para destacar */
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.menu-info-box p {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
  background-color: #ffffff;
  color: var(--text-main);
}

.form-group input::placeholder {
  color: #94a3b8;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

/* Success Card */
#card-success {
  border: 2px solid #10b981 !important; /* Linha de contorno verde esmeralda no retângulo do tudo certo */
}
#card-success.active {
  display: block;
  margin: auto 0; /* Centraliza o card verticalmente na tela */
}
.success-header {
  background: #10b981 !important; /* Verde esmeralda premium */
}
.success-header h2 {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.success-body {
  text-align: center;
  padding: 2.5rem 1.5rem;
}
.success-body p {
  color: #ffffff !important;
  font-size: 1.25rem !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7) !important;
  margin-bottom: 1.2rem !important;
  line-height: 1.5 !important;
}
.success-body p:last-child {
  margin-bottom: 0 !important;
}
.success-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

/* Actions */
.actions {
  width: 100%;
  max-width: 600px;
  margin-top: 0.65rem; /* Aproximação padronizada de 0.65rem para todos os cards */
  display: flex;
  gap: 1rem;
}

button {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background-color: #fbbf24; /* Amarelo */
  color: #1e3a5f; /* Azul escuro para leitura */
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.4);
  animation: glowPulse 2.5s infinite ease-in-out;
}

.btn-primary:hover {
  background-color: #f59e0b; /* Amarelo mais escuro no hover */
  transform: translateY(-2px);
}

.btn-primary:active {
  animation: none; /* Desativa pulso ao clicar */
  background-color: #d97706; /* Laranja/âmbar escuro no clique */
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

@keyframes glowPulse {
  0% {
    background-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.45);
  }
  50% {
    background-color: #f59e0b;
    box-shadow: 0 4px 22px rgba(251, 191, 36, 0.85);
  }
  100% {
    background-color: #fbbf24;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.45);
  }
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
}

.btn-secondary:active {
  background-color: #cbd5e1;
  transform: translateY(1px);
}

/* WhatsApp specific button with encrypt green pulsing color shifting */
.btn-whatsapp {
  animation: encryptGreen 3s infinite ease-in-out !important;
  border: 1.5px solid #2dfc7b !important;
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.btn-whatsapp:hover {
  filter: brightness(1.1);
}

.btn-whatsapp:active {
  animation: none !important;
  background-color: #075e54 !important;
  transform: translateY(1px);
}

@keyframes encryptGreen {
  0% {
    background-color: #0fdc5a;
    box-shadow: 0 4px 14px rgba(15, 220, 90, 0.4);
  }
  50% {
    background-color: #059037;
    box-shadow: 0 4px 24px rgba(15, 220, 90, 0.85);
  }
  100% {
    background-color: #0fdc5a;
    box-shadow: 0 4px 14px rgba(15, 220, 90, 0.4);
  }
}

/* Error message */
.error-msg {
  color: #ef4444;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  text-align: center;
  display: none;
}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 600px) {
  header {
    padding: 1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
  }
  
  .header-datetime {
    display: none;
  }

  .card-body {
    padding: 1rem;
  }
  
  .search-container {
    margin-bottom: 1rem;
  }

  .logo-part-1 {
    font-size: 1.8rem;
  }
  .logo-part-2 {
    font-size: 1.3rem;
  }
  
  main {
    margin-top: 0; /* Cola totalmente no topo no celular */
    padding: 0; /* Margens laterais removidas para ocupar a tela inteira */
  }

  .card {
    width: 100%;
    max-width: 100%;
    border-radius: 0; /* Bordas retas para preencher a tela */
    border-left: none;
    border-right: none;
    border-top: none;
    box-shadow: none; /* Elimina sombras laterais para visual fluido */
  }
  #card-success {
    width: calc(100% - 2rem) !important;
    margin: auto 1rem !important;
    border-radius: 12px !important;
  }

  .theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .theme-content {
    height: 120px;
  }

  #card-2 .card-header h2, .card-header h2 {
    font-size: 1.3rem;
  }

  /* Ajustes para o Calendário no celular - tamanho ampliado */
  .calendar-wrapper {
    padding: 0.5rem; /* Reduzido para evitar estouro lateral */
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.4rem;
  }
  .calendar-header {
    font-size: 1.1rem;
  }
  .calendar-grid-header {
    gap: 0.15rem;
  }
  .calendar-grid-header span {
    font-size: 0.8rem; /* Ligeiramente menor para segurança */
  }
  .calendar-grid {
    gap: 0.15rem;
    width: 100%;
  }
  .calendar-day {
    aspect-ratio: 1; /* Força dias quadrados esticando o calendário verticalmente */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0; /* Zerado no mobile para o flexbox centralizar sem vazar */
    font-size: 0.85rem; /* Reduzido de 0.95rem para segurança */
    border-radius: 6px;
  }
  .calendar-day.promo-deadline::after {
    font-size: 0.45rem; /* Reduzido no mobile para caber perfeitamente */
    margin-top: 1px;
  }

  .actions {
    flex-direction: column-reverse;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding: 0 1rem; /* Adiciona espaçamento interno para os botões respirarem nas bordas */
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  button {
    padding: 0.9rem;
    width: 100%;
  }

  .price-display-box {
    margin-top: 0.25rem;
    margin-bottom: 1rem;
    font-size: 1.1rem; /* Reduzido para caber em telas pequenas */
    padding: 0.5rem 0.75rem;
  }
}

/* VFX Balões e Confetes */
#vfx-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
  overflow: hidden;
}
.balloon {
  position: absolute;
  bottom: -100px;
  font-size: 2.5rem;
  animation: floatUp 8s linear infinite;
  opacity: 0;
}
.confetti {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 10px;
  background-color: #fbbf24;
  animation: fallDown 5s linear infinite;
  opacity: 0;
  border-radius: 2px;
}
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(-120vh) rotate(20deg); opacity: 0; }
}
@keyframes fallDown {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.8; }
  100% { transform: translateY(120vh) rotate(360deg); opacity: 0; }
}

/* Promo Card styling */
.promo-card-body {
  padding: 1.25rem;
  padding-bottom: 0.15rem; /* Cola a parte inferior do card na foto */
}
.promo-img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  max-height: 520px;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.promo-img:hover {
  transform: scale(1.02);
}

@media (max-width: 600px) {
  .promo-card-body {
    padding: 0.5rem;
  }
  .promo-img {
    max-height: 75vh;
  }
}
