/*
Theme Name: InDepthScripture
Theme URI: https://indepthscripture.com
Author: Chris
Description: A custom WordPress theme for InDepthScripture.com — Scholarly Depth. Everyday Clarity. Built for Bible teaching, blogging, and YouTube ministry integration.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: indepthscripture
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --navy: #1B3A5C;
  --navy-dark: #0F2840;
  --navy-light: #2A5580;
  --gold: #C8963E;
  --gold-light: #E8C87A;
  --gold-pale: #F5E6C8;
  --cream: #FAF6EF;
  --cream-dark: #F0E8D8;
  --text: #2C2C2C;
  --text-light: #6B6B6B;
  --white: #FFFFFF;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1100px;
  --content-width: 740px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans); color: var(--text);
  background: var(--cream); line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold); }
h1, h2, h3, h4, h5, h6 { font-family: var(--serif); color: var(--navy); line-height: 1.25; }

/* ============================================
   NAVIGATION
   ============================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15, 40, 64, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(200,150,62,0.2);
  transition: background 0.3s;
}
.header-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 2rem; height: 72px;
  display: flex; align-items: center; justify-content: space-between;
}
.site-logo {
  font-family: var(--serif); color: var(--white);
  font-size: 1.5rem; font-weight: 700;
  text-decoration: none; letter-spacing: -0.02em;
}
.site-logo span { color: var(--gold); }

.main-nav { display: flex; gap: 2rem; align-items: center; }
.main-nav a {
  color: rgba(255,255,255,0.8); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.05em;
  text-transform: uppercase; transition: color 0.3s;
}
.main-nav a:hover { color: var(--gold); }
.nav-cta {
  background: var(--gold) !important; color: var(--navy-dark) !important;
  padding: 0.5rem 1.2rem !important; border-radius: 4px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

/* Mobile menu toggle */
.menu-toggle {
  display: none; background: none; border: none;
  color: var(--white); font-size: 1.5rem; cursor: pointer;
  padding: 0.5rem;
}
.menu-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--white); margin: 5px 0;
  transition: all 0.3s;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav {
    display: none; position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--navy-dark);
    flex-direction: column; padding: 1.5rem 2rem; gap: 1rem;
    border-bottom: 2px solid var(--gold);
  }
  .main-nav.active { display: flex; }
}

