/* ==========================================================================
   Yard Busters Landscaping — Base Theme Styles
   ========================================================================== */

:root {
    /* Primary palette */
    --yb-green-light: #A0D347;
    --yb-primary: #0A7752;
    --yb-primary-dark: #065E40;
    --yb-primary-light: #A0D347;
    --yb-secondary: #F77F00;
    --yb-secondary-dark: #D96E00;
    --yb-cream: #FFFBE5;
    --yb-dark: #1D1816;
    --yb-white: #FFFFFF;

    /* Taupe / Brown shades — borders & lines */
    --yb-taupe-50: #F5F0EB;
    --yb-taupe-100: #E8E2DC;
    --yb-taupe-200: #D5CEC7;
    --yb-taupe-300: #C0B8AF;
    --yb-taupe-400: #A89E94;
    --yb-taupe-500: #8F8479;
    --yb-taupe-600: #6E6358;
    --yb-taupe-700: #544840;
    --yb-taupe-800: #3A302A;
    --yb-taupe-900: #241E1A;

    /* Semantic text colors (mapped from palette) */
    --yb-text-primary: #1D1816;
    --yb-text-body: #544840;
    --yb-text-muted: #8F8479;
    --yb-border: #D5CEC7;
    --yb-border-light: #E8E2DC;
    --yb-bg-light: #FFFBE5;
    --yb-bg-off: #F5F0EB;

    /* Typography */
    --yb-font-body: 'Google Sans', system-ui, -apple-system, sans-serif;
    --yb-font-heading: 'Google Sans', system-ui, -apple-system, sans-serif;

    /* Layout */
    --yb-container: 1280px;
    --yb-gap: 2rem;
    --yb-radius: 8px;
    --yb-shadow: 0 2px 8px rgba(29, 24, 22, 0.06);
    --yb-shadow-lg: 0 8px 30px rgba(29, 24, 22, 0.1);
    --yb-transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

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

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

a {
    color: var(--yb-primary);
    text-decoration: none;
    transition: color var(--yb-transition);
}

a:hover {
    color: var(--yb-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.yb-container {
    width: 100%;
    max-width: var(--yb-container);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* Buttons */
.yb-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--yb-font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid transparent;
    border-radius: var(--yb-radius);
    cursor: pointer;
    transition: all var(--yb-transition);
    text-decoration: none;
    white-space: nowrap;
}

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

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

.yb-btn--outline {
    background-color: transparent;
    color: var(--yb-primary);
    border-color: var(--yb-primary);
}

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

/* Posts Grid */
.yb-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--yb-gap);
    margin-block: 2rem;
}

.yb-post-card {
    background: var(--yb-white);
    border: 1px solid var(--yb-border-light);
    border-radius: var(--yb-radius);
    overflow: hidden;
    box-shadow: var(--yb-shadow);
    transition: box-shadow var(--yb-transition), transform var(--yb-transition);
    list-style: none;
}

.yb-post-card:hover {
    box-shadow: var(--yb-shadow-lg);
    transform: translateY(-2px);
}

.yb-post-thumbnail img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.yb-post-content {
    padding: 1.5rem;
}

.yb-post-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.yb-post-title a {
    color: var(--yb-text-primary);
}

.yb-post-title a:hover {
    color: var(--yb-primary);
}

.yb-post-meta {
    font-size: 0.875rem;
    color: var(--yb-text-muted);
    margin-bottom: 0.75rem;
}

.yb-post-excerpt {
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.yb-read-more {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--yb-primary);
}

.yb-read-more:hover {
    color: var(--yb-secondary);
}

/* ==========================================================================
   Blog Layout — 2-column (content + sticky sidebar)
   ========================================================================== */
.yb-blog-layout {
    display: grid !important;
    grid-template-columns: 1fr 340px !important;
    grid-template-rows: auto;
    gap: 2.5rem;
    padding-block: 2rem;
    align-items: start;
    width: 100%;
}

.yb-blog-layout > .yb-blog-layout__content {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    grid-column: 1;
    grid-row: 1;
}

.yb-blog-layout > .yb-blog-layout__sidebar {
    min-width: 0;
    grid-column: 2;
    grid-row: 1;
}

/* Prevent Elementor from breaking out of the content column */
.yb-blog-layout__content .elementor {
    width: 100% !important;
    max-width: 100% !important;
}

.yb-blog-layout__content .elementor-section-wrap,
.yb-blog-layout__content .elementor-section,
.yb-blog-layout__content .elementor-section.elementor-section-boxed > .elementor-container,
.yb-blog-layout__content .e-con {
    max-width: 100% !important;
}

.yb-sidebar-sticky {
    position: sticky;
    top: 100px;
    transition: top 0.3s ease;
}

.admin-bar .yb-sidebar-sticky {
    top: 132px;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */
.yb-widget {
    margin-bottom: 2rem;
    background: var(--yb-white);
    border: 1px solid var(--yb-border-light);
    border-radius: var(--yb-radius);
    padding: 1.5rem;
}

.yb-widget__title {
    font-family: var(--yb-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--yb-text-primary);
    margin-bottom: 1.25rem;
}

/* Recent Posts Widget */
.yb-recent-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yb-recent-posts__item {
    margin-bottom: 0.75rem;
}

.yb-recent-posts__item:last-child {
    margin-bottom: 0;
}

.yb-recent-posts__link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.5rem;
    border-radius: calc(var(--yb-radius) - 2px);
    transition: background var(--yb-transition);
}

.yb-recent-posts__link:hover {
    background: var(--yb-bg-off);
}

.yb-recent-posts__thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: calc(var(--yb-radius) - 2px);
    overflow: hidden;
    background: var(--yb-bg-off);
}

