:root {
    --primary-blue: #1a4b8c;
    --secondary-blue: #2c6aa0;
    --light-blue: #e8f1f5;
    --accent-yellow: #ffc107;
    --dark-yellow: #e6a800;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    flex: 1 0 auto;
}

.bg-blue { background-color: var(--primary-blue); }
.bg-light-blue { background-color: var(--light-blue); }
.text-blue { color: var(--primary-blue); }

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.btn-primary:hover {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
}
.btn-accent {
    background-color: var(--accent-yellow);
    border-color: var(--accent-yellow);
    color: #333;
}
.btn-accent:hover {
    background-color: var(--dark-yellow);
    border-color: var(--dark-yellow);
}
.btn-outline-blue {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}
.btn-outline-blue:hover {
    background-color: var(--primary-blue);
    color: white;
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.navbar-brand {
    font-weight: 700;
    color: var(--primary-blue) !important;
}
.nav-link {
    color: #333 !important;
    font-weight: 500;
    margin: 0 5px;
}
.nav-link:hover {
    color: var(--primary-blue) !important;
}

.hero-section {
    background: linear-gradient(rgba(26, 75, 140, 0.8), rgba(26, 75, 140, 0.8)), url('../img/hero.jpg');
    background-size: cover;
    background-position: center;
    padding: 6rem 0;
    color: white;
    position: relative;
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    font-weight: 700;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-yellow);
}

.card-webinar, .team-card, .card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}
.card-webinar:hover, .team-card:hover {
    transform: translateY(-5px);
}
.card-webinar .card-header {
    background-color: var(--primary-blue);
    color: white;
    font-weight: 600;
}

/* --- THIS IS THE FIX --- */
.team-img {
    width: 100%;
    height: 500px; /* Set a fixed height */
    object-fit: cover; /* This prevents stretching */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
/* --- END FIX --- */


.social-icon {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}
.social-icon:hover {
    color: var(--accent-yellow);
}

footer {
    background-color: #2c3e50;
    color: white;
    flex-shrink: 0;
}
footer a {
    color: #ecf0f1;
    transition: color 0.3s ease;
}
footer a:hover {
    color: var(--accent-yellow);
    text-decoration: none;
}

.objective-list {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    counter-reset: item;
    max-height: 300px;
    overflow-y: auto;
}
.objective-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    counter-increment: item;
    line-height: 1.6;
    text-align: left;
}
.objective-list li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: var(--primary-blue);
    width: 1.8rem;
    text-align: right;
    font-size: 1rem;
}

.form-control {
    border-radius: 10px;
    border: 2px solid var(--light-blue);
    padding: 0.75rem;
}
.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

.alert {
    border-radius: 10px;
}

.carousel-item {
    padding: 4rem 0;
    color: white;
    text-align: center;
    min-height: 300px;
    transition: opacity 0.5s ease;
}
.carousel-caption {
    position: static;
    padding: 0;
}
.carousel-control-prev, .carousel-control-next {
    width: 8%;
    background: transparent;
    opacity: 0.7;
}
.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
}
.carousel-control-prev-icon, .carousel-control-next-icon {
    font-size: 2rem;
    color: var(--accent-yellow);
    width: 40px;
    height: 40px;
    line-height: 40px;
}
.carousel-control-prev-icon::before {
    font-family: 'Font Awesome 5 Free';
    content: '\f053';
    font-weight: 900;
}
.carousel-control-next-icon::before {
    font-family: 'Font Awesome 5 Free';
    content: '\f054';
    font-weight: 900;
}
.carousel-indicators {
    bottom: 1rem;
}
.carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--light-blue);
    border: 2px solid var(--accent-yellow);
    margin: 0 6px;
}
.carousel-indicators .active {
    background-color: var(--accent-yellow);
    border-color: var(--primary-blue);
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
a:focus, button:focus, .btn:focus {
    outline: 2px solid var(--accent-yellow);
    outline-offset: 2px;
}

/* Dynamic column sizing for webinars/events and notices */
.webinar-event-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.webinar-event-column {
    flex: 1;
    min-width: 0;
}
.notice-column {
    flex: 0 0 auto;
    width: 100%;
    max-width: 400px;
}
@media (max-width: 991px) {
    .webinar-event-column, .notice-column {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* --- New Webinar Grid --- */
.webinar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.webinar-grid .card-webinar {
    height: 100%;
}
.webinar-grid .card-body.d-flex {
    display: flex;
    flex-direction: column;
}
.webinar-grid .card-body .list-unstyled {
    margin-top: auto;
}
/* --- End New Webinar Grid --- */

/* --- New Button Styles --- */
.btn-warning {
    color: #212529;
    background-color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}
.btn-warning:hover {
    background-color: var(--dark-yellow);
    border-color: var(--dark-yellow);
}
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}
.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}
/* --- End New Button Styles --- */


@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }
    .carousel-item {
        padding: 2rem 0;
        min-height: 250px;
    }
    .carousel-item h1 {
        font-size: 1.8rem;
    }
    .carousel-item p {
        font-size: 1rem;
    }
    .carousel-control-prev, .carousel-control-next {
        width: 10%;
    }
    .carousel-control-prev-icon, .carousel-control-next-icon {
        font-size: 1.5rem;
        width: 30px;
        height: 30px;
        line-height: 30px;
    }
    .carousel-indicators li {
        width: 10px;
        height: 10px;
        margin: 0 4px;
    }
    /* --- THIS IS THE FIX --- */
    .team-img {
        height: 250px; /* A fixed height for mobile */
        object-fit: cover; /* This prevents stretching */
    }
    /* --- END FIX --- */
}

@media (max-width: 576px) {
    .navbar-nav .btn {
        margin-top: 0.5rem;
        display: block;
        width: 100%;
    }
    .carousel-item h1 {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
}