/* Styles for schedule.php content */

body {
    font-family: 'Sarabun', sans-serif;
    padding-top: 100px;
}
#video-background {
    position: fixed;
    right: 0; bottom: 0;
    min-width: 100%;
    min-height: 100%;
    z-index: -1000;
    object-fit: cover;
}
.stats-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px; z-index: 1000;
}
.stats-bar a {
    text-decoration: none;
    }
.stat-item {
    text-align: center;
    color: white;
    }
.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    }
.stat-number.orange {
    color: #ff6b4a;
    }
.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    }
.top-right-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    }
.menu-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    padding: 8px 16px; font-size: 0.9rem;
    font-weight: 500; text-decoration: none;
}
.page-wrapper {
    padding-top: 0;
}
.hero-section {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    padding: 2rem 0;
    text-align: center;
}
.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255,255,255,0.8);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    object-fit: cover;
}
.info-card {
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}
.info-card h3 {
    color: #0056b3;
    font-weight: 700;
    font-size: 1.5rem;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background-color: #fff;
}
.schedule-table th, .schedule-table td {
    border: 1px solid #ddd;
    padding: 5px;
    text-align: center;
}
.schedule-table thead th {
    background-color: #0056b3;
    color: white;
}
.sectionserv {
    border: 2px solid orange;
    padding: 20px;
    margin-top: 10px;
    margin-bottom: 20px;
    border-radius: 3px;
    background-color: rgba(255, 254, 250, .5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}
.download-btn, .download-btn-t {
    display: inline-block;
    padding: 10px 20px;
    margin: 20px 0;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.download-btn {
    color: white;
    background-color: orange;
}
.download-btn-t {
    color: rgb(36, 7, 220);
    background-color: rgb(244, 229, 94);
}
.download-btn:hover, .download-btn-t:hover {
    background-color: darkorange;
}
.download-btn i, .download-btn-t i {
    margin-right: 10px;
}
@media (max-width: 768px) {
    .col-sm-12 {
        margin-bottom: 20px;
    }
}
.h5-box {
    text-align: center;
    font-size: 24px;
    color: #260AD6;
    padding: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid orange;
}

/* Additional styles from the 2567 HTML snippet */
.page-container {
    padding: 20px;
}

/* Enhanced table styles */
.table-bordered {
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Added shadow */
    border-radius: 8px; /* Added border-radius */
    overflow: hidden; /* Ensures border-radius applies to children */
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #e9ecef; /* Lighter border for cells */
    padding: 10px; /* Increased padding */
}

.table thead th {
    vertical-align: middle; /* Changed from bottom */
    border-bottom: 2px solid #0056b3; /* Stronger border */
    background-color: #0056b3; /* Consistent with info-card h3 */
    color: white;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: #f2f2f2; /* Subtle hover effect */
    transition: background-color 0.3s ease;
}

.day-column {
    font-weight: bold;
    background-color: #f8f9fa; /* Light background for day column */
    color: #343a40; /* Darker text for day column */
}

/* Day specific colors (Thai tradition) */
.day-monday { background-color: #FFFACD; /* Lemon Chiffon - Yellow */ }
.day-tuesday { background-color: #FFC0CB; /* Pink */ }
.day-wednesday { background-color: #90EE90; /* LightGreen - Green */ }
.day-thursday { background-color: #FFDAB9; /* PeachPuff - Orange */ }
.day-friday { background-color: #ADD8E6; /* LightBlue - Blue */ }
.day-saturday { background-color: #EE82EE; /* Violet - Purple */ }
.day-sunday { background-color: #FFB6C1; /* LightPink - Red */ }

.class-cell {
    background-color: #e6f7ff; /* LightCyan */
    vertical-align: middle;
    position: relative; /* For positioning classroom link */
}

.empty-cell {
    background-color: #f8f8f8; /* WhiteSmoke */
}

.classroom-link {
    display: inline-block; /* Changed to inline-block */
    margin-top: 8px; /* Increased margin */
    padding: 5px 10px; /* Added padding */
    background-color: #28a745; /* Green button */
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.classroom-link:hover {
    background-color: #218838; /* Darker green on hover */
    transform: translateY(-2px); /* Lift effect on hover */
    text-decoration: none; /* Remove underline on hover */
}

/* Course specific colors - make them more vibrant */
.course-1 { background-color: #d4edda; } /* Light green */
.course-2 { background-color: #f8d7da; } /* Light red */
.course-3 { background-color: #cce5ff; } /* Light blue */
.course-4 { background-color: #fff3cd; } /* Light yellow */
.course-5 { background-color: #e2d4ed; } /* Light purple */

/* Enhanced sectionserv cards */
.sectionserv {
    border: 1px solid #e0e0e0; /* Lighter border */
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15); /* Stronger shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff; /* White background */
    padding: 25px; /* Increased padding */
    margin-bottom: 30px; /* More space between cards */
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column; /* Stack content vertically */
    justify-content: space-between; /* Distribute space */
}

.sectionserv:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Stronger shadow on hover */
}

.sectionserv h4 {
    font-size: 1.4rem; /* Slightly larger */
    font-weight: 600; /* Bolder */
    color: #ffeb3b; /* Yellowish color from research-card-title */
    margin-bottom: 15px;
}

.sectionserv img {
    border-radius: 8px; /* Rounded images */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for images */
    margin-bottom: 15px;
}

/* Enhanced download buttons */
.download-btn, .download-btn-t {
    padding: 12px 25px; /* Larger padding */
    font-size: 17px; /* Larger font size */
    border-radius: 30px; /* Pill shape */
    font-weight: 600;
    text-transform: uppercase; /* Uppercase text */
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Shadow for buttons */
}

.download-btn {
    background-color: #ff6b4a; /* Orange */
    color: white;
}

.download-btn:hover {
    background-color: #e05a3c; /* Darker orange */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.download-btn-t {
    background-color: #6c757d; /* Gray */
    color: white;
}

.download-btn-t:hover {
    background-color: #5a6268; /* Darker gray */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.download-btn i, .download-btn-t i {
    margin-right: 8px; /* Adjusted margin */
}

/* Enhanced h5-box */
.h5-box {
    background-color: #f8f9fa; /* Light background */
    color: #0056b3; /* Blue text */
    border: 1px solid #e0e0e0; /* Light border */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    margin-bottom: 40px; /* More space below */
    padding: 20px; /* Increased padding */
    font-size: 26px; /* Larger font size */
    font-weight: 700;
    text-transform: uppercase; /* Uppercase text */
    letter-spacing: 1px;
}

/* Year and Semester Navigation Buttons */
.year-nav .btn, .semester-nav .btn {
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 25px; /* Pill shape */
    margin: 0 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.year-nav .btn-primary, .semester-nav .btn-primary {
    background-color: #007bff; /* Blue */
    border-color: #007bff;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.year-nav .btn-primary:hover, .semester-nav .btn-primary:hover {
    background-color: #0056b3; /* Darker blue */
    border-color: #0056b3;
    transform: translateY(-2px);
}

.year-nav .btn-secondary, .semester-nav .btn-secondary {
    background-color: #6c757d; /* Gray */
    border-color: #6c757d;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.year-nav .btn-secondary:hover, .semester-nav .btn-secondary:hover {
    background-color: #5a6268; /* Darker gray */
    border-color: #5a6268;
    transform: translateY(-2px);
}

/* Responsive adjustments for schedule table */
@media (max-width: 992px) {
    .schedule-table {
        font-size: 10px; /* Smaller font for smaller screens */
    }
    .schedule-table th, .schedule-table td {
        padding: 3px; /* Smaller padding */
    }
}

@media (max-width: 768px) {
    .schedule-table {
        font-size: 9px;
    }
    .schedule-table th, .schedule-table td {
        padding: 2px;
    }
    .sectionserv {
        padding: 20px;
    }
    .sectionserv h4 {
        font-size: 1.1rem;
    }
    .download-btn, .download-btn-t {
        padding: 10px 20px;
        font-size: 15px;
    }
    .h5-box {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .schedule-table {
        font-size: 8px;
    }
    .schedule-table th, .schedule-table td {
        padding: 1px;
    }
    .year-nav .btn, .semester-nav .btn {
        font-size: 0.9rem;
        padding: 8px 15px;
        margin: 0 4px;
    }
}

/* New styles for material items and image containers */
.material-item {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
    margin-bottom: 15px; /* Space between material item and buttons */
}

.material-item h4 {
    text-align: center; /* Center the title */
    margin-bottom: 10px; /* Space between title and image */
}

.material-image-container {
    width: 100%; /* Ensure container takes full width */
    max-width: 250px; /* Limit image size for single images */
    height: 150px; /* Fixed height for consistency */
    overflow: hidden; /* Hide overflow if image is larger */
    border-radius: 8px; /* Match sectionserv img border-radius */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Match sectionserv img shadow */
    margin-bottom: 15px; /* Space between image and buttons */
}

.material-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, cropping if necessary */
    display: block; /* Remove extra space below image */
}

.material-image-container.multiple-images {
    display: flex; /* Use flexbox for multiple images */
    flex-wrap: wrap; /* Allow images to wrap */
    justify-content: center; /* Center multiple images */
    gap: 10px; /* Space between multiple images */
    max-width: none; /* Remove max-width for multiple images */
    height: auto; /* Auto height for multiple images */
    box-shadow: none; /* Remove shadow for the container itself */
}

.material-image-container.multiple-images .col-md-6 {
    flex: 0 0 48%; /* Adjust width for two images per row */
    max-width: 48%;
    padding: 0; /* Remove padding from col-md-6 */
}

.material-image-container.multiple-images img {
    height: 120px; /* Adjust height for multiple images */
}

/* Adjust sectionserv to better accommodate new material-item structure */
.sectionserv {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center; /* Center content within sectionserv */
}

.sectionserv .download-btn, .sectionserv .download-btn-t {
    margin-top: auto; /* Push buttons to the bottom */
}

/* Ensure row for sectionserv is properly spaced */
.row.justify-content-center {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px; /* Compensate for column padding */
    margin-right: -15px; /* Compensate for column padding */
    margin-top: 20px; /* Add some top margin to the row of sectionserv */
}

/* Ensure columns within this row behave as expected */
.row.justify-content-center > [class*="col-"] {
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 30px; /* Space between rows of cards */
}

/* Adjust column padding for better visual separation */
.col-md-5, .col-sm-10, .col-lg-12 {
    padding: 15px; /* Add some padding to columns */
}

/* Ensure the main content area has proper padding */
.main-content .container {
    padding-top: 20px; /* Add padding to the top of the container within main-content */
    padding-bottom: 40px; /* Add padding to the bottom */
}

/* Adjust year/semester nav spacing */
.year-nav, .semester-nav {
    margin-bottom: 30px; /* More space below navigation buttons */
}

/* Adjust h5-box margin */
.h5-box {
    margin-top: 40px; /* More space above h5-box */
}

/* Ensure images within sectionserv are responsive */
.sectionserv img {
    max-width: 100%;
    height: auto;
}

/* Adjustments for smaller screens */
@media (max-width: 992px) {
    .schedule-table {
        font-size: 10px; /* Smaller font for smaller screens */
    }
    .schedule-table th, .schedule-table td {
        padding: 3px; /* Smaller padding */
    }
}

@media (min-width: 768px) { /* For medium and larger screens */
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .schedule-table {
        font-size: 9px;
    }
    .schedule-table th, .schedule-table td {
        padding: 2px;
    }
    .sectionserv {
        padding: 20px;
    }
    .sectionserv h4 {
        font-size: 1.1rem;
    }
    .download-btn, .download-btn-t {
        padding: 10px 20px;
        font-size: 15px;
    }
    .h5-box {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .material-image-container {
        max-width: 150px;
        height: 90px;
    }
    .material-image-container.multiple-images img {
        height: 70px;
    }
    .sectionserv {
        padding: 15px;
    }
    .sectionserv h4 {
        font-size: 1.1rem;
    }
    .download-btn, .download-btn-t {
        padding: 8px 15px;
        font-size: 14px;
    }
    .h5-box {
        font-size: 18px;
    }
}
