@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Color Palette */
    --primary-color: #4F46E5; /* Indigo */
    --primary-light: #818CF8;
    --primary-dark: #3730A3;
    
    --secondary-color: #10B981; /* Emerald */
    --secondary-light: #34D399;
    
    --accent-color: #F43F5E; /* Rose */
    
    --bg-color: #F8FAFC;
    --surface-color: #FFFFFF;
    
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #F8FAFC;
    
    --border-color: rgba(15, 23, 42, 0.08);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15); /* Stronger shadow */
    --glass-bg: rgba(255, 255, 255, 0.9); /* More opaque */
    --glass-border: rgba(255, 255, 255, 0.4); /* Brighter border */

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* Base Navigation Utility (Moved and consolidated) */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-glass);
}

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

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

/* Premium Sub-page Hero Patterns */
.section-gradient-primary {
    background: linear-gradient(135deg, #4F46E5, #3730A3, #1E1B4B) !important;
    position: relative;
    z-index: 1;
}

.section-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4v-4H4v4H0v2h4v4h2v-4h4v-2H6zm30 0v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

/* Breadcrumb Styling within Hero */
.section-gradient-primary .breadcrumb {
    background: transparent;
    padding: 0;
}

.section-gradient-primary .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5) !important;
}

.section-gradient-primary .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
    background: none !important;
}

.section-gradient-primary .breadcrumb-item a:hover {
    color: #fff !important;
    text-decoration: none;
}

.section-gradient-primary .breadcrumb-item.active {
    color: #fff !important;
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
    color: white;
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-2px);
}

/* Custom Navbar Styles */
.top-bar-modern {
    background-color: var(--primary-dark);
    padding: 5px 0;
    font-size: 0.85rem;
}
.top-bar-modern a {
    color: rgba(255, 255, 255, 0.85);
    margin-left: 15px;
    font-weight: 500;
    text-transform: uppercase;
}
.top-bar-modern a:hover {
    color: white;
}

.navbar-modern {
    padding: 0.8rem 0;
    transition: all var(--transition-normal);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 10000;
    background: white;
    border-bottom: 3px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    transition: all 0.3s ease;
}

.navbar-modern.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-dark) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main) !important;
    margin: 0 6px;
    position: relative;
    padding: 0.6rem 0 !important;
    transition: all 0.3s ease;
}
.dropdown-menu {
    animation: fadeUp 0.3s ease-out forwards;
    border: none;
    box-shadow: var(--shadow-xl);
}

.animate-slide-up {
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Modern Header / Hero Section */
.hero-wrapper {
    position: relative;
    height: 100vh; /* Full Viewport Height */
    width: 100%;
    overflow: hidden;
    background: #000;
}

.hero-slider, .carousel, .carousel-inner, .carousel-item {
    height: 100%;
    width: 100%;
}

.carousel-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Dark Overlay for Text Legibility */
.carousel-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4), transparent);
    z-index: 1;
}

.hero-slider-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out forwards;
}

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

.hero-content h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white !important;
    line-height: 1.1;
}

