/* Optimized CSS for Teacher.co.ke - Only Essential Styles */

/* Base Styles */
:root {
  --publisher-system-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif;
  --publisher-primary-color: #0080ce;
}

body {
  font: 14px/1.7 'Lato', sans-serif;
  color: #5f6569;
  background: #fff;
}

/* Essential Typography */
h1, h2, h3, h4, h5, h6 {
  color: #2D2D2D;
  line-height: 1.3;
}

h1 { font-size: 34px; }
h2 { font-size: 30px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 17px; }
h6 { font-size: 15px; }

/* Essential Layout */
.container, .content-wrap, .main-wrap {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Your Specific Header Style Only */
.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
}

/* Essential Menu Styles (no animations) */
.main-menu > li {
  float: left;
  margin-right: 10px;
}

.main-menu > li > a {
  line-height: 48px;
  display: inline-block;
  padding: 0 12px;
  color: #333;
  text-decoration: none;
}

.main-menu > li > a:hover {
  color: #0080ce;
}

/* Essential Post Listing Styles */
.listing-item {
  margin-bottom: 30px;
}

.listing-item .title {
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 10px;
}

.listing-item .title a {
  color: #2D2D2D;
  text-decoration: none;
}

.listing-item .title a:hover {
  color: #0080ce;
}

/* Essential Image Styles */
.img-holder {
  position: relative;
  display: block;
  margin-bottom: 15px;
}

.img-holder img {
  width: 100%;
  height: auto;
}

/* Essential Responsive */
@media (max-width: 768px) {
  .container, .content-wrap {
    padding: 0 15px;
  }
  
  .main-menu > li {
    display: block;
    float: none;
  }
}

/* Essential Post Meta */
.post-meta {
  color: #8b8b8b;
  font-size: 13px;
  margin-bottom: 10px;
}

/* Essential Sidebar */
.sidebar {
  margin-top: 30px;
}

/* Essential Footer */
.site-footer {
  background: #f8f8f8;
  padding: 30px 0;
  margin-top: 50px;
}

/* Add these to your optimized-style.css file */

/* Layout Structure */
.layout-2-col {
  display: flex;
  flex-wrap: wrap;
}

.layout-2-col .content-column {
  width: 67%;
  padding-right: 20px;
}

.layout-2-col .sidebar-column {
  width: 33%;
}

@media (max-width: 768px) {
  .layout-2-col .content-column,
  .layout-2-col .sidebar-column {
    width: 100%;
    padding-right: 0;
  }
}

/* Header Styles (specific to your header style) */
.header-style-1 .header-inner {
  padding: 20px 0;
}

.site-branding {
  float: left;
}

.site-branding img {
  max-height: 80px;
}

/* Post Grid Layout */
.listing.listing-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.listing-grid .listing-item {
  width: 33.333%;
  padding: 0 15px;
  margin-bottom: 25px;
}

@media (max-width: 768px) {
  .listing-grid .listing-item {
    width: 50%;
  }
}

@media (max-width: 480px) {
  .listing-grid .listing-item {
    width: 100%;
  }
}

/* Post Thumbnail Grid */
.listing-thumbnail .listing-item {
  display: flex;
  margin-bottom: 15px;
}

.listing-thumbnail .img-holder {
  width: 80px;
  margin-right: 10px;
  margin-bottom: 0;
}

.listing-thumbnail .title {
  font-size: 14px;
  margin-bottom: 5px;
}

/* Section Headings */
.section-heading {
  margin-bottom: 25px;
  border-bottom: 3px solid #eee;
  position: relative;
}

.section-heading .h-text {
  display: inline-block;
  padding: 5px 15px 5px 0;
  position: relative;
  font-size: 18px;
  font-weight: bold;
}

.section-heading .h-text:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 3px;
  background: var(--publisher-primary-color);
}

/* Pagination */
.bs-pagination {
  margin: 25px 0;
  text-align: center;
}

.bs-pagination .page-numbers {
  display: inline-block;
  padding: 5px 12px;
  margin: 0 3px;
  border: 1px solid #e2e2e2;
  color: #333;
  text-decoration: none;
}

.bs-pagination .page-numbers.current {
  background: var(--publisher-primary-color);
  color: #fff;
  border-color: var(--publisher-primary-color);
}

/* Widgets */
.sidebar .widget {
  margin-bottom: 30px;
  border: 1px solid #eee;
  padding: 15px;
  background: #f9f9f9;
}

.widget .widget-title {
  font-size: 16px;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

/* =================================================================
   HEADER, LOGO, AND NAVIGATION STYLES
   ================================================================= */

/* --- Header Layout --- */
.site-header .header-inner .container {
    display: flex;
    justify-content: space-between; /* Pushes logo to the left and nav to the right */
    align-items: center; /* Vertically aligns logo and nav */
    padding: 10px 0;
}

/* --- Logo Styling --- */
.site-branding .custom-logo {
    max-height: 60px; /* Adjust this value to your logo's desired height */
    width: auto;
    display: block;
}

.site-title a {
    font-size: 24px;
    font-weight: bold;
    color: #222;
    text-decoration: none;
}

/* --- Main Navigation Styling --- */
.main-navigation ul.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Aligns menu items horizontally */
    flex-wrap: wrap;
}

.main-navigation .main-menu li {
    position: relative;
    margin-left: 15px; /* Space between menu items */
}

.main-navigation .main-menu a {
    display: block;
    padding: 15px 10px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 14px;
    transition: color 0.2s;
}

.main-navigation .main-menu a:hover,
.main-navigation .main-menu .current-menu-item > a {
    color: #0080ce; /* Primary color for hover/active */
}


/* =================================================================
   FOOTER NAVIGATION & WIDGET STYLES
   ================================================================= */

/* --- Footer Layout & Widgets --- */
.site-footer {
    background: #222;
    color: #aaa;
    padding: 40px 0 20px;
    font-size: 14px;
}

.site-footer .footer-widgets .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    padding-bottom: 20px;
}

.site-footer .footer-widgets .col-sm-4 {
    width: 33.33%;
    padding: 0 15px;
}

.site-footer .footer-widgets .widget {
    margin-bottom: 20px;
}

.site-footer .widget-title {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer ul li {
    margin-bottom: 8px;
}

.site-footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #fff;
}


/* --- Footer Copyright --- */
.footer-copy {
    border-top: 1px solid #444;
    padding-top: 20px;
    text-align: center;
    color: #888;
}

/* --- Mobile Menu (Simple Stacked) --- */
@media (max-width: 768px) {
    .site-header .header-inner .container {
        flex-direction: column; /* Stack logo and nav on top of each other */
    }

    .main-navigation {
        width: 100%;
        margin-top: 15px;
    }

    .main-navigation ul.main-menu {
        justify-content: center; /* Center the menu items */
    }

    .site-footer .footer-widgets .col-sm-4 {
        width: 100%;
        margin-bottom: 30px;
    }
}