/* ======================================================= */
/* == 1. THEME & GLOBAL STYLES (Light & Dark Modes)    == */
/* ======================================================= */
:root {
    /* --- Light Theme (Default) --- */
    --clr-red: #C62828;
    --clr-red-hover: #A32020;
    --clr-turquoise: #0097A7;
    --clr-turquoise-dark: #007A87;
    --clr-dark: #222831;
    --clr-grey: #5F6769;
    --clr-light-grey: #F5F7F9;
    --clr-white: #ffffff;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --radius: 8px;
    --shadow: 0 10px 30px rgba(0,0,0,0.07);
    /* Dynamic Theme Variables */
    --clr-background: var(--clr-light-grey);
    --clr-card-background: var(--clr-white);
    --clr-heading-text: var(--clr-dark);
    --clr-body-text: var(--clr-grey);
    --clr-border: #eef0f3;
    --clr-card-background-rgb: 255, 255, 255;
    --clr-pastel-red: #ffa2ab;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* --- Dark Theme Overrides --- */
        --clr-red: #C62828;
        --clr-turquoise: #0097A7;
        --clr-turquoise-dark: #00BCD4;
        --clr-background: #111827;
        --clr-card-background: #1F2937;
        --clr-heading-text: #F9FAFB;
        --clr-body-text: #D1D5DB;
        --clr-border: #374151;
        --clr-card-background-rgb: 31, 41, 55;
    }
}

