/* ============================================================
   Igreja PIBC — Landing pública
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1e7e34;
  --primary-dark: #155724;
  --primary-light: #d4edda;
  --accent: #f6d55c;
  --accent-dark: #d4b53e;
  --bg: #f8faf9;
  --surface: #ffffff;
  --text: #1f2937;
  --text-soft: #6b7280;
  --border: #e2e8f0;
  --header-h: 78px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- Header ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex; align-items: center;
}

.site-header .container {
  display: flex; align-items: center; gap: 24px; width: 100%;
}

.site-header .logo {
  display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--primary-dark); font-size: 1.05rem;
}
.site-header .logo .logo-img {
  width: 48px; height: 48px; object-fit: contain;
}
.site-header .logo .logo-fallback {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.2rem;
}

.site-header nav { margin-left: auto; }
.site-header nav ul {
  display: flex; gap: 8px; list-style: none;
}
.site-header nav a {
  padding: 8px 14px; color: var(--text); font-size: .92rem; font-weight: 500;
  border-radius: 6px; transition: all .15s; text-decoration: none;
}
.site-header nav a:hover { background: var(--primary-light); color: var(--primary-dark); }

.menu-btn {
  display: none; background: var(--primary); color: #fff;
  border: none; padding: 10px 14px; border-radius: 8px;
  cursor: pointer; font-size: .9rem; font-weight: 600;
  margin-left: auto;
}

.menu-slide {
  position: fixed; top: var(--header-h); left: 0; right: 0;
  background: var(--surface); border-bottom: 2px solid var(--primary);
  padding: 12px 16px;
  display: none; flex-direction: column; gap: 4px;
  z-index: 99;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.menu-slide.open { display: flex; }
.menu-slide a {
  padding: 12px 14px; border-radius: 8px;
  color: var(--text); font-weight: 500;
}
.menu-slide a:hover { background: var(--primary-light); color: var(--primary-dark); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  min-height: calc(85vh - var(--header-h));
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  display: grid; place-items: center;
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(246,213,92,.15), transparent 50%);
  pointer-events: none;
}
.hero .text-box { max-width: 800px; position: relative; z-index: 1; }
.hero .welcome {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800; line-height: 1.15;
  margin: 4px 0;
}
.hero .welcome.green {
  color: var(--accent);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  margin: 8px 0 12px;
}
.hero .subtext {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  opacity: .9;
  margin: 24px 0 36px;
  max-width: 600px;
  margin-left: auto; margin-right: auto;
}
.btn-home {
  display: inline-block;
  background: var(--accent); color: var(--primary-dark);
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700; font-size: 1rem;
  text-decoration: none;
  transition: all .2s;
  box-shadow: 0 4px 20px rgba(246,213,92,.3);
}
.btn-home:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(246,213,92,.5);
  text-decoration: none;
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}
.section .container {
  max-width: 1100px;
}
.section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  text-align: center;
  color: var(--primary-dark);
  margin-bottom: 12px;
  position: relative;
  display: inline-block;
  width: 100%;
  font-weight: 700;
}
.section h2::after {
  content: '';
  display: block;
  width: 60px; height: 4px;
  background: var(--accent);
  margin: 16px auto 0;
  border-radius: 2px;
}
.section .subtext {
  color: var(--text-soft);
  font-size: 1rem;
  margin-bottom: 40px;
  text-align: center;
}

/* ---------- Localização ---------- */
.localizacao {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
  align-items: stretch;
}
.localizacao iframe {
  width: 100%;
  min-height: 400px;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.local-info {
  background: var(--surface);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  display: flex; flex-direction: column;
}
.local-info .card-title {
  font-size: 1.25rem;
  color: var(--primary-dark);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
}
.local-info .card-title .material-symbols-outlined {
  background: var(--primary); color: #fff;
  border-radius: 50%; padding: 10px;
  font-size: 22px;
}
.local-info .card-address { color: var(--text-soft); margin-bottom: 24px; }
.local-info .card-btn {
  display: inline-block;
  background: var(--primary); color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600; text-align: center;
  margin-bottom: 12px;
  transition: background .15s;
}
.local-info .card-btn:hover { background: var(--primary-dark); text-decoration: none; }
.local-info .card-hint { font-size: .82rem; color: var(--text-soft); }

/* ---------- Instagram grid ---------- */
.instagram-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px auto 0;
  max-width: 1200px;
}
@media (max-width: 900px) {
  .instagram-grid { grid-template-columns: repeat(2, 1fr); gap: 14px }
}
@media (max-width: 560px) {
  .instagram-grid { grid-template-columns: 1fr; gap: 14px }
}

