/*
Theme Name: Local Market Dominator
Theme URI: https://yoursite.com
Description: Custom child theme for Kadence with split header layout
Author: Andrew
Author URI: https://yoursite.com
Template: kadence
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: localmarketdominator
*/

/* ==========================================================================
   Hide Kadence Default Title Area - We Use Custom Header
   ========================================================================== */

.single .entry-hero-container-inner,
.page .entry-hero-container-inner,
.single .kadence-entry-header,
.page .kadence-entry-header {
    display: none !important;
}

/* ==========================================================================
   Split Header Design (Both Pages & Posts)
   ========================================================================== */

/* Global spacing controls for the split header (easy tuning) */
:root {
    --dmd-hero-side-pad: 40px;       /* space from left/right edges */
    --dmd-hero-text-pad-y: 60px;
    --dmd-hero-text-pad-x: 50px;
    --dmd-hero-text-pad-right: 100px; /* extra so title doesn't sit under image */
    --dmd-hero-radius-left: 16px;
    --dmd-hero-min-height: 400px;
    --dmd-hero-content-min-height: 350px;
}

.dmd-split-header {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
    padding-bottom: 25px; /* Only bottom padding for image overhang */
    padding-left: var(--dmd-hero-side-pad);
    padding-right: var(--dmd-hero-side-pad);
    display: flex;
    align-items: flex-start; /* keep as-is; change to center if you want */
    min-height: var(--dmd-hero-min-height);
    box-sizing: border-box;
}

.dmd-header-content {
    width: 50%;
    background: #c17f4e; /* Default - overridden by Customizer */
    padding: var(--dmd-hero-text-pad-y) var(--dmd-hero-text-pad-x);
    padding-right: var(--dmd-hero-text-pad-right); /* Extra space so title doesn't go under image */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
    min-height: var(--dmd-hero-content-min-height);
    box-sizing: border-box;
}

.dmd-header-content h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* Right side background area - hidden */
.dmd-header-bg-area {
    display: none;
}

/* Image - flush with top, extends below text box
   FIX: add right inset so it isn't flush to page edge,
        and set a predictable left edge so padding behaves consistently.
*/
.dmd-header-image {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(50% - var(--dmd-hero-side-pad)); /* begins around the midpoint */
    right: var(--dmd-hero-side-pad);            /* was 0 -> gives breathing room */
    z-index: 10;
    box-sizing: border-box;
}

.dmd-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--dmd-hero-radius-left) 0 0 var(--dmd-hero-radius-left); /* Rounded corners on left side */
    display: block;
}

/* Placeholder */
.dmd-header-image .dmd-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--dmd-hero-radius-left) 0 0 var(--dmd-hero-radius-left);
}

/* Optional fade effect on image (transparency fade) */
.dmd-header-image.has-fade img {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 25%, black 100%);
}

/* Gradient overlay option (color gradient blending into image) */
.dmd-header-image.has-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(to right, var(--dmd-gradient-color, #c17f4e) 0%, transparent 100%);
    border-radius: var(--dmd-hero-radius-left) 0 0 var(--dmd-hero-radius-left);
    z-index: 15;
    pointer-events: none;
}

/* ==========================================================================
   Content Layout - Full Width
   ========================================================================== */

.dmd-content-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
}

.dmd-content-wrapper.dmd-has-sidebar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.dmd-content-row {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.dmd-main-content {
    flex: 1;
    min-width: 0;
}

.dmd-has-sidebar .dmd-main-content {
    max-width: calc(70% - 20px);
}

.dmd-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* Full Width Layout for Pages (no sidebar) */
.dmd-full-width {
    max-width: 100%;
    padding: 0;
}

.dmd-full-width .dmd-main-content {
    max-width: 100%;
}

.dmd-full-width .entry-content {
    width: 100%;
}

/* ==========================================================================
   Main Content Styling
   ========================================================================== */

.dmd-main-content .entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

/* Section headings with left border accent */
.dmd-main-content .entry-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 2rem 0 1rem;
    padding-left: 15px;
    border-left: 4px solid #6b5b95;
}

.dmd-main-content .entry-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 0.75rem;
}

.dmd-main-content .entry-content p {
    margin-bottom: 1.25rem;
}

