/*
Theme Name: Laikipia County Government Portal
Theme URI: http://www.laikipia.go.ke
Author: JONATHAN N WAITI
Description: Official responsive theme built for Laikipia County citizen portals, public notices, and tender registries.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: laikipia-gov
*/

/* ==========================================================================
   1. Core Reset & Global Layout Base
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #f4f7f5;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #2c3e50;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: #004d26;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #003319;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. WordPress Core Required Classes
   ========================================================================== */
.alignnone { margin: 5px 20px 20px 0; }
.aligncenter, div.aligncenter { display: block; margin: 5px auto 5px auto; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft { float: left; margin: 5px 20px 20px 0; }
.clear { clear: both; }
.wp-caption { background: #ffffff; border: 1px solid #ffffff; max-width: 96%; padding: 5px 3px 10px; text-align: center; }
.wp-caption img { margin: 0; padding: 0; border: 0 none; }
.wp-caption p.wp-caption-text { font-size: 0.85rem; margin: 5px 0 0 0; color: #ffffff; }

/* ==========================================================================
   3. Typography & Editor Content Formatting Engine
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    color: #111;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

p {
    margin-top: 0;
    margin-bottom: 1.5em;
}

/* Formats lists created inside the page/post content block editor */
main ul, main ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

main li {
    margin-bottom: 0.5em;
}

/* Dynamic table layout cleanup for standard content pages */
table {
    width: 100%;
    margin-bottom: 1.5em;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background-color: #004d26;
    color: #fff;
    font-weight: bold;
}

/* ==========================================================================
   4. WordPress Standard Pagination Layout Styles
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 30px 0;
}

.pagination .page-numbers {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #004d26;
    font-weight: bold;
}

.pagination .page-numbers.current {
    background: #004d26;
    color: #fff;
    border-color: #004d26;
}

.pagination .page-numbers:hover:not(.current) {
    background: #f0f4f2;
}

/* ==========================================================================
   5. Comprehensive CSS Mobile Media Queries (Responsiveness)
   ========================================================================== */
@media screen and (max-width: 992px) {
    /* Collapse side-by-side flex layouts into vertical stacks on tablets */
    div[style*="display: flex"], 
    div[style*="display:flex"] {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    /* Make main content width spans and sidebars expand to take up full screen widths */
    main, aside {
        width: 100% !important;
        flex: none !important;
    }

    .laikipia-nav-container ul {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center;
    }
}

@media screen and (max-width: 600px) {
    h1 { font-size: 1.8rem !important; }
    h2 { font-size: 1.4rem !important; }
    
    body {
        font-size: 15px;
    }
    
    /* Optimize padding inside card wrappers on small mobile screen dimensions */
    article, section {
        padding: 20px !important;
    }
}
.btn-download:hover { background-color: #00331a !important; }
/* FORCE FULL WIDTH ON HOMEPAGE */
.home .site-main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Ensure blocks inside the editor (like your slider) stretch */
.home .entry-content, 
.home .wp-block-group,
.home .wp-block-group__inner-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Force the homepage content to break out of any parent container */
.home #primary, 
.home .site-main {
    max-width: 100% !important;
    width: 100vw !important; /* Forces width to full viewport */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    padding: 0 !important;
}

/* Ensure the slider block inside follows the force-break */
.home .wp-block-group {
    max-width: 100% !important;
}