/*
Theme Name: Reluctant Leader
Theme URI: https://thereluctantleader.com
Author: Shawn McDonald
Description: A clean, conversion-focused theme inspired by John Mark Comer's website, designed for The Reluctant Leader brand. Features muted earthy tones, generous white space, and clear calls-to-action.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reluctant-leader
Tags: blog, ministry, author, clean, modern
*/

/* ========================================
   GLOBAL RESET & BASE STYLES
   ======================================== */

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

:root {
    /* Color Palette - Muted, Earthy Tones */
    --color-primary: #2c3e50;        /* Deep charcoal/navy */
    --color-secondary: #7c9885;      /* Muted sage green */
    --color-accent: #c9a961;         /* Soft gold */
    --color-background: #fafaf8;     /* Off-white */
    --color-text: #3a3a3a;           /* Dark gray for body text */
    --color-text-light: #6b6b6b;     /* Lighter gray */
    --color-white: #ffffff;
    
    /* Typography */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Merriweather', Georgia, serif;
    --font-sans: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    --spacing-xxl: 7rem;
    
    /* Container */
    --container-width: 1200px;
    --container-narrow: 800px;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

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

h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

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

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ========================================
   LAYOUT CONTAINERS
   ======================================== */

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

.container-narrow {
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

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

.section-light {
    background-color: var(--color-white);
}

.section-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
    background-color: var(--color-white);
    padding: var(--spacing-md) 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.main-navigation a {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* ========================================
   HERO SECTION (Above the Fold)
   ======================================== */

.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-background) 0%, #f0f0ed 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-text .subtitle {
    font-size: 1.3rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

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

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* This creates a minimum padding to clear the menu, 
       then scales based on screen height */
    padding-top: clamp(80px, 15vh, 200px); 
    padding-bottom: var(--spacing-lg);
    min-height: 80vh; /* Keeps it feeling like a 'Hero' section on iPad */
}

/* Specific Tablet (iPad Pro) adjustment */
@media (max-width: 1024px) {
    .hero {
        padding-top: 10vh; /* Pulls it up slightly on taller tablets */
    }
}

/* Specific Phone adjustment */
@media (max-width: 480px) {
    .hero {
        padding-top: 100px; /* Forces enough room so it doesn't touch the menu */
    }
}

/* ========================================
   BUTTONS & CTAs
   ======================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

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

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

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

.btn-accent:hover {
    background-color: #b89850;
}

/* ========================================
   AUTHORITY/CREDIBILITY BAR
   ======================================== */

.authority-bar {
    background-color: var(--color-white);
    padding: var(--spacing-md) 0;
    text-align: center;
    border-top: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.authority-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.authority-label {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.authority-item {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* ========================================
   THREE-COLUMN GRID (Core Method)
   ======================================== */

.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
}

.column-item {
    text-align: center;
    padding: var(--spacing-lg);
}

.column-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    /*background-color: var(--color-secondary);*/
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: var(--color-white);
}

.column-item h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.column-item p {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* ========================================
   PRODUCT SPOTLIGHT
   ======================================== */

.product-spotlight {
    background-color: var(--color-white);
    padding: var(--spacing-xxl) 0;
}

.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.product-details h2 {
    margin-bottom: var(--spacing-md);
}

.product-details p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   CONTENT STREAM (Blog Posts/Videos)
   ======================================== */

.content-stream {
    padding: var(--spacing-xxl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.content-card {
    background-color: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.content-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.content-card-body {
    padding: var(--spacing-md);
}

.content-card-title {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

.content-card-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.content-card-meta {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* ========================================
   EMAIL OPT-IN SECTION
   ======================================== */

.email-optin {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    padding: var(--spacing-xxl) 0;
    color: var(--color-white);
    text-align: center;
}

.email-optin h2 {
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.email-optin p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.email-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: var(--spacing-sm);
}

.email-form input[type="email"] {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-sans);
}

.email-form button {
    padding: 1rem 2rem;
}

/* ========================================
   Mailer Lite CSS (Updated for Inline Alignment)
   ======================================== */

.mailerlite-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

/* 1. Force the container to be a Flex row and handle error positioning */
.mailerlite-form-inputs {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important; /* Changed to start so errors grow downward */
    gap: var(--spacing-sm);
    flex-wrap: nowrap; /* Keep them together */
    position: relative;
}

/* 2. Container for the input field */
.mailerlite-form-field {
    flex: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative; /* Anchor for the error message */
}

/* 3. The Input Style - Adding padding and font inheritance */
.mailerlite-form-field input {
    width: 100% !important;
    height: 54px !important; /* Matches original btn height */
    padding: 1rem 1.5rem !important;
    font-size: 1rem !important;
    font-family: var(--font-sans) !important;
    border: none !important;
    border-radius: 4px !important;
    background-color: var(--color-white);
}

/* 4. The Button Container */
.mailerlite-subscribe-button-container {
    flex: 0 0 auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* 5. The Submit Button - Reflecting your .btn-accent style */
.mailerlite-subscribe-submit {
    height: 54px !important;
    padding: 0 2.5rem !important;
    background-color: var(--color-accent) !important;
    color: var(--color-white) !important;
    font-family: var(--font-sans) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.mailerlite-subscribe-submit:hover {
    background-color: #b89850 !important; /* Match your btn-accent hover */
    transform: translateY(-2px);
}

/* 6. Fix for the Error Message alignment */
.mailerlite-form-inputs .mailerlite-form-field .mailerlite-error {
    position: absolute;
    top: 100%; /* Drops below the input */
    left: 0;
    font-size: 0.8rem;
    color: #ffcccc; /* Soft red on the dark background */
    margin-top: 5px;
    white-space: nowrap;
}

/* 7. Hide the Label */
.mailerlite-form-field label {
    display: none !important;
}

/* 8. Hide the "Please wait" loader from disrupting the row */
.mailerlite-form-loader {
    display: none !important;
}

/* 9. Mobile Responsiveness: Stack on small screens */
@media (max-width: 768px) {
    .mailerlite-form-inputs {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .mailerlite-form-field, 
    .mailerlite-subscribe-button-container {
        width: 100% !important;
    }
    
    .mailerlite-form-inputs .mailerlite-form-field .mailerlite-error {
        position: relative; /* Let it flow naturally on mobile */
    }
}


/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

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

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

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    
    .hero-text h1 { font-size: 3rem; }
    
    .three-column-grid,
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .main-navigation.active ul {
        display: flex;
    }
    
    .hero-content,
    .product-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero-text h1 { font-size: 2.5rem; }
    
    .three-column-grid,
    .content-grid,
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .email-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    .hero-text h1 { font-size: 2rem; }
    .section { padding: var(--spacing-lg) 0; }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

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

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

.py-1 { padding-top: var(--spacing-sm); padding-bottom: var(--spacing-sm); }
.py-2 { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }
.py-3 { padding-top: var(--spacing-lg); padding-bottom: var(--spacing-lg); }
