/* ===== CSS Variables ===== */
:root {
  --primary: #5d0606;
  --primary-dark: #450404;
  --primary-light: #f5e6e6;
  --secondary: #8b1a1a;
  --secondary-light: #e8c4b8;
  --dark: #2a0303;
  --dark-2: #3d0505;
  --accent-cream: #f5e6d0;
  --accent-green: #00b090;
  --accent-gold: #d4a853;
  --neutral-dark: #1d1e20;
  --neutral-gray: #727586;
  --neutral-light: #f9f5f0;
  --white: #fff;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  color: var(--neutral-dark);
  line-height: 1.7;
  overflow-x: hidden;
  background: var(--white);
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navigation ===== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(42, 3, 3, 0.95);
  backdrop-filter: blur(10px);
  transition: background 0.3s, box-shadow 0.3s;
}

#header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

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

.logo-img {
  height: 110px;
  width: auto;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 6px 0;
  position: relative;
  transition: color 0.3s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: width 0.3s;
}

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

.nav-links a:hover {
  color: var(--accent-gold);
}

/* Nav Alunos Button */
.btn-nav-alunos {
  background: var(--accent-gold) !important;
  color: var(--dark) !important;
  padding: 8px 20px !important;
  border-radius: 50px;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: all 0.3s !important;
}

.btn-nav-alunos:hover {
  background: #c4923e !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 168, 83, 0.4);
}

.btn-nav-alunos::after {
  display: none !important;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: url('assets/hero.jpg') center/cover no-repeat;
  color: var(--white);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,1,1,0.88) 0%, rgba(93,6,6,0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 0 24px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  opacity: 0.9;
  margin-bottom: 32px;
  font-weight: 300;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--dark);
}

.btn-primary:hover {
  background: #c4923e;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(212, 168, 83, 0.4);
}

.btn-card {
  padding: 12px 28px;
  font-size: 0.9rem;
  color: var(--white);
  width: 100%;
  margin-top: auto;
}

.btn-giras {
  background: var(--accent-green);
}

.btn-giras:hover {
  background: #009a7d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 176, 144, 0.4);
}

.btn-desenvolvimento {
  background: var(--primary);
}

.btn-desenvolvimento:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(93, 6, 6, 0.4);
}

.btn-buzios {
  background: var(--accent-gold);
  color: var(--dark);
}

.btn-buzios:hover {
  background: #c4923e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 168, 83, 0.4);
}

/* ===== Section Styles ===== */
.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
  margin-bottom: 16px;
  color: var(--dark);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-gold);
  margin: 16px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px;
  color: var(--neutral-gray);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ===== Sacerdotes ===== */
.sacerdotes {
  background: var(--neutral-light);
}

.sacerdotes-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 48px;
}

.image-frame {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(93, 6, 6, 0.15);
  position: relative;
}

.image-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 3px solid var(--primary);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}

.image-frame:hover::before {
  opacity: 1;
}

.image-frame img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  transition: transform 0.5s;
}

.image-frame:hover img {
  transform: scale(1.03);
}

.sacerdotes-text p {
  margin-bottom: 16px;
  color: var(--neutral-dark);
  font-size: 1.02rem;
  line-height: 1.8;
}

.sacerdotes-text strong {
  color: var(--primary);
}

/* ===== A Casa ===== */
.a-casa {
  background: var(--white);
}

.casa-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 48px;
}

.fundado-badge {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  padding: 6px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}

.casa-text p {
  margin-bottom: 16px;
  color: var(--neutral-dark);
  font-size: 1.02rem;
  line-height: 1.8;
}

/* ===== Video (A Casa) ===== */
.video-frame {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(93, 6, 6, 0.15);
}

.video-frame video {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

/* ===== Cursos e Atividades ===== */
.cursos {
  background: linear-gradient(170deg, var(--dark) 0%, var(--dark-2) 100%);
  color: var(--white);
}

.cursos .section-title {
  color: var(--white);
}

.cursos .section-subtitle {
  color: rgba(255,255,255,0.75);
}

/* Giras Destaque */
.giras-destaque {
  text-align: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 48px;
  backdrop-filter: blur(4px);
}

.giras-destaque .giras-icon {
  font-size: 2.5rem;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.giras-destaque h3 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--accent-gold);
}

.giras-destaque p {
  max-width: 600px;
  margin: 0 auto;
  color: rgba(255,255,255,0.8);
  line-height: 1.8;
}

/* Curso Cards */
.cursos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.curso-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  backdrop-filter: blur(4px);
}

.curso-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.curso-card-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--accent-gold);
}

.curso-card-icon svg {
  width: 100%;
  height: 100%;
}

.curso-card h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--white);
}

.curso-card p {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
  flex-grow: 1;
}

/* ===== Contato / Mapa ===== */
.contato {
  background: var(--neutral-light);
}

.contato-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  margin-top: 48px;
  align-items: start;
}

.contato-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contato-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contato-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  padding: 10px;
}

.contato-icon svg {
  width: 100%;
  height: 100%;
}

.contato-item h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}

.contato-item p {
  color: var(--neutral-gray);
  font-size: 0.95rem;
  line-height: 1.6;
}

.contato-item a {
  color: var(--primary);
  font-weight: 500;
  transition: color 0.3s;
}

.contato-item a:hover {
  color: var(--primary-dark);
}

.mapa-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.mapa-container iframe {
  display: block;
  border-radius: 16px;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-logo {
  height: 120px;
  margin-bottom: 12px;
  border-radius: 50%;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
  font-weight: 600;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-contact p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: background 0.3s, transform 0.3s;
}

.social-links a svg {
  width: 20px;
  height: 20px;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-bottom {
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: pulse 2s infinite;
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

/* ===== Popup Modal ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
  padding: 20px;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.popup-overlay.active .popup {
  transform: scale(1) translateY(0);
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.3s;
  line-height: 1;
}

.popup-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.popup-image {
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-body {
  padding: 28px 32px 32px;
  text-align: center;
}

.popup-body h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.popup-body p {
  color: var(--neutral-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.btn-popup {
  display: inline-block;
  padding: 14px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: var(--primary);
  color: var(--white);
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  width: 100%;
}

.btn-popup:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(93, 6, 6, 0.35);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 24px rgba(37, 211, 102, 0.7); }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .sacerdotes-content,
  .casa-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cursos-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .contato-content {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--dark);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    transition: right 0.4s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .section {
    padding: 64px 0;
  }

  .image-frame img {
    height: 280px;
  }

  .giras-destaque {
    padding: 28px 20px;
  }

  .mapa-container iframe {
    height: 300px;
  }
}
