/* Variáveis de Cores (Paleta Terracota) */
:root {
  --terracota-dark: #A0522D;
  --terracota-medium: #CD853F;
  --terracota-light: #F4A460;
  --creme: #FDF5E6;
  --off-white: #ffffff;
  --text-dark: #333;
  --text-light: #555;
  --accent-color: #8B4513;
}

/* Reset Básico e Configurações Globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Evita arrastar para o lado no telemóvel */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.4; /* Linhas mais próximas */
  color: var(--text-dark);
  background-color: var(--off-white);
}

/* Trava a rolagem do fundo quando o menu está aberto */
body.no-scroll {
  overflow: hidden !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Tipografia */
h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--terracota-dark);
  margin-bottom: 15px;
}

h1 {
  font-size: 4rem;
  text-align: center;
  color: var(--creme);
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
}

h2 {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--terracota-light), var(--terracota-medium));
  margin: 15px auto 0;
}

h3 {
  font-size: 2rem;
  color: var(--terracota-medium);
  margin-bottom: 10px;
  transition: color 0.4s ease;
}

h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--terracota-dark);
  font-size: 1.5rem;
}

p {
  margin-bottom: 12px; /* Parágrafos mais próximos */
}

/* Seções */
.section-padded {
  padding: 80px 20px;
  text-align: center;
  overflow: hidden;
}

.bg-light {
  background: linear-gradient(45deg, var(--creme), var(--off-white), var(--creme));
  background-size: 400% 400%;
  animation: gradientAnimation 15s ease infinite;
}

@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Componentes (Hero, Spotify, Botões, etc.) */
.hero {
  background: url('img/IMG_8130.webp') no-repeat center top/cover;
  background-attachment: fixed;
  color: var(--creme);
  text-align: center;
  padding: 150px 20px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: var(--creme);
}

.countdown {
  font-size: 2em;
  font-weight: bold;
  margin-top: 20px;
  color: var(--creme);
  display: flex;
  justify-content: center;
  gap: 20px;
}

.countdown span {
  text-align: center;
}

.countdown span div {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.5em;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spotify-embed-container {
  margin-top: 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.spotify-embed-container iframe {
  width: 100%;
  display: block;
}

.btn-submit,
.btn-scroll {
  display: inline-block;
  background-color: var(--accent-color);
  color: white !important;
  padding: 14px 35px;
  text-decoration: none;
  border-radius: 50px;
  margin-top: 30px;
  transition: transform 0.3s ease, background-color 0.3s ease, padding 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 700;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-submit::after,
.btn-scroll::after {
  content: '♥';
  font-family: sans-serif;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, right 0.3s ease;
}

.btn-submit:hover,
.btn-scroll:hover {
  background-color: var(--terracota-dark);
  transform: scale(1.05);
  padding-right: 55px;
}

.btn-submit:hover::after,
.btn-scroll:hover::after {
  opacity: 1;
  right: 25px;
}

/* Navbar */
.navbar {
  background: rgba(0, 0, 0, 0.925);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 250, 240, 0.2);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: top 0.3s;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  color: var(--creme);
  text-decoration: none;
  font-weight: 700;
}

.nav-links ul {
  list-style: none;
  text-align: center;
  margin: 0;
  padding: 0;
}

.nav-links ul li {
  display: inline-block;
  margin: 0 12px;
}

.nav-links ul li a {
  color: var(--creme);
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  transition: color 0.3s ease;
  padding: 5px 0;
  position: relative;
}

.nav-links ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  display: block;
  margin-top: 5px;
  right: 0;
  background: var(--terracota-light);
  transition: width 0.4s ease;
}

.nav-links ul li a:hover::after,
.nav-links ul li a.active::after {
  width: 100%;
  left: 0;
}

.nav-links ul li a:hover,
.nav-links ul li a.active {
  color: var(--terracota-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  content: '';
  display: block;
  width: 30px;
  height: 3px;
  background-color: var(--creme);
  border-radius: 3px;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.hamburger::before {
  transform: translateY(-8px);
}

.hamburger::after {
  transform: translateY(8px);
}

/* Seção Nossa História com Vídeo */
.historia-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.historia-video {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.historia-video video,
.historia-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ROLETA DE CITAÇÕES 3D (Nossa História) */
.citacoes-wrapper {
  height: 380px; 
  overflow-y: auto;
  scroll-snap-type: y mandatory; 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.citacoes-wrapper::-webkit-scrollbar {
  display: none; 
}

.citacoes-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 140px 10px; 
}

.card-citacao {
  background-color: white;
  padding: 25px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--terracota-medium);
  position: relative;
  text-align: left;
  scroll-snap-align: center; 
  transform-origin: center center;
  will-change: transform, opacity;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-citacao:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--terracota-dark);
}

.quote-mark {
  position: absolute;
  top: -15px;
  right: 15px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 6rem;
  color: var(--terracota-light);
  opacity: 0.15;
  line-height: 1;
  user-select: none;
}

.citacao-texto {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--text-dark);
  font-style: italic;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  line-height: 1.4;
}

.citacao-autor {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--terracota-dark);
  display: block;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.historia-texto {
  text-align: left;
}

.verse-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  margin-top: 30px;
  font-size: 1.5rem;
  color: var(--terracota-dark);
  text-align: center;
}

