/* --- CSS Variables and Global Styles --- */
:root {
    --primary-color: #EC368F;
    --secondary-color: #3E4095;
    --dark-color: #021e40;
    --light-color: #ffffff;
    --text-color: #4c4d56;
    --heading-color: #0e0e0e;
    --bg-light-gray: #f8f9fa;
    --border-color: #ebebeb;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-family); color: var(--text-color); line-height: 1.7; background-color: var(--light-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
h1, h2, h3, h4 { color: var(--heading-color); line-height: 1.3; font-weight: 700; }
h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; transition: color var(--transition-speed) ease; }
a:hover { color: var(--secondary-color); }
img { max-width: 100%; height: auto; display: block; }

.btn { display: inline-block; padding: 0.8rem 1.8rem; border-radius: 5px; font-weight: 600; text-align: center; transition: all var(--transition-speed) ease; border: none; cursor: pointer; }
.btn-primary { background: linear-gradient(145deg, var(--primary-color), var(--secondary-color)); color: var(--light-color); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); color: var(--light-color); }
.btn-secondary { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: var(--light-color); }

.section-title { color: var(--dark-color); }
.text-center { text-align: center; }
section { padding: 5rem 0; }

/*Header & Navigation*/
.site-header { background-color: var(--light-color); box-shadow: var(--shadow); position: sticky; top: 0; width: 100%; z-index: 1000; }
.main-nav .container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.nav-logo img { max-height: 50px; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 2rem; }
.nav-links a { color: var(--heading-color); font-weight: 600; padding: 1.5rem 0; position: relative; display: flex; align-items: center; gap: 0.3rem; }
.nav-links li.active > a, .nav-links li.current-page > a { color: var(--primary-color); }
.nav-links > li > a::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; background-color: var(--primary-color); transition: all var(--transition-speed) ease-out; transform: translateX(-50%); }
.nav-links > li > a:hover::after, .nav-links li.active > a::after { width: 100%; left: 0; transform: translateX(0); }
.nav-links .dropdown > a i { font-size: 0.8em; transition: transform var(--transition-speed) ease; }

/* Desktop Dropdown Menu */
.dropdown { position: relative; }
.submenu { display: none; position: absolute; top: 100%; left: 0; background-color: var(--light-color); box-shadow: var(--shadow); list-style: none; padding: 0.5rem 0; min-width: 240px; border-radius: 5px; opacity: 0; transform: translateY(10px); transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease; z-index: 1001; }
.dropdown:hover .submenu { display: block; opacity: 1; transform: translateY(0); }
.dropdown:hover > a i { transform: rotate(180deg); }
.submenu li a { padding: 0.75rem 1.5rem; width: 100%; display: block; font-weight: 500; }
.submenu li a::after { display: none; }
.submenu li a:hover { background-color: var(--bg-light-gray); color: var(--primary-color); }

.nav-apply-btn { margin-left: 1rem; }
/* .hamburger to .nav-toggle to hide button on desktop */
.nav-toggle { display: none; font-size: 1.5rem; background: none; border: none; color: var(--dark-color); cursor: pointer; }


/* --- Hero Section --- */
.hero-section {
    padding: 0;
    position: relative;
    height: 90vh;
    color: var(--light-color);
}
.hero-swiper {
    width: 100%;
    height: 100%;
}
.hero-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 30, 64, 0.6);
}
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 1rem;
}
.hero-subtitle {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.hero-title {
    color: var(--light-color);
    font-size: 3.5rem;
    font-weight: 800;
}
.hero-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
    opacity: 0.9;
}
.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: var(--light-color);
}
.hero-swiper .swiper-pagination-bullet-active {
    background: var(--primary-color);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-color);
    color: #c0c0c0;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}


/* --- Events Page Styles --- */
.events-section {
    background-color: var(--bg-light-gray);
    padding: 4rem 0 5rem;
}

.events-category {
    margin-bottom: 4rem;
}

.events-category-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 2.5rem;
    position: relative;
}

.events-category-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
}

