.glass-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(0.5rem, 2vw, 1rem) clamp(1rem, 5vw, 2rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-brand {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.5px;
    flex: 1 1 max-content;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.nav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(1rem, 3vw, 1.5rem);
    list-style: none;
    margin: 0; 
    padding: 0;
    flex: 999 1 max-content;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
}

.nav-link:hover { color: var(--accent-color); }

.nav-link::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

.nav-btn {
    padding: clamp(0.4rem, 1vw, 0.6rem) clamp(1rem, 2vw, 1.5rem);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: clamp(0.8rem, 1.5vw, 0.95rem);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    list-style: none;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(10px);
}

.dropdown-link {
    display: block;
    padding: 10px 15px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background 0.2s;
    text-align: center;
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}



/* General Reset & Layout Fixes */
/* General Reset & Layout Fixes */
.event-section {
    width: 100%;
    /* Fluid padding that shrinks on mobile */
    padding: clamp(40px, 8vw, 80px) clamp(15px, 4vw, 30px);
    display: block;
    clear: both;
    box-sizing: border-box; /* Stops padding from breaking widths */
}

.event-container {
    max-width: 1200px;
    margin: 0 auto;
    /* Magic Grid: Responsive to every screen size automatically */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: clamp(20px, 4vw, 40px);
}

/* Fix for the Section Titles */
.section-title {
    width: 100%;
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 50px);
    font-size: clamp(1.8rem, 4vw, 2.5rem); /* Fluid text */
    color: #203a87;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: #5c6bc0;
    margin: 10px auto 0;
}

/* --- Card Improvements & Alignment Fixes --- */
.course-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%; /* Replaced fixed width with fluid 100% */
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

/* BIG RESPONSIVE PHOTOS */
.card-banner {
    width: 100%;
    /* Locks the image shape like a wide video thumbnail so it scales perfectly */
    aspect-ratio: 16 / 9; 
    overflow: hidden;
}

.card-banner img {
    width: 100%;
    height: 100%;
    /* Prevents the image from stretching or squishing when resizing */
    object-fit: cover; 
    display: block;
    transition: transform 0.5s ease;
}

.course-card:hover .card-banner img {
    transform: scale(1.05); /* Adds a nice subtle zoom on hover */
}

.card-content {
    padding: clamp(15px, 3vw, 25px);
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.status-badge {
    width: 30px;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
}

.price-tag {
    color: #5c6bc0;
    font-weight: bold;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.course-title {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem); /* Fluid title */
    color: #222;
    line-height: 1.4;
    margin-bottom: 15px;
}

.instructor-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.avatar {
    width: 35px;
    height: 35px;
    background: #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    flex-shrink: 0;
}

.instructor-name {
    color: #777;
    font-size: 0.9rem;
}

.course-details {
    margin-top: auto; 
}

.course-details p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}

.highlight-blue {
    color: #1a43bf;
    font-weight: 600;
}

.meta-info {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on tiny phone screens */
    justify-content: space-between;
    gap: 10px;
    font-size: 0.85rem;
    color: #555;
    margin-top: 15px;
}

.meta-info i {
    margin-right: 5px;
    color: #777;
}

.card-footer {
    padding: clamp(12px, 2vw, 20px);
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap; /* Keeps button from breaking text on small screens */
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.deadline {
    display: flex;
    flex-direction: column;
}

.deadline .date {
    font-weight: bold;
    color: #222;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.deadline .label {
    font-size: 0.75rem;
    color: #999;
}

.placeholder-section {
    padding: clamp(3rem, 10vh, 6rem) 1.5rem;
    text-align: center;
}

.placeholder-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    padding: clamp(2rem, 5vw, 4rem);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.05);
}

.placeholder-icon {
    font-size: clamp(3rem, 8vw, 4.5rem);
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    animation: float 4s ease-in-out infinite;
}

.placeholder-text {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.placeholder-actions .nav-btn {
    display: inline-block;
    padding: 12px 35px;
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}


.details-btn {
    background-color: #203a87;
    color: white;
    border: none;
    padding: 10px clamp(15px, 3vw, 25px);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    white-space: nowrap;
}

.details-btn:hover {
    background-color: #162a63;
    transform: scale(1.02);
}


/* --- Completed Events Grid --- */
#completed-events {
    padding: 5vh 5vw;
    text-align: center;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.event-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
    text-align: left;
}

.event-card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.event-card img {
    width: 100%;
    height: 250px;
    object-fit: cover; 
}

.card-info {
    padding: 1.5rem;
}

.card-info h3 {
    color: #203a87;
    margin-bottom: 5px;
}

.card-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.read-more-link {
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.event-card:hover .read-more-link {
    transform: translateX(5px);
}

/* ================== EVENT ARTICLE MODAL STYLES ================== */
.event-modal {
    display: none; 
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow-y: auto; 
    padding: 2rem 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-modal.active {
    display: block;
    opacity: 1;
}

.event-modal-content {
    background: #ffffff;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transform: translateY(30px);
    transition: transform 0.4s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    text-align: left;
}

.event-modal.active .event-modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.close-modal:hover { background: #3b82f6; }

.event-modal-header img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.event-modal-body {
    padding: 2.5rem;
    color: #334155;
}

.event-modal-body h2 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.modal-meta {
    color: #3b82f6;
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-article p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.gallery-title {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.modal-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s;
}

.modal-gallery img:hover {
    transform: scale(1.05);
}

footer {
    text-align: center;
    padding: 10px 10px;
    background: #343d46;
    color: #94a3b8;
    font-size: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer2 {
    position: fixed;
    bottom: 0;
    right: 0;
    text-align: right; 
    width: auto;
}