/* Estilos para o formulário de RSVP incorporado */
.form-container {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 40px auto 0 auto;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  height: 800px;
}

.form-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Seção de Presentes */
.gift-carousel-container {
  position: relative;
  margin-top: 40px;
}

.gifts-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gifts-grid::-webkit-scrollbar {
  display: none;
}

.gift-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 10px;
}

.gift-item {
  width: calc((100% - 60px) / 5); 
  aspect-ratio: 1 / 1;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gift-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.gift-img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  padding: 0; 
  transition: transform 0.4s ease;
}

.gift-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
  padding: 20px 15px 15px 15px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 65%;
}

.gift-overlay h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: white;
  margin: 0 0 2px 0;
  line-height: 1.2;
}

.gift-overlay p {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--terracota-light);
  margin: 0 0 10px 0;
}

.gift-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.btn-gift {
  background-color: var(--terracota-medium);
  color: white;
  padding: 8px 0;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: 100%;
}

.btn-gift:hover {
  background-color: var(--terracota-dark);
  transform: scale(1.02);
}

.btn-comprar {
  background-color: transparent;
  border: 1.5px solid var(--terracota-light);
  color: white;
}

.btn-comprar:hover {
  background-color: var(--terracota-medium);
  border-color: var(--terracota-medium);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 22px;
  font-weight: bold;
  color: var(--terracota-dark);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.1);
  background-color: white;
}

.carousel-btn.prev {
  left: -22px;
}

.carousel-btn.next {
  right: -22px;
}

.pix-info-hidden {
  display: none;
  margin-top: 40px;
  padding: 30px;
  background-color: var(--off-white);
  border: 2px dashed var(--terracota-medium);
  border-radius: 8px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeIn 0.5s;
}

.pix-qrcode {
  max-width: 200px;
  margin: 20px auto;
  display: block;
}

#load-more-gifts {
  display: none;
  margin-top: 20px;
}

#load-more-photos {
  display: none;
  margin-top: 30px;
}

/* Galeria de Fotos */
.gallery-grid {
  column-count: 3;
  column-gap: 15px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  width: 100%;
  display: block;
  margin-bottom: 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  break-inside: avoid;
}

.upload-section {
  margin-top: 50px;
  background-color: var(--creme);
  padding: 40px;
  border-radius: 8px;
}

.footer {
  background-color: var(--terracota-dark);
  color: var(--creme);
  text-align: center;
  padding: 40px 20px;
  margin-top: 60px;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--terracota-medium);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  font-size: 24px;
  text-decoration: none;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

/* Estilos do Modal (Lightbox) da Galeria */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.5s;
  align-items: center;
  justify-content: center;
}

#modal-image {
  max-height: 85vh;
  max-width: 90vw;
  object-fit: contain;
  animation: zoomIn 0.5s;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10;
}

