/* Syllabus Section - Responsive CSS */
/* Base Styles */

/* 1. Make the page a column flex container that’s at least viewport-tall */
html, body {
  height: 100%;
  margin: 0;
}
body {
  display: flex;
  flex-direction: column;
}

/* 2. Let the syllabus section grow to fill all available space */
#syllabus {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 3. If your syllabus content itself needs to scroll when it overruns,
   make the inner container scrollable: */
.course-syllabus {
  overflow-y: auto;
  /* optional: max-height: calc(100vh - header-height - footer-height - syllabus h2 spacing); */
}


.syllabus {
    padding: 20px;
    max-width: 800px;
    margin: 20px auto;
    animation: fadeIn 1s ease-in-out;
    margin-bottom: 70px;
    width:100%;
}

.syllabus h2 {
    text-align: center;
    font-size: clamp(24px, 5vw, 32px); /* Responsive font size */
    margin-bottom: 20px;
    color: #000000;
    animation: slideIn 1s ease-in-out;
}

.toggle-syllabus i{
    color: #ef7602;
}

.toggle-syllabus {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    flex-direction: row;
}

/* Course Container */
.course-syllabus .syllabus-course {
    background-color: #fff;
    padding: 15px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-syllabus .syllabus-course:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Course Header */
.course-syllabus .syllabus-course h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: clamp(18px, 4vw, 24px); /* Responsive font size */
    margin: 0;
    color: #317dff;
    padding: 8px 0;
}

/* Toggle Icon */
.toggle-icon i {
    transition: transform 0.3s ease;
    font-size: clamp(16px, 3vw, 20px); /* Responsive icon size */
}

.toggle-icon i.rotate {
    transform: rotate(90deg);
}

/* Syllabus Content */
.syllabus-content {
    display: none;
    margin-top: 15px;
    animation: slideDown 0.5s ease-in-out;
}

.syllabus-content.visible {
    display: block;
}

.syllabus-content p {
    margin: 10px 0;
    color: #555;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
    line-height: 1.6;
}

.syllabus-content ul {
    list-style: disc;
    margin-left: 20px;
    color: #555;
    padding-left: 15px;
}

.syllabus-content ul li {
    margin-bottom: 8px;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
}

/* Download Section */
.download-section {
    margin-top: 15px;
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.download-btn {
    background-color: #073e5c;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: background-color 0.3s;
    cursor: pointer;
    border: none;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
    white-space: nowrap;
}

.download-btn:hover {
    background-color: #1d4ed8;
}

.download-btn i {
    margin-right: 8px;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive icon size */
}

.file-info {
    font-size: clamp(12px, 2.5vw, 14px); /* Responsive font size */
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tools Section */
.tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tools span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f4f4f9;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: clamp(12px, 2.5vw, 14px); /* Responsive font size */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tools span:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.tools i {
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive icon size */
    color: #007BFF;
}

/* Form Styles */
.form-group {
    margin-bottom: 15px;
    margin-top: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
}

.submit-btn {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: clamp(14px, 2.5vw, 16px); /* Responsive font size */
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #1d4ed8;
}

/* Course Card Styles */
.course {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.course-card {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.course-card .card-header {
    display: none;
}

.course-card .card-body {
    width: 100% !important;
    padding: 15px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
    .syllabus {
        padding: 15px;
        margin-bottom: 50px;
    }
    
    .download-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
    }
    
    .syllabus-content ul {
        margin-left: 15px;
    }
    
    .tools span {
        padding: 5px 8px;
    }
}

@media (max-width: 480px) {
    .syllabus {
        padding: 12px;
    }
    
    .course-syllabus .syllabus-course {
        padding: 12px;
    }
    
    .syllabus-content ul {
        margin-left: 12px;
    }
    
    .tools {
        gap: 6px;
    }
    
    .form-group input {
        padding: 8px 10px;
    }
    
    .submit-btn {
        padding: 8px 12px;
    }
}

/* Accessibility Improvements */
.syllabus-course h3:focus {
    outline: 2px solid #317dff;
    outline-offset: 2px;
}

.download-btn:focus, .submit-btn:focus {
    outline: 2px solid #1d4ed8;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .syllabus {
        padding: 0;
        margin-bottom: 0;
    }
    
    .syllabus-course {
        break-inside: avoid;
        margin-bottom: 15px !important;
    }
    
    .download-section, .toggle-icon {
        display: none !important;
    }
    
    .syllabus-content {
        display: block !important;
    }
}