/*
 Theme Name:   SarkariDamad
 Theme URI:    https://sarkaridamad.com
 Description:  Your Trusted Family Guide for Govt Schemes, Savings & Smart Living. A lightweight, AdSense-friendly Astra child theme.
 Author:       SarkariDamad
 Author URI:   https://sarkaridamad.com
 Template:     astra
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  sarkaridamad
 Requires at least: 6.0
 Tested up to: 6.7
 Requires PHP: 7.4
*/

/* ==========================================================================
   0. Google Fonts Import
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   1. CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
    --sd-primary: #1565C0;
    --sd-primary-light: #1E88E5;
    --sd-primary-dark: #0D47A1;
    --sd-accent: #00897B;
    --sd-accent-light: #26A69A;
    --sd-slate: #334155;
    --sd-text: #1e293b;
    --sd-muted: #64748b;
    --sd-bg: #F8FAFC;
    --sd-card: #FFFFFF;
    --sd-border: #E2E8F0;
    --sd-success: #16a34a;
    --sd-warning: #f59e0b;
    --sd-error: #dc2626;
    --sd-radius: 10px;
    --sd-radius-sm: 6px;
    --sd-radius-lg: 14px;
    --sd-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    --sd-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --sd-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --sd-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --sd-content-width: 1100px;
    --sd-gap: 1.5rem;
    --sd-gap-sm: 1rem;
    --sd-gap-lg: 2rem;
    --sd-transition: 0.2s ease;
}

/* ==========================================================================
   2. Global Reset & Base Typography
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    font-family: var(--sd-font);
    font-size: 16px;
    line-height: 1.7;
    color: var(--sd-text);
    background-color: var(--sd-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.sd-theme {
    background-color: var(--sd-bg);
}

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

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

a:hover,
a:focus {
    color: var(--sd-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--sd-font);
    color: var(--sd-slate);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

ul, ol {
    padding-left: 1.5rem;
}

/* ==========================================================================
   3. Astra Overrides
   ========================================================================== */
body .ast-container {
    max-width: var(--sd-content-width);
    padding-left: 1rem;
    padding-right: 1rem;
}

.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
    background: var(--sd-card);
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow);
    padding: 1.5rem;
}

.ast-separate-container .ast-comment-list li {
    background: var(--sd-card);
}

.entry-content p,
.entry-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--sd-text);
}

.ast-single-post .entry-title,
.ast-single-post .entry-header .entry-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sd-slate);
    line-height: 1.3;
}

.ast-single-post .entry-meta,
.ast-single-post .entry-meta * {
    color: var(--sd-muted);
    font-size: 0.875rem;
}

.ast-breadcrumbs,
.ast-breadcrumbs .trail-items li {
    font-size: 0.8125rem;
    color: var(--sd-muted);
}

body .ast-button,
body .ast-custom-button,
body .button,
body .wp-block-button__link {
    font-family: var(--sd-font);
    border-radius: var(--sd-radius-sm);
    font-weight: 600;
    transition: all var(--sd-transition);
}

.ast-footer-overlay {
    background: transparent;
}

body .site-content .ast-builder-layout-element {
    font-family: var(--sd-font);
}

/* Override Astra heading colors */
body h1, body .entry-content h1,
body h2, body .entry-content h2,
body h3, body .entry-content h3,
body h4, body .entry-content h4,
body h5, body .entry-content h5,
body h6, body .entry-content h6 {
    color: var(--sd-slate);
}

/* Override Astra link colors */
body a,
body .entry-content a {
    color: var(--sd-primary);
}

body a:hover,
body .entry-content a:hover {
    color: var(--sd-primary-dark);
}

/* ==========================================================================
   4. Layout Containers
   ========================================================================== */
.sd-container {
    width: 100%;
    max-width: var(--sd-content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.sd-section {
    padding: 2rem 0;
}

.sd-section--alt {
    background-color: var(--sd-card);
}

/* ==========================================================================
   5. Header & Navigation
   ========================================================================== */
.sd-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--sd-card);
    border-bottom: 1px solid var(--sd-border);
    box-shadow: var(--sd-shadow);
}

.sd-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 1.5rem;
}

