/*
Theme Name: Jess Dobbs Custom Theme
Theme URI: https://jessdobbs.com
Author: Jess Dobbs
Author URI: https://jessdobbs.com
Description: A clean, personal blog theme for faith, family, and natural living.
Version: 1.0
Text Domain: jessdobbs
*/

/* =============================================
   CSS Variables
   ============================================= */
:root {
     /* Your original palette – kept for continuity */
    --bg-color: #fdfdfd;           /* Soft off-white background */
    --text-color: #2c2c2c;         /* Dark charcoal text */
    --heading-color: #4a6c6f;      /* Muted teal/green – your current signature */
    --accent-color: #8b7355;       /* Warm muted gold/brown accent */
    --card-bg: #ffffff;            /* White cards */
    --border-color: #e0e0e0;       /* Subtle borders */

    /* New logo-inspired brand colors */
    --logo-black: #000000;         /* Pure black – use for strong headings, logo text */
    --logo-red: #ff0000;           /* Bright red – use sparingly for hearts, emphasis, or CTAs */
    --logo-blue: #0000ff;          /* Vibrant blue – use for links, active states, underlines */

    /* Softer, more usable coordinating shades (recommended) */
    --soft-red: #c8102e;           /* Deeper, more elegant red for better harmony */
    --soft-blue: #003087;          /* Navy blue – calmer, more professional alternative to bright blue */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Georgia', serif;
}

/* =============================================
   Global & Base Styles
   ============================================= */
body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

a {
    color: var(--soft-red);
    text-decoration: underline;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--soft-blue);
}

h1, h2, h3, h4 {
    color: var(--logo-black);
    font-family: var(--font-sans);
    line-height: 1.3;
}

/* =============================================
   Header & Navigation
   ============================================= */
.site-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
	position: relative;           /* ← This is the key fix! Creates containing block */
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 30px;
}

.site-branding {
    flex: 0 1 auto;
}

.site-title {
    margin: 0;
    font-size: 2.1rem;
    color: var(--logo-black);
}

.site-title a {
    text-decoration: none;
    color: inherit;
}

.site-description {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: #777;
    font-style: italic;
}

.main-navigation {
    flex: 1;
    text-align: right;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
    justify-content: flex-end;
}

.primary-menu li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
	position: relative;
    padding-bottom: 6px;
}

.primary-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease, left 0.3s ease;
}

.primary-menu li a:hover::after,
.primary-menu li.current-menu-item a::after {
    width: 100%;
    left: 0;
	color: var(--soft-blue);
    border-bottom: 2px solid var(--logo-blue);
}

.primary-menu li a:hover,
.primary-menu li.current-menu-item a {
    color: var(--soft-blue);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 20px;                    /* Increased from 15px for breathing room */
    margin-right: 40px;           /* More space from menu on desktop */
	margin-left: 40px;
}

.social-icons i {
    font-size: 32px;
    transition: transform 0.3s;
}

.social-icons a:hover i {
    transform: scale(1.15);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2rem;
    color: var(--heading-color);
    padding: 10px;
}

.menu-icon-open,
.menu-icon-close {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.menu-toggle:hover .menu-icon-open,
.menu-toggle:hover .menu-icon-close {
    transform: scale(1.15);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--card-bg);
        box-shadow: 0 8px 16px rgba(0,0,0,0.15);
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
        z-index: 999;
    }

    .main-navigation.toggled {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .primary-menu {
        flex-direction: column;
        padding: 30px 20px;
        gap: 20px;
        margin: 0;
        text-align: center; /* Centers items in dropdown */
    }

    .header-container {
        padding: 15px 20px;
    }

    .site-branding {
        flex: 1;
        text-align: center;
    }

    .social-icons {
        display: none;
    }
}

/* =============================================
   Layout (Content + Sidebar Grid)
   ============================================= */
.content-wrapper {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.primary-content {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar,
.widget-area {
    grid-column: 2;
}

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr !important; /* Override any specificity issues */
        gap: 40px;
    }

    .primary-content,
    .sidebar,
    .widget-area {
        grid-column: 1 !important; /* Force both into the single column */
        grid-row: auto;            /* Let them stack naturally in source order */
        width: 100%;
    }

    /* Force post grid to single column on small screens */
    .post-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .content-wrapper {
        padding: 20px 15px;
    }

    .post-grid .card {
        margin: 0 auto;
        max-width: 100%;
    }
}

/* =============================================
   Post Grid & Cards
   ============================================= */
.post-grid {
    display: grid;
    /* grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); */
    gap: 30px;
    margin-top: 0;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.card-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.card-content {
    padding: 20px;
}

.entry-title {
    margin: 0 0 10px;
    font-size: 1.4rem;
}

.entry-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 12px;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--logo-red);
    font-weight: 600;
}

/* Archive / Category Header */
.archive-header {
    width: 100%;
    margin: 0;
    padding: 20px 0px;
    background: rgba(139, 115, 85, 0.05);
    border-radius: 8px;
    text-align: center;
}

.archive-title {
    margin: 0 0 8px;
    font-size: 2.4rem;
}

.archive-description {
    margin: 0;
    padding: 20px 30px;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.5;
}

/* Widgets */
.widget {
    margin-bottom: 40px;
}

.widget-title {
    color: var(--heading-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 8px;
}

/* =============================================
   Hero Carousel
   ============================================= */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
}

.swiper.hero-swiper,
.swiper-slide,
.slide-bg,
.slide-overlay {
    height: 100%;
    width: 100%;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-width: 90%;
    width: 100%;
    padding: 30px;
    text-align: center;
    color: white;
}

.slide-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    margin: 0 0 15px;
    line-height: 1.1;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.slide-excerpt {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    margin: 0 0 25px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.slide-content .read-more {
    pointer-events: auto;
    background: var(--soft-red);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.slide-content .read-more:hover {
    background: var(--soft-blue);
    transform: translateY(-3px);
}

.slide-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

@media (max-width: 992px) {
    .hero-carousel {
        height: 65vh;
        min-height: 450px;
    }
}

/* =============================================
   Single Post & Misc
   ============================================= */
.single .single-featured-image {
    margin-bottom: 30px;
    text-align: center;
}

.single .single-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

/* ... (add back author-bio, nav-links, reading-time, footer, etc. if needed) ... */

/* Site Footer */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 0 30px;
    margin-top: 60px;
    font-size: 0.95rem;
    color: #666;
    text-align: center;
}

.footer-inner {
    max-width: 800px;
    margin: 0 auto;
}

.copyright {
    margin: 0;
    line-height: 1.6;
}

.back-to-top {
    display: inline-block;
    margin-top: 20px;
    color: var(--logo-red);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.back-to-top:hover {
    color: var(--heading-color);
}

.heart-icon {
    color: var(--logo-red);
}

.cat-badge.featured {
    background: var(--soft-red);
    color: white;
}