/* Simplified 2017 Design - Clean Flat Design */
@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|Roboto:300,400,500,700');

body {
    padding-top: 0; /* Remove body padding-top since we're using container padding */
    padding-bottom: 20px;
    background: #f8f9fa;
    font-family: 'Open Sans', 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #2c3e50;
    min-height: 100vh;
}

/* Simplified Container */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
    background: white;
    margin: 0 auto;
    max-width: 1200px;
    border-radius: 0 0 8px 8px; /* Only bottom corners rounded */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    border-top: none; /* No top border to connect with navbar */
    padding: 40px;
    margin-top: 70px; /* Account for fixed navbar height */
}

.navbar {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    box-shadow: 0 3px 10px rgba(30, 60, 114, 0.3);
    min-height: 70px; /* Use min-height instead of fixed height */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    border-bottom: 3px solid #ffd700;
}

.navbar-brand {
    font-family: 'Roboto', serif;
    font-weight: 700;
    font-size: 24px;
    color: white !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
    padding: 15px 15px;
    position: relative;
}

.navbar-brand::before {
    content: "🎓";
    margin-right: 8px;
    font-size: 20px;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 15px;
    width: 0;
    height: 2px;
    background: #ffd700;
    transition: width 0.3s ease;
}

.navbar-brand:hover::after {
    width: calc(100% - 30px);
}

.navbar-brand:hover {
    color: #ffd700 !important;
    text-decoration: none;
}

.navbar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-left: 30px;
    --bs-nav-link-padding-x: 0.5rem;
    --bs-nav-link-padding-y: 0.5rem;
}

.navbar-nav li {
    list-style: none;
    margin: 0 3px;
    position: relative;
}

.navbar-nav li::before {
    display: none; /* Remove any bullets */
}

.navbar-nav > li > a,
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    font-size: 14px;
    padding: 15px 18px;
    text-decoration: none;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    position: relative;
    border-bottom: 3px solid transparent;
}

.navbar-nav > li > a:hover,
.navbar-nav .nav-link:hover {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.1);
    border-bottom: 3px solid #ffd700;
    text-decoration: none;
}

/* Active/Current page styling */
.navbar-nav > li.active > a,
.navbar-nav > li > a.active,
.navbar-nav .nav-link.active {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.15);
    border-bottom: 3px solid #ffd700;
}

/* Sub-menu item icons */
.navbar-nav > li > a::before {
    margin-right: 6px;
    font-size: 12px;
}

/* Add specific icons for each menu item */
.navbar-nav > li:nth-child(1) > a::before { content: "🏠"; } /* Home */
.navbar-nav > li:nth-child(2) > a::before { content: "ℹ️"; } /* About */
.navbar-nav > li:nth-child(3) > a::before { content: "👥"; } /* Students */
.navbar-nav > li:nth-child(4) > a::before { content: "📚"; } /* Courses */
.navbar-nav > li:nth-child(5) > a::before { content: "👨‍🏫"; } /* Instructors */
.navbar-nav > li:nth-child(6) > a::before { content: "🏛️"; } /* Departments */

/* Separator between menu groups */
.navbar-nav > li:nth-child(2)::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
}

/* University themed styling */
.navbar-container {
    position: relative;
}

.navbar-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Simplified Buttons */
.btn {
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-default {
    background: #6c757d;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 3px;
}

/* Simplified Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: #2c3e50;
    font-weight: 400;
    margin-bottom: 20px;
}

h1 {
    font-size: 32px;
    color: #007bff;
    margin-bottom: 25px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

h2 {
    font-size: 26px;
    color: #34495e;
    margin-bottom: 18px;
}

h4 {
    font-size: 18px;
    color: #495057;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Simplified Tables */
.table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    border: 1px solid #dee2e6;
}

.table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 15px;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

/* Simplified Forms */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    box-shadow: none;
    background: white;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

/* Simplified Cards */
.panel, .card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.panel-heading, .card-header {
    background: #f8f9fa;
    color: #495057;
    padding: 15px 20px;
    font-weight: 600;
    border-bottom: 1px solid #dee2e6;
}

.panel-body, .card-body {
    padding: 20px;
}

/* Simplified Alerts */
.alert {
    border: none;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left-color: #17a2b8;
}

/* Simplified Images */
img {
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Simplified Links */
a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Simplified File Upload */
input[type="file"] {
    max-width: 100%;
    padding: 10px;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    background: #f8f9fa;
}

/* Simplified Image Display */
.current-image {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.current-image img {
    border: 2px solid #dee2e6;
    padding: 5px;
    background-color: white;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
    text-align: left;
    width: 180px;
    color: #495057;
    font-weight: 600;
}

.dl-horizontal dd {
    margin-left: 200px;
    color: #6c757d;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 400px;
}

/* Simplified validation helpers */
.field-validation-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

.field-validation-valid {
    display: none;
}

input.input-validation-error {
    border: 2px solid #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

input[type="checkbox"].input-validation-error {
    border: 0 none;
}

.validation-summary-errors {
    color: #dc3545;
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.validation-summary-valid {
    display: none;
}

/* Bootstrap 5 specific fixes */
.navbar-nav {
    --bs-nav-link-padding-x: 0.5rem;
    --bs-nav-link-padding-y: 0.5rem;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0;
    padding: 0.5rem 0;
}

.navbar-text .badge {
    margin-left: 0.5rem;
}

/* Badge styling for Bootstrap 5 */
.badge.bg-success { background-color: #198754 !important; }
.badge.bg-warning { background-color: #ffc107 !important; color: #000 !important; }
.badge.bg-danger { background-color: #dc3545 !important; }
.badge.bg-info { background-color: #0dcaf0 !important; color: #000 !important; }

/* Right-aligned navbar items */
.navbar-nav.ms-auto .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav.ms-auto .navbar-text {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

/* Ensure badges are properly styled in navbar */
.navbar .badge {
    font-size: 11px;
    padding: 0.25em 0.5em;
    border-radius: 0.25rem;
}

/* Ensure proper spacing on mobile */
@media (max-width: 991.98px) {
    .body-content {
        margin-top: 80px; /* Account for taller navbar on mobile */
    }
    
    .navbar-nav {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .navbar-nav.ms-auto {
        margin-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 0.5rem;
    }
    
    .navbar-nav.ms-auto .navbar-text {
        padding: 0.5rem 0;
        text-align: center;
        width: 100%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .body-content {
        margin: 10px;
        padding: 20px;
        border-radius: 6px;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }
    
    .navbar-nav li {
        width: 100%;
        margin: 2px 0;
    }
    
    .navbar-nav > li > a {
        border-radius: 4px;
        margin: 2px 0;
    }
}

/* Additional Clean Styling */
.page-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.navbar-right {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

.navbar-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 13px;
    font-weight: 500;
    margin: 0;
    padding: 0;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.navbar-text .label {
    margin-left: 8px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Role-specific label colors */
.label-admin {
    background: #ffd700;
    color: #1e3c72;
}

.label-teacher {
    background: #28a745;
    color: white;
}

.label-student {
    background: #17a2b8;
    color: white;
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
    .navbar-right {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        text-align: center;
        margin-top: 10px;
        width: 100%;
    }
}
