/* University of Sierra Leone - Main Stylesheet */

/* ===================================
   CSS VARIABLES & BASE STYLES
   =================================== */

:root {
    --primary-color: #050c2a;
    --primary-dark: #02041a;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Responsive breakpoints */
    --breakpoint-sm: 640px;
    --breakpoint-md: 768px;
    --breakpoint-lg: 1024px;
    --breakpoint-xl: 1280px;
    
    /* Spacing system */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Typography scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--gray-50);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   COMPREHENSIVE HEADER SYSTEM
   =================================== */

/* H1 - Main Page Headers */
h1, .h1 {
    font-size: var(--text-4xl);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
    color: var(--primary-color);
    position: relative;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h1::after, .h1::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* H1 Variants */
h1.hero-title, .h1.hero-title {
    font-size: var(--text-5xl);
    font-weight: 900;
    text-align: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: relative;
}

h1.hero-title::after, .h1.hero-title::after {
    background: linear-gradient(90deg, #ffffff, #e2e8f0);
    width: 120px;
    height: 6px;
    bottom: -1rem;
}

h1.page-title, .h1.page-title {
    font-size: var(--text-4xl);
    text-align: left;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1.page-title::after, .h1.page-title::after {
    left: 0;
    transform: none;
    width: 60px;
    height: 3px;
}

/* H2 - Section Headers */
h2, .h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1.25rem 0;
    color: var(--gray-800);
    position: relative;
    padding-left: 1rem;
    border-left: 4px solid var(--primary-color);
    background: linear-gradient(90deg, rgba(5, 12, 42, 0.05) 0%, transparent 100%);
    padding: 0.75rem 0 0.75rem 1.5rem;
    border-radius: 0 8px 8px 0;
}

h2::before, .h2::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px 0 0 2px;
}

/* H2 Variants */
h2.section-title, .h2.section-title {
    text-align: center;
    padding: 1rem 0;
    border: none;
    background: none;
    position: relative;
    margin-bottom: 2rem;
}

h2.section-title::before, .h2.section-title::before {
    display: none;
}

h2.section-title::after, .h2.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

h2.card-title, .h2.card-title {
    font-size: var(--text-2xl);
    padding: 0.5rem 0;
    border: none;
    background: none;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

h2.card-title::before, .h2.card-title::before {
    display: none;
}

/* H3 - Subsection Headers */
h3, .h3 {
    font-size: var(--text-2xl);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 1rem 0;
    color: var(--gray-700);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h3::before, .h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

/* H3 Variants */
h3.modal-title, .h3.modal-title {
    font-size: var(--text-xl);
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
    display: block;
}

h3.modal-title::before, .h3.modal-title::before {
    display: none;
}

h3.feature-title, .h3.feature-title {
    font-size: var(--text-xl);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.75rem;
    position: relative;
    padding: 0.5rem 0;
}

h3.feature-title::before, .h3.feature-title::before {
    display: none;
}

h3.feature-title::after, .h3.feature-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
    border-radius: 1px;
}

/* H4 - Minor Headers */
h4, .h4 {
    font-size: var(--text-xl);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    color: var(--gray-600);
    position: relative;
    padding-left: 1.5rem;
}

h4::before, .h4::before {
    content: '▶';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary-color);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* H4 Variants */
h4.list-header, .h4.list-header {
    font-size: var(--text-lg);
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    padding-left: 0;
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.25rem;
}

h4.list-header::before, .h4.list-header::before {
    display: none;
}

/* H5 - Small Headers */
h5, .h5 {
    font-size: var(--text-lg);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* H6 - Smallest Headers */
h6, .h6 {
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.75px;
    font-size: 0.75rem;
}

/* Special Header Classes */
.header-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-underline {
    position: relative;
    padding-bottom: 0.5rem;
}

.header-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 1px;
}

/* Navigation Headers */
.nav-dropdown-header {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.nav-dropdown-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--secondary-color);
}

.mobile-menu-section-header {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem 0.5rem;
    background: linear-gradient(90deg, rgba(5, 12, 42, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0.5rem;
}

/* Modal Headers */
.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 2px solid var(--gray-200);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

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

/* Page Headers */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-header h1 {
    color: white;
    font-size: var(--text-5xl);
    margin-bottom: 1rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.page-header h1::after {
    background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.7));
    width: 120px;
    height: 4px;
}

.page-header p {
    font-size: var(--text-xl);
    opacity: 0.9;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Search Headers */
.search-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0;
    text-align: center;
    border-bottom: 2px solid var(--gray-200);
}

.search-header h1 {
    color: var(--primary-color);
    font-size: var(--text-3xl);
    margin-bottom: 0.5rem;
}

.search-header h1::after {
    background: var(--secondary-color);
    width: 80px;
    height: 3px;
}

/* Chat Headers */
.chat-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.chat-header::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--secondary-color);
}