/* ============================================
   HERO SECTION (Front Page)
   ============================================ */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(170deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  position: relative; overflow: hidden;
  padding: 6rem 2rem 4rem;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(200,150,62,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(200,150,62,0.05) 0%, transparent 50%);
}
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
  background: linear-gradient(to top, var(--cream), transparent);
  pointer-events: none;
}
.hero-content {
  position: relative; z-index: 2; max-width: 800px; text-align: center;
}
.hero-badge {
  display: inline-block; padding: 0.4rem 1rem;
  border: 1px solid rgba(200,150,62,0.4);
  border-radius: 50px; color: var(--gold-light);
  font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 2rem; font-weight: 500;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: 1.1;
  margin-bottom: 1.5rem; font-weight: 800; letter-spacing: -0.02em;
}
.hero h1 em {
  font-style: italic; color: var(--gold);
  display: block; margin-top: 0.15em;
}
.hero-text {
  color: rgba(255,255,255,0.75); font-size: 1.2rem;
  line-height: 1.7; max-width: 600px; margin: 0 auto 2.5rem;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 2rem; border-radius: 4px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  letter-spacing: 0.03em; transition: all 0.3s; cursor: pointer;
  border: none; font-family: var(--sans);
}
.btn-primary {
  background: var(--gold); color: var(--navy-dark);
}
.btn-primary:hover { background: var(--gold-light); color: var(--navy-dark); transform: translateY(-2px); }
.btn-secondary {
  background: transparent; border: 1px solid rgba(255,255,255,0.3); color: var(--white);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

/* ============================================
   SECTION COMMON
   ============================================ */
.section { padding: 5rem 2rem; }
.section-inner { max-width: var(--max-width); margin: 0 auto; }
.section-label {
  color: var(--gold); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--serif); font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--navy); line-height: 1.2; margin-bottom: 1rem;
  font-weight: 700; letter-spacing: -0.01em;
}
.section-subtitle {
  color: var(--text-light); font-size: 1.1rem;
  max-width: 650px; line-height: 1.7; font-weight: 300;
}
.bg-white { background: var(--white); }
.bg-cream { background: var(--cream); }
.bg-dark { background: var(--navy-dark); color: var(--white); }
.bg-dark .section-label { color: var(--gold-light); }
.bg-dark .section-title { color: var(--white); }
.bg-dark .section-subtitle { color: rgba(255,255,255,0.6); }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 4rem; align-items: center; margin-top: 3rem;
}
.about-image {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-radius: 8px; aspect-ratio: 4/5; position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.about-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.about-image-placeholder {
  color: rgba(255,255,255,0.4); text-align: center;
  font-size: 0.9rem; padding: 2rem;
}
.about-text p { margin-bottom: 1rem; color: var(--text-light); line-height: 1.7; }
.credentials { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.credential {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1rem; background: var(--cream); border-radius: 6px;
  border-left: 3px solid var(--gold);
}
.credential-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--navy); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-weight: 700; font-size: 0.9rem;
}
.credential h4 { font-family: var(--sans); font-size: 0.95rem; color: var(--navy); margin-bottom: 0.2rem; font-weight: 600; }
.credential p { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image { max-height: 400px; }
}

/* ============================================
   CONTENT PILLARS
   ============================================ */
.pillar-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem; margin-top: 3rem;
}
.pillar-card {
  background: var(--white); border-radius: 8px; padding: 2rem;
  border: 1px solid rgba(0,0,0,0.06); transition: all 0.3s;
  position: relative; overflow: hidden;
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.pillar-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gold);
}
.pillar-number {
  font-family: var(--serif); font-size: 3rem; font-weight: 800;
  color: rgba(200,150,62,0.15); line-height: 1; margin-bottom: 0.5rem;
}
.pillar-card h3 {
  font-family: var(--serif); font-size: 1.3rem;
  color: var(--navy); margin-bottom: 0.75rem;
}
.pillar-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.7; }
.pillar-tag {
  display: inline-block; margin-top: 1rem;
  padding: 0.3rem 0.8rem; background: var(--cream);
  border-radius: 50px; font-size: 0.75rem; color: var(--gold);
  font-weight: 600; letter-spacing: 0.05em;
}
@media (max-width: 768px) {
  .pillar-grid { grid-template-columns: 1fr; }
}

/* ============================================
   VIDEO SECTION
   ============================================ */
.video-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 3rem;
}
.video-card {
  background: rgba(255,255,255,0.05); border-radius: 8px;
  overflow: hidden; border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s;
}
.video-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.08);
}
.video-card .video-thumb {
  aspect-ratio: 16/9; position: relative; overflow: hidden;
}
.video-card .video-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.video-card .video-thumb .play-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2); transition: background 0.3s;
}
.video-card:hover .play-overlay { background: rgba(0,0,0,0.4); }
.play-btn {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(200,150,62,0.9); display: flex;
  align-items: center; justify-content: center;
  transition: transform 0.3s;
}
.video-card:hover .play-btn { transform: scale(1.1); }
.play-btn::after {
  content: ''; width: 0; height: 0;
  border-left: 16px solid var(--white);
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 3px;
}
.video-info { padding: 1.2rem; }
.video-info h3 { font-family: var(--sans); font-size: 0.95rem; color: var(--white); line-height: 1.4; margin-bottom: 0.5rem; font-weight: 600; }
.video-info p { font-size: 0.8rem; color: rgba(255,255,255,0.4); }