/* Two-column card layout for directions/info boxes */
.dmd-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.dmd-info-card {
    background: #fff;
    border-left: 4px solid #48c9b0;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dmd-info-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dmd-info-card h4::before {
    content: '📍';
}

.dmd-info-card p {
    font-size: 0.9375rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   Sidebar Styling (Posts Only)
   ========================================================================== */

.dmd-sidebar .widget {
    margin-bottom: 25px;
}

.dmd-sidebar .widget-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

.dmd-sidebar .widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dmd-sidebar .widget ul li {
    padding: 6px 0;
}

.dmd-sidebar .widget ul li a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.dmd-sidebar .widget ul li a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Category dropdown styling */
.dmd-sidebar select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9375rem;
    margin-bottom: 15px;
}

/* ==========================================================================
   Post Navigation (Posts Only)
   ========================================================================== */

.dmd-post-nav {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
}

.dmd-post-nav .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.dmd-post-nav .nav-previous,
.dmd-post-nav .nav-next {
    flex: 1;
}

.dmd-post-nav .nav-subtitle {
    display: block;
    font-size: 0.8125rem;
    color: #666;
    margin-bottom: 5px;
}

.dmd-post-nav .nav-title {
    color: #2563eb;
    font-weight: 500;
}

/* ==========================================================================
   Related Posts Section (Posts Only)
   ========================================================================== */

.dmd-related-posts {
    background: #f8f9fa;
    padding: 50px 0;
    margin-top: 50px;
}

.dmd-related-posts .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dmd-related-posts h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 30px;
    color: #1a1a2e;
}

.dmd-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.dmd-related-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dmd-related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.dmd-related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.dmd-related-card .card-body {
    padding: 20px;
}

.dmd-related-card h3 {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}

.dmd-related-card h3 a {
    color: #333;
    text-decoration: none;
}

.dmd-related-card h3 a:hover {
    color: #2563eb;
}

.dmd-related-card p {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

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

@media (max-width: 991px) {
    /* Tighter hero padding on tablet/mobile */
    :root {
        --dmd-hero-side-pad: 20px;
        --dmd-hero-text-pad-y: 40px;
        --dmd-hero-text-pad-x: 30px;
        --dmd-hero-text-pad-right: 30px;
    }

    .dmd-split-header {
        flex-direction: column;
        padding-bottom: 0;
        min-height: auto;
    }

    .dmd-header-content {
        width: 100%;
        border-radius: 0;
    }

    .dmd-header-content h1 {
        font-size: 2rem;
    }

    .dmd-header-bg-area {
        display: none;
    }

    /* On mobile/tablet, revert to normal flow image with inner padding */
    .dmd-header-image {
        position: relative;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        padding: 0 var(--dmd-hero-side-pad);
        margin-top: -40px;
        margin-bottom: 20px;
    }

    .dmd-header-image img {
        min-height: auto;
        max-height: 300px;
        border-radius: 16px;
    }

    .dmd-header-image.has-gradient::before {
        display: none;
    }

    .dmd-content-row {
        flex-direction: column;
    }

    .dmd-has-sidebar .dmd-main-content {
        max-width: 100%;
    }

    .dmd-sidebar {
        width: 100%;
    }

    .dmd-two-col {
        grid-template-columns: 1fr;
    }

    .dmd-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    :root {
        --dmd-hero-side-pad: 15px;
        --dmd-hero-text-pad-y: 30px;
        --dmd-hero-text-pad-x: 20px;
        --dmd-hero-text-pad-right: 20px;
    }

    .dmd-header-content h1 {
        font-size: 1.75rem;
    }

    .dmd-header-image {
        margin-top: -30px;
    }

    .dmd-related-grid {
        grid-template-columns: 1fr;
    }
}
/* === FULL-BLEED HERO (keep blue + image edge-to-edge) === */
.dmd-split-header{
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Keep the text padded INSIDE the blue block */
.dmd-header-content{
  padding: 60px 50px !important;
  padding-right: 100px !important; /* prevents text under image */
}

/* Image full-bleed to the RIGHT edge again */
.dmd-header-image{
  left: 42% !important;  /* your original overlap */
  right: 0 !important;   /* full width to right edge */
}