/* La Mariée Studio — Custom Styles */

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   HEADER — SCROLL BEHAVIOR
   ============================================ */
#site-header.scrolled .header-bg {
  opacity: 1;
}

#site-header:not(.scrolled) .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

#site-header:not(.scrolled) .nav-link:hover {
  color: #c9b882;
}

#site-header:not(.scrolled) .hamburger-line {
  background-color: white;
}


/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */
#mobile-menu-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   ANIMATIONS — REVEAL ON SCROLL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for grid children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }

/* Hero fade-ins */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.2s; }
.fade-in-delay-2 { animation-delay: 0.4s; }
.fade-in-delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SERVICE CARDS
   ============================================ */
.service-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* ============================================
   GALLERY
   ============================================ */

/* Grid principal: 4 colunas no desktop, 2 no tablet, 1 no mobile */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto;
  gap: 6px;
}

/* Item padrão: aspect-ratio quadrado */
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  background-color: #2d3f37; /* fallback enquanto imagem carrega */
}

/* Item destaque: ocupa 2 colunas e 2 linhas */
.gallery-item--tall {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: unset; /* altura definida pela grade */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.06);
}

/* Overlay no hover */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(61, 84, 74, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:focus .gallery-overlay {
  background: rgba(61, 84, 74, 0.45);
}

.gallery-overlay svg {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay svg,
.gallery-item:focus .gallery-overlay svg {
  opacity: 1;
  transform: scale(1);
}

/* Tablet: 3 colunas */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile: 2 colunas, sem destaque */
@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .gallery-item--tall {
    grid-column: span 2;
    grid-row: span 1;
    aspect-ratio: 16 / 7;
  }
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
  border-top: 3px solid #c9b882;
  transition: box-shadow 0.3s ease;
}

.testimonial-card:hover {
  box-shadow: 0 10px 30px rgba(61, 84, 74, 0.1);
}

/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item {
  transition: box-shadow 0.2s ease;
}

.faq-item.open {
  box-shadow: 0 4px 20px rgba(61, 84, 74, 0.08);
  border-color: #3d544a;
}

.faq-btn[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

/* ============================================
   FORM STYLES
   ============================================ */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(61, 84, 74, 0.15);
}

input.error,
textarea.error {
  border-color: #ef4444 !important;
}

/* ============================================
   WHATSAPP FLOAT BUTTON
   ============================================ */
.whatsapp-float {
  animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
  animation: fadeInDown 1s ease 1.5s both;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   DIFERENCIAL CARDS
   ============================================ */
.diferencial-card {
  transition: transform 0.3s ease;
}

.diferencial-card:hover {
  transform: translateY(-4px);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
em {
  font-style: italic;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 640px) {
  html {
    scroll-padding-top: 70px;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .whatsapp-float,
  #site-header,
  #mobile-menu {
    display: none !important;
  }
}

/* ============================================
   FOCUS STYLES — ACCESSIBILITY
   ============================================ */
:focus-visible {
  outline: 2px solid #3d544a;
  outline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #3d544a;
  outline-offset: 3px;
  border-radius: 2px;
}
