/*
Theme Name: Called.org
Theme URI: https://called.org/
Author: Called.org
Description: A clean custom WordPress theme for Called.org with a simple header, single primary navigation, readable book and Bible study pages, and a focused homepage.
Version: 1.6.0
Text Domain: called-org
*/

:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --text: #26221d;
  --muted: #6d665d;
  --accent: #6d5234;
  --accent-dark: #4f3a23;
  --border: #ddd5ca;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.7;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: #000; }

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
}

.primary-nav a {
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .98rem;
  font-weight: 600;
}

.menu-toggle {
  display: none;
}

.site-main,
.content-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 44px 28px 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: 44px;
  align-items: center;
  margin-bottom: 52px;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.3rem, 5vw, 4.3rem);
  line-height: 1.06;
}

.hero-copy p {
  font-size: 1.16rem;
  color: #4f4942;
  max-width: 690px;
}

.hero-image {
  min-height: 340px;
  overflow: hidden;
  border-radius: 12px;
  background: #e6dfd5;
  box-shadow: 0 8px 28px rgba(0,0,0,.08);
}

.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
}

.home-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: clamp(24px, 4vw, 44px);
}

.entry-header h1,
.page-title {
  margin-top: 0;
  line-height: 1.2;
}

.entry-content {
  font-size: 1.08rem;
}

.entry-content h2,
.entry-content h3 {
  line-height: 1.25;
  margin-top: 1.7em;
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 0 0 0 20px;
  border-left: 4px solid var(--accent);
  color: #4a433b;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 26px 28px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: .92rem;
}


/* Called.org homepage hero spacing — v1.2
   Gives the opening text comfortable space from the left edge while
   preserving the full-width photograph. These rules cover both the
   theme hero and common WordPress Cover/Group block layouts. */

.home .hero-copy {
  padding-left: clamp(40px, 6vw, 84px);
  padding-right: clamp(24px, 3vw, 44px);
  max-width: 650px;
}

.home .hero-copy h1 {
  max-width: 540px;
}

.home .wp-block-cover:first-of-type .wp-block-cover__inner-container,
.home main > .wp-block-cover:first-child .wp-block-cover__inner-container,
.home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container {
  padding-left: clamp(40px, 6vw, 84px);
  padding-right: clamp(24px, 4vw, 56px);
}

.home .wp-block-cover:first-of-type .wp-block-cover__inner-container > *,
.home main > .wp-block-cover:first-child .wp-block-cover__inner-container > *,
.home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container > * {
  max-width: 620px;
}

.home .wp-block-cover:first-of-type h1,
.home main > .wp-block-cover:first-child h1,
.home .entry-content > .wp-block-cover:first-child h1 {
  max-width: 540px;
  line-height: 1.04;
}

/* Support common custom homepage hero class names if the page was
   originally built with a page builder or custom HTML. */
.home .hero-content,
.home .homepage-hero-content,
.home .home-hero-content {
  padding-left: clamp(40px, 6vw, 84px);
  padding-right: clamp(24px, 4vw, 56px);
  max-width: 650px;
}

@media (max-width: 820px) {
  .home .hero-copy,
  .home .wp-block-cover:first-of-type .wp-block-cover__inner-container,
  .home main > .wp-block-cover:first-child .wp-block-cover__inner-container,
  .home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container,
  .home .hero-content,
  .home .homepage-hero-content,
  .home .home-hero-content {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .home .hero-copy,
  .home .wp-block-cover:first-of-type .wp-block-cover__inner-container,
  .home main > .wp-block-cover:first-child .wp-block-cover__inner-container,
  .home .entry-content > .wp-block-cover:first-child .wp-block-cover__inner-container,
  .home .hero-content,
  .home .homepage-hero-content,
  .home .home-hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .primary-nav ul {
    gap: 10px 16px;
  }
}


/* Homepage opening panel spacing — v1.3
   Target the real first content block regardless of block type. */
body.home .entry-content > :first-child {
  padding-left: clamp(52px, 7vw, 96px) !important;
  padding-right: clamp(28px, 4vw, 56px) !important;
}

/* If the first block contains a nested wrapper created by WordPress or older
   page-builder markup, keep its text column comfortably inset as well. */
body.home .entry-content > :first-child > div:first-child,
body.home .entry-content > :first-child .wp-block-cover__inner-container,
body.home .entry-content > :first-child .wp-block-group__inner-container {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* Keep the opening copy readable instead of stretching too far across the image. */
body.home .entry-content > :first-child h1 {
  max-width: 560px;
}

body.home .entry-content > :first-child p {
  max-width: 610px;
}

@media (max-width: 820px) {
  body.home .entry-content > :first-child {
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}

@media (max-width: 480px) {
  body.home .entry-content > :first-child {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}


/* v1.4 definitive homepage hero positioning */
body.home main.site-main > section.hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
}

body.home main.site-main > section.hero > .hero-copy {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 680px !important;
  padding-left: 80px !important;
  padding-right: 36px !important;
  margin-left: 0 !important;
}

body.home main.site-main > section.hero > .hero-copy h1 {
  max-width: 540px !important;
}

body.home main.site-main > section.hero > .hero-copy p {
  max-width: 590px !important;
}

@media (max-width: 820px) {
  body.home main.site-main > section.hero > .hero-copy {
    max-width: none !important;
    padding-left: 28px !important;
    padding-right: 28px !important;
  }
}

@media (max-width: 480px) {
  body.home main.site-main > section.hero > .hero-copy {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}


/* =========================================================
   Called.org Home Page template — v1.5
   ========================================================= */

.called-home {
  max-width: none;
  padding: 0;
  margin: 0;
}

.called-home-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}

.called-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(247,244,238,.96) 0%,
    rgba(247,244,238,.88) 31%,
    rgba(247,244,238,.42) 52%,
    rgba(247,244,238,0) 70%
  );
}

.called-home-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 48px 76px 86px;
}

