/* Academics Page Styles */

/* Hero Section */
.academics-hero {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: white;
    text-align: center;
    padding: 80px 20px;
    position: relative;
}

.academics-hero .hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.academics-hero .hero-text p {
    font-size: 1.5rem;
    opacity: 0.9;
}

/* Main Content Layout */
.academics-main {
    background: #f8f9fa;
    padding: 60px 0;
    background-image: url('../images/pattern-background.png');
    background-repeat: no-repeat;
    background-position: left top;
    background-size: 25% auto; /* 1/6 ของหน้าจอ */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.content-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-section {
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.sidebar-button {
    background: #8B0000;
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-button i:first-child {
    margin-right: 12px;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav li:last-child {
    border-bottom: none;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover {
    background: #f8f9fa;
    color: #8B0000;
    padding-left: 25px;
}

.sidebar-nav i {
    margin-right: 12px;
    color: #8B0000;
    font-size: 0.9rem;
}

/* Main Content */
.main-content {
    /* background: white; */
    border-radius: 12px;
    padding: 0 40px 40px 40px;
    /* box-shadow: 0 4px 20px rgba(0,0,0,0.1); */
}

.content-header h2 {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 20px;
    position: relative;
}

.content-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 200px;
    height: 4px;
    background: #FFD700;
    border-radius: 2px;
}

.content-intro {
    margin-bottom: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
}

.content-intro p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Academic Calendar */
.academic-calendar {
    margin-top: 40px;
}

.calendar-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.calendar-header h3 {
    color: #8B0000;
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.school-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.school-logo span {
    color: #666;
    font-size: 0.9rem;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.legend-color.green { background: #28a745; }
.legend-color.yellow { background: #ffc107; }
.legend-color.light-blue { background: #17a2b8; }
.legend-color.purple { background: #6f42c1; }
.legend-color.red { background: #dc3545; }
.legend-color.dark-blue { background: #007bff; }

.legend-item span:last-child {
    color: #555;
    font-size: 0.9rem;
}

/* Calendar Grid */
.calendar-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.month-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.month-section h4 {
    background: #8B0000;
    color: white;
    margin: 0;
    padding: 15px 20px;
    font-size: 1.2rem;
    font-weight: 600;
}

.month-grid {
    padding: 20px;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #8B0000;
    text-align: center;
}

.dates {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.date-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 15px;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.date {
    background: #8B0000;
    color: white;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    min-width: 60px;
}

.event {
    color: #555;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .sidebar {
        position: static;
        order: 2;
    }
    
    .main-content {
        order: 1;
        padding: 30px 20px;
    }
    
    .academics-hero .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .academics-hero .hero-text p {
        font-size: 1.2rem;
    }
    
    .content-header h2 {
        font-size: 2rem;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 15px;
    }
    
    .weekdays {
        grid-template-columns: repeat(5, 1fr);
        font-size: 0.8rem;
    }
    
    .date-item {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }
    
    .date {
        min-width: 50px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .academics-hero {
        padding: 60px 15px;
    }
    
    .academics-hero .hero-text h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .calendar-header h3 {
        font-size: 1.4rem;
    }
    
    .month-grid {
        padding: 15px;
    }
}
