/* ============================================
   AFB - Associação Família Bethel
   Advanced Animations & Effects
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Open+Sans:wght@300;400;600;700&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --orange:       #F97316;
  --orange-dark:  #EA580C;
  --orange-light: #FED7AA;
  --black:        #111111;
  --dark:         #1C1917;
  --gray-900:     #1C1917;
  --gray-700:     #44403C;
  --gray-500:     #78716C;
  --gray-200:     #E7E5E4;
  --white:        #FFFFFF;
  --warm-bg:      #FAFAF9;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--warm-bg);
  color: var(--gray-700);
  overflow-x: hidden;
}

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

/* ============================================
   SCROLL PROGRESS BAR
   ============================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), #FBBF24, var(--orange));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
}

/* ============================================
   HEADER
   ============================================ */
.header-transparent {
  background: transparent !important;
  box-shadow: none !important;
}
.header-transparent a:not(.btn-header) { color: #fff !important; }

.header-solid {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}
.header-solid a:not(.btn-header) { color: var(--gray-700) !important; }
.header-solid .btn-header-outline { border-color: var(--orange) !important; color: var(--orange) !important; }

/* Logo sizing */
.header-logo { transition: height 0.4s ease; }
.header-transparent .header-logo { /* logo mantém aparência original */ }
.header-solid .header-logo { /* logo mantém aparência original */ }

/* ============================================
   BUTTONS
   ============================================ */
.btn-header {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  border-radius: 9999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  transition: all 0.35s ease;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.btn-header-primary {
  background: var(--orange);
  color: #fff !important;
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.35);
}
.btn-header-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.45);
}
.btn-header-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff !important;
}
.btn-header-outline:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  border-radius: 9999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: var(--orange);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s ease;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
  position: relative;
  overflow: hidden;
}
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  background: rgba(255,255,255,0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}
.btn-primary:hover::before { width: 300px; height: 300px; }
.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(249, 115, 22, 0.5);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.2rem;
  border-radius: 9999px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s ease;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255,255,255,0.15);
}

/* ============================================
   VIDEO / IMAGE BACKGROUND SECTIONS
   ============================================ */
.img-bg-section {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.img-bg-section .img-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.img-bg-section .section-content {
  position: relative;
  z-index: 2;
}

/* Parallax via background-attachment */
.parallax {
  background-attachment: fixed;
}
@media (max-width: 768px) {
  .parallax { background-attachment: scroll; }
}

/* Overlay presets */
.overlay-dark        { background: rgba(0,0,0,0.62); }
.overlay-orange      { background: linear-gradient(135deg, rgba(234,88,12,0.88) 0%, rgba(17,17,17,0.80) 100%); }
.overlay-dark-warm   { background: linear-gradient(180deg, rgba(28,25,23,0.55) 0%, rgba(28,25,23,0.78) 100%); }
.overlay-purple      { background: linear-gradient(135deg, rgba(88,28,135,0.70) 0%, rgba(0,0,0,0.65) 100%); }
.overlay-rose        { background: linear-gradient(135deg, rgba(159,18,57,0.72) 0%, rgba(0,0,0,0.60) 100%); }
.overlay-teal        { background: linear-gradient(135deg, rgba(15,118,110,0.78) 0%, rgba(0,0,0,0.65) 100%); }
.overlay-split-light { background: linear-gradient(to right, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.97) 55%, rgba(255,255,255,0.65) 100%); }
.overlay-split-dark  { background: linear-gradient(to left,  rgba(28,25,23,0.97) 0%, rgba(28,25,23,0.97) 55%, rgba(28,25,23,0.65) 100%); }

/* ============================================
   KEN BURNS EFFECT
   ============================================ */