.called-home-copy {
  max-width: 590px;
}

.called-home-kicker,
.called-section-kicker {
  margin: 0 0 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .77rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6a6258;
}

.called-home-copy h1 {
  margin: 0 0 26px;
  max-width: 550px;
  font-size: clamp(3.4rem, 5.7vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.025em;
}

.called-home-intro {
  max-width: 560px;
  margin: 0 0 24px;
  font-size: 1.17rem;
  line-height: 1.62;
  color: #5f584f;
}

.called-home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.called-home-button {
  display: inline-block;
  border: 1px solid #21352d;
  border-radius: 999px;
  padding: 10px 19px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
}

.called-home-button.primary {
  background: #21352d;
  color: #fff;
}

.called-home-button.secondary {
  background: rgba(255,255,255,.72);
  color: #21352d;
}

.called-home-resources {
  background: #fff;
  padding: 78px 28px 82px;
}

.called-home-section-inner {
  max-width: 970px;
  margin: 0 auto;
}

.called-home-resources h2 {
  margin: 0 0 42px;
  max-width: 780px;
  font-size: clamp(2.8rem, 4.7vw, 4.25rem);
  line-height: 1.05;
}

.called-home-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.called-home-card {
  min-height: 245px;
  padding: 28px 26px 24px;
  border: 1px solid #e2dbd1;
  border-radius: 14px;
  background: #fff;
}

.called-home-card-number {
  margin-bottom: 38px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  color: #a67b42;
}

.called-home-card h3 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

.called-home-card p {
  margin: 0 0 22px;
  color: #71695f;
  font-size: .96rem;
  line-height: 1.6;
}

.called-home-card a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
}

.called-home-scripture {
  padding: 92px 28px 100px;
  text-align: center;
  background: #21352d;
  color: #fff;
}

.called-home-scripture .called-section-kicker {
  color: rgba(255,255,255,.45);
}

.called-home-scripture blockquote {
  max-width: 820px;
  margin: 18px auto 12px;
  padding: 0;
  border: 0;
  color: #fff;
  font-size: clamp(2.35rem, 4.7vw, 4.25rem);
  line-height: 1.08;
}

.called-home-scripture cite {
  font-style: normal;
  font-size: .9rem;
}

@media (max-width: 820px) {
  .called-home-hero {
    min-height: 560px;
    background-position: 62% center;
  }

  .called-home-hero::before {
    background: linear-gradient(
      90deg,
      rgba(247,244,238,.96) 0%,
      rgba(247,244,238,.86) 55%,
      rgba(247,244,238,.20) 82%,
      rgba(247,244,238,0) 100%
    );
  }

  .called-home-hero-inner {
    padding: 58px 28px 64px;
  }

  .called-home-copy {
    max-width: 520px;
  }

  .called-home-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .called-home-hero {
    min-height: 520px;
    background-position: 68% center;
  }

  .called-home-hero::before {
    background: rgba(247,244,238,.78);
  }

  .called-home-hero-inner {
    padding: 46px 20px 52px;
  }

  .called-home-copy h1 {
    font-size: clamp(2.8rem, 14vw, 4rem);
  }

  .called-home-resources,
  .called-home-scripture {
    padding-left: 20px;
    padding-right: 20px;
  }
}
