/*
Theme Name: SchoolGist
Theme URI: https://schoolgist.ng
Author: SchoolGist Team
Author URI: https://schoolgist.ng
Description: A lightweight, SEO-optimized WordPress theme designed for educational content, scholarships, jobs, and grants. Features include customizable colors, strategic ad placements, and mobile-first responsive design.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: schoolgist
Tags: blog, education, news, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready, rtl-language-support, responsive-layout, accessibility-ready

SchoolGist is a modern, lightweight WordPress theme optimized for educational websites.
*/

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-main: #f5f5f5;
    --background-content: #ffffff;
    --border-color: #e0e0e0;
    --header-text: #2c3e50;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

body {
    font-family: var(--font-main);
    font-size: 18px; /* 16px */
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Header Styles */
.site-header {
    background-color: var(--primary-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo a {
    font-size: 24px;
    font-weight: bold;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.logo-school {
    color: #2c3e50;
}

.logo-gist {
    color: #1a1a1a;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

.main-navigation a {
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-navigation a:hover {
    color: #2c3e50;
}

.search-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
}

/* Search Form */
.search-form-wrapper {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    min-width: 300px;
}

.search-form-wrapper.active {
    display: block;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

/* Main Content Area */
.site-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: 90vh;
}

/* Ad Banner */
.ad-banner {
    /* background-color: #5a5a5a; */
    /* color: #ffffff; */
    text-align: center;
    /* padding: 60px 20px; */
    margin-bottom: 20px;
    /* border-radius: 4px; */
}

/* .ad-banner h2 {
    font-size: 24px;
} */

/* Featured Categories Section */
.featured-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.category-section {
    background: var(--background-content);
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.category-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Post Card Styles */
.post-card {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    overflow: hidden;
    border-radius: 4px;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-title {
    font-size: 18px; /* 16px */
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.post-title a {
    color: var(--text-dark);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-meta {
    font-size: 12px;
    color: var(--text-light);
}

.apply-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 8px;
}

.apply-button:hover {
    background-color: var(--primary-dark);
    color: #ffffff;
}

/* Latest Posts Section */
.latest-posts-section {
    background: var(--background-content);
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.latest-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* gap: 30px; */
    column-gap: 30px;
    margin-top: 20px;
}

.load-more-wrapper {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 12px 40px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background-color: var(--primary-dark);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Single Post Styles */
.single-post-header {
    background: var(--background-content);
    padding: 40px;
    border-radius: 4px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.single-post-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.post-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-info h4 {
    font-size: 16px;
    margin-bottom: 2px;
}

.author-info p {
    font-size: 13px;
    color: var(--text-light);
}

.social-share {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.social-share a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-main);
    color: var(--text-dark);
    font-size: 14px;
}

.social-share a:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.single-post-content {
    background: var(--background-content);
    padding: 40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.single-post-content h2 {
	margin-top: 0.8em;
}
.single-post-content h3 {
	margin-top: 0.4em;
}

/* Footer */
.site-footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 20px;
    /* padding: 30px 20px; */
    /* margin-top: 50px; */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-menu {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    /* margin-bottom: 20px; */
}

.footer-menu ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.footer-menu a {
    color: #ffffff;
    font-size: 14px;
}

.footer-copyright {
    text-align: center;
    font-size: 14px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .main-navigation ul.active {
        display: flex;
    }
    
    .main-navigation li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 10px 0;
    }
    
    .featured-categories {
        grid-template-columns: 1fr;
    }
    
    .latest-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post-header {
        padding: 25px;
    }
    
    .single-post-title {
        font-size: 24px;
    }
    
    .single-post-content {
        padding: 25px;
    }
    
    .footer-menu ul {
        flex-direction: column;
        /* gap: 15px; */
        text-align: center;
    }
}

@media (max-width: 480px) {
    .post-card {
        gap: 12px;
    }
    
    .post-thumbnail {
        width: 100px;
        height: 75px;
    }
    
    .post-title {
        font-size: 16px;
    }
    
    .header-container {
        padding: 12px 15px;
    }
    
    .site-content {
        padding: 20px 10px !important;
        /* padding: 20px 15px; */
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Accessibility */
.screen-reader-text {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .ad-banner,
    .social-share,
    .load-more-wrapper,
    .inline-read-more,
    #adblocker-overlay {
        display: none;
    }
}

/* Inline Read More */
.inline-read-more {
    background: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.inline-read-more:hover {
    transform: translateX(5px);
}

.inline-read-more h3 a {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.inline-read-more h3 a:hover {
    color: var(--primary-color);
}

/* Pagination Styles */
.pagination {
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 20px;
    background: var(--background-main);
    color: var(--text-dark);
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.pagination .current {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.pagination .dots {
    border: none;
    background: transparent;
}

.nav-links .page-numbers:not(.prev):not(.next) {
    display: none;
}

/* AdBlocker Overlay */
#adblocker-overlay {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* === ADDED BY ME === */

ul, ol {
  margin: 0 0 1em 1em;
  padding-left: 0.5em;
  list-style-type: disc;
}

ul li, ol li {
  margin: 0.4em 0;
}

/* Nested ULs */
ul ul {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  margin-left: 0.5em;
  list-style-type: circle;
}

ul ul ul {
  list-style-type: square;
}

/* Base table styling */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Table header */
thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  background-color: #f3f4f6;
  font-weight: 600;
  border-bottom: 2px solid #e5e7eb;
}

/* Table body cells */
tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Zebra striping */
tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

tbody tr:hover {
  background-color: #eef2ff;
}

/* Responsive handling */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prevent text from forcing layout breaks */
td,
th {
  white-space: nowrap;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  thead {
    font-size: 0.85rem;
  }

  tbody td {
    padding: 0.5rem 0.75rem;
  }
}