.sd-header__logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.sd-header__logo a,
.sd-header__logo .custom-logo-link {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--sd-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.sd-header__logo img,
.sd-header__logo .custom-logo,
.sd-header__logo .custom-logo-link img,
body .sd-header__logo .custom-logo-link img {
    max-height: 42px !important;
    height: auto !important;
    width: auto !important;
    max-width: 180px !important;
    display: block;
}

/* Bigger logo on desktop */
@media (min-width: 768px) {
    .sd-header__logo img,
    .sd-header__logo .custom-logo,
    .sd-header__logo .custom-logo-link img,
    body .sd-header__logo .custom-logo-link img {
        max-height: 60px !important;
        max-width: 300px !important;
    }
}

.sd-header__nav {
    display: none;
}

.sd-header__nav.is-active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--sd-card);
    border-bottom: 1px solid var(--sd-border);
    padding: 1rem;
    box-shadow: var(--sd-shadow-lg);
    z-index: 1000;
}

.sd-header__nav.is-active ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
}

.sd-header__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sd-header__nav li {
    position: relative;
}

.sd-header__nav li.menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Dropdown Menu (Desktop) */
.sd-header__nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    box-shadow: var(--sd-shadow-lg);
    border-radius: var(--sd-radius-sm);
    min-width: 220px;
    padding: 0.5rem 0;
    margin: 0;
    z-index: 1001;
    list-style: none;
}

.sd-header__nav .sub-menu ul {
    display: block;
}

.sd-header__nav .sub-menu li {
    width: 100%;
}

.sd-header__nav .sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sd-slate);
    border-radius: 0;
    transition: all var(--sd-transition);
}

.sd-header__nav .sub-menu a:hover,
.sd-header__nav .sub-menu a:focus {
    color: var(--sd-primary);
    background-color: rgba(21, 101, 192, 0.05);
}

/* Show Dropdown on Hover */
@media (min-width: 768px) {
    .sd-header__nav li:hover > .sub-menu,
    .sd-header__nav li:focus-within > .sub-menu {
        display: block;
    }
}

/* Mobile Dropdown styling */
@media (max-width: 767px) {
    .sd-header__nav .sub-menu {
        display: block;
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        padding-left: 1.25rem;
        min-width: auto;
    }
    
    .sd-header__nav .sub-menu li {
        width: auto;
    }
    
    .sd-header__nav .sub-menu a {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

.sd-header__nav a {
    display: block;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--sd-slate);
    border-radius: var(--sd-radius-sm);
    transition: all var(--sd-transition);
}

.sd-header__nav a:hover,
.sd-header__nav a:focus {
    color: var(--sd-primary);
    background-color: rgba(21, 101, 192, 0.06);
}

.sd-header__nav .current-menu-item > a,
.sd-header__nav .current_page_item > a {
    color: var(--sd-primary);
    font-weight: 600;
}

/* Mobile menu toggle */
.sd-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    background: transparent;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--sd-slate);
}

/* Astra header overrides */
.ast-primary-header-bar,
.ast-header-break-point .ast-primary-header-bar {
    background: var(--sd-card);
    border-bottom: 1px solid var(--sd-border);
    box-shadow: var(--sd-shadow);
}

body .main-header-bar {
    background: var(--sd-card);
    border-bottom-color: var(--sd-border);
}

body .ast-header-break-point .main-header-bar {
    background: var(--sd-card);
}

body .main-header-menu > .menu-item > a {
    font-family: var(--sd-font);
    font-weight: 500;
    color: var(--sd-slate);
}

body .main-header-menu > .menu-item > a:hover {
    color: var(--sd-primary);
}

body .main-header-menu > .current-menu-item > a {
    color: var(--sd-primary);
}

/* ==========================================================================
   6. Hero Section
   ========================================================================== */
.sd-hero {
    background: linear-gradient(135deg, var(--sd-primary) 0%, var(--sd-primary-light) 100%);
    color: #ffffff;
    padding: 2.5rem 0;
    text-align: center;
}

.sd-hero__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.sd-hero__subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.sd-hero__search {
    max-width: 500px;
    margin: 0 auto;
}

