/*
Theme Name: AfriUni
Theme URI: https://wearesalt.agency/CLIENT/afriuni
Author: Your Name
Author URI: 
Description: A custom theme for AfriUni - African Universities Network
Version: 1.0.0
License: GPL v2 or later
Text Domain: afriuni
*/

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

:root {
    --primary-color: #1a3e60;
    --secondary-color: #c49a6c;
    --accent-color: #e67e22;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0;
    font-family: var(--font-serif);
}

.site-title a {
    color: var(--primary-color);
    letter-spacing: 1px;
}

.site-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Slide-out Menu Styles */
.site {
    position: relative;
    overflow-x: hidden;
}

.menu-toggle {
    display: block !important;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

/* Main Menu as Slide-out Drawer */
.main-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen by default */
    width: 85%; /* Mobile default */
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    padding: 80px 2rem 2rem;
    margin: 0;
    list-style: none;
    overflow-y: auto;
    transition: right 0.3s ease-in-out;
    z-index: 1000;
}

.main-menu.open {
    right: 0; /* Slide in */
}

/* Desktop size adjustment */
@media (min-width: 992px) {
    .main-menu {
        width: 30%; /* Desktop width */
        padding: 100px 2.5rem 2.5rem;
    }
}

/* Larger desktop */
@media (min-width: 1400px) {
    .main-menu {
        width: 25%; /* Even larger screens */
    }
}

/* Menu items styling */
.main-menu li {
    margin: 0 0 1rem 0;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    transition-delay: calc(0.05s * var(--item-index, 0));
}

.main-menu.open li {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger animation for menu items */
.main-menu li:nth-child(1) { --item-index: 1; }
.main-menu li:nth-child(2) { --item-index: 2; }
.main-menu li:nth-child(3) { --item-index: 3; }
.main-menu li:nth-child(4) { --item-index: 4; }
.main-menu li:nth-child(5) { --item-index: 5; }
.main-menu li:nth-child(6) { --item-index: 6; }
.main-menu li:nth-child(7) { --item-index: 7; }
.main-menu li:nth-child(8) { --item-index: 8; }
.main-menu li:nth-child(9) { --item-index: 9; }
.main-menu li:nth-child(10) { --item-index: 10; }

.main-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.main-menu a:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Current menu item */
.main-menu .current-menu-item a {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Menu header (optional) */
.main-menu::before {
    content: 'Menu';
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    font-family: var(--font-serif);
}

/* Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Body scroll lock when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Adjust header z-index */
.site-header {
    position: relative;
    z-index: 1001;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .main-menu {
        width: 85%;
        padding: 70px 1.5rem 1.5rem;
    }
    
    .main-menu a {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }
}

/* Optional: Add a subtle pattern or gradient to menu */
.main-menu {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
}
/* Submenu styles */
.main-menu .sub-menu {
    list-style: none;
    padding-left: 1rem;
    margin: 0.5rem 0 0.5rem 1rem;
    border-left: 2px solid var(--secondary-color);
}

.main-menu .sub-menu a {
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

.main-menu .menu-item-has-children {
    position: relative;
}

.main-menu .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    float: right;
    transition: transform 0.2s ease;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5a7a 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero-section h1 {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero-section p {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Country Grid Section */
.countries-section {
    padding: 5rem 0;
    background-color: var(--background-light);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.country-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.country-card:hover {
    transform: translateY(-5px);
}

.country-content {
    padding: 2rem;
    text-align: center;
}

.country-name {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.university-count {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.country-flag {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Universities Section */
.universities-section {
    padding: 5rem 0;
}

.university-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.university-card {
    background: var(--white);
    border: 1px solid #eef2f6;
    border-radius: var(--border-radius);
    padding: 2rem;
    transition: all 0.3s ease;
}

.university-card:hover {
    border-color: var(--secondary-color);
    box-shadow: var(--shadow);
}

.university-logo {
    width: 80px;
    height: 80px;
    background-color: var(--background-light);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
}

.university-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.university-location {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.university-location i {
    margin-right: 0.5rem;
}

/* Events Section */
.events-section {
    padding: 5rem 0;
    background-color: var(--background-light);
}

.event-card {
    display: flex;
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.event-date {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1.5rem;
    text-align: center;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-day {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-details {
    padding: 1.5rem;
    flex: 1;
}

.event-title {
    margin-bottom: 0.5rem;
}

.event-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Publications Section */
.publications-section {
    padding: 5rem 0;
}

.publication-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.publication-card {
    background: var(--white);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.publication-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.publication-authors {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.publication-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Blog Section */
.blog-section {
    padding: 5rem 0;
    background-color: var(--background-light);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-category {
    color: var(--secondary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-excerpt {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
 	background-color: #161616!important;
    color: var(--white);
    padding: 4rem 0 2rem;
}

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

.footer-widget h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

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

.footer-widget li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255,255,255,0.8);
}

.footer-widget a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #b3865a;
    color: var(--white);
}

.btn-outline {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 992px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .hero-section h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: var(--shadow);
    }
    
    .main-menu.active {
        display: flex;
    }
    
    .main-menu li {
        margin: 0;
        text-align: center;
    }
    
    .main-menu a {
        display: block;
        padding: 0.75rem 1rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .hero-section h1 { font-size: 2.5rem; }
    .hero-section { padding: 4rem 0; }
    
    .event-card {
        flex-direction: column;
    }
    
    .event-date {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 15px; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .hero-section h1 { font-size: 2rem; }
    .country-grid { grid-template-columns: 1fr; }
}