/*
Theme Name: Adonai Yeshua Premium
Theme URI: https://www.adonaiyeshua.org
Description: A modern, elegant, premium Christian website theme with Scripture-focused design. Features warm gold accents, deep navy typography, and minimalist layout inspired by high-end ministry websites.
Version: 1.0.0
Author: Adonai Yeshua
Author URI: https://www.adonaiyeshua.org
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adonai-yeshua
Domain Path: /languages
Requires at least: 6.0
Requires PHP: 7.4
*/

/* ============================================
   Adonai Yeshua Premium Theme
   Modern, Elegant, Scripture-Focused Design
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */

:root {
  /* Color Palette */
  --primary: #C89B3C;           /* Warm Gold - decorative/large fills only, 2.45:1 on light bg */
  --primary-text: #8A6119;      /* Accessible Gold - 5.3:1 on light bg, use for all gold TEXT/icons/focus rings */
  --primary-foreground: #FAFAF8; /* Off-White */
  --secondary: #163A63;          /* Deep Navy */
  --secondary-foreground: #FAFAF8; /* Off-White */
  --accent: #6B8E4E;             /* Olive Green */
  --accent-foreground: #FAFAF8;  /* Off-White */
  
  /* Semantic Colors */
  --background: #FAFAF8;         /* Off-White */
  --foreground: #2B2B2B;         /* Dark Gray */
  --card: #FFFFFF;               /* Pure White */
  --card-foreground: #2B2B2B;    /* Dark Gray */
  --muted: #E5E5E5;              /* Light Gray */
  --muted-foreground: #6B7280;   /* Medium Gray */
  --border: #E5E5E5;             /* Light Gray */
  --input: #F3F4F6;              /* Very Light Gray */
  --ring: #C89B3C;               /* Gold for focus */
  
  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  
  /* Spacing */
  --radius: 0.65rem;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
}

/* ============================================
   Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.25rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-text);
  text-decoration: none;
  transition: color 0.2s ease-out;
}

a:hover {
  color: var(--secondary);
}

/* ============================================
   Layout
   ============================================ */

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (min-width: 640px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 var(--spacing-xl);
  }
}

/* ============================================
   Header
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(250, 250, 248, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
}

.site-header-inner--centered {
  justify-content: center;
  padding: var(--spacing-lg) 0;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  text-decoration: none;
  color: var(--secondary);
  font-size: 1.5rem;
  font-weight: 700;
}

.site-branding:hover {
  color: var(--primary-text);
}

.site-title {
  color: inherit;
}

.site-logo-img {
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Navigation */
.site-nav {
  display: none;
  align-items: center;
  gap: var(--spacing-lg);
}

/* Defensive styling for the wp_page_menu() fallback that WordPress uses
   when no menu has been assigned to the primary location. That fallback
   wraps items in a <div class="menu"><ul><li> structure rather than
   flat <a> tags, so we have to reach through that wrapper and strip its
   default list bullets/spacing to keep it visually consistent with the
   normal wp_nav_menu() output. */
.site-nav > div,
.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  list-style: none;
  margin: 0;
}

@media (min-width: 768px) {
  .site-nav {
    display: flex;
  }
}

/* Mobile nav open state (toggled by .menu-toggle via main.js) */
@media (max-width: 767px) {
  .site-nav.active {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--background, #FAFAF8);
    padding: var(--spacing-md, 1rem);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    z-index: 50;
  }

  .site-nav.active > div,
  .site-nav.active ul {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Mobile menu toggle button */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--foreground);
  padding: 0.25rem;
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Header needs relative positioning for the dropdown nav to anchor to it */
.site-header-inner {
  position: relative;
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  transition: color 0.2s ease-out;
}

.site-nav a:hover {
  color: var(--primary-text);
}

.site-nav a.current {
  color: var(--primary-text);
  font-weight: 600;
}

/* Header Actions */
.site-header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-sm);
  color: var(--foreground);
  transition: background-color 0.2s ease-out;
  border-radius: var(--radius);
}

.search-btn:hover {
  background-color: var(--muted);
}

/* Smaller Subscribe button in the header specifically — the shared .btn
   sizing (used for hero CTAs, pagination, etc.) is too large up here */
#subscribe-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.8125rem;
}

@media (max-width: 767px) {
  #subscribe-btn {
    display: none;
  }
}

/* ============================================
   Buttons
   ============================================ */

.btn,
button,
input[type="button"],
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--primary);
  color: var(--foreground);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease-out;
  text-decoration: none;
}

