/* =========================================================
   IDD United — main stylesheet
   Colors and fonts live in the variables below: change them
   here and the whole site updates.
   ========================================================= */
:root {
  --blue: #277ead;          /* "Necesitas oración" band */
  --black: #000;
  --text: #7a7a7a;          /* body copy */
  --text-dark: #333;
  --blue-dark: #1d5f84;
  --paper: #f7f4ee;         /* main page background (warm off-white) */
  --sand: #ece5d8;          /* alternate bands */
  --gray-light: #f3f3f3;
  --card: #fff;
  --card-shadow: 0 10px 30px rgba(40, 30, 15, .08), 0 2px 6px rgba(40, 30, 15, .05);
  --button: #d9d9d9;
  /* Textures: a fine paper grain and a soft dot pattern (pure CSS/SVG, no image files) */
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.09'/></svg>");
  --dots: radial-gradient(rgba(60, 45, 20, .09) 1.2px, transparent 1.3px);
  --font: "Nunito Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; } /* keeps menu links from hiding sections under the sticky header */
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text-dark);
  background: var(--grain), var(--paper);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; color: var(--black); font-weight: 900; line-height: 1.15; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-title { font-size: clamp(28px, 4vw, 42px); text-transform: uppercase; letter-spacing: .02em; }
.section-title::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--blue); margin-top: 14px; }
.center .section-title::after, .section-title.center::after { margin-left: auto; margin-right: auto; }
/* Reusable textured bands */
.band-sand { background: var(--grain), var(--dots) 0 0 / 22px 22px, var(--sand); }
.band-dark { background: var(--grain), radial-gradient(circle at 15% 0%, #23323c 0, transparent 55%), #0e0e0e; color: #ddd; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: #fff; }
.center { text-align: center; }
.muted { color: var(--text); }
.divider { border: 0; border-top: 1px solid rgba(0,0,0,.12); margin: 40px auto 0; max-width: var(--container); }

.btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--button);
  color: #000;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .3s;
  font-family: inherit;
}
.btn:hover { transform: scale(1.05); }
.btn-dark { background: #111; color: #fff; text-transform: none; border-radius: 30px; }
.btn-small { font-size: 13px; padding: 8px 20px; text-transform: none; border-radius: 30px; color: var(--blue); background: transparent; border: 2px solid var(--blue); font-weight: 800; }
.btn-small:hover { background: var(--blue); color: #fff; }

/* ---------- Header (black) ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: #000; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; padding-bottom: 12px; }
.logo img { width: 230px; filter: invert(1); } /* the logo file is black; invert makes it white */
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 10px; align-items: center; }
.nav a {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 900;
  color: #bdbdbd;
  position: relative;
  transition: color .3s;
}
.nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: #fff; opacity: 0; transition: opacity .3s;
}
.nav a:hover, .nav a.active { color: #fff; }
.nav a:hover::after, .nav a.active::after { opacity: 1; }
/* Fortaleciendo Familias: the logo has black + orange colors, so it sits on a white badge */
.nav a.nav-logo { padding: 0; margin-left: 14px; }
.nav a.nav-logo::after { display: none; }
.nav a.nav-logo img { height: 42px; width: auto; background: #fff; border-radius: 8px; padding: 4px 10px; transition: transform .3s; }
.nav a.nav-logo:hover img { transform: scale(1.06); }
.nav a.nav-logo-vae { margin-left: 10px; }
.nav a.nav-logo-vae img { padding: 3px; }
.nav { margin-left: auto; }
/* Donar button (links to ChMeetings online giving) */
.donate {
  margin-left: 18px; padding: 10px 22px; border-radius: 30px;
  background: var(--blue); color: #fff; font-weight: 900; text-decoration: none;
  text-transform: uppercase; letter-spacing: .05em; font-size: 14px;
  transition: background .3s, transform .3s; white-space: nowrap;
}
.donate:hover { background: #1f6a92; transform: scale(1.05); }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle span { display: block; width: 24px; height: 3px; background: #fff; margin: 4px 0; border-radius: 2px; }

/* ---------- Hero slideshow ---------- */
.hero { position: relative; height: min(82vh, 760px); min-height: 460px; overflow: hidden; background: #000; }
.hero-slider { position: absolute; inset: 0; }
.hero-slider .slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s ease, transform 6s ease-out;
}
.hero-slider .slide.active { opacity: 1; transform: scale(1); }
/* light fade at the bottom so the dots stay visible */
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 90px;
  background: linear-gradient(transparent, rgba(0,0,0,.35)); pointer-events: none;
}
.hero-arrow {
  position: absolute; top: 50%; z-index: 3; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; font-size: 26px; line-height: 1;
  transition: background .3s;
}
.hero-arrow:hover { background: rgba(0,0,0,.65); }
.hero-arrow.prev { left: 20px; }
.hero-arrow.next { right: 20px; }
.hero-dots { position: absolute; bottom: 20px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.hero-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,.5); transition: background .3s, transform .3s;
}
.hero-dots button.active { background: #fff; transform: scale(1.3); }

/* ---------- Welcome heading (under the slideshow) ---------- */
.welcome { text-align: center; padding: 50px 0 10px; }
.welcome h1 { font-size: clamp(28px, 4vw, 48px); text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.welcome h1::after {
  content: ""; display: block; width: 70px; height: 4px; border-radius: 2px;
  background: var(--blue); margin: 18px auto 0;
}

/* ---------- Featured post cards ---------- */
.post-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 800px; margin: 0 auto; }
.post-card {
  display: flex; gap: 12px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 8px 12px 8px 8px;
  text-decoration: none;
  transition: transform .3s, box-shadow .3s;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(40,30,15,.14); }
.post-card img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.post-card h3 { font-size: 18px; margin: 4px 0 4px; }
.post-card p { font-size: 13px; color: var(--text); margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Services ---------- */
.services { padding-top: 0; }
.service-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; max-width: 800px; margin: 30px auto 0; }
.service-card {
  background: var(--card); border-radius: 16px; padding: 32px 20px;
  text-align: center; box-shadow: var(--card-shadow); border-top: 5px solid var(--blue);
}
.service-card p { margin: 0; }
.service-card .day { font-weight: 900; font-size: 22px; text-transform: uppercase; color: #000; }
.service-card .time { font-weight: 900; font-size: 40px; color: var(--blue); margin: 6px 0; }
.service-card .desc { color: var(--text); font-size: 16px; }

/* ---------- Prayer band ---------- */
.prayer, .cta-band { background: var(--grain), radial-gradient(circle at 80% 0%, rgba(255,255,255,.18) 0, transparent 50%), var(--blue); color: #fff; text-align: center; }
.prayer h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); }
.prayer a { color: #fff; font-weight: 800; }

/* ---------- First steps tabs ---------- */
.steps { background: var(--grain), var(--dots) 0 0 / 22px 22px, var(--sand); }
.steps .subtitle { font-weight: 800; margin-top: -10px; color: #000; }
.tabs { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-top: 30px; }
.tab-list { background: #fff; border-radius: 14px; padding: 10px 0; box-shadow: var(--card-shadow); overflow: hidden; display: flex; flex-direction: column; }
.tab-list button {
  background: none; border: 0; padding: 22px 10px;
  font: 800 15px var(--font); color: #000; cursor: pointer;
}
.tab-list button { border-left: 4px solid transparent; transition: background .2s; }
.tab-list button.active, .tab-list button:hover { background: #f4f1ea; }
.tab-list button.active { border-left-color: var(--blue); color: var(--blue); }
.tab-panel { background: #fff; border-radius: 14px; padding: 30px; box-shadow: var(--card-shadow); color: var(--text); min-height: 260px; }
.tab-panel strong { color: #000; }
.tab-panel[hidden] { display: none; }

/* ---------- About / pastors ---------- */
.pastors { display: flex; justify-content: center; gap: 60px; flex-wrap: wrap; margin-top: 30px; }
.pastor { text-align: center; width: 220px; }
.pastor img { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; margin: 0 auto 25px; border: 6px solid #fff; box-shadow: var(--card-shadow); }
.pastor h3 { font-size: 14px; text-transform: uppercase; min-height: 2.4em; }

/* ---------- Latest message ---------- */
.message { background: var(--grain), radial-gradient(circle at 15% 0%, #23323c 0, transparent 55%), #0e0e0e; color: #ddd; }
.message h2 { color: #fff; }
.message .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.video-wrap { position: relative; aspect-ratio: 16/9; border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.5); overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.message .label { color: #9fd3f0; font-weight: 800; margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.message h2 { font-size: 28px; border-bottom: 1px solid rgba(255,255,255,.2); padding-bottom: 10px; }
.meta { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; margin: 25px 0; }
.share { display: flex; gap: 8px; justify-content: flex-end; }
.share a {
  width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.12); transition: background .3s;
  display: grid; place-items: center; color: #fff;
}
.share a:hover { background: var(--blue); }
.share svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Books (libros.html) ---------- */
.books .lead { max-width: 560px; margin: 0 auto 50px; }
.books .cover { width: 100%; border-radius: 3px 6px 6px 3px; box-shadow: 10px 14px 24px rgba(0,0,0,.25), 2px 2px 6px rgba(0,0,0,.15); transition: transform .3s; }
.books article:hover .cover { transform: translateY(-6px); }
.featured-books { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.feature-book { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: center; }
.feature-book .eyebrow { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin: 0 0 6px; }
.feature-book h3 { font-size: 26px; margin-bottom: 10px; }
.feature-book h3 span { display: block; font-size: 16px; font-weight: 600; color: var(--text); margin-top: 4px; }
.group-title { text-align: center; font-size: 26px; margin: 70px 0 36px; }
.group-title::after { content: ""; display: block; width: 48px; height: 3px; border-radius: 2px; background: var(--blue); margin: 12px auto 0; }
.books .lead + .group-title { margin-top: 0; }
.featured-books.three { grid-template-columns: repeat(3, 1fr); gap: 40px; }
.featured-books.three .feature-book { grid-template-columns: 1fr; text-align: center; align-items: start; gap: 22px; }
.featured-books.three .cover { max-width: 200px; margin: 0 auto; }
.featured-books.three .book-buttons { justify-content: center; }
.badge { display: inline-block; background: #c1121f; color: #fff; border-radius: 20px; padding: 2px 10px; font-size: 11px; letter-spacing: .06em; margin-left: 6px; vertical-align: 1px; }
.author-link { font-weight: 800; color: #000; }
.more-title { text-align: center; font-size: 22px; margin: 70px 0 36px; }
.more-books { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 30px; max-width: 860px; margin: 0 auto; }
.mini-book { text-align: center; }
.mini-book .cover { max-width: 170px; margin: 0 auto 18px; }
.mini-book h4 { font-size: 17px; margin: 0 0 2px; }
.mini-book .muted { font-size: 14px; margin-bottom: 12px; }
.book-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-book .book-buttons { justify-content: center; }
.btn-outline { background: transparent; border: 2px solid #111; color: #111; text-transform: none; border-radius: 30px; padding: 10px 18px; }
.btn-dark, .btn-outline { font-size: 14px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ---------- Address / map ---------- */
.map { border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); margin-top: 24px; }
.map iframe { width: 100%; height: 400px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--grain), #0e0e0e; color: #bdbdbd; font-size: 14px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 50px; padding-bottom: 40px; }
.footer-logo { width: 210px; filter: invert(1); margin-bottom: 16px; }
.site-footer h4 { color: #fff; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; margin-bottom: 14px; }
.site-footer p { margin: 0 0 6px; }
.site-footer a { color: #bdbdbd; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: #888; }
.social { display: flex; gap: 8px; }
.social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; display: grid; place-items: center; transition: background .3s; }
.social a:hover { background: var(--blue); }
.social svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Blog ---------- */
.page-hero {
  min-height: 450px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)), url(../images/hero-DSC02719.jpg) center/cover;
}
.page-hero h1 { color: #fff; font-size: clamp(36px, 5vw, 60px); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.blog-card { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); transition: transform .3s; }
.blog-card:hover { transform: translateY(-5px); }
.blog-card > *:not(a:first-child) { margin-left: 22px; margin-right: 22px; }
.blog-card .more { display: inline-block; margin-bottom: 22px; }
.blog-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.blog-card h3 { font-size: 21px; margin: 18px 0 8px; }
.blog-card h3 a { text-decoration: none; }
.blog-card p { color: var(--text); font-size: 14px; }
.blog-card .more { color: var(--blue); font-size: 13px; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Blog post pages ---------- */
.eyebrow { color: var(--blue); font-weight: 800; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; margin: 0 0 8px; }
.container.narrow { max-width: 820px; }
.post-hero {
  position: relative; min-height: 460px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center; color: #fff; padding: 0 0 56px;
}
.post-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.75)); }
.post-hero .container { position: relative; }
.post-hero .eyebrow { color: #9fd3f0; }
.post-hero h1 { color: #fff; font-size: clamp(38px, 6vw, 68px); text-transform: uppercase; margin: 0 0 12px; }
.post-hero-lead { font-size: clamp(17px, 2vw, 22px); max-width: 680px; margin: 0; opacity: .92; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.pillar { background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); }
.pillar img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.pillar-body { padding: 26px; color: var(--text); }
.pillar-num { display: block; font-weight: 900; font-size: 34px; color: var(--blue); line-height: 1; margin-bottom: 8px; }
.pillar h2 { font-size: 22px; }

.courses { background: var(--grain), var(--dots) 0 0 / 22px 22px, var(--sand); }
.chips { list-style: none; padding: 0; margin: 10px auto 20px; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 820px; }
.chips li { background: var(--card); border-radius: 30px; padding: 10px 20px; font-weight: 800; color: #000; box-shadow: 0 3px 8px rgba(0,0,0,.08); }

.faith { margin-top: 30px; background: var(--card); border-radius: 16px; box-shadow: var(--card-shadow); padding: 6px 28px; }
.faith details { border-bottom: 1px solid #eee; }
.faith details:last-child { border-bottom: 0; }
.faith summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-weight: 800; font-size: 18px; color: #000;
}
.faith summary::-webkit-details-marker { display: none; }
.faith summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--blue); transition: transform .3s;
}
.faith details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faith details p { color: var(--text); margin: 0 0 20px; }

.cta-band { padding: 64px 0; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3.5vw, 38px); }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.btn-light { background: #fff; color: #000; text-transform: none; border-radius: 30px; padding: 12px 26px; }
.btn-outline-light { background: transparent; border: 2px solid #fff; color: #fff; text-transform: none; border-radius: 30px; padding: 10px 24px; }

.read-next .eyebrow { margin-bottom: 16px; }
.read-next-card { max-width: 560px; margin: 0 auto 30px; }

.intro-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; align-items: center; }
.intro-split h2 { font-size: clamp(26px, 3vw, 36px); }
.intro-split p { color: var(--text); }
.lead-text { font-size: 19px; color: var(--text-dark) !important; }
.intro-img { border-radius: 14px; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.info-band { background: var(--grain), var(--dots) 0 0 / 22px 22px, var(--sand); }
.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.info-card { background: var(--card); border-radius: 16px; padding: 30px 24px; text-align: center; box-shadow: var(--card-shadow); border-top: 5px solid var(--blue); }
.info-card p { margin: 0; }
.info-label { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 800; color: var(--blue); }
.info-value { font-size: 26px; font-weight: 900; color: #000; margin: 6px 0 4px !important; }
.info-sub { color: var(--text); }

/* ---------- Responsive ---------- */
/* Header switches to the menu button when the full menu no longer fits */
@media (max-width: 1060px) {
  .menu-toggle { display: block; order: 2; }
  .donate { order: 1; margin-left: auto; margin-right: 8px; padding: 8px 16px; font-size: 13px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #000; box-shadow: 0 6px 10px rgba(0,0,0,.3); }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; align-items: stretch; }
  .nav a.nav-logo, .nav a.nav-logo-vae { padding: 10px 14px; margin-left: 0; }
  .nav a.nav-logo img { display: inline-block; }
}

@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .featured-books.three { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
  .more-books { grid-template-columns: repeat(2, 1fr); gap: 40px 16px; }
  .pillars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .feature-book { grid-template-columns: 120px 1fr; gap: 18px; }
  .feature-book h3 { font-size: 22px; }
  .logo img { width: 180px; }

  .hero { height: 62vh; min-height: 380px; }
  .welcome { padding-top: 36px; }
  .hero-arrow { display: none; } /* swipe or dots on phones */

  .post-cards, .service-cards, .blog-grid, .featured-books, .pillars, .intro-split, .info-cards,
  .message .grid { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: 1fr; }
  .tab-list { flex-direction: row; flex-wrap: wrap; }
  .tab-list button { flex: 1 1 50%; padding: 14px 10px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .footer-logo { margin-left: auto; margin-right: auto; }
  .social { justify-content: center; }
  .footer-bottom { text-align: center; }
}
