/* ==========================================================================
   THEME SLIDER
   ========================================================================== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 1rem;
    background: var(--nav-hover);
    border-radius: 12px;
}

.theme-switch {
    display: inline-block;
    height: 24px;
    width: 44px;
    position: relative;
}

.theme-switch input { display: none; }

.slider {
    background-color: #64748b;
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: white;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 4px;
    position: absolute;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: var(--accent-color); }
input:checked + .slider:before { transform: translateX(20px); }

/* ==========================================================================
   ADMIN WIDE-CARD LAYOUT (Themed)
   ========================================================================== */
.admin-grid-wide {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    max-width: 1000px;
}

.admin-card {
    /* Uses --sidebar-bg to match the UI depth */
    background: var(--sidebar-bg);
    padding: 2rem;
    border-radius: 12px;
    /* Subtle border that works in both modes */
    border: 1px solid rgba(128, 128, 128, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.admin-card h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    font-size: 1.4rem;
}

/* Form Structure */
.form-group {
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Horizontal Rows */
.form-row-triple {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1.5rem;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 1.5rem;
    align-items: start;
}

/* Input Styling (Themed Dropdowns, Text, Dates, Times) */
.admin-form input, 
.admin-form textarea,
.admin-form select {
    padding: 0.8rem;
    border-radius: 6px;
    /* Border changes color based on theme text color */
    border: 1px solid rgba(128, 128, 128, 0.3);
    background: var(--bg-color);
    color: var(--text-color);
    margin-top: 0.4rem;
    width: 100%;
    font-size: 1rem;
    transition: border-color 0.2s, background 0.3s;
}

/* Fix for date/time picker icons in some browsers */
.admin-form input::-webkit-calendar-picker-indicator {
    filter: var(--calendar-filter, invert(0));
}

/* Dropdown options styling */
.admin-form select option {
    background-color: var(--sidebar-bg);
    color: var(--text-color);
}

.admin-form input:focus, 
.admin-form select:focus, 
.admin-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Save Button */
.btn-primary {
    background-color: var(--accent-color);
    color: #fff;
    padding: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ==========================================================================
   MASCOT & SECURITY
   ========================================================================== */
.mascot-scatter-container {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.scattered-mascot {
    position: absolute;
    width: 80px;
    opacity: 0.1;
}

#fixed-mascot {
    position: fixed;
    top: 20px; right: 20px;
    width: 80px;
    z-index: 1000;
    cursor: pointer;
    display: none;
}

.nav-links a[href="#admin"] {
    display: none !important;
}

.nav-links a[href="#admin"].unlocked {
    display: flex !important;
}

/* ==========================================================================
   MOBILE ADAPTATION
   ========================================================================== */
@media (max-width: 768px) {
    .form-row-triple, 
    .admin-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ==========================================================================
   DELETE EVENTS
   ========================================================================== */

.admin-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 1rem;
}

.admin-event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid rgba(128, 128, 128, 0.2);
}

.admin-event-info {
    display: flex;
    flex-direction: column;
}

.admin-event-info strong {
    color: var(--accent-color);
}

.btn-delete {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-delete:hover {
    background: #dc2626;
}

.admin-form-small {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid rgba(128,128,128,0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-family: inherit;
}

.admin-manage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.subtitle {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 4px;
}

.admin-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(128, 128, 128, 0.1);
}

.current-view-info {
    text-align: center;
}

.current-view-info h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
    color: var(--accent-color);
}

.cache-status {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.4;
}

.btn-nav {
    background: var(--nav-hover);
    color: var(--text-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.btn-nav:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

/* ==========================================================================
   ABOUT US SECTION (Left Aligned)
   ========================================================================== */
.about-container {
    max-width: 900px;
    margin: 0; /* Align container to the left */
    padding: 0 20px;
}

.about-header {
    text-align: left; /* Header text to the left */
    margin-bottom: 2.5rem;
}

.about-header .accent-underline {
    margin: 8px 0 0 0; /* Move underline to start at the left edge */
}

/* Ensure the text and underline stack vertically */
.about-header, 
.events-header, 
.header-text-group {
    display: flex;
    flex-direction: column; /* This forces the underline below the H1 */
    align-items: flex-start; /* Keeps everything aligned to the left */
    gap: 8px; /* Optional: adds a small space between text and line */
}

/* Ensure the underline has a set height and width */
.accent-underline {
    width: 50px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
    /* Prevent the line from shrinking or growing in a flex container */
    flex-shrink: 0; 
}

.about-content p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.9;
    text-align: left;
}

.mission-statement {
    font-size: 1.2rem !important;
    font-weight: 500;
}

/* Highlight Quote */
.about-highlight {
    border-left: 4px solid var(--accent-color);
    background: rgba(128, 128, 128, 0.05); /* Subtle dark background */
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
    border-radius: 0 8px 8px 0;
    text-align: left;
}

/* Contact Cards (Left Aligned Grid) */
.about-contact-grid {
    display: flex;
    flex-wrap: wrap; /* Wraps on mobile */
    gap: 15px;
    margin-top: 3rem;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: var(--sidebar-bg);
    border: 1px solid rgba(128, 128, 128, 0.1);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s ease;
    min-width: 280px;
}

.contact-card i {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.contact-info span {
    display: block;
    font-size: 0.75rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    background: rgba(var(--accent-color), 0.05);
}

/* ==========================================================================
COURSE LISTING (Reusing about us layout with minor tweaks)
========================================================================== */

.course-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--glass-border), transparent);
    margin: 3rem 0;
    opacity: 0.5;
}

.course-entry .about-contact-grid {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Ensure the container is scrollable if you add many courses */
.content-section {
    overflow-y: auto;
    max-height: 85vh; /* Prevents the box from going off-screen */
}

/*Align form elements in the admin section to match the content section width */
/* 1. Force both elements to have the exact same height */
#ace-date, 
#submit-ace {
    height: 45px !important;
    padding: 0 15px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* 2. Push the button down to account for the label height in the previous column */
.align-with-input {
    margin-top: 30px;
}

/* 3. Ensure the row doesn't try to be clever with alignment */
.form-row {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start; /* Keeps the labels aligned at the top */
}