.modal-caption {
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  position: absolute;
  bottom: 20px;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

/* Setas de navegação do modal */
.modal .prev,
.modal .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.3);
}

.modal .prev { left: 2vw; }
.modal .next { right: 2vw; border-radius: 3px 0 0 3px; }
.modal .prev:hover, .modal .next:hover { background-color: rgba(0, 0, 0, 0.6); }

/* Estilo do Formulário de Mensagens */
.message-form {
  max-width: 600px;
  margin: 30px auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message-form input,
.message-form textarea {
  padding: 15px;
  border: 1px solid var(--terracota-light);
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
}

.message-form textarea {
  min-height: 120px;
  resize: vertical;
}

/* Estilo do Mural */
.mural-container {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.message-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-left: 5px solid var(--terracota-medium);
  text-align: left;
}

.message-card h4 {
  margin-bottom: 5px;
  color: var(--terracota-dark);
}

.message-card p {
  font-style: italic;
  color: var(--text-light);
  font-size: 0.95rem;
}

.btn-delete {
  background: none;
  border: none;
  color: #ff4d4d;
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 10px;
  padding: 5px;
  opacity: 0.6;
  transition: 0.3s;
}

.btn-delete:hover {
  opacity: 1;
  text-decoration: underline;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.message-date {
  font-size: 0.75rem;
  color: var(--text-light);
  font-family: 'Montserrat', sans-serif;
  opacity: 0.8;
}

.message-card h4 {
  margin: 0;
  font-size: 1.1rem;
}

/* NOVO: Estilo do Modal de Entrega */
#delivery-modal .delivery-content {
  background-color: var(--off-white);
  padding: 40px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  animation: zoomIn 0.4s;
}

#delivery-modal h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  color: var(--terracota-dark);
  margin-bottom: 15px;
}

#delivery-modal p {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.6;
}

.address-box {
  background-color: white;
  border: 1.5px dashed var(--terracota-medium);
  padding: 20px;
  border-radius: 8px;
  margin-top: 20px;
  color: var(--terracota-dark);
  font-size: 1.1rem;
}

.close-delivery-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 10;
}

/* NOVO: Estilo do RSVP Integrado */
.rsvp-container {
  background-color: white;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border-top: 5px solid var(--terracota-medium);
  max-width: 600px;
  margin: 40px auto 0;
  text-align: center;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
  margin: 10px 0 20px 0;
}

.radio-group label {
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.radio-group input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: var(--terracota-dark);
}

/* ==========================================
   NOVO: Estilo da Tela de Bloqueio (Senha) - COM FOTO E EFEITO VIDRO
   ========================================== */
body.locked {
  overflow: hidden !important;
}

.access-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Imagem de fundo com uma película escura suave (rgba) para dar contraste */
  background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)), url('img/IMG_8130.webp') center/cover no-repeat;
  transition: opacity 0.5s ease;
}

.access-content {
  /* Efeito Glassmorphism (Vidro Desfocado) */
  background: rgba(255, 255, 255, 0.20); /* Transparência branca */
  backdrop-filter: blur(12px); /* O desfoque mágico */
  -webkit-backdrop-filter: blur(12px); /* Suporte para iPhones/Safári */
  border: 1px solid rgba(255, 255, 255, 0.4); /* Bordinha de vidro brilhante */
  
  padding: 40px;
  border-radius: 16px; /* Bordas mais arredondadas (moderno) */
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  max-width: 450px;
  width: 90%;
  animation: zoomIn 0.5s;
}

/* Deixando os textos brancos e legíveis sobre o vidro */
.access-content h2 {
  color: var(--off-white);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5); /* Sombrinha para leitura */
  margin-bottom: 10px;
}

