/* ==========================================================================
   MB Site Style — unified look and feel for Mishna Berura Summaries
   Palette: navy #1a365d · gold #b8860b · cream #faf8f5 · text #2d3748
   Type:    Crimson Pro (headings) · Source Sans 3 (body/UI)
   ========================================================================== */

:root {
    --mb-navy: #1a365d;
    --mb-navy-deep: #12263f;
    --mb-gold: #b8860b;
    --mb-gold-light: #daa520;
    --mb-cream: #faf8f5;
    --mb-text: #2d3748;
    --mb-text-light: #718096;
    --mb-border: #e2e8f0;
    --mb-shadow: rgba(26, 54, 93, 0.08);
    --mb-serif: 'Crimson Pro', Georgia, serif;
    --mb-sans: 'Source Sans 3', -apple-system, sans-serif;
}

/* ---- Global typography & palette ---- */

body {
    font-family: var(--mb-sans) !important;
    color: var(--mb-text) !important;
    background-color: var(--mb-cream) !important;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.betterdocs-category-title,
.betterdocs-entry-title {
    font-family: var(--mb-serif) !important;
    color: var(--mb-navy);
}

a { transition: color 0.15s ease; }

/* ==========================================================================
   Homepage hero
   ========================================================================== */

.home .elementor-widget-heading .elementor-heading-title {
    color: #fff !important;
    letter-spacing: 0.06em;
    font-weight: 600;
}

/* Gold rule under the site title */
.home .elementor-widget-heading .elementor-heading-title::after {
    content: '';
    display: block;
    width: 72px;
    height: 3px;
    background: var(--mb-gold);
    margin: 0.9rem auto 0;
    border-radius: 2px;
}

/* Injected subtitle + CTA (added by site.js) */
.mbss-hero-extras {
    text-align: center;
    padding: 0 1.25rem;
}

.mbss-hero-sub {
    font-family: var(--mb-sans);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    font-weight: 400;
    max-width: 620px;
    margin: 1.1rem auto 1.4rem;
    line-height: 1.55;
}

.mbss-hero-cta {
    display: inline-block;
    font-family: var(--mb-sans);
    font-size: 1rem;
    font-weight: 600;
    color: #fff !important;
    background: var(--mb-gold);
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    text-decoration: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease, transform 0.15s ease;
}

.mbss-hero-cta:hover {
    background: var(--mb-gold-light);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ==========================================================================
   Search band — turn the flat white slab into a floating card
   ========================================================================== */

.home .elementor-widget-betterdocs-search-form {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

/* Kill the flat grey slab around the search field */
.betterdocs-search-layout-1 {
    background: transparent !important;
    padding: 0 !important;
}

.betterdocs-search-layout-1 .search-bar {
    font-family: var(--mb-sans);
    background: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 12px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.betterdocs-search-layout-1 .search-bar:focus-within {
    border-color: var(--mb-gold) !important;
    box-shadow: 0 6px 26px rgba(184, 134, 11, 0.35);
}

.betterdocs-search-layout-1 .search-bar input {
    font-family: var(--mb-sans) !important;
    font-size: 1.05rem !important;
    color: var(--mb-text) !important;
}

/* ==========================================================================
   Category grid cards
   ========================================================================== */

.betterdocs-single-category-wrapper.category-grid {
    background: #fff !important;
    border: 1px solid var(--mb-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--mb-shadow) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.betterdocs-single-category-wrapper.category-grid:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(26, 54, 93, 0.14) !important;
}

/* Navy header flush with card edges */
.betterdocs-single-category-wrapper.category-grid .betterdocs-single-category-inner {
    padding: 0 !important;
}

/* Breathing room around the hero content (Elementor's own rules need !important) */
.home .elementor-element-282dc7e2 {
    border-bottom: none !important;
    padding-top: 3rem !important;
    padding-bottom: 3.25rem !important;
}

.home .elementor-element-7293178 {
    border-top: none !important;
}

/* Navy header bar, echoing the print selector cards */
.betterdocs-single-category-wrapper.category-grid .betterdocs-category-header {
    background: var(--mb-navy) !important;
    padding: 0.95rem 1.25rem !important;
    margin: 0 !important;
}

.betterdocs-single-category-wrapper.category-grid .betterdocs-category-title {
    color: #fff !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 !important;
}

/* Doc lists inside cards */
.betterdocs-single-category-wrapper.category-grid .betterdocs-single-category-inner > ul,
.betterdocs-single-category-wrapper.category-grid ul.betterdocs-articles-list {
    padding: 0.5rem 1.25rem 0.75rem !important;
    margin: 0 !important;
}

.betterdocs-single-category-wrapper.category-grid li {
    border-bottom: 1px solid #f0f3f7;
    padding: 0.5rem 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: baseline;
}

.betterdocs-single-category-wrapper.category-grid li:last-child {
    border-bottom: none;
}

/* Replace the stock grey doc icons with a slim gold marker */
.betterdocs-single-category-wrapper.category-grid li > svg {
    display: none !important;
}

.betterdocs-single-category-wrapper.category-grid li::before {
    content: '';
    flex: 0 0 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mb-gold);
    margin-right: 0.7rem;
    position: relative;
    top: -2px;
}

.betterdocs-single-category-wrapper.category-grid li a {
    font-family: var(--mb-sans) !important;
    font-size: 0.95rem !important;
    color: var(--mb-text) !important;
    line-height: 1.45;
    text-decoration: none;
}

.betterdocs-single-category-wrapper.category-grid li a:hover {
    color: var(--mb-gold) !important;
}

/* "Explore more" footer link */
.betterdocs-single-category-wrapper.category-grid .betterdocs-category-footer,
.betterdocs-single-category-wrapper.category-grid .betterdocs-category-link-btn {
    font-family: var(--mb-sans) !important;
    color: var(--mb-gold) !important;
    font-weight: 600;
}

.betterdocs-single-category-wrapper.category-grid .betterdocs-category-footer a {
    color: var(--mb-gold) !important;
}

/* ==========================================================================
   Doc single pages, category archives, sidebar
   ========================================================================== */

.betterdocs-content-area,
.betterdocs-single-content {
    font-family: var(--mb-sans);
}

.betterdocs-single-content .betterdocs-content h1,
.betterdocs-single-content .betterdocs-content h2,
.betterdocs-entry-title {
    color: var(--mb-navy) !important;
}

.betterdocs-entry-title {
    font-weight: 600 !important;
}

/* Sidebar category list */
.betterdocs-sidebar .betterdocs-category-title,
.betterdocs-sidebar-list li a {
    font-family: var(--mb-sans) !important;
}

.betterdocs-sidebar a:hover {
    color: var(--mb-gold) !important;
}

/* Doc content lists — comfortable reading rhythm */
.betterdocs-content ol li,
.betterdocs-content ul li {
    margin-bottom: 0.45rem;
    line-height: 1.65;
}

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

.site-footer,
footer.elementor-location-footer,
.dialog-widget ~ footer,
body > footer {
    background: var(--mb-navy-deep) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    font-family: var(--mb-sans);
}

.site-footer a,
body > footer a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.site-footer a:hover,
body > footer a:hover {
    color: var(--mb-gold-light) !important;
}

/* Injected footer bar (site.js) */
.mbss-footer {
    background: var(--mb-navy-deep);
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--mb-sans);
    text-align: center;
    padding: 1.6rem 1rem;
    font-size: 0.92rem;
    line-height: 1.6;
}

.mbss-footer strong {
    font-family: var(--mb-serif);
    font-size: 1.05rem;
    color: #fff;
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
    letter-spacing: 0.04em;
}

.mbss-footer a {
    color: var(--mb-gold-light);
    text-decoration: none;
}

.mbss-footer a:hover { text-decoration: underline; }

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 767px) {
    /* The hero column collapses to ~135px on mobile via an Elementor width setting */
    .home .elementor-element-282dc7e2 .elementor-column {
        width: 100% !important;
    }
    .home .elementor-widget-heading .elementor-heading-title {
        font-size: 1.7rem !important;
    }
    .mbss-hero-sub { font-size: 1rem; }
    .betterdocs-single-category-wrapper.category-grid .betterdocs-category-title {
        font-size: 1.05rem !important;
    }
}
