/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Body Styling */
body {
    background-color: #f4faff;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* --- Unified Sidebar (Copied from styles.css) --- */
.side-bar {
    width: 280px; /* Desktop width */
    background: linear-gradient(180deg, #002366 0%, #001a4d 100%);
    color: white;
    height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed; /* Fixed position */
    top: 0;
    left: 0;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1001; /* Above overlay */
    transition: transform 0.3s ease-out; /* Transition for mobile */
    overflow-y: auto; /* Allow sidebar scrolling if content overflows */
}

.logo-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 25px; /* More space */
    text-align: center;
    width: 100%;
}

.logo {
    width: 180px; /* Adjusted size */
    height: auto;
    margin-bottom: 15px;
    opacity: 0.9; /* Slightly less transparent */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.animated-text {
    font-size: 1.1rem; /* Adjusted size */
    margin: 10px 0 5px 0; /* Adjusted margin */
    color: #ffffff;
    font-weight: 600;
}

.animated-subtext {
    font-size: 0.85rem; /* Adjusted size */
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
}

.side-bar ul {
    list-style: none;
    width: 100%; /* Full width */
    padding: 0 10px; /* Add padding */
    margin: 0;
    flex-grow: 1; /* Allow list to take remaining space */
}

.side-bar ul li {
    margin: 10px 0; /* Adjusted margin */
}

.nav-item { /* Unified class for sidebar links */
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85); /* Brighter text */
    font-weight: 500;
    padding: 12px 18px; /* Adjusted padding */
    display: flex;
    align-items: center;
    text-align: left;
    border-radius: 8px; /* Smoother radius */
    background: transparent; /* Transparent background */
    border: 1px solid transparent; /* Placeholder for transition */
    transition: all 0.25s ease-out;
    position: relative;
    overflow: hidden;
}

.nav-item i {
    margin-right: 15px; /* More space */
    font-size: 1.1em;
    min-width: 25px;
    text-align: center;
    transition: transform 0.3s ease;
    color: rgba(255, 255, 255, 0.85);
}

.nav-item .nav-text {
    color: inherit; /* Inherit color from <a> */
    transition: color 0.25s ease-out;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff; /* Full white on hover */
    transform: translateX(5px); /* Subtle move */
}

.nav-item:hover i {
    transform: scale(1.1);
}

.nav-item.active {
    background: #0054a6; /* Solid active background */
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-item.active i {
    color: #ffffff;
}

/* Ripple Effect */
.ripple:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
    opacity: 1;
    pointer-events: none;
}
.ripple:active:before {
    transform: translate(-50%, -50%) scale(100);
    opacity: 0;
    transition: 0s;
}

/* Sidebar Bottom Links (Desktop) */
.sidebar-bottom-links {
    margin-top: auto; /* Push to bottom */
    padding: 15px 10px 10px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}
.bottom-nav-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}
.bottom-nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.bottom-nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* --- Mobile Menu Specific --- */
.mobile-menu-icon {
    display: none; /* Hidden by default, shown in media query */
    background: rgba(0, 84, 166, 0.8); /* Make button background blue */
    border: none;
    color: white; /* Icon color */
    font-size: 22px; /* Slightly smaller icon */
    padding: 0; /* Remove padding, use width/height */
    cursor: pointer;
    position: fixed;
    top: 10px; /* Adjust position */
    left: 10px;
    z-index: 1002; /* Above sidebar and overlay */
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    width: 44px; /* Touch target size */
    height: 44px;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.mobile-menu-icon.active {
    background-color: rgba(255, 255, 255, 0.9); /* White background */
    color: #0054a6; /* Blue icon */
}
.mobile-menu-icon:hover {
    background-color: rgba(0, 84, 166, 1);
}
.mobile-menu-icon.active:hover {
     background-color: rgba(255, 255, 255, 1);
}
.nav-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000; /* Below sidebar, above content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0s 0.3s linear;
}
.nav-overlay.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-out, visibility 0s 0s linear;
}


/* --- Main Content --- */
.main-content {
    width: calc(100% - 280px); /* Desktop width */
    margin-left: 280px; /* Desktop margin */
    padding: 30px 40px; /* Updated padding */
    min-height: calc(100vh - 40px); /* Account for footer height */
    transition: margin-left 0.3s ease-out, width 0.3s ease-out; /* Smooth transition */
    padding-bottom: 80px; /* Ensure space above footer */
    display: flex;
    flex-direction: column;
}

/* Create flex container for schedule content */
.schedule-content {
    display: flex;
    gap: 30px;
    margin: 30px auto;
    max-width: 1400px;
    align-items: flex-start;
}

/* --- Schedules Page Specific Styles --- */
.schedule-header {
    text-align: center;
    margin-bottom: 30px;
}

.schedule-header h1 { /* Use standard section title style */
    font-size: 2.2rem;
    color: #002366;
    margin-bottom: 10px;
    font-weight: 600;
}

.schedule-header p { /* Use standard section subtitle style */
    font-size: 1.1rem;
    color: #0054a6;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.schedule-announcement {
    background: linear-gradient(135deg, #ffc85a, #ffae00); /* Yellow/Orange gradient */
    padding: 18px 25px; /* Adjusted padding */
    border-radius: 10px;
    margin: 30px auto; /* Center and add margin */
    max-width: 900px; /* Limit width */
    display: flex;
    align-items: center;
    gap: 15px;
    color: #5c3d00; /* Darker text for contrast */
    box-shadow: 0 4px 15px rgba(255, 174, 0, 0.2);
    border: 1px solid rgba(255, 174, 0, 0.3);
}

.announcement-icon i {
    font-size: 1.6rem; /* Adjusted size */
    line-height: 1; /* Align icon better */
}
.schedule-announcement p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Adjust schedule calendar width */
.schedule-calendar {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 30px 35px; /* Increased padding */
    margin: 0; /* Remove margin since parent handles spacing */
    box-shadow: 0 5px 20px rgba(0, 35, 102, 0.08);
    border: 1px solid #e8f0f8;
    max-width: none; /* Remove max-width limitation */
}

.calendar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #003366;
}

.calendar-header i {
    font-size: 1.8rem; /* Adjusted size */
    color: #0054a6;
}
.calendar-header h3 {
    font-size: 1.5rem; /* Adjusted size */
    font-weight: 600;
    margin: 0;
}

.schedule-item {
    display: flex;
    align-items: center;
    padding: 18px 10px; /* Adjusted padding */
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border-radius: 8px; /* Add slight radius */
    margin: 5px 0; /* Add small margin */
}
.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item:hover {
    background-color: #f8fcff;
    transform: translateX(3px);
}
.schedule-item:active {
     background-color: #e6f3ff;
     transform: scale(0.99);
}

.day-label {
    width: 120px; /* Adjusted width */
    font-weight: 600;
    color: #002366;
    font-size: 1.05rem; /* Adjusted size */
    flex-shrink: 0; /* Prevent shrinking */
    padding-right: 15px;
}

.time-slots {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px; /* Row and column gap */
}

.time-slot {
    color: #555; /* Darker text */
    font-size: 0.95rem;
    padding: 6px 14px; /* Adjusted padding */
    background: #f0f4f8; /* Light background */
    border-radius: 15px; /* Pill shape */
    border: 1px solid #e0e8f0;
    white-space: nowrap; /* Prevent wrapping */
}

.schedule-item i.fa-chevron-right { /* Arrow icon */
    margin-left: auto; /* Push to right */
    color: #0054a6;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: transform 0.3s ease;
    padding-left: 15px;
}
.schedule-item:hover i.fa-chevron-right {
    transform: translateX(4px);
    opacity: 1;
}

/* Adjust notes section */
.schedule-notes {
    width: 350px;
    background: #f0f8ff; /* Light background */
    border: 1px solid #cce4ff;
    border-radius: 12px;
    padding: 25px; /* Increased padding */
    margin: 0; /* Remove margin since parent handles spacing */
    text-align: left;
    position: sticky;
    top: 20px;
}

.schedule-notes h4 {
    color: #003366;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px; /* Space below heading */
    font-size: 1.2rem;
    font-weight: 600;
}
.schedule-notes h4 i {
    color: #0054a6;
    font-size: 1.1em; /* Match text size */
}

.schedule-notes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-notes li {
    padding: 8px 0; /* Vertical padding */
    color: #555; /* Darker text */
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    line-height: 1.6;
}
.schedule-notes li::before {
    content: "\f0da"; /* Font Awesome chevron-right */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #0054a6;
    font-size: 0.9em;
    margin-top: 0.2em; /* Align icon */
    line-height: 1.6;
}

/* --- Footer Styling --- */
.footer {
    text-align: center;
    padding: 15px;
    background-color: #001a4d;
    color: rgba(255, 255, 255, 0.7);
    width: calc(100% - 280px);
    margin-left: 280px;
    font-size: 0.85rem;
    z-index: 100;
    margin-top: auto; /* Push to bottom */
    transition: margin-left 0.3s ease-out, width 0.3s ease-out;
    position: static;
}

/* --- SweetAlert2 Custom Styles --- */
.schedule-detail {
    padding: 10px 0 0 0; /* Padding top */
    text-align: left;
}

.schedule-detail p {
    margin: 8px 0; /* Reduced margin */
    color: #555; /* Darker text */
    font-size: 1rem; /* Slightly smaller */
    line-height: 1.6;
    padding-left: 5px; /* Indent slightly */
}

.schedule-note {
    margin-top: 15px; /* Space above note */
    padding-top: 15px;
    border-top: 1px solid #eee;
    color: #0054a6 !important; /* Ensure color override */
    font-style: italic;
    font-size: 0.95rem;
}

/* Improved modal styling */
.swal2-popup.schedule-popup {
    max-width: 90% !important; /* Use percentage for better mobile adaptation */
    width: auto !important;
    min-width: 280px !important;
    max-width: 450px !important;
    padding: 1.5em !important;
    border-radius: 15px !important;
}

.swal2-popup.schedule-popup .swal2-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.8em !important;
    color: #002366 !important;
}