@media (max-width: 768px) {
  .video-grid { grid-template-columns: 1fr; }
}

/* ============================================
   NEWSLETTER / EMAIL SIGNUP
   ============================================ */
.newsletter-section { text-align: center; }
.newsletter-section .section-subtitle { margin-left: auto; margin-right: auto; }
.newsletter-box { max-width: 550px; margin: 2.5rem auto 0; }
.email-form {
  display: flex; gap: 0.75rem; margin-top: 1.5rem;
}
.email-form input[type="email"] {
  flex: 1; padding: 0.9rem 1.2rem;
  border: 1px solid rgba(0,0,0,0.12); border-radius: 4px;
  font-size: 1rem; font-family: var(--sans);
  background: var(--white);
}
.email-form input[type="email"]:focus { outline: none; border-color: var(--gold); }
.email-form button {
  background: var(--navy); color: var(--white);
  padding: 0.9rem 1.8rem; border: none; border-radius: 4px;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  font-family: var(--sans); transition: background 0.3s;
}
.email-form button:hover { background: var(--navy-dark); }
.newsletter-note {
  font-size: 0.8rem; color: var(--text-light); margin-top: 0.75rem;
}
@media (max-width: 768px) {
  .email-form { flex-direction: column; }
}

/* ============================================
   BLOG POSTS / ARCHIVE
   ============================================ */
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; margin-top: 3rem;
}
.blog-card { transition: transform 0.3s; }
.blog-card:hover { transform: translateY(-4px); }
.blog-card a { text-decoration: none; }
.blog-card-image {
  aspect-ratio: 16/10; border-radius: 8px; overflow: hidden;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}
.blog-card-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-cat {
  font-size: 0.7rem; color: var(--gold); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.blog-card h3 {
  font-family: var(--serif); font-size: 1.15rem; color: var(--navy);
  line-height: 1.35; margin-bottom: 0.6rem;
}
.blog-card p { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }
.blog-card-date { font-size: 0.8rem; color: #aaa; margin-top: 0.75rem; }

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ============================================
   SINGLE POST / PAGE CONTENT
   ============================================ */
.page-header {
  background: linear-gradient(170deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 8rem 2rem 4rem; text-align: center;
}
.page-header h1 {
  color: var(--white); font-size: clamp(2rem, 4vw, 3rem);
  max-width: 700px; margin: 0 auto 1rem;
}
.page-header .post-meta {
  color: rgba(255,255,255,0.5); font-size: 0.9rem;
}
.page-header .post-meta a { color: var(--gold-light); }

.content-area {
  max-width: var(--content-width); margin: 0 auto;
  padding: 3rem 2rem 5rem;
}
.content-area h2 {
  font-size: 1.8rem; margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--gold-pale);
}
.content-area h3 { font-size: 1.4rem; margin: 2rem 0 0.75rem; }
.content-area h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.content-area p { margin-bottom: 1.2rem; }
.content-area ul, .content-area ol {
  margin: 0 0 1.5rem 1.5rem;
}
.content-area li { margin-bottom: 0.5rem; }
.content-area blockquote {
  border-left: 4px solid var(--gold);
  padding: 1rem 1.5rem; margin: 1.5rem 0;
  background: var(--cream-dark); border-radius: 0 6px 6px 0;
  font-style: italic; color: var(--navy);
}
.content-area blockquote cite {
  display: block; margin-top: 0.5rem;
  font-style: normal; font-size: 0.85rem; color: var(--text-light);
}
.content-area img {
  border-radius: 8px; margin: 1.5rem 0;
}
.content-area .wp-block-embed { margin: 2rem 0; }
.content-area .wp-block-embed iframe {
  width: 100%; aspect-ratio: 16/9; border-radius: 8px;
}

/* Scripture reference styling */
.scripture-ref {
  background: var(--cream-dark); padding: 0.15rem 0.4rem;
  border-radius: 3px; font-size: 0.9em; white-space: nowrap;
}

/* ============================================
   SIDEBAR (for blog archive)
   ============================================ */
.blog-layout {
  max-width: var(--max-width); margin: 0 auto;
  padding: 3rem 2rem 5rem;
  display: grid; grid-template-columns: 1fr 300px; gap: 3rem;
}
.sidebar .widget {
  background: var(--white); padding: 1.5rem;
  border-radius: 8px; margin-bottom: 1.5rem;
  border: 1px solid rgba(0,0,0,0.06);
}
.sidebar .widget h4 {
  font-family: var(--sans); font-size: 0.8rem;
  color: var(--gold); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--cream-dark);
}
.sidebar .widget ul { list-style: none; }
.sidebar .widget li {
  padding: 0.4rem 0; border-bottom: 1px solid var(--cream);
}
.sidebar .widget li:last-child { border: none; }
.sidebar .widget a {
  font-size: 0.9rem; color: var(--navy);
}
.sidebar .widget a:hover { color: var(--gold); }

@media (max-width: 768px) {
  .blog-layout { grid-template-columns: 1fr; }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--navy-dark); color: rgba(255,255,255,0.5);
  padding: 3rem 2rem 2rem;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand p { margin-top: 0.75rem; font-size: 0.85rem; line-height: 1.6; max-width: 280px; }
.footer-col h4 {
  color: var(--white); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 1rem; font-family: var(--sans);
}
.footer-col a {
  display: block; color: rgba(255,255,255,0.5); text-decoration: none;
  font-size: 0.9rem; margin-bottom: 0.6rem; transition: color 0.3s;
}
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  max-width: var(--max-width); margin: 2rem auto 0;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem; text-align: center;
}

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content > * {
  animation: fadeUp 0.8s ease-out both;
}
.hero-badge { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.2s; }
.hero-text { animation-delay: 0.35s; }
.hero-actions { animation-delay: 0.5s; }

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.alignwide { max-width: var(--max-width); margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; max-width: 100%; }
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem; margin-bottom: 1rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem; text-align: center; }
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); position: absolute;
  height: 1px; width: 1px; overflow: hidden;
}

