/* Main Layout and Sections */
#main-content {
  width: 100%;
  display: block;
}

/* Background Subtle Hearts */
.bg-heart {
  position: absolute;
  fill: #ff0844;
  opacity: 0;
  filter: blur(8px); /* Blur estático, muito mais leve para a GPU */
  animation: pulseBgHeart 8s infinite alternate ease-in-out;
  will-change: transform, opacity;
}

@keyframes pulseBgHeart {
  0% {
    transform: scale(0.8) translateY(0) rotate(var(--rot, 0deg));
    opacity: 0.01;
  }
  100% {
    transform: scale(1.3) translateY(-30px) rotate(var(--rot, 0deg));
    opacity: 0.06;
  }
}

/* Hero Section */
.hero-section {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
}

.hero-composition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 3rem;
  margin-top: 5vh;
}

.site-title-hero {
  font-family: var(--font-cursive);
  font-size: 5rem;
  color: #ff0844;
  margin-bottom: 2rem;
  text-shadow: 0 0 20px rgba(255, 8, 68, 0.4);
  animation: floatName 3s ease-in-out infinite;
}

.timer-romantic-phrase {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}
.hero-image-wrapper {
  position: relative;
  width: 300px;
  height: 400px;
  transform: rotate(5deg);
}

.main-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: var(--box-bg);
  border: 8px solid #1a1a1a;
  border-bottom: 35px solid #1a1a1a; /* Polaroid effect escuro */
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(255, 8, 68, 0.4);
  position: relative;
  z-index: 2;
}

.floating-hearts svg {
  position: absolute;
  width: 24px;
  height: 24px;
  fill: #ff0844;
  z-index: 1;
  filter: drop-shadow(0 0 10px rgba(255, 8, 68, 0.8));
}

/* Time Counter */
.time-counter {
  display: flex;
  gap: 0.8rem;
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  flex-wrap: wrap;
  justify-content: center;
  color: #ff0844;
  text-shadow: 0 2px 10px rgba(255, 8, 68, 0.4);
}

.time-block {
  background: rgba(30, 5, 5, 0.85); /* Vidro escuro */
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(255, 8, 68, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid rgba(255, 8, 68, 0.3);
  backdrop-filter: blur(10px);
}

.time-block span:first-child {
  font-size: 2rem;
  background: linear-gradient(45deg, #ff0844, #ffb199);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.time-label {
  font-size: 0.75rem;
  margin-top: 4px;
  color: #f5f5f5;
  letter-spacing: 1px;
}

/* Huge Text Section (GSAP) */
.huge-text-section {
  width: 100%;
  overflow: hidden;
  padding: 10vh 0;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(255, 8, 68, 0.05) 50%, rgba(0,0,0,0) 100%);
  content-visibility: auto;
  contain-intrinsic-size: 500px;
}

.huge-text-container {
  white-space: nowrap;
}

.huge-text {
  font-family: var(--font-cursive);
  font-size: 8rem;
  font-weight: bold;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 8, 68, 0.6);
  background: linear-gradient(90deg, #ff0844, #ffb199);
  background-size: 200% auto;
  -webkit-background-clip: text;
  animation: shine 5s linear infinite;
  text-shadow: 0 0 20px rgba(255, 8, 68, 0.2);
  margin: 0;
  padding: 0 2rem;
}

/* Carrossel Nativo */
.carousel-section {
  width: 100%;
  padding: 5rem 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.carousel-header {
  text-align: center;
  padding: 0 2rem;
  margin-bottom: 2rem;
}

.carousel-header h3 {
  font-family: var(--font-cursive);
  font-size: 4rem;
  color: #ff0844;
}

.carousel-header p {
  color: #e0e0e0;
  font-size: 1.2rem;
}

.carousel-container {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  padding: 0 2rem 2rem 2rem;
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-panel {
  flex: 0 0 85vw;
  max-width: 900px;
  height: 60vh;
  min-height: 400px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  background-color: var(--box-bg);
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

/* Escurecer as imagens de fundo para dar foco ao texto */
.carousel-panel::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.4) 100%);
  z-index: 1;
}

.panel-content {
  position: relative;
  z-index: 2;
  padding: 5rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.name-text {
  font-family: var(--font-cursive);
  font-size: 8rem;
  color: transparent;
  background: linear-gradient(135deg, #ff0844, #ffb199);
  -webkit-background-clip: text;
  background-clip: text;
  font-weight: bold;
  text-shadow: 0 0 30px rgba(255, 8, 68, 0.5);
  position: relative;
  z-index: 3;
  animation: floatName 4s ease-in-out infinite;
}

@keyframes floatName {
  0%, 100% { 
    transform: translateY(0) scale(1); 
    filter: drop-shadow(0 0 10px rgba(255, 8, 68, 0.3)); 
  }
  50% { 
    transform: translateY(-15px) scale(1.05); 
    filter: drop-shadow(0 0 25px rgba(255, 8, 68, 0.8)); 
  }
}

.name-left {
  margin-right: -50px;
  transform-origin: right center;
}

.name-right {
  margin-left: -50px;
  transform-origin: left center;
  animation-delay: -2s; /* Descompasso para animar alternado com a esquerda */
}

.panel-content h3 {
  font-family: var(--font-cursive);
  font-size: 4rem;
  color: #ff0844;
  margin-bottom: 1rem;
}

.panel-content p {
  font-size: 1.5rem;
  max-width: 600px;
  line-height: 1.4;
  color: #e0e0e0;
}

/* Memory Grid */
.memory-grid-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  width: 100%;
  max-width: 1000px;
  padding: 2rem;
  margin: 0 auto 5rem auto; /* Centraliza horizontalmente e dá margem inferior */
  content-visibility: auto;
  contain-intrinsic-size: 1000px;
}

.memory-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.grid-img {
  width: 100%;
  aspect-ratio: 3/4;
  background-color: var(--box-bg);
  border: 6px solid #1a1a1a;
  border-bottom: 25px solid #1a1a1a;
  border-radius: 4px;
  box-shadow: 0 10px 25px rgba(255, 8, 68, 0.2);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
  position: relative;
  overflow: hidden;
}

.memory-card:hover .grid-img {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 15px 35px rgba(255, 8, 68, 0.4);
}

.memory-date {
  font-weight: 900;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #ff0844;
}

.memory-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Horizontal Gallery & Decks Wrapper */
.decks-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .decks-wrapper {
    flex-direction: row;
    flex-wrap: wrap; /* Permite quebrar a linha se houver mais de 2 leques */
    justify-content: center;
    align-items: flex-start;
  }
  
  .decks-wrapper .horizontal-gallery-section {
    /* Força cada leque a ocupar no máximo metade do espaço, garantindo 2 por linha */
    flex: 0 0 calc(50% - 1rem); 
    margin-bottom: 5rem; 
    padding: 2rem 0;
    box-sizing: border-box;
  }
}

.horizontal-gallery-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 0;
  margin-bottom: 10rem;
}

