/* =========================================
   Bootstrap Custom Overrides & Brand Styles
   ========================================= */

/* CSS Variables */
:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --bs-primary: #4F46E5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-secondary: #0ea5e9;
    --bs-secondary-rgb: 14, 165, 233;
}

/* Typography */
body {
    font-family: 'Inter', sans-serif;
    padding-top: 56px; /* For fixed navbar */
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .display-5 {
    font-family: 'Outfit', sans-serif;
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar Styles */
#mainNavbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

#mainNavbar .nav-link {
    font-weight: 500;
    color: #334155;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

#mainNavbar .nav-link:hover,
#mainNavbar .nav-link.active {
    color: var(--primary);
}

/* Offcanvas Sidebar Menu */
.offcanvas-start {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.offcanvas-start .nav-link {
    color: #334155;
    font-weight: 500;
    transition: all 0.3s;
}

.offcanvas-start .nav-link:hover,
.offcanvas-start .nav-link.active {
    color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
    padding-left: 1.5rem;
}

.offcanvas-start .nav-link i {
    width: 24px;
    text-align: center;
}

/* Hero Section */
.hero-section {
    height: calc(100vh - 56px);
    min-height: 500px;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.hero-swiper .swiper-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(79, 70, 229, 0.6) 100%);
}

.hero-swiper .slide-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-swiper .slide-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-swiper .slide-desc {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
}

.hero-swiper .swiper-button-next:after,
.hero-swiper .swiper-button-prev:after {
    font-size: 1.2rem;
}

.hero-swiper .swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Notifications Bar */
.notifications-bar {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: white;
}

.marquee-container {
    white-space: nowrap;
}

.marquee {
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Cards */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Gallery Grid */
#gallery-grid .col-6,
#gallery-grid .col-md-4,
#gallery-grid .col-lg-3 {
    cursor: pointer;
}

#gallery-grid img {
    transition: transform 0.3s;
}

#gallery-grid .card:hover img {
    transform: scale(1.05);
}

/* Page Header */
.page-header {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -56px;
    padding-top: 56px;
}

.page-header-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(79, 70, 229, 0.75) 100%);
    backdrop-filter: blur(2px);
}

.page-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
    padding: 2rem;
}

.page-header-content h1 {
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
}

.breadcrumb a:hover {
    opacity: 1;
}

/* Faculty Cards */
.faculty-card {
    background: white;
    border-radius: 1rem;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid rgba(79, 70, 229, 0.06);
    transition: all 0.3s;
    cursor: pointer;
}

.faculty-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.12);
}

.faculty-card-header {
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 1rem 1rem 0 0;
    position: relative;
}

.faculty-card-avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-top: -40px;
    position: relative;
    z-index: 10;
    height: 40px;
    margin-bottom: 40px;
}

.faculty-card-avatar,
.faculty-card-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    object-fit: cover;
    background: white;
}

.faculty-card-avatar-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

/* Leadership Cards */
.leadership-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    border: 1px solid rgba(79, 70, 229, 0.08);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.leadership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.leadership-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.12);
}

.avatar-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.2);
}

.avatar-wrapper img,
.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

/* Faculty Filter Buttons */
.faculty-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    background: white;
    border: 2px solid rgba(79, 70, 229, 0.1);
    border-radius: 50rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Faculty Stats Section */
.faculty-stats-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 4rem 0;
    position: relative;
}

.faculty-stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.1;
}

.faculty-stat-item {
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}

.faculty-stat-item i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faculty-stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* Forms */
.form-floating > label {
    color: #64748b;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(79, 70, 229, 0.25);
}

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #64748b;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Faculty Modal */
.faculty-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.faculty-modal-overlay.open {
    display: flex;
}

.faculty-modal-card {
    background: white;
    border-radius: 1.5rem;
    max-width: 500px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.faculty-modal-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
}

.faculty-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.faculty-modal-close:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
    }
    
    .hero-section {
        height: 70vh;
    }
    
    .page-header {
        height: 300px;
    }
    
    .faculty-stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        height: 60vh;
        min-height: 400px;
    }
    
    .page-header {
        height: 250px;
    }
    
    .page-header-content h1 {
        font-size: 1.75rem;
    }
    
    .faculty-filter {
        gap: 0.35rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }
    
    .faculty-stat-item h3 {
        font-size: 1.75rem;
    }
    
    .faculty-stat-item p {
        font-size: 0.85rem;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
