/*
Theme Name: University of Blantyre Synod
Description: A comprehensive WordPress theme for University of Blantyre Synod, featuring custom post types for faculty, programs, events, and a complete administration system with role-based access control.
Version: 1.0.0
Author: University of Blantyre Synod Development Team
Author URI: https://ubs.edu.mw
Tags: education, university, custom-post-types, responsive, accessibility-ready
Text Domain: ubs-university
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

University of Blantyre Synod WordPress Theme
Copyright (C) 2024 University of Blantyre Synod

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

/* 
==============================================
MAIN THEME STYLES - IMPORTS ALL CSS FILES
==============================================
*/
/* 
==============================================
CORE IMPORTS (Required - Load First)
==============================================
*/
@import url('assets/css/header.css');
@import url('assets/css/footer.css');
@import url('assets/css/typography.css');
@import url('assets/css/reset.css');
@import url('assets/css/variables.css');
@import url('assets/css/components.css');
@import url('assets/css/utilities.css');

/* 
==============================================
PAGE-SPECIFIC IMPORTS (Load as needed)
==============================================
*/
@import url('assets/css/home.css');
@import url('assets/css/about.css');
@import url('assets/css/contact.css');
@import url('assets/css/programs.css');
@import url('assets/css/courses.css');
@import url('assets/css/faculty.css');
@import url('assets/css/news.css');
@import url('assets/css/events.css');
@import url('assets/css/gallery.css');
@import url('assets/css/faculties.css');
@import url('assets/css/calendar.css');
@import url('assets/css/student-life.css');
@import url('assets/css/testimonials.css');
@import url('assets/css/portal.css');
/* 
==============================================
RESPONSIVE IMPORTS (Load Last)
==============================================
*/
@import url('assets/css/responsive.css');

/* 

/* WordPress Required Styles */
.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* WordPress Gallery Styles */
.gallery {
    margin-bottom: 1.5em;
}

.gallery-item {
    display: inline-block;
    text-align: center;
    vertical-align: top;
    width: 100%;
}

.gallery-columns-2 .gallery-item {
    max-width: 50%;
}

.gallery-columns-3 .gallery-item {
    max-width: 33.33%;
}

.gallery-columns-4 .gallery-item {
    max-width: 25%;
}

.gallery-columns-5 .gallery-item {
    max-width: 20%;
}

.gallery-columns-6 .gallery-item {
    max-width: 16.66%;
}

.gallery-columns-7 .gallery-item {
    max-width: 14.28%;
}

.gallery-columns-8 .gallery-item {
    max-width: 12.5%;
}

.gallery-columns-9 .gallery-item {
    max-width: 11.11%;
}

.gallery-caption {
    display: block;
}

/* WordPress Comment Styles */
.comment-content a {
    word-wrap: break-word;
}

.bypostauthor {
    display: block;
}

/* Sticky Post Styles */
.sticky {
    display: block;
}

/* Print Styles */
@media print {
    .no-print,
    .site-header,
    .site-footer,
    .sidebar,
    .comment-form,
    .nav-links {
        display: none !important;
    }
}


/* ----------------------------------------------
1. General Sidebar & Widget Container
----------------------------------------------
*/
.widget-area { /* A common class for the <aside> or sidebar container */
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(44, 90, 160, 0.1);
    transition: all 0.3s ease;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.global .widget-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 24px 0; /* Adjusted margin */
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    position: relative;
}

.global .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-gradient);
}


/* ----------------------------------------------
2. List-Based Widgets (Categories, Archives, Recent Posts)
----------------------------------------------
*/
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 12px 0;
    border-bottom: 1px solid var(--light-color);
    transition: all 0.2s ease;
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li:first-child {
    padding-top: 0;
}