.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.event-card {
    background: var(--light-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.event-date {
    flex: 0 0 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--light-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}

.event-date .month {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.8;
}

.event-date .day {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.event-content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.event-meta i {
    color: var(--primary-color);
}

.event-description {
    margin-bottom: 1rem;
    flex-grow: 1;
}

.event-content .btn {
    align-self: flex-start;
}

.past-events .event-card {
    opacity: 0.8;
}

.past-events .event-content {
    filter: grayscale(30%);
}

.past-events .btn.disabled {
    background: #ccc;
    color: #777;
    cursor: not-allowed;
}
.past-events .btn.disabled:hover {
    transform: none;
    box-shadow: none;
}


/*Responsive Styles*/

/* ---------- Large Tablets and Small Desktops (≤1024px) ---------- */
@media (max-width: 1024px) {
    .trainings-grid, .news-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Tablets and Large Phones (≤768px) ---------- */
@media (max-width: 768px) {
    html { font-size: 16px; }
    h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
    section { padding: 3rem 0; }
    .hero-title { font-size: 2.6rem; }
    .header-top-bar { display: none; }
    .main-nav .container { height: 70px; }
    .nav-toggle { display: block; z-index: 1001; }
    .nav-apply-btn { display: none; }

    /*MOBILE NAVIGATION LOGIC*/
    .nav-links {
        display: block; position: fixed; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px);
        background-color: var(--dark-color); flex-direction: column; align-items: flex-start;
        gap: 0; padding: 2rem 0; transform: translateX(100%); transition: transform 0.35s ease-in-out;
        overflow-y: auto; z-index: 1000;
    }
    .nav-links.active { transform: translateX(0); }
    .nav-links li { width: 100%; }
    .nav-links a { color: var(--light-color); font-size: 1.1rem; padding: 1rem 2rem; width: 100%; display: flex; justify-content: space-between; align-items: center; }
    .nav-links a:hover { background-color: rgba(255, 255, 255, 0.05); }
    .nav-links > li > a::after { display: none; } 
    .nav-links .dropdown > a > i { display: none; }

    /* Add a dropdown arrow icon to parent links */
    .dropdown > a::after { content: '▼'; font-size: 0.8em; font-weight: bold; transition: transform var(--transition-speed) ease; }
    .dropdown.open > a::after { transform: rotate(180deg); }
    
    /* Hide the submenu by default and prepare for animation */
    .dropdown .submenu {
        display: none; position: static; opacity: 1; transform: none; box-shadow: none;
        background-color: rgba(0, 0, 0, 0.2); padding: 0; min-width: 100%; border-radius: 0;
        max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out;
    }
    
    /* Show the submenu when the parent li has the .open class */
    .dropdown.open > .submenu { display: block; max-height: 500px; }
    
    /* Style for items inside the mobile submenu */
    .dropdown .submenu li a { padding-left: 3rem; font-size: 1rem; font-weight: 400; color: #e0e0e0; }

    /* Other Mobile Layouts*/
    .about-content { grid-template-columns: 1fr; }
    .about-text { text-align: center; }
    .about-video { margin-top: 2rem; }
    .stats-section .container { grid-template-columns: 1fr 1fr; gap: 3rem 1rem; }
    .news-grid, .footer-grid { grid-template-columns: 1fr; }
    .footer-widget { text-align: center; }
    .widget-title::after { left: 50%; transform: translateX(-50%); }
    .footer-social { justify-content: center; }
}

/* ---------- Small Phones (≤480px) ---------- */
@media (max-width: 480px) {
    html { font-size: 15px; }
    .hero-title { font-size: 2.2rem; }
    .hero-text { font-size: 1rem; }
    .stats-section .container { grid-template-columns: 1fr; }
    .nav-links { gap: 1.25rem; }
    .nav-links a { font-size: 1.1rem; padding: 0.6rem 1rem; }
}


/* Responsive adjustments for Events page */
@media (max-width: 768px) {
    .event-card {
        flex-direction: column;
    }
    .event-date {
        flex-direction: row;
        gap: 1rem;
        flex: 0 0 auto;
        width: 100%;
    }
     .event-date .day {
        font-size: 2rem;
    }
    .event-date .month {
        font-size: 0.9rem;
    }
}


/* make the regional impact to be white and centrally positioned */
.page-header h1 {
    color: black;
    text-align: center;
}