/* Modern CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Brighter and More Vibrant */
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --accent-blue: #60a5fa;
    --light-blue: #dbeafe;
    --dark-blue: #1d4ed8;

    --primary-green: #059669;
    --secondary-green: #10b981;
    --accent-green: #34d399;

    --primary-purple: #7c3aed;
    --secondary-purple: #8b5cf6;

    /* Additional Vibrant Colors */
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-orange: #ea580c;
    --accent-yellow: #eab308;

    --neutral-50: #f8fafc;
    --neutral-100: #f1f5f9;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;

    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --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);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

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

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    background: linear-gradient(135deg, var(--neutral-50) 0%, var(--light-blue) 100%);
    min-height: 100vh;
    color: var(--neutral-800);
    overflow-x: hidden;
}

/* Modern Navigation */
nav {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

nav:hover {
    box-shadow: var(--shadow-xl);
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition-fast);
    color: white;
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    filter: brightness(0) invert(1);
    transition: var(--transition-fast);
}

.logo span {
    color: white;
}

nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    margin: 0 0.25rem;
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    min-width: 120px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

nav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-slow);
}

nav ul li a:hover::before {
    left: 100%;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

nav ul li a.active {
    background: rgba(255,255,255,0.25);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    margin-left: 1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    nav {
        padding: var(--space-md);
    }

    .logo {
        font-size: 1.25rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-blue);
        flex-direction: column;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }

    nav ul.mobile-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 1rem 1.5rem;
        margin: 0;
        min-width: auto;
        width: 100%;
        justify-content: flex-start;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        text-align: left;
    }
}

/* Main Content Layout */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    position: relative;
}

/* Typography */
h1 {
    text-align: center;
    color: var(--neutral-800);
    margin: var(--space-xl) 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-purple));
    border-radius: var(--radius-sm);
}

h2 {
    color: var(--neutral-700);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

h3 {
    color: var(--neutral-600);
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

/* Modern Card Components */
.overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-2xl) 0;
}

.stat-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-2xl);
    text-align: center;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
    position: relative;
    overflow: hidden;
}

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

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue);
}

.stat-card h3 {
    color: var(--neutral-600);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

/* Prevent email overflow in stat-card */
.stat-card .stat-value {
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: normal;
    font-size: 1.1rem;
    max-width: 100%;
}

.stat-description {
    color: var(--neutral-500);
    font-size: 0.875rem;
    font-weight: 400;
}

/* Advanced Chart Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-3xl);
    align-items: start;
}

/* Triangle/Pyramid layout for 3 items - always 3 columns in web view */
.charts-grid-triangle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl, 2rem);
    margin-bottom: var(--space-2xl, 3rem);
}

/* Remove centering for the third card in web view */
.charts-grid-triangle > *:nth-child(3) {
    grid-column: auto;
    margin: 0;
}

/* Responsive: stack cards vertically on mobile */
@media (max-width: 900px) {
    .charts-grid-triangle {
        grid-template-columns: 1fr;
    }
    .charts-grid-triangle > *:nth-child(3) {
        grid-column: auto;
        margin: 0 auto;
        max-width: 100%;
    }
    .chart-container.text-only {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        margin: 0 auto var(--space-xl, 2rem);
    }
}

.charts-grid-triangle > * {
    display: flex;
    flex-direction: column;
}

.charts-grid-triangle .chart-container.text-only {
    min-height: 350px !important;
    height: auto !important;
}

.chart-container {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden; /* Changed from visible to hidden for correct clipping */
    min-height: 520px;
    height: 520px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.chart-container canvas {
    height: 400px !important;
    min-height: 400px !important;
    max-height: 400px !important;
    width: 100% !important;
}

/* Text-only containers - set consistent minimum height but allow expansion */
.chart-container.text-only {
    min-height: 350px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-green));
    /* Added to make the green line match the container's rounded corners */
    border-top-left-radius: var(--radius-2xl);
    border-top-right-radius: var(--radius-2xl);
}