.gallery-active-date {
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 3rem;
  color: #ff0844;
  text-shadow: 0 2px 10px rgba(255, 8, 68, 0.3);
}

.gallery-deck {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 400px;
  width: 100%;
  max-width: 800px;
}

.deck-card {
  width: 250px;
  height: 350px;
  background-color: var(--box-bg);
  border: 8px solid #1a1a1a;
  border-radius: 8px;
  position: absolute;
  box-shadow: 0 15px 35px rgba(255, 8, 68, 0.3);
  cursor: pointer;
  /* Usando pseudo-elemento para aumentar o hit-box durante o hover */
}

/* Pseudo-elemento transparente que expande a área de clique para evitar o jitter (tremida) */
.deck-card::after {
  content: "";
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -40px; /* Estende bastante pra baixo para a carta não fugir do mouse quando levantar */
  background: transparent;
  z-index: 10;
}

.gallery-indicators {
  display: flex;
  gap: 1rem;
  margin-top: 3rem;
}

.indicator {
  width: 40px;
  height: 12px;
  background-color: rgba(255, 8, 68, 0.2);
  border-radius: 6px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.indicator.active {
  background-color: #ff0844; 
  transform: scale(1.1);
}

/* Infinite Slider Section */
.infinite-slider-section {
  width: 100%;
  padding: 5rem 0 10rem 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  content-visibility: auto;
  contain-intrinsic-size: 600px;
}

.infinite-slider-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin-top: 3rem;
}

.infinite-slider {
  display: flex;
  gap: 2rem;
  width: max-content;
  padding: 2rem 0;
}

.slide-card {
  width: 320px;
  height: 450px;
  background-color: var(--box-bg);
  border: 6px solid #1a1a1a;
  border-bottom: 25px solid #1a1a1a; /* Efeito polaroid */
  border-radius: 4px;
  box-shadow: 0 15px 35px rgba(255, 8, 68, 0.2);
  overflow: hidden;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.slide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.slide-card:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 25px 50px rgba(255, 8, 68, 0.4);
}