.yb-recent-posts__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yb-recent-posts__placeholder {
    width: 100%;
    height: 100%;
    background: var(--yb-cream);
    border-radius: inherit;
}

.yb-recent-posts__info {
    flex: 1;
    min-width: 0;
}

.yb-recent-posts__title {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--yb-text-primary);
    line-height: 1.4;
    transition: color var(--yb-transition);
}

.yb-recent-posts__link:hover .yb-recent-posts__title {
    color: var(--yb-primary);
}

.yb-recent-posts__date {
    display: block;
    font-size: 0.75rem;
    color: var(--yb-text-muted);
    margin-top: 0.25rem;
}

/* Categories Widget */
.yb-categories {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yb-categories__item {
    border-bottom: 1px solid var(--yb-border-light);
}

.yb-categories__item:last-child {
    border-bottom: none;
}

.yb-categories__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.5rem;
    border-radius: calc(var(--yb-radius) - 2px);
    transition: all var(--yb-transition);
}

.yb-categories__link:hover {
    background: var(--yb-bg-off);
    padding-left: 0.75rem;
}

.yb-categories__name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--yb-text-body);
    transition: color var(--yb-transition);
}

.yb-categories__link:hover .yb-categories__name {
    color: var(--yb-primary);
}

.yb-categories__count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--yb-text-primary);
    background: var(--yb-cream);
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--yb-border-light);
}

/* Post Meta Bar (above Elementor content) */
.yb-post-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--yb-text-muted);
    padding: 0.75rem 0;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--yb-border-light);
}

.yb-post-meta-bar__center {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.yb-post-meta-bar__nav {
    flex-shrink: 0;
    min-width: 120px;
}

.yb-post-meta-bar__prev {
    text-align: left;
}

.yb-post-meta-bar__next {
    text-align: right;
}

.yb-post-meta-bar__nav a {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--yb-primary);
    transition: color var(--yb-transition);
}

.yb-post-meta-bar__nav a:hover {
    color: var(--yb-primary-dark);
}

.yb-post-meta-bar__sep {
    color: var(--yb-taupe-300);
}

.yb-post-meta-bar__date {
    font-weight: 500;
}

.yb-post-meta-bar__author {
    font-weight: 500;
}

.yb-post-meta-bar__cats {
    color: var(--yb-primary);
    font-weight: 500;
}

/* ==========================================================================
   Legacy single post styles (kept for non-Elementor fallback)
   ========================================================================== */
.yb-article__title {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
}

.yb-article__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--yb-text-muted);
}

.yb-article__footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--yb-border);
}

.yb-tag {
    display: inline-block;
    background: var(--yb-bg-off);
    color: var(--yb-text-body);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    margin: 0.25rem;
}