.chart-container:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--accent-blue);
}

.chart-container h2 {
    margin-bottom: var(--space-lg);
    color: var(--neutral-800);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.chart-container h2::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.chart-container canvas {
    max-width: 100% !important;
    min-height: 300px !important;
    max-height: 420px !important;
    height: auto !important;
    flex: 1;
}

/* Specific adjustments for charts with legends */
.chart-container:has(canvas[id*="sector"]) canvas,
.chart-container:has(canvas[id*="location"]) canvas,
.chart-container:has(canvas[id*="company"]) canvas {
    min-height: 350px !important;
    max-height: 450px !important;
}

/* Chart legend styling improvements */
.chart-container .chartjs-legend {
    margin-top: 15px !important;
    margin-bottom: 10px !important;
}

/* Ensure chart containers have enough space for legends */
.chart-container canvas {
    margin-bottom: 20px;
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--neutral-200);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Modern Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    white-space: nowrap; /* Prevents text from wrapping */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
}

/* Contact Page Specific Styles */

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }

.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* Contact Page Styles */

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-item {
    padding: var(--space-md);
    border-left: 4px solid var(--primary-blue);
    background: var(--neutral-50);
    border-radius: var(--radius-md);
}

.contact-item h3 {
    color: var(--primary-blue);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.contact-item p {
    color: var(--neutral-600);
    line-height: 1.6;
}

.contact-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

.timeline-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.timeline-item-contact {
    padding: var(--space-md);
    background: var(--light-blue);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-blue);
}

