/*
Theme Name: BuniHub
Theme URI: https://example.com/bunihub
Author: Daniel Ogutu
Author URI: https://example.com
Description: A modern WordPress theme with customizable headers and sliders.
Version: 1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bunihub
Tags: custom-header, custom-menu, featured-images, translation-ready
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --title-color: #222222;
    --widget-text-color: #333333;
    --widget-title-color: #222222;
    --link-color: #0073aa;
    --widget-title-size: 18px;
    --widget-text-size: 14px;
    --link-size: 14px;
    --top-header-bg: #f8f9fa;
    --menu-bg: #ffffff;
    --footer-bg: #2c3e50;
    --footer-text-color: #bdc3c7;
    --social-icons-color: #bdc3c7;
    --widget-bg-color: #f8f9fa;
}

/* Top Header - EQUAL WIDTH SECTIONS */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    background: var(--top-header-bg);
    border-bottom: 1px solid #eaeaea;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Equal width for all 5 sections */
.logo-section,
.contact-section,
.search-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-section {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    white-space: nowrap;
}

.contact-item i {
    color: #0073aa;
}

/* Modern Search Form */
.search-section {
    position: relative;
    justify-content: flex-end;
}

.search-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    background: #f0f0f0;
    color: #0073aa;
}

.search-form-container {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 15px;
    min-width: 300px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-form-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-form-container .search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-form-container input[type="search"] {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    min-width: 250px;
}

.search-form-container input[type="search"]:focus {
    border-color: #0073aa;
}

.search-form-container button[type="submit"] {
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.search-form-container button[type="submit"]:hover {
    background: #005a87;
}

.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-close {
    display: none;
    background: none;
    border: none;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* Main Navigation Header */
.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    background: var(--menu-bg);
    border-bottom: 1px solid #eaeaea;
}

.menu-section {
    flex: var(--menu-width, 3);
}

.social-section {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #333;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: #0073aa;
}

/* Primary Menu */
.primary-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.primary-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.primary-menu li a:hover {
    color: #0073aa;
}

/* Slider */
.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    max-width: 50%;
}

.slide-title {
    font-size: var(--slider-title-size, 48px);
    font-weight: bold;
    margin-bottom: var(--slider-title-spacing, 15px);
}

.slide-subtitle {
    font-size: var(--slider-subtitle-size, 24px);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.3s;
}

.slider-nav:hover {
    background: rgba(0,0,0,0.8);
}

.prev-slide {
    left: 0;
}

.next-slide {
    right: 0;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* Page Header Banner */
.page-header-banner {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.page-header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.page-title {
    position: relative;
    color: white;
    font-size: 48px;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Main Content Layout */
.main-content {
    display: flex;
    gap: 30px;
    padding: 40px 0;
}

.content-area {
    flex: 2;
}

.widget-area {
    flex: 1;
}

.widget-area.left {
    order: -1;
}

.widget-area.right {
    order: 1;
}

.widget {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--widget-bg-color);
    border-radius: 8px;
}

.widget-title {
    color: var(--widget-title-color);
    font-size: var(--widget-title-size);
    margin-bottom: 15px;
    font-weight: bold;
}

.widget-content {
    color: var(--widget-text-color);
    font-size: var(--widget-text-size);
}

.widget-content a {
    color: var(--link-color);
    font-size: var(--link-size);
    text-decoration: none;
}

.widget-content a:hover {
    text-decoration: underline;
}

/* Content Styles */
.entry-title {
    color: var(--title-color);
    margin-bottom: 20px;
}

.entry-content {
    color: var(--text-color);
    line-height: 1.8;
}

.entry-content a {
    color: var(--link-color);
    text-decoration: none;
}

.entry-content a:hover {
    text-decoration: underline;
}

/* NEW CUSTOMIZABLE FOOTER */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text-color);
    padding: 60px 0 30px;
}

.footer-container {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.footer-column {
    display: table-cell;
    vertical-align: top;
    padding: 0 20px;
    border: none;
}

.footer-column:first-child {
    padding-left: 0;
}

.footer-column:last-child {
    padding-right: 0;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

.footer-contact-info {
    line-height: 1.8;
}

.footer-contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact-info i {
    width: 16px;
    text-align: center;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-menu ul li {
    margin-bottom: 10px;
}

.footer-menu ul li a {
    color: var(--footer-text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-menu ul li a:hover {
    color: #3498db;
}

.footer-social .social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.footer-social .social-icons a {
    color: var(--social-icons-color);
    font-size: 20px;
    transition: color 0.3s;
}

.footer-social .social-icons a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    color: var(--footer-text-color);
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .main-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .slide-content {
        max-width: 80%;
        left: 10%;
    }
    
    .slide-title {
        font-size: 32px;
    }
    
    .slide-subtitle {
        font-size: 18px;
    }
    
    /* Mobile search improvements */
    .search-form-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        margin-top: 0;
        border-radius: 0;
        min-width: auto;
        padding: 20px;
        background: #f8f9fa;
    }
    
    .search-form-container .search-form {
        flex-direction: row;
    }
    
    .search-form-container input[type="search"] {
        min-width: auto;
        flex: 1;
    }
    
    .search-close {
        display: block;
    }
    
    .search-overlay {
        display: none;
    }
    
    /* Stack footer columns vertically on mobile */
    .footer-container {
        display: block;
    }
    
    .footer-column {
        display: block;
        width: 100%;
        padding: 0;
        margin-bottom: 30px;
    }
    
    .footer-column:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .footer-column {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .slide-content {
        max-width: 90%;
        left: 5%;
    }
    
    .slide-title {
        font-size: 24px !important;
    }
    
    .slide-subtitle {
        font-size: 16px !important;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .search-form-container {
        padding: 15px;
    }
    
    .search-form-container input[type="search"] {
        padding: 10px 15px;
        font-size: 16px;
    }
}