/*
Theme Name: Kilimokwanza Digital Hub Pro
Theme URI: https://kilimokwanza.org
Author: Kilimokwanza Team
Author URI: https://appsvalle.com
Description: A professional WordPress theme for agricultural information platform with enhanced search, language support, and mobile optimization. Features include working search functionality, language switcher, responsive design, custom post types for research and market data, and comprehensive dashboard.
Version: 2.2.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kilimokwanza
Tags: agriculture, two-columns, custom-header, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #F5F5F5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1B5E20;
}

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

p {
    margin-bottom: 1rem;
}

a {
    color: #4CAF50;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #2E7D32;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-content {
    min-height: 60vh;
    padding: 40px 0;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background: #FFFFFF;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Top Bar */
.header-top-bar {
    background: linear-gradient(135deg, #1B5E20, #2E7D32);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.top-bar-links a {
    color: white;
    opacity: 0.9;
}

.top-bar-links a:hover {
    opacity: 1;
}

/* Header Social */
.header-social {
    display: flex;
    gap: 15px;
}

.header-social a {
    color: white;
    font-size: 16px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.header-social a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Main Header */
.header-main {
    padding: 20px 0;
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-logo {
    width: 60px;
    height: 60px;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #4CAF50;
    color: white;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    text-decoration: none;
}

.site-info {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 28px;
    margin: 0;
}

.site-title a {
    color: #1B5E20;
    text-decoration: none;
    font-weight: 700;
}

.site-tagline {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    background: white;
    border-radius: 30px;
    padding: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.lang-item {
    padding: 8px 16px;
    border-radius: 26px;
    font-weight: 600;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.lang-item.active,
.lang-item:hover {
    background: #1B5E20;
    color: white;
}

/* Login Button */
.btn-login {
    padding: 10px 24px;
    background: #4CAF50;
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
}

.btn-login:hover {
    background: #388E3C;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76,175,80,0.4);
}

/* ==========================================================================
   Navigation Menu
   ========================================================================== */

.main-navigation {
    background: #2E7D32;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: #FFD700;
}

/* Dropdown Menus */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    display: none;
    z-index: 999;
}

.nav-menu li:hover > .sub-menu {
    display: block;
}

.nav-menu .sub-menu a {
    color: #333;
    padding: 10px 20px;
    border-bottom: 1px solid #F0F0F0;
}

.nav-menu .sub-menu a:hover {
    background: #E8F5E9;
    color: #1B5E20;
}

/* ==========================================================================
   Mega Search Section
   ========================================================================== */

.mega-search-section {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    padding: 60px 0;
}

.mega-search-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.mega-search-title {
    color: white;
    font-size: 36px;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Search Form */
.mega-search-form {
    display: flex;
    background: white;
    border-radius: 60px;
    overflow: visible;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    position: relative;
}

.mega-search-form.focused {
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    transform: translateY(-2px);
}

.mega-search-input {
    flex: 1;
    padding: 25px 30px;
    font-size: 18px;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
}

.mega-search-input::placeholder {
    color: #999;
}

.mega-search-filters {
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-left: 1px solid #E0E0E0;
}

.search-filter-select {
    padding: 10px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #666;
    outline: none;
    cursor: pointer;
}

.mega-search-button {
    padding: 25px 50px;
    background: #FFD700;
    color: #000;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 0 60px 60px 0;
}

.mega-search-button:hover {
    background: #FFC107;
    transform: scale(1.05);
}

/* Search Suggestions */
#search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

/* Quick Search Tags */
.quick-search-tags {
    margin-top: 20px;
}

.quick-search-label {
    color: rgba(255,255,255,0.8);
    margin-right: 10px;
}

.search-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 20px;
    margin: 5px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

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

.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 5px auto;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-navigation {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.mobile-navigation.active {
    right: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 9998;
}

.mobile-overlay.active {
    display: block;
}

/* ==========================================================================
   Content Styles
   ========================================================================== */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card h3 {
    padding: 15px;
    font-size: 20px;
}

.article-card p {
    padding: 0 15px 15px;
    color: #666;
}

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

.site-footer {
    background: #1B5E20;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-widget h4 {
    color: #FFD700;
    margin-bottom: 20px;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
}

.footer-widget a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumbs-wrapper {
    background: white;
    padding: 15px 0;
    border-bottom: 1px solid #E0E0E0;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 10px;
}

.breadcrumb-list li::after {
    content: '/';
    margin-left: 10px;
    color: #999;
}

.breadcrumb-list li:last-child::after {
    content: '';
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hide desktop navigation */
    .main-navigation {
        display: none;
    }
    
    /* Header adjustments */
    .header-main-content {
        flex-wrap: wrap;
    }
    
    .site-branding {
        flex: 1;
    }
    
    /* Search form mobile */
    .mega-search-form {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .mega-search-input {
        padding: 20px;
        font-size: 16px;
    }
    
    .mega-search-filters {
        border-left: none;
        border-top: 1px solid #E0E0E0;
        padding: 10px;
        width: 100%;
    }
    
    .mega-search-button {
        padding: 20px;
        border-radius: 0 0 16px 16px;
        width: 100%;
        justify-content: center;
    }
    
    /* Grid adjustments */
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .mega-search-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-social {
        display: none;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.align-items-center { align-items: center; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Skip Link */
.skip-link {
    position: absolute;
    left: -9999px;
}

.skip-link:focus {
    position: absolute;
    left: 6px;
    top: 7px;
    z-index: 999999;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    text-decoration: none;
}