.timeline-item-contact h4 {
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.timeline-item-contact p {
    color: var(--neutral-700);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.timeline-item-contact span {
    color: var(--neutral-500);
    font-size: 0.875rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.benefit-item {
    text-align: center;
    padding: var(--space-lg);
    background: var(--neutral-50);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-item i {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: var(--space-md);
}

.benefit-item h4 {
    color: var(--neutral-800);
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.benefit-item p {
    color: var(--neutral-600);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Team Member Styles */
.team-member-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.team-member {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--neutral-200);
    transition: var(--transition-normal);
    text-align: center;
}

.team-member:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.team-photo {
    width: 150px;
    height: 150px;
    margin: 0 auto var(--space-lg);
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.team-member:hover .team-photo img {
    transform: scale(1.05);
}

.team-info h3 {
    color: var(--neutral-800);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.team-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.team-description {
    color: var(--neutral-600);
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

/* Center department chair grid */
.team-member-grid.chair-center {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
}

/* Responsive adjustments for team members */
@media (max-width: 768px) {
    .team-member-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .team-photo {
        width: 120px;
        height: 120px;
    }

    .team-member {
        padding: var(--space-lg);
    }
}

@media (max-width: 900px) {
    .team-member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .team-member-grid {
        grid-template-columns: 1fr;
    }
}

/* Recruitment Information Styles */
.recruitment-info {
    padding: var(--space-lg);
}

.recruitment-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recruitment-info li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--neutral-200);
    color: var(--neutral-700);
    line-height: 1.6;
}

.recruitment-info li:last-child {
    border-bottom: none;
}

.recruitment-info li strong {
    color: var(--primary-blue);
    font-weight: 600;
}

.recruitment-info li:hover {
    background-color: var(--neutral-50);
    padding-left: var(--space-sm);
    transition: var(--transition-fast);
    border-radius: var(--radius-md);
}

/* Dynamic Content Sizing */

.chart-container canvas {
    min-height: 300px !important;
    height: 300px !important;
}

.recruitment-info {
    padding: var(--space-md) var(--space-lg);
    min-height: auto;
    height: auto;
}

.recruitment-info ul {
    margin: 0;
    padding: 0;
}

.recruitment-info li {
    padding: var(--space-xs) 0;
    line-height: 1.5;
}

.recruitment-info h3 {
    margin-bottom: var(--space-sm);
    margin-top: var(--space-md);
}

.recruitment-info h3:first-child {
    margin-top: 0;
}

/* Timeline specific adjustments */
.timeline-container .recruitment-info {
    padding: var(--space-md);
}

.timeline-container .recruitment-info div {
    margin-bottom: var(--space-md);
}

.timeline-container .recruitment-info div:last-child {
    margin-bottom: 0;
}

/* Side-by-side Timeline Responsive Styles */
@media (max-width: 768px) {
    .timeline-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-lg) !important;
    }

    .timeline-container h2 {
        font-size: 1.25rem !important;
    }

    .timeline-container h3 {
        font-size: 1rem !important;
    }

    .chart-container {
        padding: var(--space-md);
    }

    .recruitment-info {
        padding: var(--space-sm) var(--space-md);
    }
}

@media (max-width: 900px) {
    .team-member-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .team-member-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    main {
        padding: var(--space-lg);
    }

    .charts-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .chart-container {
        height: 480px;
        min-height: 480px;
    }

    .chart-container canvas {
        height: 350px !important;
        min-height: 350px !important;
        max-height: 350px !important;
    }
}

@media (max-width: 768px) {
    main {
        padding: var(--space-md);
    }

    .overview {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .stat-card {
        padding: var(--space-lg);
    }

    .chart-container {
        padding: var(--space-lg);
        height: 450px;
        min-height: 450px;
    }

    .chart-container canvas {
        height: 320px !important;
        min-height: 320px !important;
        max-height: 320px !important;
    }

    .chart-container.text-only {
        min-height: auto !important;
        height: auto !important;
    }

    .chart-container canvas {
        min-height: 280px !important;
        max-height: 380px !important;
    }

    .charts-grid {
        margin-top: var(--space-xl);
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* New responsive rules for very small screens */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    
    nav {
        padding: var(--space-sm);
    }

    nav ul {
        width: 100%;
    }

    nav ul li a {
        padding: 0.75rem 1rem;
    }

    main {
        padding: var(--space-md) var(--space-sm);
    }

    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin: var(--space-lg) 0;
    }

    .stat-card {
        padding: var(--space-lg) var(--space-md);
    }

    .overview {
        gap: var(--space-md);
        margin: var(--space-xl) 0;
    }

    .team-member-grid {
        grid-template-columns: 1fr;
    }

    .charts-grid {
        gap: var(--space-md);
        grid-template-columns: 1fr;
    }

    .chart-container {
        padding: var(--space-md);
    }
    
    .team-photo {
        width: 100px;
        height: 100px;
    }

    .team-info h3 {
        font-size: 1rem;
    }
    
    .team-title {
        font-size: 0.875rem;
    }

    /* Footer adjustments for smaller devices */
    footer {
        padding: var(--space-md) var(--space-sm) !important;
    }

    footer h3 {
        font-size: 1rem !important;
    }

    footer p {
        font-size: 0.75rem !important;
    }
    
    /* Button group adjustments */
    .flex.justify-center.gap-lg {
        flex-direction: column;
        gap: var(--space-md);
    }

    .flex.justify-center.gap-lg .btn {
        width: 100%; /* Make buttons full width */
    }
}


#catgpt-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 998;
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

#cat-avatar {
  width: 64px;
  cursor: pointer;
}

#catgpt-btn {
  display: none;
  background-color: #1e40af;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

#catgpt-chatbox {
  position: fixed;
  bottom: 20px;
  left: 100px;
  width: 250px;
  background: #fff;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.15);
  z-index: 999;
}
#catgpt-messages {
  max-height: 150px;
  overflow-y: auto;
  font-family: monospace;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
#catgpt-input {
  width: 70%;
  padding: 5px;
}
#catgpt-send {
  width: 25%;
  padding: 5px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}

/* Rolling Logo Belt Styles */
.logo-belt-container {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) 0;
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.logo-belt-container::before,
.logo-belt-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.logo-belt-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.logo-belt-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
}

.logo-belt {
    display: flex;
    animation: scroll-left 60s linear infinite;
    width: calc(200% + 40px);
}