/* Archive */
.yb-archive-header {
    margin-bottom: 2rem;
    padding-block: 2rem;
}

.yb-archive-title {
    font-size: 2rem;
}

.yb-archive-description {
    margin-top: 0.5rem;
    color: var(--yb-text-muted);
}

/* Pagination */
.yb-pagination {
    margin-block: 3rem;
    text-align: center;
}

.yb-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.yb-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--yb-radius);
    background: var(--yb-bg-off);
    color: var(--yb-text-body);
    font-weight: 500;
    transition: all var(--yb-transition);
}

.yb-pagination .page-numbers.current,
.yb-pagination .page-numbers:hover {
    background: var(--yb-primary);
    color: var(--yb-white);
}

/* 404 */
.yb-404 {
    text-align: center;
    padding-block: 6rem;
}

.yb-404__title {
    font-size: 8rem;
    font-weight: 800;
    color: var(--yb-primary-light);
    line-height: 1;
}

.yb-404__subtitle {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.yb-404__text {
    max-width: 480px;
    margin-inline: auto;
    margin-bottom: 2rem;
    color: var(--yb-text-muted);
}

/* No content */
.yb-no-content {
    text-align: center;
    padding-block: 4rem;
}

.yb-no-content h2 {
    margin-bottom: 0.75rem;
}

/* Post Navigation */
.yb-post-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--yb-border);
}

.yb-post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.yb-post-nav__label {
    display: block;
    font-size: 0.8125rem;
    color: var(--yb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.yb-post-nav__title {
    display: block;
    font-weight: 600;
    color: var(--yb-text-primary);
}

/* Elementor full-width override */
.yb-full-width .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 100%;
}

.yb-canvas-main {
    min-height: 100vh;
}

/* Sidebar */
.yb-sidebar {
    padding: 1.5rem;
}

/* ==========================================================================
   Blog Hub — 3-column card grid
   ========================================================================== */
.yb-blog-hub {
    padding-block: 3rem;
}

.yb-blog-hub__header {
    margin-bottom: 0;
}

.yb-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.yb-blog-card {
    background: var(--yb-white);
    border: 1px solid var(--yb-border-light);
    border-radius: 15px;
    overflow: hidden;
    transition: box-shadow var(--yb-transition), transform var(--yb-transition);
}

.yb-blog-card:hover {
    box-shadow: var(--yb-shadow-lg);
    transform: translateY(-3px);
}

.yb-blog-card__img-link {
    display: block;
    overflow: hidden;
}

.yb-blog-card__img-link img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.yb-blog-card:hover .yb-blog-card__img-link img {
    transform: scale(1.04);
}

.yb-blog-card__placeholder {
    width: 100%;
    height: 220px;
    background: var(--yb-cream);
}

.yb-blog-card__body {
    padding: 1.5rem;
}

.yb-blog-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.625rem;
}

.yb-blog-card__title a {
    color: var(--yb-text-primary);
    transition: color var(--yb-transition);
}

.yb-blog-card__title a:hover {
    color: var(--yb-primary);
}

.yb-blog-card__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--yb-text-muted);
    margin-bottom: 0.875rem;
}

.yb-blog-card__cat {
    color: var(--yb-primary);
    font-weight: 500;
}

.yb-blog-card__excerpt {
    font-size: 0.9rem;
    color: var(--yb-text-body);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.yb-blog-card__read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--yb-primary);
    transition: gap var(--yb-transition), color var(--yb-transition);
}

.yb-blog-card__read-more:hover {
    color: var(--yb-primary-dark);
    gap: 0.5rem;
}

/* Responsive */
@media (max-width: 991px) {
    .yb-blog-layout {
        grid-template-columns: 1fr !important;
    }

    .yb-blog-layout > .yb-blog-layout__sidebar {
        grid-column: 1;
        grid-row: 2;
    }

    .yb-sidebar-sticky {
        position: static;
    }
}

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

    .yb-article__title {
        font-size: 1.75rem;
    }

    .yb-404__title {
        font-size: 5rem;
    }

    .yb-post-navigation .nav-links {
        flex-direction: column;
    }

    .yb-post-meta-bar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .yb-post-meta-bar__nav {
        min-width: auto;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .yb-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