.swal2-popup.schedule-popup .swal2-icon {
    margin: 0.5em auto 1em !important;
}

.swal2-popup.schedule-popup .swal2-content {
    padding: 0 !important;
}

.swal2-popup.schedule-popup .swal2-confirm {
    border-radius: 8px !important;
    min-width: 100px !important;
    padding: 0.5em 1.5em !important;
}

/* Responsive adjustments for modals */
@media screen and (max-width: 480px) {
    .swal2-popup.schedule-popup {
        padding: 1em !important;
        margin: 0 10px !important;
    }
    
    .swal2-popup.schedule-popup .swal2-title {
        font-size: 1.3rem !important;
    }
    
    .schedule-detail p {
        font-size: 0.9rem;
    }
}

/* --- Responsive --- */

/* Medium devices (Tablets & Smaller Desktops) */
@media screen and (max-width: 992px) {
    .side-bar {
        transform: translateX(-100%);
        position: fixed;
        width: 280px;
        height: 100%;
    }
    .side-bar.active {
        transform: translateX(0);
    }
    .mobile-menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .nav-overlay {
        display: block;
    }
    .main-content {
        width: 100%;
        margin-left: 0;
        padding: 80px 20px 40px 20px;
    }
    .footer {
        width: 100%;
        margin-left: 0;
        position: static;
        margin-top: 30px;
    }
    .logo { width: 150px; }
    .sidebar-bottom-links { display: block; }
    .schedule-calendar { padding: 20px; }
    .day-label { width: 100px; font-size: 1rem; }
    .time-slot { font-size: 0.9rem; padding: 5px 12px;}
}

