/* 
Theme Name: MDLT Theme V3.1
Description: Business/Company Website - Modernized Layout
Version: 3.1
Author: My Digital Life Technologies, LLC
...
*/

/* 1. Global Theme Configuration & CSS Variables */
:root {
    --bg-main: #f3f4f6;          /* Soft slate light gray background */
    --bg-surface: #ffffff;       /* Pure white layout containers */
    --text-primary: #1f2937;     /* Modern charcoal dark gray text */
    --text-secondary: #4b5563;   /* Muted accent gray text */
    --color-accent: #2563eb;     /* Professional crisp corporate blue */
    --color-accent-hover: #1d4ed8;
    --font-stack: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* 2. Global Reset and Base Rules */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 16px;
    line-height: 1.6;
}

.site-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   3. Global Responsive Flexbox Layout Framework
   ========================================================================== */
.site-main-layout {
    display: flex;
    flex-direction: column;   /* Default to stacked columns on mobile */
    gap: 1.5rem;              /* Unified margin spacing between items */
    max-width: 1200px;        /* Limits expansion on ultra-wide screens */
    margin: 2rem auto;        /* Centers the whole layout on the page */
    padding: 0 1rem;          /* Prevents content from hitting browser edges */
}

/* Desktop Viewport Alignment Activation Layer */
@media (min-width: 992px) {
    .site-main-layout {
        flex-direction: row;          /* Lines up columns horizontally */
        align-items: flex-start;      /* Keeps the sidebar from stretching unevenly */
        gap: 2rem;                    /* Increases separation on large monitors */
    }

    /* Core Post Cards Container Main Area Allocation */
    .site-main-content {
        flex: 1;                      /* Instructs content box to claim all remaining row space */
        min-width: 0;                 /* Fixes potential layout breaks with nested pre/code blocks */
    }

    /* Dynamic Widget Sidebar Allocation Column */
    .primary-sidebar-zone {
        width: 300px;                 /* Establishes a fixed, predictable desktop width */
        flex-shrink: 0;               /* Prevents the main container from squeezing the sidebar */
        position: sticky;             /* Locks the widgets in place when scrolling */
        top: 2rem;                    /* Keeps sticky widgets nicely aligned with viewport margins */
    }
}

.site-main-content {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* 4. Typography Scale System */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* 5. Components: Modern Primary Buttons */
.art-button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-accent);
    color: #ffffff !important;
    font-family: var(--font-stack);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.5rem;
    height: auto;
    border: none !important;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.art-button:hover, .button:hover {
    background-color: var(--color-accent-hover);
    text-decoration: none;
}

/* 6. Base Element Overrides & Utilities */
ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Form Styling Reset */
input, textarea, select {
    font-family: var(--font-stack);
    font-size: 1rem;
    color: var(--text-primary);
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    width: 100%;
}

/* ==========================================================================
   7. Structural Layout Headers & Branding Components (Updated V3)
   ========================================================================== */