.slide-card:hover img {
  transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-section { padding: 1rem; }
  .site-title-hero { font-size: 3.5rem; margin-top: 4rem; }
  .timer-romantic-phrase { font-size: 1rem; text-align: center; }
  .hero-composition { flex-direction: column; gap: 1rem; margin-top: 2vh; }
  
  .name-text { 
    font-size: 5rem; 
    margin: 0 !important;
    text-align: center;
    animation: floatNameMobile 4s ease-in-out infinite;
  }
  
  .name-right { animation-delay: -2s; }
  
  .hero-image-wrapper { width: 280px; height: 360px; transform: rotate(2deg); margin: 0 auto; }
  
  .time-counter { padding: 0; gap: 0.5rem; }
  .time-block { padding: 0.5rem 0.8rem; }
  .time-block span:first-child { font-size: 1.5rem; }
  .time-label { font-size: 0.7rem; }
  
  .huge-text { font-size: 4rem; }
  
  .memory-grid-section { grid-template-columns: 1fr; gap: 2rem; padding: 1rem; }
  
  .gallery-deck { height: 300px; }
  .deck-card { width: 160px; height: 230px; }
  
  .panel-content { padding: 1.5rem; padding-bottom: 4rem; }
  .panel-content h3 { font-size: 2.2rem; margin-bottom: 0.5rem; }
  .panel-content p { font-size: 1.05rem; line-height: 1.3; }
  
  .slide-card { width: 240px; height: 340px; }
}

/* Micro mobile (ex: iPhone SE - 320px) */
@media (max-width: 480px) {
  .name-text { font-size: 3.5rem; }
  .hero-image-wrapper { width: 240px; height: 320px; border-width: 5px; border-bottom-width: 25px; }
  
  .time-counter { gap: 0.3rem; }
  .time-block { padding: 0.4rem 0.6rem; border-radius: 8px; }
  .time-block span:first-child { font-size: 1.2rem; }
  .time-label { font-size: 0.55rem; }
  
  .huge-text { font-size: 2.8rem; }
  
  .gallery-deck { height: 250px; }
  .deck-card { width: 120px; height: 180px; border-width: 4px; }
  
  .slide-card { width: 180px; height: 260px; border-width: 4px; border-bottom-width: 15px; }
  
  .carousel-panel { min-height: 400px; height: 60vh; }
  .panel-content { padding: 1.2rem; padding-bottom: 5rem; }
  .panel-content h3 { font-size: 1.8rem; margin-bottom: 0.3rem; }
  .panel-content p { font-size: 0.95rem; line-height: 1.3; }
}

@keyframes floatNameMobile {
  0%, 100% { 
    transform: translateY(0); 
    filter: drop-shadow(0 0 5px rgba(255, 8, 68, 0.3)); 
  }
  50% { 
    transform: translateY(-8px); 
    filter: drop-shadow(0 0 15px rgba(255, 8, 68, 0.6)); 
  }
}

/* --- ELEMENTOS FLUTUANTES (PARALLAX DE CANTOS) --- */
.corner-decorations {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  pointer-events: none; /* Para não bloquear cliques na página */
  z-index: 5; /* Fica acima do background mas atrás do texto */
}

.ch-wrapper {
  position: absolute;
}

/* Posições base dos cantos */
.ch-wrapper.ch-tl { top: 12%; left: 8%; }
.ch-wrapper.ch-tr { top: 18%; right: 10%; }
.ch-wrapper.ch-bl { bottom: 15%; left: 10%; }
.ch-wrapper.ch-br { bottom: 12%; right: 8%; }

.corner-heart-svg {
  width: 45px;
  height: 45px;
  color: rgba(255, 8, 68, 0.15); /* Cor sutil neon vermelha */
  filter: drop-shadow(0 0 15px rgba(255, 8, 68, 0.2));
}

/* Variações orgânicas de tamanho e rotação inicial para cada canto */
.ch-tl .corner-heart-svg { transform: rotate(-15deg); width: 40px; height: 40px; }
.ch-tr .corner-heart-svg { transform: rotate(15deg); width: 60px; height: 60px; }
.ch-bl .corner-heart-svg { transform: rotate(-25deg); width: 50px; height: 50px; }
.ch-br .corner-heart-svg { transform: rotate(10deg); width: 70px; height: 70px; }

/* Reduz no celular */
@media (max-width: 768px) {
  .corner-heart-svg { width: 40px !important; height: 40px !important; }
}

/* --- ESTILIZAÇÃO DAS IMAGENS DE APRESENTAÇÃO --- */
.presentation-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  border-radius: inherit;
  z-index: 0;
  transition: transform 0.8s ease;
  will-change: transform;
}

/* O conteúdo das cartas e painéis precisa ficar acima das imagens */
.carousel-panel .panel-content,
.deck-card::after {
  position: relative;
  z-index: 2;
}

/* --- NARRATIVE TEXT SECTIONS --- */
.narrative-section {
  width: 100%;
  max-width: 800px;
  margin: 4rem auto;
  padding: 0 2rem;
  text-align: center;
  content-visibility: auto;
  contain-intrinsic-size: 200px;
}

.narrative-text {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--text-secondary);
  font-style: italic;
  font-weight: 300;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.narrative-text strong {
  color: #ff0844;
  font-weight: 600;
}

@media (max-width: 768px) {
  .narrative-section {
    margin: 3rem auto;
    padding: 0 1.5rem;
  }
  .narrative-text {
    font-size: 1.1rem;
    line-height: 1.6;
  }
}