.btn:hover,
button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background-color: rgba(200, 155, 60, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 155, 60, 0.2);
}

.btn:active,
button:active {
  transform: scale(0.97);
}

.btn-secondary {
  background-color: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  background-color: var(--secondary);
  color: white;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

@media (min-width: 768px) {
  .hero {
    height: 700px;
  }
}

.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 85% at center, rgba(8, 16, 30, 0.72) 0%, rgba(8, 16, 30, 0.45) 55%, rgba(8, 16, 30, 0.15) 100%),
    linear-gradient(to bottom, rgba(8, 16, 30, 0.25), rgba(8, 16, 30, 0.4));
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: var(--spacing-lg) var(--spacing-md);
}

.hero h1 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 3.5rem;
  }
}

.hero p {
  font-size: 1.125rem;
  color: rgb(255, 255, 255);
  margin-bottom: var(--spacing-xl);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  justify-content: center;
}

@media (min-width: 640px) {
  .hero-cta {
    flex-direction: row;
  }
}

/* ============================================
   Scripture Callout
   ============================================ */

.scripture-callout {
  border-left: 4px solid var(--primary);
  background-color: rgba(200, 155, 60, 0.05);
  padding: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
  border-radius: var(--radius);
}

.scripture-callout p:first-child {
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--foreground);
  margin-bottom: var(--spacing-md);
}

.scripture-callout .reference {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease-out;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease-out;
}

.card:hover .card-image {
  transform: scale(1.05);
}

.card-body {
  padding: var(--spacing-lg);
  display: flex;
  flex-direction: column;
}

.card-category {
  display: inline-block;
  background-color: rgba(200, 155, 60, 0.1);
  color: var(--primary-text);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--spacing-md);
  width: fit-content;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: var(--spacing-md);
  line-height: 1.4;
}

.card:hover .card-title {
  color: var(--primary-text);
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: var(--spacing-md);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid {
  display: grid;
  gap: var(--spacing-lg);
}

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

@media (min-width: 768px) {
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: var(--spacing-3xl) 0;
}

.section-light {
  background-color: rgba(200, 155, 60, 0.05);
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: var(--spacing-md);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: var(--spacing-2xl);
  max-width: 600px;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-newsletter {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-newsletter h3 {
  color: white;
  margin-bottom: var(--spacing-md);
}

.footer-newsletter p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-lg);
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-sm);
  max-width: 400px;
}

.newsletter-form input {
  flex: 1;
  padding: var(--spacing-md);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-section h4 {
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: var(--spacing-md);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  transition: color 0.2s ease-out;
}

.footer-section a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ============================================
   Posts & Pages
   ============================================ */

.post-header {
  margin-bottom: var(--spacing-2xl);
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.post-meta {
  display: flex;
  gap: var(--spacing-lg);
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: var(--spacing-lg);
}

.post-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: var(--spacing-lg);
}

.post-content h2,
.post-content h3 {
  margin-top: var(--spacing-2xl);
  margin-bottom: var(--spacing-md);
}

.post-content img {
  max-width: 100%;
  height: auto;
  margin: var(--spacing-xl) 0;
  border-radius: var(--spacing-sm);
}

/* ============================================
   Archive & Search
   ============================================ */

.archive-header {
  background-color: rgba(200, 155, 60, 0.05);
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-2xl) 0;
  margin-bottom: var(--spacing-2xl);
}

.archive-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

.archive-description {
  color: var(--muted-foreground);
}

/* ============================================
   Forms
   ============================================ */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea,
select {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.2s ease-out;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-text);
  box-shadow: 0 0 0 3px rgba(138, 97, 25, 0.15);
}

label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--foreground);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }
}

/* ============================================
   Utilities
   ============================================ */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.max-w-3xl {
  max-width: 800px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   WordPress Specific
   ============================================ */

.wp-block-image {
  margin: var(--spacing-xl) 0;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

.wp-block-quote {
  border-left: 4px solid var(--primary);
  padding-left: var(--spacing-lg);
  margin: var(--spacing-xl) 0;
  font-style: italic;
}

.wp-block-separator {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--spacing-2xl) 0;
}

.alignleft {
  float: left;
  margin-right: var(--spacing-lg);
}

.alignright {
  float: right;
  margin-left: var(--spacing-lg);
}

.aligncenter {
  text-align: center;
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
  .site-header,
  .site-footer,
  .navigation {
    display: none;
  }
}
