/* CSS Variables for College Theme */
:root {
    --college-primary: #1e3a8a;
    --college-secondary: #3b82f6;
    --college-accent: #f59e0b;
    --college-success: #10b981;
    --college-warning: #f59e0b;
    --college-danger: #ef4444;
    --college-light: #f8fafc;
    --college-dark: #1e293b;
    --college-gray: #64748b;
    --college-border: #e2e8f0;
    --header-height: 80px;
    --footer-height: 200px;
}

/* Global Layout Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: white;
    color: var(--college-dark);
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--college-dark) 0%, var(--college-primary) 100%);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--header-height);
}

.navbar-custom {
    background: transparent;
    padding: 0.75rem 0;
    min-height: var(--header-height);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.75rem;
    color: white !important;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    color: var(--college-accent) !important;
    transform: translateY(-1px);
}

.navbar-brand i {
    font-size: 2rem;
    margin-right: 0.75rem;
    color: var(--college-accent);
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.navbar-brand .brand-main {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand .brand-sub {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.9;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.navbar-nav .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

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

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Sidebar Styles */
.sidebar {
    background: white;
    min-height: calc(100vh - var(--header-height));
    border-right: 1px solid var(--college-border);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    padding: 0;
}

.sidebar .nav {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: var(--college-gray);
    padding: 0.875rem 1.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background-color: var(--college-light);
    color: var(--college-primary);
    border-left-color: var(--college-secondary);
    padding-left: 1.75rem;
}

.sidebar .nav-link.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--college-primary);
    border-left-color: var(--college-primary);
    font-weight: 600;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

.sidebar-heading {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--college-gray);
    padding: 1rem 1.5rem 0.5rem;
    margin: 0;
    border-top: 1px solid var(--college-border);
}

.sidebar-heading:first-child {
    border-top: none;
    padding-top: 0.5rem;
}

/* Footer Styles */
.footer-custom {
    background: linear-gradient(135deg, var(--college-dark) 0%, var(--college-primary) 100%);
    color: white;
    padding: 3rem 0 0;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--college-accent) 0%, var(--college-secondary) 50%, var(--college-accent) 100%);
}

/* Footer Brand */
.footer-brand {
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
    display: flex;
    align-items: center;
}

.footer-brand i {
    color: var(--college-accent);
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

/* Footer Headings */
.footer-heading {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--college-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

/* Footer Text */
.footer-text {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-emergency {
    margin-bottom: 0.25rem;
}

/* Footer Links */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-link:hover {
    color: var(--college-accent);
    transform: translateX(4px);
}

.footer-link i {
    margin-right: 0.5rem;
    width: 16px;
}

/* Footer Bottom */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    margin-top: 1rem;
}

.footer-bottom p,
.footer-bottom small {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
}

/* Footer Social Links */
.footer-social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background-color: var(--college-accent);
    transform: translateY(-2px);
    color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .navbar-brand .brand-text {
        display: none;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.98);
        margin-top: 1rem;
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        position: absolute;
        right: 0;
        left: auto;
        top: 100%;
        z-index: 1050;
        min-width: 300px;
    }
    
    .navbar-collapse .nav-link {
        color: var(--college-primary) !important;
        padding: 0.75rem 1rem !important;
        border-radius: 6px;
        margin: 0.25rem 0;
    }
    
    .navbar-collapse .nav-link:hover {
        background-color: var(--college-light);
        color: var(--college-secondary) !important;
    }
    
    .navbar-collapse .dropdown-menu {
        background-color: var(--college-light);
        border: 1px solid var(--college-border);
        margin-top: 0.5rem;
        position: static;
        float: none;
        width: 100%;
        box-shadow: none;
    }
    
    .navbar-collapse .dropdown-item {
        color: var(--college-dark);
        padding: 0.75rem 1rem;
    }
    
    .navbar-collapse .dropdown-item:hover {
        background-color: rgba(59, 130, 246, 0.1);
        color: var(--college-primary);
    }
    
    .sidebar {
        min-height: auto;
        box-shadow: none;
        border-right: none;
        border-bottom: 1px solid var(--college-border);
    }
    
    .sidebar .nav-link {
        padding: 0.75rem 1rem;
    }
    
    .sidebar .nav-link:hover {
        padding-left: 1.25rem;
    }
    
    .sidebar-heading {
        padding: 0.75rem 1rem 0.25rem;
    }
}

@media (max-width: 767.98px) {
    .footer-custom {
        padding: 2rem 0 1rem;
    }
    
    .footer-custom .row > div {
        margin-bottom: 1.5rem;
    }
    
    .footer-custom .text-md-end {
        text-align: left !important;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Animation for smooth transitions */
@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar-custom {
    animation: slideInFromTop 0.5s ease-out;
}

/* Focus styles for accessibility */
.navbar-nav .nav-link:focus,
.sidebar .nav-link:focus,
.footer-custom a:focus {
    outline: 2px solid var(--college-accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    header,
    .sidebar,
    .footer-custom {
        display: none !important;
    }
    
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }
}