/* University Headers */
.university-header {
    position: relative;
    padding: 1rem 0;
}

.university-header h1 {
    font-size: var(--text-2xl);
    color: var(--primary-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.university-header h1::after {
    display: none;
}

/* Responsive Headers */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: var(--text-3xl);
    }
    
    h1.hero-title, .h1.hero-title {
        font-size: var(--text-4xl);
    }
    
    h2, .h2 {
        font-size: var(--text-2xl);
        padding-left: 1rem;
    }
    
    h3, .h3 {
        font-size: var(--text-xl);
    }
    
    .page-header h1 {
        font-size: var(--text-4xl);
    }
    
    .page-header p {
        font-size: var(--text-lg);
    }
}

@media (max-width: 640px) {
    h1, .h1 {
        font-size: var(--text-2xl);
    }
    
    h1.hero-title, .h1.hero-title {
        font-size: var(--text-3xl);
    }
    
    h2, .h2 {
        font-size: var(--text-xl);
    }
    
    .page-header h1 {
        font-size: var(--text-3xl);
    }
}

/* ===================================
   RESPONSIVE CONTAINERS
   =================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ===================================
   RESPONSIVE TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin: 0 0 1rem 0;
    font-size: clamp(0.875rem, 2vw, 1rem);
    line-height: 1.6;
}

.responsive-text {
    font-size: clamp(var(--text-sm), 2.5vw, var(--text-base));
}

.responsive-heading {
    font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
    line-height: 1.2;
}

.responsive-subheading {
    font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
    line-height: 1.3;
}

/* ===================================
   HERO SECTIONS & GRADIENTS
   =================================== */

.hero-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.hero-gradient-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.hero-gradient-blue {
    background: linear-gradient(135deg, #03142e 0%, #020d2b 100%);
}

.hero-gradient-purple {
    background: linear-gradient(135deg, #080117 0%, #100229 100%);
}

.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        padding: 1.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }
}

/* ===================================
   RESPONSIVE BUTTONS
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
    min-height: 44px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
    
    .btn:last-child {
        margin-bottom: 0;
    }
}

/* ===================================
   CARD SYSTEM
   =================================== */

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .card-hover:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

.card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

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