/* --- Global Element Styles --- */
body {
    background-color: var(--clr-background); color: var(--clr-body-text);
    font-family: var(--font-body); padding-top: 80px; line-height: 1.7;
}
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); color: var(--clr-heading-text); font-weight: 700; }
a { color: var(--clr-turquoise); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--clr-turquoise-dark); }
hr { border-top: 1px solid var(--clr-border); }
.form-control { background-color: var(--clr-background); border-color: var(--clr-border); color: var(--clr-heading-text); }
.form-control:focus { background-color: var(--clr-background); border-color: var(--clr-turquoise); color: var(--clr-heading-text); box-shadow: none; }
.form-control::placeholder { color: var(--clr-grey); }
.contact-detail a[href^="mailto"] {
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* ============================================= */
/* == 2. LAYOUT & REUSABLE COMPONENTS        == */
/* ============================================= */


/* --- Navbar Logo Styling --- */
.navbar-logo {
    height: 60px; /* Constrain the height of the logo to fit the navbar */
    width: auto; /* Let the width adjust automatically */
    margin-right: 0.5rem; /* THIS CREATES THE SPACE between the logo and the text */
    border-radius: 0.2rem;
}

/* --- Generic Content Card --- */
.content-card {
    background-color: var(--clr-card-background);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.navbar {
    background: rgba(var(--clr-card-background-rgb), 0.85);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--clr-border);
}
.navbar-brand { color: var(--clr-turquoise) !important; font-weight: 700; }
.navbar-nav .nav-link,
.navbar-nav .btn-link {
    color: var(--clr-heading-text) !important; /* Use !important to override defaults */
    font-family: var(--font-heading);
    font-weight: 600;
    margin: 0 0.5rem;
    padding-bottom: 5px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    background: none; /* Ensure logout button has no background */
    border: none; /* Ensure logout button has no border */
    cursor: pointer;
}
    /* This rule targets the active/hover state for all links */
    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover,
    .navbar-nav .btn-link:hover {
        color: var(--clr-turquoise) !important;
        border-bottom-color: var(--clr-turquoise);
    }

.navbar-nav .nav-link.active, .navbar-nav .nav-link:hover {
    color: var(--clr-turquoise) !important; border-bottom-color: var(--clr-turquoise);
}
.btn-register {
    background-color: var(--clr-red); border-color: var(--clr-red); border-radius: 50px;
    color: var(--clr-white) !important; font-weight: 600; transition: all 0.2s;
}
.btn-register:hover { background-color: var(--clr-red-hover); border-color: var(--clr-red-hover); transform: scale(1.05); }

.hero-section {
    position: relative;
    padding: 3rem 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--clr-white);
    background-image: url('../images/archive/2023/LVA_0418.jpg');
    background-size: cover;
    background-position: center;
}

    .hero-section::before { 
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(34, 40, 49, 0.9), rgba(0, 151, 167, 0.8));
        z-index: 1;
    }

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-section h1 {
    color: var(--clr-red);
    -webkit-text-stroke-width: 1px; /* The thickness of the border */
    -webkit-text-stroke-color: var(--clr-white); /* The color of the border */
    font-weight: 900;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.hero-section h3, .hero-section li {
    color: var(--clr-white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.hero-section li {
    color: var(--clr-white); 
    color: var(--clr-white); 
}

.hero-info {
    list-style: none;
    padding-left: 0;
}

    .hero-info i {
        color: var(--clr-white);
        opacity: 0.8;
        margin-right: 10px;
    }

.footer {
    background-color: var(--clr-dark); /* Dark background color */
    color: rgba(255, 255, 255, 0.7); /* Light text color */
    padding: 1.5rem 0;
    position: relative; /* This is necessary for z-index to work */
    z-index: 10; /* Ensures the footer is above the background canvas (which is at z-index: -1) */
    border-top: 1px solid var(--clr-border); /* A subtle separator line */
}

.section-title { margin-bottom: 3rem; text-align: center; }
.section-title h2 { font-size: 2.5rem; }
    .section-title h3 {
        font-size: 3.5rem;
        color: var(--clr-turquoise);
        -webkit-text-stroke-width: 0.7px; /* The thickness of the border */
        -webkit-text-stroke-color: var(--clr-white); /* The color of the border */
        line-height: 1;
        font-weight: 700;
    }
.section-title p { color: var(--clr-body-text); max-width: 600px; margin: 0 auto; }

.pro-card {
    background: var(--clr-card-background); border: 1px solid var(--clr-border);
    border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s; height: 100%;
}
.pro-card:hover { transform: translateY(-5px); }

.portrait {
    width: 120px; height: 120px; object-fit: cover; border-radius: 50%;
    border: 5px solid var(--clr-card-background); box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-tabs { border-bottom: 2px solid var(--clr-border); }
.nav-tabs .nav-link {
    border: none; background: transparent; font-family: var(--font-heading); font-weight: 600;
    color: var(--clr-body-text); padding: 0.75rem 1.5rem; border-bottom: 3px solid transparent; transition: all 0.2s;
}
.nav-tabs .nav-link.active, .nav-tabs .nav-link:hover { color: var(--clr-red); border-bottom-color: var(--clr-red); }

/* --- Main Content Wrapper with Blur Effect --- */
.main-content-wrapper {
    position: relative;
    padding: 2rem;
    border-radius: var(--radius);
    background-color: rgba(var(--clr-card-background-rgb), 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); 
    border: 1px solid rgba(var(--clr-border-rgb), 0.2); /* Subtle border */
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* RGB versions for border color for the new wrapper */
@media (prefers-color-scheme: light) {
    :root { --clr-border-rgb: 238, 240, 243; }
}
@media (prefers-color-scheme: dark) {
    :root { --clr-border-rgb: 55, 65, 81; }
}
.form-inline .btn-link {
    color: var(--clr-heading-text);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    transition: color 0.2s;
}

    .form-inline .btn-link:hover {
        color: var(--clr-turquoise) !important;
    }

/* On mobile, ensure the login/register buttons stack nicely */
@media (max-width: 991.98px) {
    #login.btn-register {
        width: 100%;
        margin-top: 1rem;
        margin-left: 0 !important;
    }
}


/* --- Dropdown Menu Styling --- */
.dropdown-menu {
    background-color: var(--clr-card-background);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dropdown-item {
    color: var(--clr-body-text);
    font-weight: 600;
}

    .dropdown-item:hover, .dropdown-item:focus {
        color: var(--clr-heading-text);
        background-color: rgba(var(--clr-turquoise-rgb), 0.1);
    }

.dropdown-divider {
    border-top: 1px solid var(--clr-border);
}

/* ============================================= */
/* == 3. PAGE-SPECIFIC STYLES                == */
/* ============================================= */


/* --- Home: Endorsement Section --- */
.endorsement-section {
    padding: 2rem 0;
    text-align: center;
}

.endorsement-title {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--clr-body-text);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.endorsement-logos {
    display: flex;
    flex-wrap: wrap; /* Allows logos to wrap onto the next line on smaller screens */
    justify-content: center; /* Horizontally centers the logos */
    align-items: center; /* Vertically aligns the logos */
    gap: 3rem; /* The space between each logo */
    
    
}

    .endorsement-logos img {
        max-height: 60px; /* THIS IS THE KEY: Sets a consistent maximum height */
        width: auto; /* Allows the width to adjust to maintain aspect ratio */
        
        border-radius: 0.2rem;
    }



/* --- Scientific Program --- */
.session-card {
    background: var(--clr-card-background);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--clr-border);
    border-left: 4px solid var(--clr-red);
}

.session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer; /* Indicates it's clickable */
    border-radius: var(--radius);
    transition: background-color 0.2s ease;
}

    .session-header:hover {
        background-color: rgba(var(--clr-turquoise-rgb), 0.1);
    }

.session-time {
    color: var(--clr-turquoise);
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 1.5rem;
}

.session-title {
    font-family: var(--font-heading);
    color: var(--clr-heading-text);
    font-weight: 600;
    font-size: 1.1rem;
}

.session-toggle-icon {
    font-size: 1.5rem;
    color: var(--clr-turquoise);
    transition: transform 0.3s ease;
}

/* Style for when the accordion is OPEN */
.session-header[aria-expanded="true"] {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--clr-border);
}

    .session-header[aria-expanded="true"] .session-toggle-icon {
        transform: rotate(45deg); /* Rotates the '+' to look like an 'x' */
    }

.session-details {
    padding: 1.5rem;
}

    .session-details p {
        margin-bottom: 0.5rem;
    }

/* Add RGB versions for Turquoise for the hover effect */
@media (prefers-color-scheme: light) {
    :root {
        --clr-turquoise-rgb: 0, 151, 167;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --clr-turquoise-rgb: 38, 198, 218;
    }
}
.scroller-section { background-color: var(--clr-card-background); padding: 4rem 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.scroller { max-width: 1100px; margin: auto; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent); mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent); }
.scroller__inner { display: flex; width: max-content; animation: scroll 10s linear infinite; }
.scroller__inner--slower { animation-duration: 20s; /* Much slower speed */ }
@keyframes scroll { to { transform: translateX(-50%); } }
.scroller:hover .scroller__inner { animation-play-state: paused; }
.scroller-item { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 2.5rem; width: 200px; }
.scroller-item .portrait { width: 120px; height: 120px; margin-bottom: 1rem; }
.scroller-item h5, .scroller-item p { color: var(--clr-heading-text); }
.clickable-scroller {
    cursor: pointer; 
    transition: box-shadow 0.3s ease;
}

    .clickable-scroller:hover {
        box-shadow: var(--shadow-hover); /* Use the hover shadow for a nice lift effect */
    }
/* --- Partners --- */
.partner-tier {
    padding: 3rem 0;
    border-radius: var(--radius);
    margin-bottom: 3rem;
    background-color: var(--clr-card-background);
    box-shadow: var(--shadow);
    border: 1px solid var(--clr-border);
}

    .partner-tier h2 {
        text-align: center;
        margin-bottom: 2rem;
        padding: 0 1rem;
    }

.partner-tier-platinum {
    border-top: 5px solid var(--clr-red);
}

.partner-tier-gold {
    background-color: #FFF8E1;
}

.partner-tier-silver {
    background-color: #ECEFF1;
}

.partner-tier-media {
    background-color: #E0F7FA;
}

@media (prefers-color-scheme: dark) {
    .partner-tier-gold {
        background-color: #3B321B;
    }

    .partner-tier-silver {
        background-color: #2E3336;
    }

    .partner-tier-media {
        background-color: #1A3A40;
    }
}

.partner-tier .scroller {
    position: relative; /* This is essential for positioning the overlays */
    overflow: hidden;
}

    /* Left Fade Overlay */
    .partner-tier .scroller::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 100px; /* Width of the fade */
        background: linear-gradient(to right, var(--clr-card-background), transparent);
        z-index: 2; /* Sit on top of the scrolling content */
    }

    /* Right Fade Overlay */
    .partner-tier .scroller::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        width: 100px; /* Width of the fade */
        background: linear-gradient(to left, var(--clr-card-background), transparent);
        z-index: 2; /* Sit on top of the scrolling content */
    }