/* ---------- .ig-photo wrapper (cropper-aware) ---------- */
/* Inserido pelo Instagram::renderMedia(). Preenche o pai por padrão. */
.ig-photo { display:block; position:relative; overflow:hidden; line-height:0; width:100%; height:100% }
.ig-photo img { display:block; width:100%; height:100%; object-fit:cover; max-width:none }
.ig-photo-empty { background:rgba(0,0,0,.04); aspect-ratio:1 }
.ig-photo-empty .ig-fallback { display:grid; place-items:center; width:100%; height:100%; color:rgba(0,0,0,.4) }
.ig-photo-empty .ig-fallback .material-symbols-outlined { font-size:42px }
.instagram-grid a {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  display: block;
}
.instagram-grid a::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(30,126,52,.0), rgba(30,126,52,.4));
  opacity: 0; transition: opacity .25s;
}
.instagram-grid a:hover::after { opacity: 1; }
.instagram-grid .ig-photo img { transition: transform .35s; }
.instagram-grid a:hover .ig-photo img { transform: scale(1.05); }

/* ---------- Cards eventos ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 40px;
}
.cards .card {
  background: var(--surface);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,.04);
  transition: all .2s;
  border-top: 5px solid var(--primary);
}
.cards .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.cards .card h3.green {
  color: var(--primary-dark);
  font-size: 1.15rem;
  margin-bottom: 18px;
  font-weight: 700;
}
.cards .card p {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-soft);
  margin-bottom: 8px;
  font-size: .92rem;
}
.cards .card p:last-child {
  margin-top: 14px;
  color: var(--text);
  display: block;
  font-size: .9rem;
  line-height: 1.6;
}
.cards .card p .material-symbols-outlined {
  color: var(--primary);
  font-size: 20px;
}

/* ---------- Ensinamentos (accordion) ---------- */
.ensinamento {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.ensinamento.open { box-shadow: 0 6px 20px rgba(30,126,52,.1); }
.ensinamento-header {
  padding: 20px 24px;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  user-select: none;
  transition: background .15s;
}
.ensinamento-header:hover { background: var(--primary-light); }
.ensinamento-header h3.green {
  color: var(--primary-dark);
  font-size: 1.05rem;
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  font-weight: 600;
}
.ensinamento-header h3 .material-symbols-outlined {
  color: var(--primary); font-size: 22px;
}
.ensinamento-header::after {
  content: '+';
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 300;
  transition: transform .2s;
  margin-left: 12px;
}
.ensinamento.open .ensinamento-header::after { transform: rotate(45deg); }
.ensinamento-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  padding: 0 24px;
}
.ensinamento.open .ensinamento-content {
  max-height: 3000px;
  padding: 0 24px 24px;
}
.ensinamento-content p { margin-bottom: 14px; color: var(--text-soft); }
.ensinamento-content p strong { color: var(--text); }

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(135deg, var(--primary-dark), #0d3919);
  color: #d4edda;
  padding: 60px 0 24px;
  margin-top: 80px;
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}
.footer h3, .footer h4 {
  color: var(--accent);
  margin-bottom: 16px;
}
.footer h3 { font-size: 1.2rem; }
.footer h4 { font-size: 1rem; }
.footer .font-small { font-size: .9rem; line-height: 1.7; opacity: .85; }
.footer .info-footer {
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 12px;
  font-size: .9rem;
  line-height: 1.5;
}
.footer .info-footer .material-symbols-outlined {
  color: var(--accent); font-size: 20px; flex-shrink: 0; margin-top: 2px;
}
.footer a { color: #d4edda; }
.footer a:hover { color: var(--accent); text-decoration: none; }
.footer ul { list-style: none; padding: 0; }
.footer ul li { margin-bottom: 8px; font-size: .9rem; }
.footer ul li i { margin-right: 8px; color: var(--accent); }
.footer-end {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  margin-top: 32px;
  text-align: center;
  font-size: .82rem;
  opacity: .7;
}
.footer-end p { margin-bottom: 8px; }
.footer-end p:last-child { font-style: italic; }

/* ---------- Responsivo ---------- */
@media (max-width: 880px) {
  .site-header nav { display: none; }
  .menu-btn { display: block; }
  .localizacao { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .container { padding: 0 16px; }
  .site-header .container { gap: 12px; }
  .site-header .logo { font-size: .95rem; gap: 8px; min-width: 0; }
  .site-header .logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
  .site-header .logo .logo-img,
  .site-header .logo .logo-fallback { width: 38px; height: 38px; }
  .menu-btn { padding: 8px 12px; font-size: .85rem; }

  .hero { min-height: auto; padding: 56px 16px 64px; }
  .section { padding: 48px 0; }
  .section h2::after { margin-top: 12px; }

  .localizacao { gap: 16px; margin-top: 24px; }
  .localizacao iframe { min-height: 240px; }
  .local-info { padding: 22px; }
  .local-info .card-title { font-size: 1.1rem; }

  .cards { gap: 14px; margin-top: 24px; }
  .cards .card { padding: 20px; }

  .ensinamento-header { padding: 14px 16px; }
  .ensinamento-header h3.green { font-size: .92rem; gap: 8px; }
  .ensinamento.open .ensinamento-content { padding: 0 16px 18px; }

  .footer { padding: 44px 0 20px; margin-top: 48px; }
  .footer-container { padding: 0 16px; gap: 28px; }
  .footer-end { margin-top: 24px; padding-top: 18px; }
}