/* Small devices (Mobile phones) */
@media screen and (max-width: 768px) {
    .main-content {
        padding: 75px 15px 30px 15px;
    }
    .schedule-header h1 { font-size: 1.8rem; }
    .schedule-header p { font-size: 1rem; }
    .schedule-announcement { padding: 15px; flex-direction: column; text-align: center; gap: 10px;}
    .announcement-icon i { font-size: 1.5rem; margin-bottom: 5px;}
    .schedule-announcement p { font-size: 0.9rem; }

    .schedule-calendar { padding: 15px; }
    .calendar-header { margin-bottom: 20px; gap: 10px; }
    .calendar-header i { font-size: 1.5rem; }
    .calendar-header h3 { font-size: 1.3rem; }

    .schedule-item { flex-direction: column; align-items: flex-start; padding: 15px 10px; gap: 8px;}
    .day-label { width: auto; margin-bottom: 5px; font-size: 1rem;}
    .time-slots { flex-direction: row; /* Keep times in a row */ }
    .time-slot { font-size: 0.85rem; padding: 4px 10px;}
    .schedule-item i.fa-chevron-right { display: none; /* Hide chevron on mobile */ }

    .schedule-notes { padding: 20px; }
    .schedule-notes h4 { font-size: 1.1rem; }
    .schedule-notes li { font-size: 0.9rem; gap: 8px; padding: 6px 0;}
    .schedule-notes li::before { font-size: 0.8em; margin-top: 0.3em;}

    .footer { padding: 10px; font-size: 0.8rem; }

    /* Mobile Sidebar Expansion */
    .side-bar .logo { width: 180px; margin-bottom: 20px; }
    .side-bar .nav-item { padding: 15px 20px; font-size: 1rem; margin: 12px 0; }
    .side-bar .nav-item i { font-size: 1.2em; margin-right: 18px; }
    .sidebar-bottom-links { padding: 20px 15px 15px 15px; }
    .bottom-nav-item { padding: 12px 15px; font-size: 0.95rem; }
    .bottom-nav-item i { font-size: 1.1rem; }

    .schedule-content {
        padding: 0 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .schedule-calendar {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .calendar-header {
        justify-content: center;
        text-align: center;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
     .main-content {
        padding: 70px 10px 20px 10px;
    }
    .logo { width: 120px; }
    .animated-text { font-size: 1rem; }
    .animated-subtext { font-size: 0.8rem; }
    .nav-item { padding: 12px 15px; font-size: 0.95rem; }
    .nav-item i { margin-right: 12px; }

    .schedule-header h1 { font-size: 1.6rem; }
    .schedule-header p { font-size: 0.9rem; }
    .time-slots { gap: 5px 8px; }
    .time-slot { font-size: 0.8rem; padding: 4px 8px;}

}

/* Landscape orientation fixes */
@media screen and (max-height: 500px) and (orientation: landscape) {
   .side-bar { overflow-y: auto; }
}

/* Touch-friendly adjustments */
@media (hover: none) {
    .nav-item:hover { background: transparent; transform: none; }
    .nav-item:active { background: rgba(255, 255, 255, 0.1); }
    .schedule-item:hover { background-color: transparent; transform: none; }
    .schedule-item:active { background-color: #f0f7ff; transform: scale(0.99); }
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    .schedule-content {
        flex-direction: column;
    }
    
    .schedule-notes {
        width: 100%;
        position: static;
    }
}
/* End of CSS */