@keyframes kenBurns {
  0%   { transform: scale(1)    translate(0, 0); }
  50%  { transform: scale(1.07) translate(-1%, -1%); }
  100% { transform: scale(1)    translate(0, 0); }
}
.ken-burns-bg {
  position: absolute;
  inset: -5%;
  width: 110%; height: 110%;
  background-size: cover;
  background-position: center;
  animation: kenBurns 22s ease-in-out infinite;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left.active { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right.active { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-scale.active { opacity: 1; transform: scale(1); }

/* Stagger */
.stagger .stagger-item {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger.active .stagger-item { opacity: 1; transform: translateY(0); }
.stagger.active .stagger-item:nth-child(1) { transition-delay: 0.08s; }
.stagger.active .stagger-item:nth-child(2) { transition-delay: 0.17s; }
.stagger.active .stagger-item:nth-child(3) { transition-delay: 0.26s; }
.stagger.active .stagger-item:nth-child(4) { transition-delay: 0.35s; }
.stagger.active .stagger-item:nth-child(5) { transition-delay: 0.44s; }
.stagger.active .stagger-item:nth-child(6) { transition-delay: 0.53s; }

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 1.25rem;
}
.glass-dark {
  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1.25rem;
}

/* ============================================
   TEXT EFFECTS
   ============================================ */
.text-shadow-strong {
  text-shadow: 0 2px 12px rgba(0,0,0,0.55), 0 4px 32px rgba(0,0,0,0.3);
}
.text-gradient-orange {
  background: linear-gradient(135deg, var(--orange), #FBBF24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   CARD EFFECTS
   ============================================ */
.card-lift {
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.2);
}

/* Project card */
.project-card {
  background: #fff;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--gray-200);
}
.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(249,115,22,0.15);
  border-color: var(--orange-light);
}
.project-card-logo {
  height: 90px;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.project-card:hover .project-card-logo { transform: scale(1.08); }

/* ============================================
   COUNTER
   ============================================ */
.counter-number {
  font-family: 'Montserrat', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.counter-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.8);
  font-weight: 600;
}

/* ============================================
   SCROLL DOWN INDICATOR
   ============================================ */
@keyframes scrollDown {
  0%   { transform: translateY(0) translateX(-50%); opacity: 1; }
  100% { transform: translateY(14px) translateX(-50%); opacity: 0; }
}
.scroll-indicator {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
}
.scroll-mouse {
  width: 26px; height: 40px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 13px;
  position: relative;
}
.scroll-wheel {
  width: 4px; height: 8px;
  background: #fff;
  border-radius: 2px;
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  animation: scrollDown 1.6s infinite;
}
.scroll-text {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.65;
}

/* ============================================
   WAVE DIVIDER
   ============================================ */
.wave-divider {
  position: absolute;
  bottom: -1px; left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 3;
}
.wave-divider svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 65px;
}
.wave-divider-top {
  position: absolute;
  top: -1px; left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 3;
  transform: rotate(180deg);
}
.wave-divider-top svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 65px;
}

/* ============================================
   PAGE LOADER
   ============================================ */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--dark);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.page-loader.loaded { opacity: 0; visibility: hidden; }
.loader-ring {
  width: 56px; height: 56px;
  border: 4px solid rgba(249,115,22,0.2);
  border-top: 4px solid var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loader-logo { height: 48px; filter: brightness(0) invert(1); opacity: 0.9; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  box-shadow: 0 4px 18px rgba(249,115,22,0.45);
  pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(249,115,22,0.55); }

/* ============================================
   ICON PULSE
   ============================================ */
@keyframes iconPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.1); }
}
.icon-pulse { animation: iconPulse 2.2s ease-in-out infinite; }

/* ============================================
   FORM STYLES
   ============================================ */
.form-input {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  border: 2px solid var(--gray-200);
  background: #fff;
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--gray-700);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  outline: none;
}
.form-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249,115,22,0.12);
}
.form-input::placeholder { color: var(--gray-500); }
textarea.form-input { resize: vertical; min-height: 140px; }

/* ============================================
   NAV LINK HOVER LINE
   ============================================ */
.nav-link {
  position: relative;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.3s ease;
  border-radius: 2px;
}
.nav-link:hover::after { width: 100%; }

/* ============================================
   MOBILE MENU
   ============================================ */
#mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem 0 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 1rem;
}
#mobile-menu.open { display: flex; }
.header-solid #mobile-menu { border-top-color: var(--gray-200); }

/* ============================================
   SECTION TITLE HELPER
   ============================================ */
.section-eyebrow {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
  display: block;
}
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--dark);
}
.section-title-white {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
}

/* ============================================
   FLOATING PARTICLES (HERO)
   ============================================ */
.particles-container {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  animation: floatParticle linear infinite;
}
@keyframes floatParticle {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .counter-number { font-size: 2.5rem; }
  .section-title, .section-title-white { font-size: clamp(1.5rem, 5vw, 2rem); }
}

/* ============================================
   FOOTER SOCIAL ICONS
   ============================================ */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.35s ease;
  text-decoration: none;
}
.social-icon:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(249,115,22,0.4);
}

/* ============================================
   HIGHLIGHT BADGE
   ============================================ */
.badge-orange {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 9999px;
  background: rgba(249,115,22,0.12);
  color: var(--orange);
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================
   MINISTÉRIO — CROSSFADE ENTRE FOTOS REAIS
   ============================================ */
.ministerio-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ministerio-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Foto 1: visível → invisível → visível (ciclo de 12s) */
.ministerio-bg-1 {
  animation: ministerioFade1 12s ease-in-out infinite;
}
/* Foto 2: invisível → visível → invisível (defasada 6s) */
.ministerio-bg-2 {
  animation: ministerioFade2 12s ease-in-out infinite;
}
@keyframes ministerioFade1 {
  0%,  45% { opacity: 1; }
  55%, 95% { opacity: 0; }
  100%     { opacity: 1; }
}
@keyframes ministerioFade2 {
  0%,  45% { opacity: 0; }
  55%, 95% { opacity: 1; }
  100%     { opacity: 0; }
}

/* Container util */
.container-site {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