.sd-hero__search .sd-search-form {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color var(--sd-transition);
}

.sd-hero__search .sd-search-form:focus-within {
    border-color: rgba(255, 255, 255, 0.6);
}

.sd-hero__search .sd-search-form__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-family: var(--sd-font);
    color: #ffffff;
    outline: none;
    min-width: 0;
}

.sd-hero__search .sd-search-form__input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.sd-hero__search .sd-search-form__btn {
    border: none;
    background: #ffffff;
    color: var(--sd-primary);
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--sd-font);
    transition: background var(--sd-transition);
}

.sd-hero__search .sd-search-form__btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   7. Category Cards Grid
   ========================================================================== */
.sd-categories {
    padding: 2.5rem 0;
}

.sd-section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.sd-section-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sd-slate);
    margin-bottom: 0.5rem;
}

.sd-section-header__desc {
    font-size: 0.9375rem;
    color: var(--sd-muted);
    max-width: 500px;
    margin: 0 auto;
}

.sd-categories__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sd-gap);
}

.sd-category-card {
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--sd-transition);
    text-decoration: none;
    display: block;
}

.sd-category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sd-shadow-md);
    border-color: var(--sd-primary-light);
}

.sd-category-card:focus {
    outline: 2px solid var(--sd-primary);
    outline-offset: 2px;
}

.sd-category-card__icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    display: block;
    line-height: 1;
}

.sd-category-card__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sd-slate);
    margin-bottom: 0.375rem;
    display: block;
}

.sd-category-card__count {
    font-size: 0.8125rem;
    color: var(--sd-muted);
    display: block;
}

/* ==========================================================================
   8. Article / Post Cards
   ========================================================================== */
.sd-articles {
    padding: 2.5rem 0;
    background: var(--sd-card);
}

.sd-articles__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sd-gap);
}

.sd-post-card {
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
    transition: all var(--sd-transition);
    display: flex;
    flex-direction: column;
}

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

.sd-post-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--sd-border);
}

.sd-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sd-post-card:hover .sd-post-card__image img {
    transform: scale(1.03);
}

.sd-post-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    color: var(--sd-muted);
    font-size: 2rem;
}

.sd-post-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--sd-primary);
    color: #ffffff;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    z-index: 2;
}

.sd-post-card__content {
    padding: 1.125rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sd-post-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--sd-slate);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sd-post-card__title a {
    color: inherit;
    text-decoration: none;
}

.sd-post-card__title a:hover {
    color: var(--sd-primary);
}

.sd-post-card__excerpt {
    font-size: 0.875rem;
    color: var(--sd-muted);
    line-height: 1.6;
    margin-bottom: 0.75rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sd-post-card__meta {
    font-size: 0.8125rem;
    color: var(--sd-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--sd-border);
}

.sd-post-card__date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==========================================================================
   9. View All / CTA Buttons
   ========================================================================== */
.sd-view-all {
    text-align: center;
    margin-top: 2rem;
}

.sd-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--sd-font);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--sd-transition);
    text-decoration: none;
    line-height: 1.4;
}

.sd-btn--primary {
    background: var(--sd-primary);
    color: #ffffff;
}

.sd-btn--primary:hover {
    background: var(--sd-primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--sd-shadow-md);
}

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

.sd-btn--outline:hover {
    background: var(--sd-primary);
    color: #ffffff;
}

.sd-btn--accent {
    background: var(--sd-accent);
    color: #ffffff;
}

.sd-btn--accent:hover {
    background: var(--sd-accent-light);
    color: #ffffff;
}

/* ==========================================================================
   10. Newsletter / WhatsApp CTA
   ========================================================================== */
.sd-cta {
    background: linear-gradient(135deg, var(--sd-accent) 0%, #00796B 100%);
    color: #ffffff;
    padding: 2.5rem 0;
    text-align: center;
}

.sd-cta__title {
    font-size: 1.375rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.sd-cta__desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.sd-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    color: var(--sd-accent);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--sd-font);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--sd-transition);
}

.sd-cta__btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--sd-accent);
    transform: translateY(-1px);
    box-shadow: var(--sd-shadow-md);
}