.site-header {
    /* Maps your old header background image cleanly behind the text */
    background: #0d1b2a url('images/header.jpg') no-repeat center center;
    background-size: cover;
    padding: 3.5rem 2rem;
    color: #ffffff;
    border-bottom: 3px solid var(--color-accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.header-branding {
    max-width: 1200px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6); /* Guarantees text readability over images */
}

.site-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.site-title a {
    color: #FDF100; /* Retains your brand's signature gold title color */
    text-decoration: none;
}

.site-description {
    font-size: 1.25rem;
    color: #e5e7eb; /* Smooth light grey subtitle formatting text */
    font-weight: 500;
}

/* 8. Structural Layout Footer Components */
.site-footer {
    background-color: var(--text-primary);
    color: #ffffff;
    padding: 3rem 1.5rem;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer a {
    color: #9ca3af;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #ffffff;
}

#wp-footer {
    padding-top: 1rem;
    opacity: 0.6;
}

/* ==========================================================================
   9. Components: Responsive Hamburger Navigation
   ========================================================================== */
.site-navigation {
    background-color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    position: relative;
    z-index: 1000;
}

.main-menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 1. The Interactive Hamburger Icon Button styling */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.menu-toggle:focus {
    outline: 2px dashed var(--color-accent);
    outline-offset: 4px;
}

.hamburger-bar {
    width: 100%;
    height: 3px;
    background-color: #e5e7eb;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Slick transform animations when active */
.menu-toggle.is-active .hamburger-bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu-toggle.is-active .hamburger-bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .hamburger-bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* 2. Hidden Drawer Behavior by default on Mobile viewports */
.main-menu-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--text-primary);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.main-menu-wrapper.is-active {
    display: block; /* Reveals menu seamlessly when clicked */
}

.main-menu {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.main-menu a {
    display: block;
    color: #e5e7eb;
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
    font-weight: 500;
}

.main-menu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
}

/* ==========================================================================
   10. Desktop Viewport Navigation Reset
   ========================================================================== */
@media (min-width: 992px) {
    .menu-toggle {
        display: none; /* Safely kill hamburger icon on desktop screens */
    }

    .main-menu-wrapper {
        display: block !important; /* Forces normal line display */
        position: static;
        width: auto;
        background: transparent;
        box-shadow: none;
    }

    .main-menu {
        flex-direction: row;
        gap: 1.5rem;
        padding: 0;
    }

    .main-menu a {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
        border-radius: 4px;
    }

    .main-menu a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* 11. Article Content & Structural Card Styling */
.site-main-content article {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e5e7eb;
}

.site-main-content article:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 12. Components: Header Branding & Alignment */
.site-header .header-branding {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
}

/* 13. Sidebar Columns and Widget Area Blocks */
.site-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Modern Card Layout for Sidebar Blocks/Widgets */
.art-block, .widget {
    background: var(--bg-surface);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Clean, Flat Sidebar Block Headers */
.art-blockheader, .widgettitle {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--bg-main);
}

.art-blockheader .t a, .widgettitle a {
    color: inherit;
}

/* Sidebar List items and content text */
.art-blockcontent, .widget-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.art-blockcontent ul, .widget ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.art-blockcontent li, .widget li {
    position: relative;
    padding-left: 1.25rem;
}

/* Clean custom bullet points instead of default browser styles */
.art-blockcontent li::before, .widget li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

.art-blockcontent a, .widget a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.art-blockcontent a:hover, .widget a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* 14. WordPress Breadcrumbs Utility */
.art-breadcrumbs, .breadcrumbs {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 15. Components: Modern Form Elements & Inputs */
input[type="text"], 
input[type="password"], 
input[type="email"], 
input[type="url"], 
textarea,
select {
    background-color: #f9fafb;
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 400;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
    width: 100%;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Accessible Interactive Input Focus States */
input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus, 
input[type="url"]:focus, 
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-accent);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Error States for Validation Checks */
input.art-error, 
textarea.art-error,
input:invalid:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* 16. Components: Modern Flexbox Search Blocks */
form.art-search,
.search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin: 1rem 0;
}

form.art-search input[type="text"],
.search-form input[type="search"] {
    flex: 1;
    margin: 0;
}

form.art-search input[type="submit"],
.search-form input[type="submit"] {
    width: auto;
    white-space: nowrap;
    background-color: var(--text-primary);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border: none !important;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

form.art-search input[type="submit"]:hover,
.search-form input[type="submit"]:hover {
    background-color: var(--color-accent);
}

/* 17. Components: Clean Custom Accessibility Checkboxes */
.art-checkbox,
.wp-block-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    user-select: none;
}

.art-checkbox input[type="checkbox"],
.wp-block-checkbox input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--color-accent); /* Leverages native modern theme colors */
    cursor: pointer;
}

/* 18. Components: Standard Native Radio Selections */
.art-radiobutton,
.wp-block-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.art-radiobutton input[type="radio"],
.wp-block-radio input[type="radio"] {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--color-accent);
    cursor: pointer;
}

/* 19. Layouts: Modern Post Cards & Typography */
.art-post, 
article.post {
    background-color: var(--bg-surface);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.art-postheader,
article.post .entry-title,
article.post h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    padding: 0;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.art-postheader a,
article.post .entry-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.art-postheader a:hover,
article.post .entry-title a:hover {
    color: var(--color-accent);
}

/* 20. Content Elements: Responsive Media & Captions */
.wp-block-image, 
.image-caption-wrapper {
    margin: 1.5rem 0;
}

.wp-block-image figcaption,
.image-caption-wrapper p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 0.5rem;
}

/* 21. Content Elements: Clean Semantic Layout Tables */
table, 
.art-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

th, td,
.art-article th, 
.art-article td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th,
.art-article th {
    background-color: #f9fafb;
    color: var(--text-primary);
    font-weight: 600;
}

/* 22. Code Blocks Formatting Layout */
pre, code {
    background-color: #f3f4f6;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9rem;
    border-radius: 4px;
}

