:root {
    --primary-red: #c0392b;   
    --dark-grey: #2d2d2d;     
    --mid-grey: #757575;      
    --light-grey: #f4f4f4;    
    --text-main: #212121;
}

body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #fdfdfd;
    color: var(--text-main);
}

/* Sticky Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8%;
    background: #ffffff;
    border-bottom: 3px solid var(--primary-red);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Control the size of your logo image */
.logo-img {
    height: 50px; /* Adjust this height to match your header's scale */
    width: auto;  /* Maintains aspect ratio */
    display: block;
}

/* Keep the H1 and tagline stacked vertically */
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Ensure margins don't break the alignment */
.logo h1 {
    line-height: 1; /* Tighter fit for the logo look */
}

.logo h1 {
    margin: 0;
    font-size: 28px;
    color: var(--dark-grey);
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span.accent {
    color: var(--primary-red);
}


.logo span.tagline {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    letter-spacing: 2px;
    line-height: 1;
    text-transform: uppercase;
    color: var(--mid-grey);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 18px; /* Slightly smaller header buttons */
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-red { background: var(--primary-red); color: white; }
.btn-dark { background: var(--dark-grey); color: white; }

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

/* Hero Section */
.hero {
    padding: 80px 8% 100px; /* Increased padding for more breathing room */
    /* Changed flat overlay to a radial 'spotlight' effect */
    background: radial-gradient(circle, rgba(33, 33, 33, 0.4) 0%, rgba(33, 33, 33, 0.8) 100%), 
                url("../assets/images/admin/edex.jpeg") no-repeat center center/cover;
    text-align: center;
    color: white;
}

.hero h2 {
    font-size: 2.5rem; /* Slightly larger */
    margin-bottom: 35px;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Added text shadow for perfect readability on lighter backgrounds */
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero h2 span { color: var(--primary-red); }

/* Teacher Grid - Reduced min-width for 75% size look */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
    justify-content: start;
}

/* Call to Action Section at bottom */
.cta-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.cta-footer p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.teacher-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    color: var(--text-main);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.teacher-card:hover {
    transform: translateY(-5px);
}

.teacher-img {
    width: 100%;
    height: 165px; /* Reduced from 220px */
    background: #eee;
    object-fit: cover;
}

.teacher-info {
    padding: 15px; /* Reduced padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.teacher-info h3 {
    margin: 0 0 4px 0;
    font-size: 17px; /* Reduced font size */
    color: var(--dark-grey);
}

.medium-tag {
    font-size: 10px;
    font-weight: bold;
    color: var(--primary-red);
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.class-details {
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
    color: #444;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 6px;
    color: var(--mid-grey);
}

.online-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: bold;
    margin-top: 4px;
    margin-bottom: 12px;
}

.status-yes { background: #e8f5e9; color: #2e7d32; }
.status-no { background: #ffebee; color: #c62828; }

details {
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    padding-top: 8px;
}

summary {
    font-size: 11px;
    font-weight: bold;
    color: var(--mid-grey);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    text-transform: uppercase;
}

summary:hover { color: var(--primary-red); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 14px; }
details[open] summary::after { content: "-"; }

.more-content {
    font-size: 12px;
    padding: 8px 0;
    color: #555;
    line-height: 1.5;
}

.more-content ul { margin: 0; padding-left: 15px; }

.btn-request {
    margin-top: auto;
    background: var(--primary-red); 
    color: white;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border: 1px solid var(--primary-red);
}

.btn-request:hover {
    background: #a93226; 
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

footer {
    background: var(--dark-grey);
    color: white;
    padding: 35px 8%;
    text-align: center;
    border-top: 4px solid var(--primary-red);
}

.footer-content { max-width: 600px; margin: 0 auto; }
.footer-content strong { display: block; margin-bottom: 8px; font-size: 15px; }
.footer-content a { color: white; text-decoration: none; }
.footer-content a:hover { color: var(--primary-red); }

.footer-map-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 18px;
    background: var(--primary-red);
    color: white !important;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
}

.btn-request svg {
    width: 16px; /* Reduced from 18px for better fit */
    height: 16px;
    /* This handles vertical centering within the flex text line */
    margin-right: 8px; /* Adds space between logo and text */
    vertical-align: middle; 
}

.btn {
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    
    /* ADD THESE FOUR LINES FOR PERFECT ALIGNMENT */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* This creates the space between the icon and text */
}

.btn svg {
    width: 14px;
    height: 14px;
}

/* Improved Filter Bar */
.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    max-width: 900px;
    margin: 0 auto 50px auto;
    background: rgba(255, 255, 255, 0.1); /* Subtle translucent backing */
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filters select {
    appearance: none; /* Removes default browser arrow */
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c0392b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    border: 2px solid transparent;
    border-radius: 6px;
    color: var(--dark-grey);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 35px 12px 15px;
    transition: all 0.3s ease;
    width: 100%;
    outline: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filters select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.filters select:focus {
    border-color: var(--primary-red);
}

/* --- 1. Minimalist Chevron Button --- */
.menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    width: 35px;
    height: 35px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-grey);
    transition: transform 0.3s ease;
}

.menu-trigger svg {
    width: 24px;
    height: 24px;
}

.menu-trigger:hover {
    color: var(--primary-red);
    transform: translateX(3px); /* Subtle nudge forward */
}

/* --- 2. Fix Header Mobile Layout --- */
@media (max-width: 900px) {
    header { 
        /* CHANGE THIS FROM column TO row */
        flex-direction: row !important; 
        padding: 10px 15px; /* Tighten padding for mobile */
        justify-content: space-between;
    }

    .hero h2 { 
        font-size: 1.6rem; 
        margin-bottom: 20px;
    }

    .logo {
        margin-left: 10px; /* Bring logo closer to the chevron */
        gap: 8px;
    }

    .logo-img {
        height: 38px; /* Slightly smaller logo for mobile */
    }

    .logo h1 {
        font-size: 20px; /* Smaller text to fit one row */
    }

    .logo span.tagline {
        display: block;      /* Crucial: ensures the margin-top actually pushes the text down */
        margin-top: 2px;     /* Changed from -5px (jammed) to 2px (breathing room) */
        font-size: 9px;
        letter-spacing: 1px;
        line-height: 1;      /* Keeps the text box itself tight */
        text-transform: uppercase;
        color: var(--mid-grey);
    }

    .header-actions {
        gap: 5px; /* Narrower gap between buttons */
    }

    .btn {
        padding: 8px 12px; /* Smaller buttons for mobile */
        font-size: 10px;
    }
}

/* --- Extra Tweak for very small phones --- */
@media (max-width: 400px) {
    /* Hide 'Teach With Us' on tiny screens to prevent overlap */
    .header-actions .btn-dark {
        display: none;
    }
}

/* Push the Logo to stay closer to the left, but not touching the button */
.logo {
    margin-right: auto; /* This pushes the Actions to the right */
    margin-left: 40px;  /* Space between the Menu Button and the Logo */
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sidebar Styling - Redesigned for impact */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--dark-grey); /* Stronger background */
    z-index: 2000;
    /* Use transform instead of left to hide the 'X' completely */
    transform: translateX(-100%); 
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 15px 0 30px rgba(0,0,0,0.3);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
}

/* When the menu is active, slide it in */
#sidebar.active {
    transform: translateX(0);
}

/* Fix for the 'X' button visibility and style */
.close-btn {
    font-size: 32px;
    background: none;
    border: none;
    color: white; /* Much more visible on dark grey */
    cursor: pointer;
    align-self: flex-end; /* Keeps it in the top right */
    padding: 10px;
    line-height: 1;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-red);
}