.hero-content p {
    font-size: clamp(1rem, 4vw, 1.35rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    max-width: 650px;
}

/* Feature Cards */
.feature-card {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.icon-blue { background: rgba(79, 70, 229, 0.1); color: var(--primary-color); }
.icon-green { background: rgba(16, 185, 129, 0.1); color: var(--secondary-color); }
.icon-rose { background: rgba(244, 63, 94, 0.1); color: var(--accent-color); }

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Modern Footer */
.footer-modern {
    background-color: var(--text-main);
    color: var(--text-light);
    padding: 5rem 0 2rem;
    margin-top: 5rem;
    border-top: 10px solid var(--primary-color);
}

.footer-modern h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-modern p, .footer-modern a {
    color: #94A3B8;
}

.footer-modern a:hover {
    color: white;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-right: 10px;
    transition: all var(--transition-normal);
}

.footer-social-icon:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Notice Ticker Modern */
.notice-modern-wrapper {
    background: var(--primary-dark);
    color: white;
    padding: 10px 0;
    display: flex;
    align-items: center;
}

.notice-modern-label {
    background: var(--accent-color);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 5px;
    margin-right: 15px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
}

.notice-modern-ticker marquee {
    font-size: 0.95rem;
    font-weight: 500;
}

.notice-modern-ticker a {
    color: rgba(255,255,255,0.9);
    margin-right: 30px;
}

.notice-modern-ticker a:hover {
    color: white;
    text-decoration: underline;
}

/* ==========================================================================
   MEGA MENU SYSTEM
   ========================================================================== */

/* Mega Menu Dropdown positioning */
.navbar-modern .nav-item.dropdown.mega-dropdown {
    position: static;
}

.mega-dropdown-menu {
    width: 100%;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 0;
    padding: 30px 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 0 0 24px 24px;
    border: none;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block; /* Show/hide via opacity/visibility for transitions */
}

/* Hover and Click effects for Desktop */
@media (min-width: 1200px) {
    .navbar-modern .dropdown-menu {
        display: block !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    }
    
    .navbar-modern .dropdown-menu-end {
        right: 0 !important;
        left: auto !important;
    }

    .nav-item.dropdown:hover > .dropdown-menu,
    .nav-item.dropdown .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-item.dropdown:hover > .nav-link,
    .nav-item.dropdown .nav-link.active,
    .nav-item.dropdown .nav-link:focus {
        color: var(--primary-color) !important;
    }
    
    /* Hover padding bridge to prevent accidental closure */
    .nav-item.dropdown::after {
        content: '';
        position: absolute;
        bottom: -20px;
        left: 0;
        width: 100%;
        height: 20px;
        background: transparent;
    }
    
    /* Standard Dropdown Specifics */
    .navbar-modern .dropdown-menu:not(.mega-dropdown-menu) {
        min-width: 240px;
        top: 100%;
        margin-top: 5px;
        padding: 15px;
        border-radius: 16px;
        box-shadow: var(--shadow-xl);
    }
}

/* Mega Menu Columns */
.mega-menu-column {
    padding: 0 20px;
    border-right: 1px solid rgba(0,0,0,0.05);
}
.mega-menu-column:last-child {
    border-right: none;
}

.mega-menu-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
}

.mega-menu-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.mega-menu-list li a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--primary-light);
    transition: all 0.3s ease;
}

.mega-menu-list li a:hover {
    background: rgba(79, 70, 229, 0.05);
    color: var(--primary-color);
    padding-left: 20px;
}

.mega-menu-list li a:hover i {
    transform: scale(1.2);
    color: var(--primary-color);
}

/* Mobile Off-canvas Style Redesign */
@media (max-width: 1199.98px) {
    .navbar-modern {
        backdrop-filter: none !important;
        background: white !important;
        z-index: 10000 !important;
    }

    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        background: white !important;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        display: flex !important;
        flex-direction: column;
        padding: 0;
        z-index: 10100;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
        overflow-x: hidden;
        backdrop-filter: none !important;
    }
    
    .navbar-collapse.show {
        left: 0;
    }

    .menu-header-mobile {
        padding: 25px 20px;
        background: var(--bg-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border-color);
        margin-bottom: 20px;
    }

    .navbar-nav {
        padding: 0 15px;
        align-items: stretch !important;
        width: 100%;
    }

    .navbar-modern .nav-item {
        width: 100%;
        margin-bottom: 5px;
    }

    .navbar-modern .nav-link {
        color: var(--text-main) !important;
        font-weight: 600;
        font-size: 1.1rem;
        padding: 12px 15px !important;
        border-radius: 12px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        width: 100%;
    }

    .navbar-modern .dropdown-toggle::after {
        position: static !important;
        display: inline-block !important;
        margin-left: auto !important;
        vertical-align: middle;
        transform: none !important;
        border-top: .3em solid;
        border-right: .3em solid transparent;
        border-bottom: 0;
        border-left: .3em solid transparent;
    }

    .navbar-toggler[aria-expanded="true"] {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .btn-portal {
        background: var(--primary-color) !important;
        color: white !important;
        border-radius: 12px !important;
        margin-left: 0 !important;
        margin-top: 20px;
        width: 100%;
        text-align: left;
        justify-content: flex-start !important;
    }

    .navbar-modern .dropdown-menu {
        position: static !important;
        width: 100% !important;
        display: none !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: rgba(0, 0, 0, 0.02) !important;
        transition: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .navbar-modern .dropdown-menu.show {
        display: block !important;
        padding: 10px 15px !important;
        border-left: 3px solid var(--primary-light) !important;
        margin: 10px 0 !important;
    }

    .mega-dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        background: rgba(0,0,0,0.02) !important;
        backdrop-filter: none;
        box-shadow: none;
        padding: 10px 15px !important;
        border: none !important;
        border-left: 3px solid var(--primary-light) !important;
        display: none; 
        margin-top: 5px;
    }
    
    .navbar-collapse.show .mega-dropdown-menu.show {
        display: block !important;
    }

    .mega-menu-column {
        border-right: none;
        padding: 0;
        margin-bottom: 25px;
    }
    
    .mega-menu-title {
        color: var(--primary-color);
        margin-bottom: 15px;
        font-size: 0.95rem;
    }

    .mega-menu-list li a {
        color: var(--text-main) !important;
        padding: 8px 12px;
    }

    .nav-overlay.show {
        display: block;
    }
}

