:root {
    --eac-blue: #005aa3;
    --eac-gold: #d4af37;
    --light-blue: #e9f0f7;
    --light-gray: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: #333;
}

.navbar {
    background-color: var(--eac-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--eac-gold) !important;
}

.hero-section {
    background: linear-gradient(rgba(26, 58, 108, 0.85), rgba(26, 58, 108, 0.9)), url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background-color: var(--eac-blue);
    border-color: var(--eac-blue);
}

.btn-primary:hover {
    background-color: #005aa3;
    border-color: #005aa3;
}

.btn-outline-light:hover {
    color: var(--eac-blue);
}

.section-title {
    color: var(--eac-blue);
    font-weight: 700;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--eac-gold);
}

.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin-bottom: 20px;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--eac-blue);
    color: white;
    border-radius: 8px 8px 0 0 !important;
    font-weight: 600;
}

.resource-card {
    height: 100%;
}

.resource-icon {
    font-size: 2.5rem;
    color: var(--eac-blue);
    margin-bottom: 15px;
}

.stats-card {
    text-align: center;
    padding: 20px;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--eac-blue);
}

.stats-label {
    color: #666;
    font-size: 0.9rem;
}

.search-section {
    background-color: var(--light-blue);
    padding: 40px 0;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.footer {
    background-color: var(--eac-blue);
    color: white;
    padding: 40px 0 20px;
}

.footer h5 {
    color: var(--eac-gold);
    margin-bottom: 20px;
}

.footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.login-modal .modal-header {
    background-color: var(--eac-blue);
    color: white;
}

.login-modal .btn-close {
    filter: invert(1);
}

.category-badge {
    background-color: var(--eac-gold);
    color: white;
}

.department-badge {
    background-color: var(--eac-blue);
    color: white;
}

.table th {
    background-color: var(--eac-blue);
    color: white;
}

.pagination .page-link {
    color: var(--eac-blue);
}

.pagination .page-item.active .page-link {
    background-color: var(--eac-blue);
    border-color: var(--eac-blue);
}

.alert {
    border-radius: 8px;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.form-control:focus {
    border-color: var(--eac-blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 58, 108, 0.25);

    /* Logo and Branding Styles */
.logo-container {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.college-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-fallback svg {
    width: 100%;
    height: 100%;
}

.brand-text {
    line-height: 1.2;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
}

.brand-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

/* Favicon and logo responsive behavior */
@media (max-width: 768px) {
    .logo-container {
        width: 40px;
        height: 40px;
    }
    
    .brand-title {
        font-size: 1rem;
    }
    
    .brand-subtitle {
        font-size: 0.7rem;
    }
}

/* Hero section with college background */
.hero-section {
    background: linear-gradient(rgba(26, 58, 108, 0.85), rgba(26, 58, 108, 0.9)), 
                url('../images/college-campus.jpg') center/cover;
    /* Fallback background */
    background: linear-gradient(rgba(26, 58, 108, 0.85), rgba(26, 58, 108, 0.9)), 
                url('https://images.unsplash.com/photo-1568667256549-094345857637?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') center/cover;
}

/* Footer logo */
.footer-logo {
    max-width: 120px;
    margin-bottom: 15px;
    opacity: 0.9;
}

/* About Page Styles */
.feature-icon {
    color: var(--eac-blue);
}

.team-photo {
    width: 80px;
    height: 80px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.team-photo i {
    color: var(--eac-blue);
}

/* Mission and Vision Cards */
.card-header.bg-primary {
    background-color: var(--eac-blue) !important;
}

.card-header.bg-success {
    background-color: #28a745 !important;
}

/* Feature Icons */
.feature-icon i {
    transition: transform 0.3s ease;
}

.feature-icon i:hover {
    transform: scale(1.1);
}

/* Resource Categories Grid */
.resource-category-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.resource-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Activity Timeline */
.activity-timeline {
    position: relative;
    padding-left: 30px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--eac-blue);
    opacity: 0.3;
}

.activity-item {
    position: relative;
    margin-bottom: 20px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--eac-blue);
    border: 2px solid white;
}

/* Contact Information Styles */
.contact-info .card-body strong {
    color: var(--eac-blue);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stats-card .stats-number {
        font-size: 2rem;
    }
    
    .team-photo {
        width: 60px;
        height: 60px;
    }
    
    .team-photo i {
        font-size: 1.5rem;
    }
}

/* Modal Stability Fixes */
.modal {
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.modal-dialog {
    margin: 2rem auto;
    transition: none !important;
}

.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: none !important;
    transition: none !important;
}

.modal-backdrop {
    background-color: rgba(0,0,0,0.5);
}

.modal-backdrop.show {
    opacity: 1;
}

/* Photo Upload Specific Styles */
.current-photo {
    transition: transform 0.2s ease;
}

.current-photo:hover {
    transform: scale(1.05);
}

.preview-image {
    border: 3px solid #1a3a6c;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Form Stability */
.form-control:focus {
    border-color: #1a3a6c;
    box-shadow: 0 0 0 0.2rem rgba(26, 58, 108, 0.25);
    transform: none;
}

/* Button Stability */
.btn {
    transition: all 0.2s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(0);
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, #1a3a6c, #2c5282);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

/* File Input Styling */
.form-control[type="file"] {
    padding: 0.75rem;
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.form-control[type="file"]:hover {
    border-color: #1a3a6c;
    background: #e9f0f7;
}

.form-control[type="file"]:focus {
    border-color: #1a3a6c;
    box-shadow: 0 0 0 0.2rem rgba(26, 58, 108, 0.25);
}

/* Prevent Bootstrap Animation Conflicts */
.modal.fade .modal-dialog {
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Mobile Responsive Fixes */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 1rem;
    }
    
    .modal-content {
        border-radius: 8px;
    }
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-text .brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.brand-text .brand-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.2;
}

.logo-container {
    display: flex;
    align-items: center;
}
}