.logo-item {
    flex: 0 0 auto;
    margin: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    min-width: 120px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
    border: 1px solid var(--neutral-200);
}

.logo-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
}

.logo-item img {
    max-height: 50px;
    max-width: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none;
    opacity: 1;
    transition: var(--transition-fast);
}

.logo-item:hover img {
    transform: scale(1.05);
}

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

/* Pause animation on hover */
.logo-belt-container:hover .logo-belt {
    animation-play-state: paused;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-belt-container {
        padding: var(--space-lg) 0;
    }

    .logo-item {
        height: 60px;
        min-width: 100px;
        margin: 0 var(--space-md);
    }

    .logo-item img {
        max-height: 40px;
        max-width: 80px;
    }

    .logo-belt {
        animation-duration: 45s;
    }
}

@media (max-width: 480px) {
    .logo-item {
        height: 50px;
        min-width: 80px;
        margin: 0 var(--space-sm);
    }

    .logo-item img {
        max-height: 30px;
        max-width: 60px;
    }

    .logo-belt {
        animation-duration: 35s;
    }
}

/* Team Contact Styling */
.team-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
    flex-wrap: wrap;
}

.email-copy {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--primary-blue);
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.email-copy:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.email-copy.copied {
    background-color: var(--secondary-green);
    color: white;
    animation: copySuccess 0.3s ease-out;
}

@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.linkedin-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #0077b5;
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: 1.1rem;
}

.linkedin-link:hover {
    background-color: #005885;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Timeline Content Formatting */
.timeline-item p {
    text-align: justify !important;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.timeline-item ul {
    text-align: justify !important;
    line-height: 1.6;
    margin: 0.75rem 0;
}

.timeline-item li {
    text-align: justify !important;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.timeline-item h3 {
    text-align: center !important;
    margin-bottom: 0.75rem;
}

/* Ensure consistent padding and spacing */
.timeline-item .bg-white {
    padding: 1.5rem !important;
    text-align: justify;
}

/* Override any conflicting text alignment */
.timeline-item-left .bg-white,
.timeline-item-right .bg-white {
    text-align: justify !important;
}

.timeline-item-left .bg-white h3,
.timeline-item-right .bg-white h3 {
    text-align: center !important;
}

/* Roles Showcase Styling */
.roles-showcase {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-lg);
    justify-content: center;
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.role-item {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-fast);
    cursor: pointer;
    width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.role-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
    color: rgb(0, 0, 0);
}

.role-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--transition-fast);
}

.role-item:hover::before {
    left: 100%;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .team-contact {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .email-copy {
        font-size: 0.85rem;
    }

    .timeline-item p,
    .timeline-item ul,
    .timeline-item li {
        text-align: justify !important;
    }

    .roles-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
        padding: var(--space-md);
    }

    .role-item {
        font-size: 0.95rem;
        padding: var(--space-md) var(--space-lg);
        min-width: 150px;
        min-height: 70px;
    }
}

/* Responsive triangle grid for excellence cards */
.charts-grid-triangle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl, 2rem);
    margin-bottom: var(--space-2xl, 3rem);
}

@media (max-width: 900px) {
    .charts-grid-triangle {
        grid-template-columns: 1fr;
    }
    .chart-container.text-only {
        min-width: 0;
        width: 100%;
        max-width: 100%;
        margin: 0 auto var(--space-xl, 2rem);
    }
}

/* Ensure text wraps and is visible */
.chart-container.text-only h2,
.chart-container.text-only p,
.chart-container.text-only ul,
.chart-container.text-only li {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.testimonials-container {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.testimonial {
    flex: 1 1 350px;
    min-width: 220px;
    max-width: 100%;
    word-break: break-word;
}

@media (max-width: 768px) {
    .testimonials-container {
        flex-direction: column;
        gap: var(--space-md);
    }
    .testimonial {
        min-width: 0;
        width: 100%;
        padding: var(--space-md);
    }
}