/* Adjust overlay colors for the colored tiers */
.partner-tier-gold .scroller::before {
    background: linear-gradient(to right, #FFF8E1, transparent);
}

.partner-tier-gold .scroller::after {
    background: linear-gradient(to left, #FFF8E1, transparent);
}

.partner-tier-silver .scroller::before {
    background: linear-gradient(to right, #ECEFF1, transparent);
}

.partner-tier-silver .scroller::after {
    background: linear-gradient(to left, #ECEFF1, transparent);
}

.partner-tier-media .scroller::before {
    background: linear-gradient(to right, #E0F7FA, transparent);
}

.partner-tier-media .scroller::after {
    background: linear-gradient(to left, #E0F7FA, transparent);
}

@media (prefers-color-scheme: dark) {
    .partner-tier-gold .scroller::before {
        background: linear-gradient(to right, #3B321B, transparent);
    }

    .partner-tier-gold .scroller::after {
        background: linear-gradient(to left, #3B321B, transparent);
    }

    .partner-tier-silver .scroller::before {
        background: linear-gradient(to right, #2E3336, transparent);
    }

    .partner-tier-silver .scroller::after {
        background: linear-gradient(to left, #2E3336, transparent);
    }

    .partner-tier-media .scroller::before {
        background: linear-gradient(to right, #1A3A40, transparent);
    }

    .partner-tier-media .scroller::after {
        background: linear-gradient(to left, #1A3A40, transparent);
    }
}


/* --- Scroller Item Styles --- */
.partner-scroller-item {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--clr-white);
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 1.5rem;
    height: 140px;
    width: 250px;
    margin: 0 1rem;
    transition: all 0.2s ease;
}

    .partner-scroller-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .partner-scroller-item img {
        max-height: 70px;
        max-width: 100%;
        width: auto;
        height: auto;
    }
/* Archive */
.archive-item { position: relative; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background-color: var(--clr-dark); }
.archive-item img { display: block; width: 100%; transition: transform 0.3s ease; }
.archive-item-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 2rem 1rem 1rem; color: var(--clr-white); background: linear-gradient(to top, rgba(0,0,0,0.85), transparent); display: flex; align-items: center; transform: translateY(100%); opacity: 0; transition: all 0.3s ease-in-out; }
a.archive-item-link:hover .archive-item-info { transform: translateY(0); opacity: 1; }
a.archive-item-link:hover .archive-item img { transform: scale(1.05); }

/* --- Archive Landing Page --- */
.archive-year-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

    .archive-year-card img {
        width: 100%;
        display: block;
        transition: transform 0.3s ease;
    }

    .archive-year-card:hover img {
        transform: scale(1.1);
    }

.archive-year-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* The gradient now provides the dark background for the text */
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 40%, transparent 100%);
    display: flex;
    align-items: flex-end; /* Aligns text to the bottom */
    justify-content: center;
    padding: 1.5rem;
}

    .archive-year-overlay span {
        font-family: var(--font-heading);
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--clr-white);
        text-shadow: 0 2px 5px rgba(0,0,0,0.5); /* Add shadow for readability */
        /* The text is now always visible */
        transform: translateY(0);
        opacity: 1;
    }

/* Contact */
.contact-card-content .name { font-size: 1.5rem; color: var(--clr-heading-text); }
.contact-card-content .role { color: var(--clr-turquoise); }
.contact-card-content .contact-detail { display: flex; align-items: center; margin-bottom: 0.5rem; }
.contact-card-content .contact-detail i { width: 30px; color: var(--clr-body-text); }

/* --- Home: YouTube Promo Section --- */
.promo-section {
    position: relative;
    padding: 5rem 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    background-image: url('../images/archive/2023/LVA_9991.jpg'); /* Placeholder image */
    background-size: cover;
    background-position: center;
    color: var(--clr-white);
}

    .promo-section::before { /* Dark overlay for text readability */
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(34, 40, 49, 0.9), rgba(0, 151, 167, 0.8));
        z-index: 1;
    }

.promo-content {
    position: relative;
    z-index: 2;
}

    .promo-content h2, .promo-content p {
        color: var(--clr-white); /* Ensure text is white */
    }

.btn-outline-light {
    border-radius: 50px;
    font-weight: 600;
}

.event-full-description h3 {
    font-size: 1.5rem;
    color: var(--clr-red); /* Use red for subheadings */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}
.event-full-description ul {
    list-style-type: none;
    padding-left: 0;
}
.event-full-description li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
}
    .event-full-description li::before {
        content: '\f105'; /* Font Awesome right-arrow icon */
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        color: var(--clr-turquoise);
        position: absolute;
        left: 0;
    }

/* --- Experts Page --- */
.expert-card-link {
    display: block; /* Makes the anchor tag take up the full column space */
    text-decoration: none; /* Removes the default link underline */
    color: inherit; /* Makes the text inside inherit the theme color */
}

    .expert-card-link:hover {
        text-decoration: none; /* Also remove underline on hover */
        color: inherit;
    }

/* --- Hero footer --- */
.hero-footer {
    display: flex;
    flex-direction: column; /* Stacks items vertically */
    justify-content: center;
    align-items: center;
    gap: 1.9rem; /* Space between the logo and the button */
}

.edition-logo {
    display: flex;
    align-items: flex-start;
    font-family: var(--font-heading);
}

    .edition-logo .number {
        font-size: 3.5rem;
        color: var(--clr-turquoise);
        -webkit-text-stroke-width: 0.7px; /* The thickness of the border */
        -webkit-text-stroke-color: var(--clr-white); /* The color of the border */
        line-height: 1;
        font-weight: 700;
    }

    .edition-logo .ordinal {
        font-size: 1.5rem;
        color: var(--clr-turquoise);
        -webkit-text-stroke-width: 0.5px; /* The thickness of the border */
        -webkit-text-stroke-color: var(--clr-white); /* The color of the border */
        font-weight: 700;
        line-height: 1.5;
    }

    .edition-logo .text {
        font-size: 2.5rem;
        color: var(--clr-white);
        font-weight: 600;
        line-height: 1.5;
        margin-left: 0.25rem;
    }
/* ============================================= */
/* == 4. BACKGROUND ANIMATION                == */
/* ============================================= */
#network-canvas { position: fixed; top: 0; left: 0; z-index: -1; }


/* ============================================= */
/* == 5. MOBILE NAVIGATION (THE FIX)         == */
/* ============================================= */

/* --- Toggler (Burger Icon) Fix --- */
.navbar-toggler {
    border: 1px solid var(--clr-border); 
    border-radius: var(--radius);
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(var(--clr-turquoise-rgb), 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(34, 40, 49, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (prefers-color-scheme: dark) {
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(209, 213, 219, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}


/* --- Collapsed Menu Drawer Styling --- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: var(--radius);
        background-color: var(--clr-card-background);
        box-shadow: var(--shadow);
        border: 1px solid var(--clr-border);
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0; 
        margin: 0;
        width: 100%;
        border-bottom: 1px solid var(--clr-border); 
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover {
        border-bottom-color: var(--clr-border); 
        background-color: rgba(var(--clr-turquoise-rgb), 0.1);
        border-radius: var(--radius);
    }
    
    .btn-register {
        width: 100%;
        margin-top: 1rem;
        padding: 0.75rem;
    }
}

/* ============================================= */
/* == 6. BOOTSTRAP COMPONENT OVERRIDE FIXES    == */
/* ============================================= */

/* --- Modal Stacking Fix --- */
/* The backdrop should be high, but not the highest */
.modal {
    z-index: 9999 !important;
}

.modal-backdrop {
    z-index: 9998 !important;
}

/* ============================================= */
/* == 7. CUSTOM IDENTITY FORMS (LOGIN/REGISTER) == */
/* ============================================= */
.identity-card {
    background-color: var(--clr-card-background);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 500px; /* Constrain the width of the form */
    margin: 2rem auto; /* Center the card on the page */
}

@media (min-width: 768px) {
    .identity-card {
        padding: 3rem;
    }
}

.identity-card h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.identity-card .form-floating label {
    color: var(--clr-grey);
}

.identity-card .btn-register {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
}

.identity-card .form-check-label {
    color: var(--clr-body-text);
}

.identity-card .link-secondary {
    color: var(--clr-turquoise);
    text-decoration: none;
}

    .identity-card .link-secondary:hover {
        text-decoration: underline;
    }

/* ============================================= */
/* == MODAL CONTENT THEME                     == */
/* ============================================= */


/* Ensure modal text is theme-aware */
.modal-content .name {
    color: var(--clr-heading-text);
}

.modal-content .role {
    font : bold;
    color: var(--clr-turquoise-dark);
}

.modal-content #modalExpertBio {
    color: var(--clr-body-text);
}

/* --- Dark Mode Override for the Modal 'X' Button --- */
@media (prefers-color-scheme: dark) {
    .modal-content .btn-close {
        /* This filter inverts the color of the default Bootstrap 'X' icon, making it white */
        filter: invert(1) grayscale(100%) brightness(200%);
    }
}@media (prefers-color-scheme: dark) {
    .modal-content .btn-close {
        /* This filter inverts the color of the default Bootstrap 'X' icon, making it white */
        filter: invert(1) grayscale(100%) brightness(200%);
    }
}

.rating-stars {
    font-size: 2rem;
    color: var(--clr-turquoise);
    cursor: pointer;
}

    .rating-stars .fa-star { /* Solid star for selected */
        font-weight: 900;
    }

/* ============================================= */
/* == 8. CUSTOM FORM STYLING (CME Page)      == */
/* ============================================= */

/* Style for the dropdown menu */
.form-select {
    background-color: var(--clr-card-background);
    border: 1px solid var(--clr-border);
    color: var(--clr-body-text);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
}

    .form-select:focus {
        border-color: var(--clr-turquoise);
        box-shadow: 0 0 0 0.25rem rgba(var(--clr-turquoise-rgb), 0.25);
    }

/* Custom styles for radio buttons */
.form-check-input {
    border-color: var(--clr-border);
}

    .form-check-input:checked {
        background-color: var(--clr-turquoise);
        border-color: var(--clr-turquoise);
    }

    .form-check-input:focus {
        box-shadow: 0 0 0 0.25rem rgba(var(--clr-turquoise-rgb), 0.25);
    }

/* Styling the star rating hover state */
.rating-stars i:hover ~ i {
    color: var(--clr-grey) !important; /* Make stars to the right of the hovered one grey */
    opacity: 0.5;
}

/* ============================================= */
/* == MEDIA APPEARANCES PAGE                 == */
/* ============================================= */

.media-list-item {
    display: block;
    padding: 1.5rem;
    background-color: var(--clr-card-background);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .media-list-item:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow);
        border-color: var(--clr-turquoise);
    }

    .media-list-item h5 {
        color: var(--clr-heading-text);
        margin-bottom: 0.5rem;
    }

    .media-list-item p {
        color: var(--clr-body-text);
        margin-bottom: 0.5rem;
    }

    .media-list-item small {
        color: var(--clr-body-text);
    }

/* Custom badge color that works in both themes */
.badge.bg-media {
    background-color: var(--clr-turquoise) !important;
    color: var(--clr-white) !important;
}


/* ============================================= */
/* == REGISTRATION PAGE                      == */
/* ============================================= */
.registration-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    overflow: hidden; /* Ensures border-radius is applied to corners */
}

    .registration-table th, .registration-table td {
        padding: 1rem 1.5rem;
        text-align: left;
        border-bottom: 1px solid var(--clr-border);
    }

    .registration-table thead th {
        background-color: var(--clr-card-background);
        color: var(--clr-heading-text);
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.9rem;
    }

    .registration-table tbody td:first-child {
        font-weight: 600;
        color: var(--clr-heading-text);
    }

    .registration-table tbody tr:last-child td {
        border-bottom: none;
    }

    .registration-table .fee-period {
        background-color: var(--clr-background); /* A slightly different background for header columns */
        font-weight: 700;
        font-size: 0.9rem;
    }

.info-section {
    margin-top: 3rem;
}

    .info-section h4 {
        color: var(--clr-turquoise);
        font-weight: 700;
        margin-bottom: 1rem;
    }

    .info-section ul {
        list-style-type: none;
        padding-left: 0;
    }

        .info-section ul li {
            position: relative;
            padding-left: 25px; /* Space for the icon */
            margin-bottom: 0.5rem;
        }

            .info-section ul li::before {
                content: '\f00c'; /* Font Awesome check icon */
                font-family: "Font Awesome 5 Free";
                font-weight: 900;
                color: var(--clr-turquoise);
                position: absolute;
                left: 0;
            }