/*
Theme Name: Campusinfo
Theme URI: https://Campusinfo.com.ng
Description: A professional School news theme
Author: Folorunsho Taiwo
Author URI: https://Campusinfo.com.ng
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: campusinfo
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

a {
    color: #5b21b6;
    text-decoration: none;
}

a:hover {
    color: #4c1d95;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4, .col-md-8, .col-lg-4, .col-lg-8 {
    position: relative;
    width: 100%;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
    
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

/* Header Styles */
.site-header {
    background-color: #5b21b6;
    color: white;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-main {
    padding: 15px 0;
}

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

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

.site-title a {
    color: white !important;
    text-decoration: none;
}

/* Navigation */
.main-navigation-wrapper {
    background-color: #5b21b6;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-navigation {
    display: flex;
}

.main-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-menu li {
    position: relative;
}

.main-menu a {
    color: white;
    padding: 12px 15px;
    display: block;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
}

.main-menu a:hover {
    background-color: #4c1d95;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    padding: 10px;
    cursor: pointer;
}

/* Content Area */
.site-content {
    padding: 30px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 2px solid #5b21b6;
    padding-bottom: 10px;
}

/* Article Cards */
.article-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #5b21b6;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}

.card-title a {
    color: #333;
}

.card-time {
    font-size: 12px;
    color: #6b7280;
}

/* Featured Grid */
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Advertisement */
.advertisement {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    margin-bottom: 20px;
}

.ad-label {
    display: block;
    font-size: 10px;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Sidebar */
.widget {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid #5b21b6;
    padding-bottom: 10px;
}

/* Popular Posts */
.popular-posts ul {
    list-style: none;
    padding: 0;
}

.popular-posts li {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.popular-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.post-thumbnail {
    width: 70px;
    height: 70px;
    background-size: cover;
    margin-right: 10px;
    border-radius: 4px;
}

.post-title {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
}

/* Footer */
.site-footer {
    background-color: #5b21b6;
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

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

.footer-widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
}

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

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: white;
    opacity: 0.9;
}

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

/* Dark Mode */
.dark-mode {
    background-color: #1a1a1a;
    color: #f3f4f6;
}

.dark-mode .article-card,
.dark-mode .widget,
.dark-mode .advertisement {
    background-color: #2a2a2a;
}

.dark-mode .card-title a,
.dark-mode .widget-title {
    color: #f3f4f6;
}

.dark-mode .site-footer {
    background-color: #3b0764;
}

/* Theme Toggle */
.theme-toggle {
    margin-left: 15px;
}

.theme-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.theme-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255,255,255,0.3);
    border-radius: 24px;
    transition: .4s;
}

.theme-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .theme-toggle-slider:before {
    transform: translateX(26px);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .site-branding {
        margin-bottom: 10px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-menu {
        flex-direction: column;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .row {
        flex-direction: column;
    }
}

/* Enhanced Comment Styles */
.comments-area {
    margin-top: 50px;
    padding: 30px;
    background-color: #f7fafc;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.comments-title {
    font-size: 22px;
    margin: 0;
    color: #1a202c;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.comments-title i {
    margin-right: 10px;
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
}

.comments-sort {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.comments-sort span {
    margin-right: 8px;
    color: #718096;
}

.comment-sort-selector {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.single-comment {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e2e8f0;
}

.single-comment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.comment-body {
    position: relative;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.comment-author {
    display: flex;
    align-items: flex-start;
}

.comment-author img {
    border-radius: 50%;
    margin-right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border: 3px solid white;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
}

.comment-author-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px;
    color: #1a202c;
}

.comment-metadata {
    font-size: 12px;
    color: #718096;
}

.comment-metadata time {
    display: flex;
    align-items: center;
}

.comment-metadata i {
    margin-right: 5px;
}

.comment-actions {
    display: flex;
    align-items: center;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f1f5f9;
    color: #4a5568;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.comment-reply-link:hover {
    background-color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
    color: white;
}

.comment-reply-link i {
    margin-right: 5px;
    font-size: 10px;
}

.comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: #4a5568;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-respond {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.comment-reply-title {
    font-size: 20px;
    margin-bottom: 25px;
    color: #1a202c;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.comment-reply-title i {
    margin-right: 10px;
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
}

.comment-form-field {
    margin-bottom: 20px;
}

.comment-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    display: flex;
    align-items: center;
}

.comment-form-field label i {
    margin-right: 8px;
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 15px;
    transition: all 0.2s ease;
    background-color: white;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form button {
    background-color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.comment-form button:hover {
    background-color: <?php echo esc_attr(get_theme_mod('gistmilinaija_secondary_color', '#4c1d95')); ?>;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.comment-form button i {
    margin-right: 8px;
}

.comment-notes {
    margin-bottom: 20px;
    font-size: 14px;
    color: #718096;
}

/* Comment icon in share menu */
.share-link.comments {
    background-color: #8b5cf6;
}

/* Trending Now Section */
.trending-now-section {
    margin: 50px 0;
    padding: 25px;
    background-color: #f7fafc;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.trending-title {
    font-size: 20px;
    margin: 0;
    color: #1a202c;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.trending-title i {
    margin-right: 10px;
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
}

.trending-view-all {
    font-size: 14px;
    font-weight: 600;
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.trending-view-all i {
    margin-left: 5px;
    transition: transform 0.2s ease;
}

.trending-view-all:hover {
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_secondary_color', '#4c1d95')); ?>;
}

.trending-view-all:hover i {
    transform: translateX(3px);
}

.trending-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trending-post {
    display: flex;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.trending-post:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.trending-post:hover {
    transform: translateX(5px);
}

.trending-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
    color: white;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.trending-post-content {
    flex-grow: 1;
}

.trending-post-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
}

.trending-post-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.trending-post-title a:hover {
    color: <?php echo esc_attr(get_theme_mod('gistmilinaija_primary_color', '#5b21b6')); ?>;
}

.trending-post-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #718096;
}

.trending-post-meta i {
    margin-right: 5px;
}

/* Make trending section appear in sidebar on desktop */
@media (min-width: 992px) {
    .trending-now-section.in-sidebar {
        display: none;
    }
}

/* Dark Mode Support */
body.dark-mode .comments-area,
body.dark-mode .trending-now-section {
    background-color: #2d3748;
}

body.dark-mode .comments-title,
body.dark-mode .comment-author-name,
body.dark-mode .trending-title,
body.dark-mode .comment-reply-title {
    color: #e2e8f0;
}

body.dark-mode .comment-content,
body.dark-mode .comment-metadata,
body.dark-mode .trending-post-meta {
    color: #a0aec0;
}

body.dark-mode .trending-post-title a {
    color: #e2e8f0;
}

body.dark-mode .comment-form input[type="text"],
body.dark-mode .comment-form input[type="email"],
body.dark-mode .comment-form textarea {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .comment-reply-link {
    background-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .trending-post,
body.dark-mode .single-comment {
    border-color: #4a5568;
}

body.dark-mode .trending-header,
body.dark-mode .comments-header,
body.dark-mode .comment-respond {
    border-color: #4a5568;
}

body.dark-mode .comment-sort-selector {
    background-color: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
}