/* Import text fixes */
@import url('text-fix.css');

/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1a5d1a;
    --primary-color-rgb: 26, 93, 26;
    --secondary-color: #3a9b3a;
    --accent-color: #f2c94c;
    --accent-color-rgb: 242, 201, 76;
    --light-color: #f9fbf7;
    --dark-color: #2c3e50;
    --transition: all 0.3s ease;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    opacity: 1;
    visibility: visible;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.spinner-inner {
    width: 100%;
    height: 100%;
    border: 4px solid rgba(242, 201, 76, 0.2);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Additional styles for enhanced design */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.courses-container, .about-container, .contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar.scrolled {
    background: rgba(26, 93, 26, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure no unwanted gaps between sections */
section {
    margin: 0;
    padding: 80px 0;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    display: flex;
    align-items: center;
    padding: 0 5%;
    height: 80px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    text-transform: lowercase;
}

.Africa{
    text-transform: uppercase;
}

.navbar .logo {
    display: flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 40px;
}

.navbar .logo span {
    font-size: 0.95rem;
    animation: colorChange 4s infinite;

}

@keyframes colorChange {
    0% { color: white; }
    50% { color: #ff3333; }
    100% { color: white; }
}

.navbar .logo-img {
    height: 50px;
    width: auto;
    margin-right: 15px;
    border-radius: 5px;
    object-fit: contain;
}

.navbar nav {
    flex: 1;
}

.navbar ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

.navbar li {
    margin: 0 18px;
    position: relative;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 0;
    display: inline-block;
}

.navbar a:hover, .navbar a.active {
    color: var(--accent-color);
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.navbar a:hover::after, 
.navbar a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 200;
}

/* Ensure sections have consistent spacing */
section {
    padding: 80px 5%;
    margin: 0;
    position: relative;
}

/* Hero Section */
.hero {
    height: 80vh;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8%;
    position: relative;
    overflow: hidden;
}

/* Slideshow */
.slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-slide:first-child {
    opacity: 1;
}

.slideshow-slide.active {
    opacity: 1;
}


.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: none;
}

.hero-content {
    max-width: 60%;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 10;
}

.hero-text {
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.year-highlight {
    position: relative;
    display: inline-block;
    z-index: 1;
    color: var(--accent-color);
    font-weight: 800;
}

.year-highlight:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 6px;
    width: 100%;
    background-color: var(--accent-color);
}

.hero p {
    font-size: 1.2rem;
    margin: 25px 0;
    font-weight: 300;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
}

.btn-accent {
    background: var(--accent-color);
    color: var(--dark-color);
}

.btn-accent:hover {
    background: #e6b937;
}

.hero-btn {
    padding: 15px 30px;
    font-weight: 700;
    font-size: 1rem;
    margin-right: 20px;
    letter-spacing: 1.5px;
    border-radius: 2px;
}

/* Scholarship Badge */
.scholarship-badge {
    background: rgba(148, 87, 235, 0.85);
    border-radius: 50%;
    width: 300px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.badge-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85em; /* Global size reduction for all badge content */
}

.badge-header {
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.scholarship-badge ul {
    list-style: none;
    padding: 0;
    margin: 0 0 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.hidden {
    display: none;
}

.scholarship-badge li {
    margin: 2px 0;
}

.badge-highlight {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1.1;
    margin: 4px 0;
}

.badge-details {
    font-size: 0.65rem;
    margin: 4px 0;
    line-height: 1.3;
    font-weight: 500;
    text-align: center;
}

.badge-details-small {
    font-size: 0.6rem;
    margin: 2px 0;
    line-height: 1.2;
}

.badge-deadline {
    font-size: 0.6rem;
    margin: 4px 0;
}

.badge-button {
    background: white;
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.65rem;
    text-decoration: none;
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
}

.badge-button i {
    margin-left: 5px;
    font-size: 0.6rem;
}

/* Sections */
section {
    padding: 80px 5%;
}

section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Media Queries */
@media (max-width: 768px) {
    .navbar {
        padding: 0 20px;
    }
    
    .mobile-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .navbar nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--primary-color);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: -5px 0 15px rgba(0,0,0,0.15);
    }
    
    .navbar nav.show {
        right: 0;
    }
    
    .navbar ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 20px;
    }
    
    .navbar li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }
    
    .hero {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
        justify-content: center;
        height: auto;
        min-height: 70vh;
        max-height: 80vh;
    }
    
    .slideshow-slide {
        background-position: top center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
        text-align: center;
        z-index: 1;
    }
    
    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .scholarship-badge {
        width: 200px;
        height: 200px;
        padding: 10px;
        z-index: 1;
        margin-top: 20px;
        position: static;
        transform: none;
        display: none;
    }
    
    .badge-highlight {
        font-size: 1.3rem;
    }
    
    .badge-details, .badge-deadline {
        font-size: 0.6rem;
        margin: 3px 0;
    }
    
    .badge-details-small {
        font-size: 0.58rem;
        line-height: 1.2;
    }
    
    .scholarship-badge ul {
        font-size: 0.6rem;
        margin-bottom: 5px;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-btn {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
        line-height: 1.2;
        padding: 0 5px;
    }
    
    .scholarship-badge {
        width: 180px;
        height: 180px;
        padding: 8px;
        position: static;
        transform: none;
        display: none;
    }
    
    .badge-content {
        transform: scale(0.95);
    }
    
    .badge-highlight {
        font-size: 1.2rem;
    }
    
    .badge-details-small {
        font-size: 0.55rem;
        line-height: 1.1;
    }
    
    .badge-button {
        padding: 4px 8px;
        font-size: 0.6rem;
        margin-top: 4px;
    }
}

@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.4rem;
    }
    
    .year-highlight {
        font-size: 0.9em;
    }
    
    .scholarship-badge {
        width: 210px;
        height: 210px;
        padding: 8px;
    }
}