/* Pagination */
.pagination {
  display: flex; justify-content: center; gap: 0.5rem;
  margin-top: 3rem; padding: 2rem 0;
}
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 4px;
  font-size: 0.9rem; font-weight: 600;
  border: 1px solid rgba(0,0,0,0.1);
}
.pagination a { color: var(--navy); background: var(--white); }
.pagination a:hover { background: var(--cream); border-color: var(--gold); }
.pagination .current {
  background: var(--navy); color: var(--white);
  border-color: var(--navy);
}

/* Comments */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--cream-dark); }
.comments-area h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; }
.comment-body {
  padding: 1.5rem; background: var(--white);
  border-radius: 8px; margin-bottom: 1rem;
  border: 1px solid rgba(0,0,0,0.06);
}
.comment-author { font-weight: 600; color: var(--navy); }
.comment-meta { font-size: 0.8rem; color: var(--text-light); margin-bottom: 0.75rem; }
.comment-respond { margin-top: 2rem; }
.comment-form label { display: block; font-weight: 500; margin-bottom: 0.3rem; font-size: 0.9rem; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%; padding: 0.75rem 1rem;
  border: 1px solid rgba(0,0,0,0.12); border-radius: 4px;
  font-family: var(--sans); font-size: 1rem;
  margin-bottom: 1rem;
}
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus {
  outline: none; border-color: var(--gold);
}
.comment-form .submit {
  background: var(--navy); color: var(--white);
  padding: 0.75rem 2rem; border: none; border-radius: 4px;
  font-weight: 600; cursor: pointer; font-family: var(--sans);
  font-size: 0.95rem; transition: background 0.3s;
}
.comment-form .submit:hover { background: var(--navy-dark); }