/* ==========================================================================
   11. Ad Placement Zones
   ========================================================================== */
.sd-ad-header {
    text-align: center;
    padding: 0.75rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    clear: both;
}

.sd-ad-in-article {
    margin: 1.5rem 0;
    padding: 1rem 0;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    clear: both;
    overflow: hidden;
}

.sd-ad-sidebar {
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    text-align: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    clear: both;
    overflow: hidden;
}

.sd-ad-footer {
    text-align: center;
    padding: 1rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    clear: both;
    margin-top: 1rem;
    border-top: 1px solid var(--sd-border);
}

.sd-ad-header ins,
.sd-ad-in-article ins,
.sd-ad-sidebar ins,
.sd-ad-footer ins {
    display: block;
}

/* ==========================================================================
   12. Breadcrumbs
   ========================================================================== */
.sd-breadcrumbs {
    padding: 0.75rem 0;
    font-size: 0.8125rem;
    color: var(--sd-muted);
    border-bottom: 1px solid var(--sd-border);
    background: var(--sd-card);
}

.sd-breadcrumbs__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
}

.sd-breadcrumbs__item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sd-breadcrumbs__item::after {
    content: '›';
    color: var(--sd-muted);
    margin-left: 0.25rem;
}

.sd-breadcrumbs__item:last-child::after {
    content: none;
}

.sd-breadcrumbs__link {
    color: var(--sd-primary);
    text-decoration: none;
    font-weight: 500;
}

.sd-breadcrumbs__link:hover {
    text-decoration: underline;
}

.sd-breadcrumbs__current {
    color: var(--sd-slate);
    font-weight: 500;
}

/* ==========================================================================
   13. Search Form
   ========================================================================== */
.sd-search-form {
    display: flex;
    border: 2px solid var(--sd-border);
    border-radius: 50px;
    overflow: hidden;
    background: var(--sd-card);
    transition: border-color var(--sd-transition);
}

.sd-search-form:focus-within {
    border-color: var(--sd-primary);
}

.sd-search-form__input {
    flex: 1;
    border: none;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    font-family: var(--sd-font);
    color: var(--sd-text);
    background: transparent;
    outline: none;
    min-width: 0;
}

.sd-search-form__input::placeholder {
    color: var(--sd-muted);
}

.sd-search-form__btn {
    border: none;
    background: var(--sd-primary);
    color: #ffffff;
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    cursor: pointer;
    font-family: var(--sd-font);
    font-weight: 600;
    transition: background var(--sd-transition);
}

.sd-search-form__btn:hover {
    background: var(--sd-primary-dark);
}

/* ==========================================================================
   14. Category Archive Page
   ========================================================================== */
.sd-archive-header {
    background: var(--sd-card);
    border-bottom: 1px solid var(--sd-border);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.sd-archive-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sd-slate);
    margin-bottom: 0.375rem;
}

.sd-archive-header__desc {
    font-size: 0.9375rem;
    color: var(--sd-muted);
    max-width: 600px;
}

.sd-archive-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sd-gap);
    margin-bottom: 2rem;
}

/* ==========================================================================
   15. Pagination
   ========================================================================== */
.sd-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 2rem 0;
    flex-wrap: wrap;
}

.sd-pagination a,
.sd-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--sd-font);
    color: var(--sd-slate);
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius-sm);
    text-decoration: none;
    transition: all var(--sd-transition);
}

.sd-pagination a:hover {
    background: var(--sd-primary);
    color: #ffffff;
    border-color: var(--sd-primary);
}

.sd-pagination .current,
.sd-pagination span.current {
    background: var(--sd-primary);
    color: #ffffff;
    border-color: var(--sd-primary);
    font-weight: 600;
}

.sd-pagination .dots {
    border: none;
    background: transparent;
    color: var(--sd-muted);
}

/* Astra pagination override */
body .ast-pagination .page-numbers,
body .ast-pagination a {
    font-family: var(--sd-font);
    border-radius: var(--sd-radius-sm);
}

body .ast-pagination .page-numbers.current {
    background: var(--sd-primary);
    border-color: var(--sd-primary);
}