/* Redesigned Menu Links for better visibility */
.sidebar-links {
    list-style: none;
    padding: 0;
    margin-top: 40px;
}

.sidebar-links li {
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.05); /* Subtle divider */
    padding-bottom: 10px;
}

.sidebar-links a {
    text-decoration: none;
    color: #ffffff; /* High contrast font color */
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s;
    display: block;
}

.sidebar-links a:hover {
    color: var(--primary-red);
    padding-left: 10px; /* Subtle movement on hover */
}

/* Ensure the overlay is very noticeable */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7); /* Darker overlay */
    backdrop-filter: blur(8px); /* Stronger blur */
    z-index: 1500;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Container for About and Schedule */
.glass-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 12px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
    color: white;
}

/* Schedule Table Styling */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.schedule-table th {
    text-transform: uppercase;
    color: var(--primary-red);
    border-bottom: 2px solid var(--primary-red);
    padding: 12px;
    text-align: left;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.schedule-table tr:hover {
    background: rgba(255,255,255,0.05);
}

/* Vision/Mission Cards */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Calendar Specific Styles */
.calendar-wrapper {
    overflow-x: auto;
    margin-top: 20px;
    padding-bottom: 10px;
    border-radius: 8px;
    /* This creates a subtle 'frame' for the scrollable area */
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5); 
}

.calendar-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 180px); 
    grid-template-rows: 50px repeat(24, 35px); 
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: max-content;
    min-width: 100%;
}

/* Create the layers */
.calendar-bg-layer, 
.calendar-events-layer {
    /* This makes the layers stack perfectly on top of each other */
    grid-area: 1 / 1 / -1 / -1; 
    display: grid;
    /* They must share the same grid definition as the parent */
    grid-template-columns: inherit;
    grid-template-rows: inherit;
}

/* Ensure events sit on top of the background */
.calendar-events-layer {
    z-index: 2;
    pointer-events: none; /* Allows clicks to pass through to details if needed */
}

.calendar-event {
    pointer-events: auto; /* Re-enable clicks for the actual buttons/links */
}

.calendar-header, .time-gutter {
    background: rgba(192, 57, 43, 0.2);
    color: var(--primary-red);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0.5px solid rgba(255,255,255,0.1);
}

.time-gutter {
    color: white;
    font-size: 10px;
}

.calendar-cell {
    border: 0.5px solid rgba(255,255,255,0.05);
}

/* The "Class Blocks" that sit inside the calendar */
.calendar-event {
    background: var(--primary-red);
    color: white;
    margin: 2px;
    padding: 5px;
    border-radius: 4px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    border-left: 3px solid white;
}

.calendar-event strong { font-size: 12px; display: block; }
.calendar-event span { opacity: 0.8; font-size: 10px; }

@media (max-width: 600px) {
    .about-grid { grid-template-columns: 1fr; }
    .schedule-table { font-size: 12px; }
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .filters {
        grid-template-columns: 1fr;
        padding: 15px;
        margin-bottom: 30px;
    }
}