.widget ul li a {
    color: var(--dark-light);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.widget ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* For widgets that show post counts (Categories, Archives) */
.widget ul li .count {
    background-color: var(--light-color);
    color: var(--dark-light);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    transition: all 0.2s ease;
}

.widget ul li a:hover .count {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Specifically for Recent Posts widget */
.widget_recent_entries .post-date {
    display: block;
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}


/* ----------------------------------------------
3. Search Widget
----------------------------------------------
*/
.widget_search .search-form {
    margin-bottom: 0;
}

.widget_search .search-field {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: var(--border-radius-md);
    background-color: var(--light-color);
    font-size: 15px;
    transition: all 0.3s ease;
}

.widget_search .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.15);
}

.widget_search .search-submit {
    display: none; /* Hides the default button, assuming you use a search block or a more custom form */
}


/* ----------------------------------------------
4. Tag Cloud Widget
----------------------------------------------
*/
.widget_tag_cloud .tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.widget_tag_cloud .tagcloud a {
    padding: 6px 14px;
    background: var(--light-color);
    color: var(--dark-light);
    text-decoration: none;
    border-radius: var(--border-radius-full);
    font-size: 14px !important; /* Override default inline font sizes */
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, #e0e0e0);
}

.widget_tag_cloud .tagcloud a:hover {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: transparent;
    transform: translateY(-2px);
}


/* ----------------------------------------------
5. Calendar Widget
----------------------------------------------
*/
.widget_calendar #calendar_wrap {
    text-align: center;
}

.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
}

.widget_calendar caption {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark-color);
    padding: 10px;
    background: var(--light-color);
    border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.widget_calendar th,
.widget_calendar td {
    padding: 8px;
    text-align: center;
}

.widget_calendar th {
    font-weight: 600;
    color: var(--dark-light);
}

.widget_calendar tbody td {
    border: 1px solid var(--light-color);
}

.widget_calendar #today {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 700;
    border-radius: 50%;
}

.widget_calendar tbody a {
    display: block;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    font-weight: 700;
    text-decoration: none;
}

.widget_calendar #prev,
.widget_calendar #next {
    padding: 10px;
}

.widget_calendar #prev a,
.widget_calendar #next a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
}

/* 
==============================================
SCROLL PROGRESS BAR
==============================================
*/
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary-color);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* 
==============================================
BACK TO TOP BUTTON
==============================================
*/
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.back-to-top i {
    font-size: 16px;
}

/* 
==============================================
LIGHTBOX
==============================================
*/
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 
==============================================
FORM VALIDATION STYLES
==============================================
*/
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2328a745'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc3545'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* 
==============================================
ANIMATION CLASSES
==============================================
*/
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}


/* 
==============================================
FACULTY FILTER STYLES
==============================================
*/
.faculty-filter {
    display: inline-block;
    padding: 8px 16px;
    margin: 4px;
    background: var(--light-color);
    color: var(--dark-color);
    text-decoration: none;
    border-radius: var(--border-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faculty-filter:hover,
.faculty-filter.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    text-decoration: none;
}

/* 
==============================================
STATISTICS ANIMATION
==============================================
*/
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

/* 
==============================================
TESTIMONIAL SLIDER FIXES
==============================================
*/
.testimonial-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.testimonial-slides {
    position: relative;
    min-height: 300px;
    overflow: hidden;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-slide.active {
    opacity: 1;
    position: relative;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
}

.slider-prev,
.slider-next {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: var(--shadow-sm);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem;
    background: var(--light-color);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--dark-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active,
.slider-dot:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* 
==============================================
RESPONSIVE FIXES
==============================================
*/
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -30px;
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .testimonial-slide {
        padding: 2rem 1.5rem;
    }
    
    .slider-prev,
    .slider-next {
        width: 40px;
        height: 40px;
    }
    
    .slider-controls {
        padding: 0 0.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* 
==============================================
UTILITY CLASSES
==============================================
*/
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}

.overflow-hidden {
    overflow: hidden;
}

.position-relative {
    position: relative;
}

.z-index-high {
    z-index: 999;
}

/* 
==============================================
HOVER EFFECTS
==============================================
*/
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonials-cta {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}