/* Ticker Animations */
@keyframes fa-spin-hover {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.fa-spin-hover:hover {
    animation: fa-spin-hover 2s infinite linear;
}

/* Scroll Effect */
.navbar-modern.shrunk {
    padding: 0.4rem 0;
    background: rgba(255, 255, 255, 0.98);
}

/* Hamburger Menu Animation */
.hamburger-menu {
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}
.navbar-toggler[aria-expanded="true"] .hamburger-menu span:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .hamburger-menu span:nth-child(2) {
    opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .hamburger-menu span:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

.btn-portal {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 0.75rem 1.75rem !important; /* Force padding to prevent text cutoff */
    border-radius: 50px !important;
    transition: all 0.3s ease;
}
.btn-portal:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.2);
}

.portal-item {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.portal-item:hover {
    background: rgba(79, 70, 229, 0.05) !important;
    border-color: rgba(79, 70, 229, 0.1);
    transform: translateX(5px);
}
.portal-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* ==========================================================================
   HOMEPAGE DYNAMIC SECTIONS
   ========================================================================== */

/* Principal Section Styles */
.biography-text {
    font-style: italic;
    line-height: 1.8;
    position: relative;
}

.principal-img {
    transition: all 0.5s ease;
}

.hero-img-container:hover .principal-img {
    transform: scale(1.02);
}

/* Recent Events Section Styles */
.event-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1) !important;
    border-color: var(--primary-light) !important;
}

.event-img-wrapper {
    height: 220px;
}

.event-card:hover .event-img-wrapper img {
    transform: scale(1.1);
}

.event-date-badge {
    z-index: 5;
    backdrop-filter: blur(4px);
    background: rgba(79, 70, 229, 0.9) !important;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.event-hover-content h5 {
    transition: color 0.3s ease;
}

.event-card:hover .event-hover-content h5 {
    color: var(--primary-color) !important;
}

@media (max-width: 991.98px) {
    .navbar-modern {
        padding: 0.5rem 0;
    }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .feature-card {
        padding: 2rem 1.5rem;
    }
    .mega-dropdown-menu {
        max-height: 80vh;
        overflow-y: auto;
        padding: 5px 15px !important;
    }
}

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .btn-modern {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    .top-bar-modern {
        display: none !important;
    }
}

/* --- Custom Components: Gallery --- */
.gallery-link {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
}
.gallery-thumb {
    transition: all 0.5s ease;
    cursor: pointer;
    object-fit: cover;
    height: 200px;
    width: 100%;
}
.gallery-link:hover .gallery-thumb {
    transform: scale(1.1);
    filter: brightness(0.85);
}
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}
.gallery-link:hover .gallery-overlay {
    opacity: 1;
}

.transition-hover {
    transition: all 0.3s ease;
}
.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.font-heading {
    font-family: 'Outfit', sans-serif !important;
}