/* ==========================================================================
   16. Single Post / Page Styles
   ========================================================================== */
.sd-single {
    padding: 2rem 0;
}

.sd-single__article {
    background: var(--sd-card);
    border-radius: var(--sd-radius);
    box-shadow: var(--sd-shadow);
    padding: 1.5rem;
    max-width: 780px;
    margin: 0 auto;
}

.sd-single__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sd-slate);
    margin-bottom: 1rem;
    line-height: 1.35;
}

.sd-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--sd-muted);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sd-border);
}

.sd-single__featured {
    border-radius: var(--sd-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.sd-single__featured img {
    width: 100%;
    height: auto;
    display: block;
}

.sd-single__content {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--sd-text);
}

.sd-single__content h2 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--sd-border);
}

.sd-single__content h3 {
    font-size: 1.1875rem;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.sd-single__content h4 {
    font-size: 1.0625rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.sd-single__content p {
    margin-bottom: 1.25rem;
}

.sd-single__content ul,
.sd-single__content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

.sd-single__content li {
    margin-bottom: 0.375rem;
}

.sd-single__content blockquote {
    border-left: 4px solid var(--sd-primary);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(21, 101, 192, 0.04);
    border-radius: 0 var(--sd-radius-sm) var(--sd-radius-sm) 0;
    font-style: italic;
    color: var(--sd-slate);
}

.sd-single__content pre {
    background: var(--sd-slate);
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: var(--sd-radius);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.sd-single__content code {
    background: rgba(21, 101, 192, 0.06);
    color: var(--sd-primary-dark);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.875em;
}

.sd-single__content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

.sd-single__content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.sd-single__content th,
.sd-single__content td {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--sd-border);
    text-align: left;
}

.sd-single__content th {
    background: var(--sd-bg);
    font-weight: 600;
    color: var(--sd-slate);
}

.sd-single__content img {
    border-radius: var(--sd-radius-sm);
    margin: 1rem 0;
}

/* Post tags */
.sd-single__tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sd-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.sd-single__tags-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--sd-slate);
}

.sd-single__tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--sd-bg);
    color: var(--sd-muted);
    border-radius: 50px;
    border: 1px solid var(--sd-border);
    text-decoration: none;
    transition: all var(--sd-transition);
}

.sd-single__tag:hover {
    background: var(--sd-primary);
    color: #ffffff;
    border-color: var(--sd-primary);
}

/* ==========================================================================
   17. Sidebar
   ========================================================================== */
.sd-sidebar .widget {
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sd-sidebar .widget-title {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--sd-slate);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--sd-primary);
}

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

.sd-sidebar .widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--sd-border);
}

.sd-sidebar .widget li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sd-sidebar .widget li a {
    color: var(--sd-text);
    font-size: 0.9375rem;
}

.sd-sidebar .widget li a:hover {
    color: var(--sd-primary);
}

/* ==========================================================================
   18. Footer
   ========================================================================== */
.sd-footer {
    background: var(--sd-slate);
    color: rgba(255, 255, 255, 0.8);
    padding: 2.5rem 0 0;
}

.sd-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sd-gap-lg);
    margin-bottom: 2rem;
}

.sd-footer__title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
}

.sd-footer__about p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
}

.sd-footer__links ul,
.sd-footer__categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sd-footer__links li,
.sd-footer__categories li {
    margin-bottom: 0.5rem;
}

.sd-footer__links a,
.sd-footer__categories a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9375rem;
    text-decoration: none;
    transition: color var(--sd-transition);
}

.sd-footer__links a:hover,
.sd-footer__categories a:hover {
    color: #ffffff;
}

.sd-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
}

.sd-footer__bottom a {
    color: rgba(255, 255, 255, 0.75);
}

.sd-footer__bottom a:hover {
    color: #ffffff;
}

/* Astra footer overrides */
body .ast-small-footer {
    background: var(--sd-slate);
    border-top-color: rgba(255, 255, 255, 0.12);
}

body .ast-small-footer .ast-footer-copyright {
    color: rgba(255, 255, 255, 0.55);
}

body .site-footer .ast-builder-layout-element {
    color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   19. Empty / Placeholder States
   ========================================================================== */
.sd-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--sd-muted);
}

