:root {
    --msu-red: rgb(200, 16, 46);
    --msu-black: #1a1a1a;
    --msu-gray: #333333;
    --msu-light-gray: #a2aeba;
    --msu-gold: #FFD700;
    --msu-light-background: rgba(255, 255, 255, 0.9);
    --gradient-primary: linear-gradient(135deg, #633a3a 0%, #333333 100%);
    --gradient-background: linear-gradient(145deg, #ffffff 20%, #b41b34 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tinos', Arial, sans-serif;
    background: var(--gradient-background);
    min-height: 100vh;
    color: var(--msu-black);
    line-height: 1.6;
}

/* Layout Components */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
    flex: 1 0 auto;
}

.content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Section */
.header-section {
    background: var(--msu-light-background);
    color: var(--msu-black);
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid var(--msu-gold);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.header-content h1,
.header-content .logo {
    font-size: 2.25rem;
    font-weight: 475;
    margin-bottom: 0.3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header-content img {
    margin-right: 2rem;
}

.header-content p {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Footer Section */
.site-footer {
    width: 100%;
    margin: auto auto 0 auto;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 0.97rem;
    border-top: 1px solid #e5e5e5;
    padding: 1.5rem 0;
}

.site-footer a {
    color: #a6192e;
    text-decoration: underline;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #7d1322;
    text-decoration: none;
}

.site-footer small {
    font-size: 0.97rem;
}

.site-footer p {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    color: #888;
    text-align: center;
}

/* Card Components */
.search-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    min-height: 60vh;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.card-header-custom {
    background: var(--gradient-secondary);
    color: var(--msu-red);
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--msu-red);
}

.card-header-custom h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* FROM */
.form-container {
    padding: 2rem;
}

/* Form Sections */
.form-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--msu-red);
}

.form-section h4 {
    color: var(--msu-red);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

.form-section h4 i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.form-label {
    font-weight: 500;
    color: var(--msu-gray);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    display: block;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    min-height: 45px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--msu-red);
    box-shadow: 0 0 0 0.2rem rgba(209, 0, 0, 0.15);
}

.form-control:hover,
.form-select:hover {
    border-color: var(--msu-red);
}

/* Validation */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

.invalid-feedback {
    display: block;
    font-size: 0.85rem;
    color: #dc3545;
    margin-top: 0.4rem;
    font-weight: 500;
}

/* Style disabled options in select dropdowns */
.form-select option:disabled {
    color: #6c757d;
    font-style: italic;
    background-color: #f8f9fa;
}

.form-select option:disabled:hover {
    background-color: #f8f9fa;
}

/* Class Code Visibility Logic */
#classCodeContainer {
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

#classCodeContainer.show {
    display: block;
    opacity: 1;
    transition: opacity 0.3s;
}

/* Adjust container widths when class code is visible */
.row.has-class-code #subjectContainer {
    flex: 0 0 auto;
    width: 33.333333%;
}

.row.has-class-code #courseTypeContainer {
    flex: 0 0 auto;
    width: 41.666667%;
}

.wildcard-note {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
    display: block;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

#classCodeContainer.show .wildcard-note {
    opacity: 1;
    transform: translateY(0);
}

#classCodeContainer.show .form-control {
    margin-bottom: 0.25rem;
}


/* Button Styles */
.btn-search,
.btn-reset {
    background: rgb(255, 255, 255);
    color: var(--msu-red);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.125em;
    transition: all 0.4s ease;
    box-shadow: 3px 4px 5px rgba(209, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
    cursor: pointer;
}

.btn-search:hover,
.btn-reset:hover {
    background: var(--msu-red);
    color: white;
    transform: translateY(-1px);
}

.btn-search:hover {
    box-shadow: 0 8px 25px rgba(209, 0, 0, 0.4);
}

.btn-reset {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    margin-left: 1.5rem;
}


.filter-info {
    background: #e8f4f8;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #004085;
}

/* Advanced Instructions */
.advanced-instructions {
    margin: 0;

}

/* RESULTS */
.results-header {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--msu-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--msu-red);
    margin-bottom: 0.5rem;
}

.results-subtext {
    font-size: 1.05rem;
    color: #555;
    margin-top: 0.5rem;
    line-height: 1.5;
    padding-left: 0.2rem;
}

.results-subtext-block {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.08rem;
    color: #444;
    border-left: 4px solid var(--msu-red);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

table,
th,
td {
    border: 1px solid black;
    padding: 2px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsiveness */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .header-content p {
        font-size: 0.9rem;
    }
    
    .main-content {
        padding: 1.5rem 0;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .search-card {
        min-height: auto;
    }
    
    .card-header-custom {
        padding: 1.5rem;
    }
    
    .card-header-custom h2 {
        font-size: 1.5rem;
    }
    
    .form-section {
        padding: 1.2rem;
    }
    
    .form-section h4 {
        font-size: 1rem;
    }
    
    .btn-search {
        padding: 0.8rem 2rem;
        font-size: 1rem;
        min-width: 150px;
    }
    
    .btn-reset {
        margin-left: 0;
        margin-top: 0.8rem;
    }
    
    .w-md-auto {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }
    
    .header-content h1 {
        font-size: 1.3rem;
    }
    
    .card-header-custom h2 {
        font-size: 1.3rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .btn-search,
    .btn-reset {
        width: 100%;
        margin: 0.4rem 0;
    }
    
    .w-md-auto {
        width: 100% !important;
    }
}