.access-content p {
  color: var(--off-white);
  font-weight: 600;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

/* O campo de digitar a senha */
.access-content input {
  width: 100%;
  padding: 15px;
  margin: 20px 0;
  background: rgba(255, 255, 255, 0.7); /* Levemente transparente */
  border: 2px solid transparent;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
  text-align: center;
  color: var(--text-dark);
  transition: all 0.3s ease;
}

.access-content input:focus {
  background: white; /* Fica 100% branco ao clicar */
  border-color: var(--terracota-light);
}

/* Ajuste da mensagem de erro para fundo transparente */
#access-error {
  color: #ffb3b3 !important; /* Um vermelho mais suave/pastel */
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* ==========================================
   Responsividade
   ========================================== */
@media (max-width: 992px) {
  .historia-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .historia-texto {
    text-align: center;
  }

  .menu-toggle {
    display: block;
  }

  .nav-brand {
    flex-grow: 1;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(46, 27, 13, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out;
    z-index: 999;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links ul {
    flex-direction: column;
  }

  .nav-links ul li {
    display: block;
    margin: 25px 0;
    text-align: center;
  }

  .nav-links ul li a {
    font-size: 1.8rem;
  }

  .navbar.nav-open .hamburger {
    background-color: transparent;
  }

  .navbar.nav-open .hamburger::before {
    transform: translateY(0px) rotate(45deg);
  }

  .navbar.nav-open .hamburger::after {
    transform: translateY(0px) rotate(-45deg);
  }

  .gift-item {
    width: calc((100% - 30px) / 3); 
  }
}

.photo-hidden {
  display: none !important;
}

#load-more-photos {
  display: none;
  margin: 30px auto;
  clear: both;
}

/* ===== CORREÇÃO PARA O MOBILE ===== */
@media (max-width: 768px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2.5em; }
  h3 { font-size: 1.8em; }

  .hero { background-attachment: scroll; }
  .section-padded { padding: 60px 15px; }
  .carousel-btn { display: none !important; }
  #load-more-gifts { display: inline-block; }
  
  /* Blinda os presentes contra o esmagamento */
  .gift-item { 
    width: 100%; 
    height: auto !important; 
    aspect-ratio: 1 / 1;
  }
  .gift-item.gift-hidden { display: none; }

  /* Configuração da Grade Mobile */
  .gifts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: max-content; /* Força a linha a não encolher */
    align-items: start; 
    align-content: start;
    gap: 15px;
    overflow-x: hidden;
    scroll-snap-type: none;
  }

  /* Quando o botão Ver Mais é clicado */
  .gifts-grid.scrollable-active {
    max-height: 650px;
    overflow-y: auto;
    padding-right: 8px;
    padding-bottom: 20px;
  }

  /* Estilo da barra de rolagem */
  .gifts-grid.scrollable-active::-webkit-scrollbar {
    width: 6px;
  }
  .gifts-grid.scrollable-active::-webkit-scrollbar-track {
    background: var(--creme);
    border-radius: 8px;
  }
  .gifts-grid.scrollable-active::-webkit-scrollbar-thumb {
    background: var(--terracota-medium);
    border-radius: 8px;
  }

  .gift-slide { display: contents; }
  .gallery-item.photo-hidden { display: none; }

  #delivery-modal .delivery-content {
    padding: 30px 15px;
    width: 95%;
  }

  .address-box {
    padding: 15px 10px;
    font-size: 0.9rem;
    word-wrap: break-word; 
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.5em; }
  h2 { font-size: 2.2em; }
  .tagline { font-size: 1.2rem; }
  
  .countdown {
    flex-direction: column;
    gap: 10px;
    font-size: 1.5em;
  }

  .btn-submit:hover,
  .btn-scroll:hover {
    padding-right: 35px;
  }

  .btn-submit:hover::after,
  .btn-scroll:hover::after {
    opacity: 0;
  }
}

@media (min-width: 769px) {
  .historia-container {
    display: flex;
    align-items: center; 
    justify-content: center;
    gap: 60px; 
    max-width: 1100px;
    margin: 40px auto 0;
  }

  .historia-video {
    flex: 0 0 auto; 
    width: 100%;
    max-width: 450px; 
    aspect-ratio: 9 / 16; 
    border-radius: 12px;
  }

  .historia-video video,
  .historia-video img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
  }

  .citacoes-wrapper {
    flex: 1; 
    max-width: 500px; 
    height: 600px; 
  }
}