.sd-empty__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.sd-empty__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--sd-slate);
    margin-bottom: 0.375rem;
}

.sd-empty__desc {
    font-size: 0.9375rem;
}

/* ==========================================================================
   20. Responsive Breakpoints (Mobile-First)
   ========================================================================== */

/* Small phones (375px+) */
@media (min-width: 375px) {
    .sd-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.375rem; }

    .sd-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .sd-section {
        padding: 3rem 0;
    }

    .sd-header__nav {
        display: block;
    }

    .sd-header__toggle {
        display: none;
    }

    .sd-hero {
        padding: 3.5rem 0;
    }

    .sd-hero__title {
        font-size: 2rem;
    }

    .sd-hero__subtitle {
        font-size: 1.0625rem;
    }

    .sd-categories {
        padding: 3rem 0;
    }

    .sd-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .sd-footer__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sd-single__article {
        padding: 2rem;
    }

    .sd-single__title {
        font-size: 1.75rem;
    }

    .sd-section-header__title {
        font-size: 1.75rem;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }

    .sd-hero {
        padding: 4.5rem 0;
    }

    .sd-hero__title {
        font-size: 2.5rem;
    }

    .sd-hero__subtitle {
        font-size: 1.125rem;
    }

    .sd-categories__grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .sd-articles__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sd-archive-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sd-single__article {
        padding: 2.5rem;
    }

    .sd-single__title {
        font-size: 2rem;
    }
}

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .sd-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ==========================================================================
   21. Accessibility
   ========================================================================== */

/* Focus rings */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--sd-primary);
    outline-offset: 2px;
}

/* Skip link */
.sd-skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 10000;
    background: var(--sd-primary);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--sd-radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.sd-skip-link:focus {
    top: 0.5rem;
}

/* Screen reader only */
.sd-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sd-post-card:hover,
    .sd-category-card:hover,
    .sd-btn--primary:hover,
    .sd-cta__btn:hover {
        transform: none;
    }
}

/* ==========================================================================
   22. Print Styles
   ========================================================================== */
@media print {
    body {
        background: #ffffff;
        color: #000000;
        font-size: 12pt;
    }

    .sd-header,
    .sd-footer,
    .sd-hero__search,
    .sd-cta,
    .sd-ad-header,
    .sd-ad-in-article,
    .sd-ad-sidebar,
    .sd-ad-footer,
    .sd-sidebar,
    .sd-pagination,
    .sd-skip-link,
    nav,
    .comments-area {
        display: none !important;
    }

    .sd-single__article {
        box-shadow: none;
        border: none;
        max-width: 100%;
        padding: 0;
    }

    a {
        color: #000000;
        text-decoration: underline;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.8em;
        color: #666666;
    }

    img {
        max-width: 100% !important;
    }

    h2, h3, h4 {
        page-break-after: avoid;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }
}

/* ==========================================================================
   23. Block Editor Page Content Styles (Homepage Gutenberg integration)
   ========================================================================== */
.sd-entry-content {
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--sd-text);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.sd-entry-content h1, 
.sd-entry-content h2, 
.sd-entry-content h3, 
.sd-entry-content h4, 
.sd-entry-content h5, 
.sd-entry-content h6 {
    color: var(--sd-slate);
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.sd-entry-content h1 { font-size: 1.75rem; }
.sd-entry-content h2 { font-size: 1.5rem; border-bottom: 2px solid var(--sd-border); padding-bottom: 0.5rem; }
.sd-entry-content h3 { font-size: 1.25rem; }
.sd-entry-content h4 { font-size: 1.125rem; }

.sd-entry-content p {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.sd-entry-content ul, 
.sd-entry-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

.sd-entry-content li {
    margin-bottom: 0.375rem;
}

.sd-entry-content blockquote {
    border-left: 4px solid var(--sd-primary);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(21, 101, 192, 0.04);
    border-radius: 0 var(--sd-radius-sm) var(--sd-radius-sm) 0;
    font-style: italic;
    color: var(--sd-slate);
}

.sd-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--sd-radius);
    margin: 1.5rem 0;
}