pre {
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* 23. Content Elements: Professional Clean Text Lists */
.art-postcontent ul, 
.art-post ul, 
.entry-content ul {
    margin: 1.25rem 0 1.25rem 1.5rem;
    padding: 0;
}

.art-postcontent ol, 
.art-post ol, 
.entry-content ol {
    margin: 1.25rem 0 1.25rem 1.5rem;
    padding: 0;
    list-style-type: decimal;
}

.art-postcontent li, 
.art-post li, 
.entry-content li {
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* 24. Content Elements: Modern Minimalist Blockquotes */
blockquote, 
.art-postcontent blockquote {
    background-color: #f9fafb !important;
    border-left: 4px solid var(--color-accent) !important;
    padding: 1rem 1.5rem !important;
    margin: 1.5rem 0 !important;
    color: var(--text-secondary) !important;
    font-family: var(--font-stack) !important;
    font-weight: 400 !important;
    font-style: italic !important;
    border-radius: 0 6px 6px 0;
}

blockquote p, 
.art-postcontent blockquote p {
    margin: 0 0 0.5rem 0 !important;
    font-size: 1.1rem;
    line-height: 1.6;
}

blockquote p:last-child, 
.art-postcontent blockquote p:last-child {
    margin-bottom: 0 !important;
}

blockquote cite {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-style: normal;
    font-weight: 600;
    display: block;
    margin-top: 0.5rem;
}

/* 25. Tables: Archive Index Sorters & Navigators */
.Sorter, 
.Navigator {
    font-family: var(--font-stack);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.Sorter a, 
.Navigator a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.Sorter a:hover, 
.Navigator a:hover {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

/* 26. Component Utility: Legacy Footer Removal Override */
.art-footer, 
.art-footer a {
    text-shadow: none !important;
    box-shadow: none !important;
}

/* 27. Components: Fully Responsive Footer Inner Layout */
.footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.site-footer ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.site-footer li {
    font-size: 0.875rem;
    color: #9ca3af;
}

/* 28. Components: Modern Fullscreen Image Lightbox Overlay */
#art-lightbox-bg,
.custom-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Fluid modern alpha opacity */
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* Adds a subtle glass blur effect */
}

img.art-lightbox-image,
.custom-lightbox-img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border: 4px solid #ffffff;
    border-radius: 6px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 29. Components: Flat Vector Navigation Controls */
.arrow,
.lightbox-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    z-index: 10005;
}

.arrow:hover,
.lightbox-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

.arrow.left { left: 1.5rem; }
.arrow.right { right: 1.5rem; }

/* CSS-Driven Minimalist Arrow Elements */
.arrow::after {
    content: '';
    width: 12px;
    height: 12px;
    border-top: 3px solid #ffffff;
    border-left: 3px solid #ffffff;
    display: block;
}
.arrow.left::after { transform: rotate(-45deg); margin-left: 4px; }
.arrow.right::after { transform: rotate(135deg); margin-right: 4px; }

/* 30. Components: Elegant Close Interface Controller */
.close,
.lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10006;
    transition: background-color 0.2s ease;
}

.close:hover,
.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.close::before,
.close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 1px;
}
.close::before { transform: rotate(45deg); }
.close::after { transform: rotate(-45deg); }

/* Error Handling and Preloaders */
.loading,
.lightbox-loader {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    z-index: 10100;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 31. Layouts: Modern Post Sidebar Sizing */
.site-sidebar {
    width: 100%;
}

@media (min-width: 768px) {
    .site-sidebar {
        width: 280px;
    }
}

/* 32. Components: Clean Modern Discussion & Comment Fields */
textarea#comment,
#commentform textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
}

#commentform {
    text-align: left;
    margin: 2rem 0;
}

ul#comments-list {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

ul#comments-list li li {
    margin-left: 2rem;
    border-left: 2px solid #e5e7eb;
    padding-left: 1rem;
}

.avatar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.avatar-container img {
    border-radius: 50%; /* Modern circular profile icons styling */
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

ul#comments-list li cite {
    font-size: 1.1rem;
    font-weight: 600;
    font-style: normal;
    color: var(--text-primary);
}

/* 33. Components: Elegant Flexbox Pagination Controls */
.navigation, 
.page-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2.5rem 0;
}

.page-navi-outer {
    display: inline-block;
}

.page-navi-inner {
    display: block;
    padding: 0.5rem 0.875rem;
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
    background-color: var(--bg-surface);
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

a .page-navi-inner:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background-color: #ffffff;
    text-decoration: none;
}

/* 34. WordPress Core Alignment Compliance Rules */
.aligncenter, 
div.aligncenter, 
img.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

p.aligncenter, 
p.center {
    text-align: center;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1.5rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1.5rem 1.5rem;
}

/* 35. Content Elements: Responsive Core WordPress Captions */
.wp-caption {
    background-color: var(--bg-surface);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem;
    max-width: 100%;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.wp-caption img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.wp-caption p.wp-caption-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 0.5rem 0.25rem 0.25rem;
    margin: 0;
}