@media (max-width: 768px) {
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* ===================================
   CAMPUS CARDS
   =================================== */

.campus-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.campus-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .campus-card {
        margin-bottom: 1rem;
        border-radius: 0.75rem;
    }
    
    .campus-card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* ===================================
   PROGRAM CARDS
   =================================== */

.program-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .program-card {
        margin-bottom: 1rem;
    }
    
    .program-card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* ===================================
   FACULTY & STAFF CARDS
   =================================== */

.faculty-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.faculty-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.staff-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .faculty-card,
    .staff-card {
        margin-bottom: 1rem;
    }
    
    .faculty-card:hover,
    .staff-card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* ===================================
   PUBLICATION & JOB CARDS
   =================================== */

.publication-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.job-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.event-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

@media (max-width: 768px) {
    .publication-card,
    .job-card,
    .event-card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .publication-card:hover,
    .job-card:hover,
    .event-card:hover {
        transform: none;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* ===================================
   RESPONSIVE GRID SYSTEM
   =================================== */

.grid-responsive {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-responsive {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .grid-responsive {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.card-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* ===================================
   RESPONSIVE SPACING
   =================================== */

.section-padding {
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 2rem 0;
    }
}

.container-padding {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-padding {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-padding {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ===================================
   MOBILE UTILITIES
   =================================== */

@media (max-width: 767px) {
    .mobile-h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .mobile-h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .mobile-h3 {
        font-size: 1.5rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .mobile-text {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    .mobile-button {
        width: 100% !important;
        padding: 1rem 1.5rem !important;
        font-size: 1.125rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .button-group {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .stats-mobile {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        margin: 2rem 0 !important;
    }
    
    .stat-item-mobile {
        text-align: center;
        background: white;
        padding: 1.5rem 1rem;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    }
    
    .stat-number-mobile {
        font-size: 2rem !important;
        font-weight: 700 !important;
        color: #4f46e5 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .stat-label-mobile {
        font-size: 0.875rem !important;
        color: #6b7280 !important;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease;
}

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

.floating-card {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.animate-in:not(.animate-in) {
    opacity: 0;
    transform: translateY(30px);
}

/* ===================================
   CAMPUS THEMES
   =================================== */

.comahs-theme {
    --campus-color: #10b981;
    --campus-light: #d1fae5;
    --campus-dark: #059669;
}

.fbc-theme {
    --campus-color: #3b82f6;
    --campus-light: #dbeafe;
    --campus-dark: #1d4ed8;
}

.ipam-theme {
    --campus-color: #8b5cf6;
    --campus-light: #ede9fe;
    --campus-dark: #7c3aed;
}

.text-campus {
    color: var(--campus-color);
}

.bg-campus {
    background-color: var(--campus-color);
}

.bg-campus-light {
    background-color: var(--campus-light);
}

.border-campus {
    border-color: var(--campus-color);
}

/* ===================================
   FILE UPLOAD STYLES
   =================================== */

.file-upload-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-input:hover {
    border-color: #4f46e5;
    background: #f3f4f6;
}

.file-upload-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.file-upload-preview {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.file-upload-preview img {
    max-width: 200px;
    max-height: 150px;
    object-fit: cover;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.file-upload-info {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.file-upload-error {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.file-upload-success {
    color: #059669;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ===================================
   RESPONSIVE UTILITIES
   =================================== */

.mobile-only {
    display: block;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

.desktop-only {
    display: none;
}

@media (min-width: 769px) {
    .desktop-only {
        display: block !important;
    }
}

.text-responsive {
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.heading-responsive {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

/* ===================================
   LOADING STATES
   =================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 2px solid var(--gray-200);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   ACCESSIBILITY & PERFORMANCE
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .card-hover,
    .campus-card,
    .program-card,
    .faculty-card,
    .staff-card,
    .publication-card,
    .job-card,
    .event-card {
        transition: none !important;
    }
    
    .slide-up,
    .fade-in,
    .floating-card {
        animation: none !important;
    }
    
    .spinner {
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--gray-900);
    }
    
    .btn {
        border-width: 3px;
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:focus {
        border-color: var(--primary-color);
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #111827;
        --gray-100: #1f2937;
        --gray-200: #374151;
        --gray-300: #4b5563;
        --gray-400: #6b7280;
        --gray-500: #9ca3af;
        --gray-600: #d1d5db;
        --gray-700: #e5e7eb;
        --gray-800: #f3f4f6;
        --gray-900: #f9fafb;
    }
    
    body {
        background-color: var(--gray-50);
        color: var(--gray-900);
    }
    
    .card {
        background: var(--gray-100);
        border: 1px solid var(--gray-200);
    }
}

/* ===================================
   MOBILE FORMS
   =================================== */

@media (max-width: 767px) {
    .form-mobile {
        background: white;
        border-radius: 0.75rem;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    }
    
    .form-group-mobile {
        margin-bottom: 1rem;
    }
    
    .form-label-mobile {
        display: block;
        font-size: 0.875rem;
        font-weight: 500;
        color: #374151;
        margin-bottom: 0.5rem;
    }
    
    .form-input-mobile,
    .form-select-mobile {
        width: 100%;
        padding: 0.75rem;
        border: 1px solid #d1d5db;
        border-radius: 0.5rem;
        font-size: 16px; /* Prevent zoom on iOS */
        transition: border-color 0.2s;
    }
    
    .form-input-mobile:focus,
    .form-select-mobile:focus {
        outline: none;
        border-color: #4f46e5;
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    }
    
    .filter-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
}

/* ===================================
   MODAL RESPONSIVE
   =================================== */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 767px) {
    .modal-backdrop {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
        border-radius: 0.5rem;
    }
}

/* ===================================
   FOOTER RESPONSIVE
   =================================== */

.footer-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    .footer-section {
        padding-bottom: 1.5rem;
        border-bottom: 1px solid #374151;
    }
    
    .footer-section:last-child {
        border-bottom: none;
    }
}
/* === Language Switcher (Dropdown) === */
.language-switcher {
  position: relative;
  display: inline-block;
}

.language-button {
  background: none;
  border: none;
  color: #4b5563;
  cursor: pointer;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  gap: 0.5rem;
}
.language-button:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%; /* Full width on mobile */
  max-width: 320px; /* Constrain width on larger screens */
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.95);
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.35, 1);
  z-index: 50;
}
.language-switcher:hover .language-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.language-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}
.language-option /* Base link styles */
a, 
a:link, 
a:visited, 
a:hover, 
a:focus, 
a:active {
    text-decoration: none !important;
    color: inherit;
    background-color: transparent;
    -webkit-text-decoration-skip: objects;
}

/* Ensure no underlines on any interactive states */
a:hover, 
a:focus, 
a:active {
    text-decoration: none !important;
    outline: 0;
}

/* Target all possible link elements */
.nav-link,
.dropdown-content a,
.footer a,
.social-links a,
.btn-link,
[href],
[role="link"] {
    text-decoration: none !important;
}

/* Remove underlines from all link states */
a:not([class]):hover,
a:not([class]):focus,
a:not([class]):active {
    text-decoration: none !important;
}

/* Remove underlines from specific sections */
.governance-section a:hover,
.governance-section a:focus,
.quick-links a:hover,
.quick-links a:focus,
.py-16.bg-gray-50 a:hover,  /* Latest News section */
.py-16.bg-gray-50 a:focus,
.py-20.bg-white a:hover,     /* Upcoming Events section */
.py-20.bg-white a:focus {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
    -moz-text-decoration: none !important;
}

.language-option:hover,
.language-option.active {
  background-color: #f3f4f6;
  color: #1f2937;
  border-left-color: #4f46e5;
  padding-left: calc(1rem + 3px);
}

.flag-icon {
  width: 20px;
  height: 15px;
  margin-right: 8px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Flag URLs */
.flag-us { background-image: url('https://flagcdn.com/w20/us.png'); }
.flag-cn { background-image: url('https://flagcdn.com/w20/cn.png'); }
.flag-fr { background-image: url('https://flagcdn.com/w20/fr.png'); }
.flag-de { background-image: url('https://flagcdn.com/w20/de.png'); }
.flag-ru { background-image: url('https://flagcdn.com/w20/ru.png'); }
.flag-ja { background-image: url('https://flagcdn.com/w20/jp.png'); }
.flag-es { background-image: url('https://flagcdn.com/w20/es.png'); }
.flag-pt { background-image: url('https://flagcdn.com/w20/pt.png'); }
.flag-ar { background-image: url('https://flagcdn.com/w20/eg.png'); }

/* Responsive Behavior */
@media (max-width: 767px) {
  .language-button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  .language-dropdown {
    width: 100%;
    max-width: 320px;
  }
}