/* 36. Components: Modern Responsive Gallery Grid System */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    text-align: center;
}

.gallery img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: transform 0.2s ease;
}

.gallery img:hover {
    transform: scale(1.02);
}

.gallery-caption {
    font-size: 0.815rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

/* 37. Components: Clean WordPress Native Calendar Tables */
#wp-calendar {
    width: 100%;
    max-width: 320px;
    margin: 1.5rem auto;
    border-collapse: collapse;
    font-size: 0.875rem;
}

#wp-calendar caption {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-bottom: 0.75rem;
    color: var(--text-primary);
}

#wp-calendar th {
    background-color: transparent;
    padding: 0.5rem 0;
    text-align: center;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

#wp-calendar td {
    padding: 0.5rem 0;
    text-align: center;
    color: var(--text-secondary);
}

#wp-calendar a {
    color: var(--color-accent);
    font-weight: 700;
}

#wp-calendar #prev a { text-align: left; }
#wp-calendar #next a { text-align: right; }

/* 38. Components: Modern Semantic Reply & Form Layouts */
#respond {
    background-color: var(--bg-surface);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin: 2.5rem 0;
}

#reply-title, 
h3#reply-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#respond p {
    margin-bottom: 1rem;
}

#respond label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--text-primary);
}

#respond .required {
    color: #ef4444;
}

/* 39. Components: Form Descriptive Tag Utilities */
.form-allowed-tags {
    display: block;
    font-size: 0.815rem;
    color: var(--text-secondary);
    line-height: 1.5;
    background-color: #f9fafb;
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin: 1rem 0;
}

.form-allowed-tags code {
    background: transparent;
    padding: 0;
    color: var(--text-primary);
}

/* 40. Custom Theme Integration Classes */
.mdlt-contentbox {
    background-color: var(--bg-surface);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.mdlt-descbox {
    background-color: #f9fafb;
    border-left: 4px solid var(--text-secondary);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 41. Integrations: Embedded Maps Display Engine */
div[id^="GMPmap"] img {
    max-width: none !important; /* Prevents layout map rendering distortions */
    background: none !important;
}

/* 42. Layout Components: Author Profile Grid Cards */
.archive-author-profile-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 576px) {
    .archive-author-profile-card {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
    }
}

.author-details-text {
    flex: 1;
}

.author-details-text blockquote {
    margin: 0.75rem 0 0 0 !important;
}

/* ==========================================================================
   43. Layout Components: Multi-Column Post Grid System
   ========================================================================== */
/* The parent loop containers we registered across index, archive, and search templates */
.archive-posts-loop-grid,
.search-posts-loop-grid,
.site-main-content .posts-loop-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* Defaults to 1 wide card on mobile devices */
    gap: 1.5rem;                /* Even whitespace distribution between rows and columns */
    margin: 1.5rem 0;
}

/* Activate side-by-side dual columns on larger desktop screens */
@media (min-width: 992px) {
    .archive-posts-loop-grid,
    .search-posts-loop-grid,
    .site-main-content .posts-loop-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Exactly 2 uniform flexible columns */
    }

    /* Force full-width spanning on featured alert notices or single full rows if desired */
    .site-post-card.sticky {
        grid-column: span 2;
    }
}

/* Refined spacing adjustments inside individual post cards for grid sizing */
.site-post-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Guarantees all cards in a row match the tallest card automatically */
    margin-bottom: 0 !important; /* Disables standard linear spacing overridden by grid gaps */
}

.site-post-card .entry-content-body {
    flex: 1; /* Pushes the card footer or read-more links cleanly to the absolute bottom */
}

.post-card-featured-img {
    width: 100%;
    height: 200px;
    object-fit: cover; /* Crops post thumbnails elegantly without squishing proportions */
    border-radius: 6px 6px 0 0;
}
/* ==========================================================================
   44. Components: Single Post Article Navigation Links
   ========================================================================== */
.post-navigation-links {
    border-top: 1px solid #e5e7eb;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
}

.post-navigation-links .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 576px) {
    .post-navigation-links .nav-links {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.post-navigation-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-navigation-links a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.post-navigation-links .nav-next {
    text-align: right;
}
/* ==========================================================================
   45. Components: Modernized 404 Error Fallback Modules
   ========================================================================== */
.error-404.not-found .widgettitle {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.wp-404-fallback-list {
    margin: 1rem 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wp-404-fallback-list li {
    font-size: 1.05rem;
    font-weight: 500;
}

.wp-404-fallback-list a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.wp-404-fallback-list a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}
