:root {
    /* Light Theme */
    --primary-color: #bf87e6;
    --secondary-color: #ffc857;
    --accent-color: #ff4fa0;
    --navbutton-color: #ff9800;
    --background-color: #f5f5f5;
    --text-color: #2d2d2d;
    --card-bg: #ffffff;
    --header-gradient: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    --glow-color: rgba(255, 79, 160, 0.3);
    --dark-bg: #111;

    /* Dark Theme */
    --dark-primary: #a56bd6;
    --dark-secondary: #ffbb33;
    --dark-accent: #ff66a3;
    --dark-background: #1a1a1a;
    --dark-text: #f0f0f0;
    --dark-card: #2d2d2d;
    --dark-nav: #0d0d0d;
}

/* Add this near your :root variables */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --primary-color: var(--dark-primary);
        --secondary-color: var(--dark-secondary);
        --accent-color: var(--dark-accent);
        --background-color: var(--dark-background);
        --text-color: var(--dark-text);
        --card-bg: var(--dark-card);
    }
}

/* This ensures manual toggle overrides system preference */
[data-theme="dark"] {
    --primary-color: var(--dark-primary);
    --secondary-color: var(--dark-secondary);
    --accent-color: var(--dark-accent);
    --background-color: var(--dark-background);
    --text-color: var(--dark-text);
    --card-bg: var(--dark-card);
}

[data-theme="light"] {
    --primary-color: #bf87e6;
    --secondary-color: #ffc857;
    --accent-color: #ff4fa0;
    --background-color: #f5f5f5;
    --text-color: #2d2d2d;
    --card-bg: #ffffff;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: all 0.4s ease;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.dark-mode {
    background-color: var(--dark-background);
    color: var(--dark-text);
}

h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* Layout */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

section {
    margin-bottom: 3rem;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    background: var(--header-gradient);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--glow-color);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px var(--glow-color);
}

.theme-toggle i {
    color: white;
    font-size: 1.3rem;
}

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

.theme-toggle.active {
    animation: spin 0.6s ease;
}

/* Navigation */
.navbar {
    background: var(--header-gradient);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

body.dark-mode .navbar {
    background: var(--dark-nav);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.navbar-logo {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 1.3rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: translateX(5px);
}

.navbar-logo img {
    height: 40px;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.navbar-logo:hover img {
    transform: rotate(-15deg);
}

/* Mobile Menu Toggle */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease;
}

.navbar-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.navbar-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Navigation Menu */
.navbar-menu {
    display: flex;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.navbar-links {
    display: flex;
    list-style: none;
}

.nav-link {
    color: white;
    padding: 0.5rem 1.2rem;
    margin: 0 0.2rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.nav-link i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--secondary-color);
}

.nav-link:hover i {
    transform: translateY(2px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--secondary-color);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    background-color: var(--card-bg);
    min-width: 220px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

body.dark-mode .dropdown-menu {
    background-color: var(--dark-card);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

body.dark-mode .dropdown-item {
    color: var(--dark-text);
}

.dropdown-item:hover {
    background-color: rgba(191, 135, 230, 0.1);
    border-left: 3px solid var(--primary-color);
    padding-left: 1.8rem;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
    margin: 2rem 0 4rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--glow-color), transparent 60%);
    z-index: -1;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

body.dark-mode .hero h1 {
    background: linear-gradient(to right, var(--dark-primary), var(--dark-secondary));
    -webkit-background-clip: text;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    max-width: 600px;
}

body.dark-mode .hero p {
    color: var(--dark-text);
}

.hero-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.hero-image img {
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

body.dark-mode .hero-image img {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Cards */
.mission-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

body.dark-mode .card {
    background: var(--dark-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 4px solid var(--primary-color);
}

body.dark-mode .card img {
    border-bottom-color: var(--dark-primary);
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

body.dark-mode .card h3 {
    color: var(--dark-primary);
}

.card p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

body.dark-mode .card p {
    color: var(--dark-text);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    background: var(--header-gradient);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn i {
    margin-left: 8px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(255, 255, 255, 0.3), transparent);
    transform: translateY(-100%);
    transition: transform 0.4s ease;
}

.btn:hover::before {
    transform: translateY(0);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--glow-color);
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

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

body.dark-mode .btn-outline {
    color: var(--dark-primary);
    border-color: var(--dark-primary);
}

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

body.dark-mode .btn-outline:hover {
    background: var(--dark-primary);
}

/* News Section */
.news-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-item {
    background: var(--card-bg);
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

body.dark-mode .news-item {
    background: var(--dark-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left-color: var(--dark-secondary);
}

.news-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

body.dark-mode .news-item h3 {
    color: var(--dark-primary);
}

.date {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: block;
}

body.dark-mode .date {
    color: var(--dark-text);
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 600;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

body.dark-mode .read-more {
    color: var(--dark-secondary);
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-color);
}

body.dark-mode .read-more:hover {
    color: var(--dark-primary);
}

.read-more:hover i {
    transform: translateX(3px);
}

/* Glow Effects */
.glow-on-hover:hover {
    box-shadow: 0 0 20px var(--glow-color);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 3rem 0 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-section p, .footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
    display: block;
}

.footer-section a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.footer-section i {
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }

    .navbar-menu.active {
        max-height: 500px;
        opacity: 1;
        margin-top: 1rem;
    }

    .navbar-links {
        flex-direction: column;
        width: 100%;
    }

    .nav-link {
        padding: 0.8rem 0;
        margin: 0.2rem 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transform: none;
        background-color: rgba(0, 0, 0, 0.1);
        width: 100%;
    }

    .dropdown:hover .dropdown-menu {
        max-height: 500px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
    }
}





/* Subpage Specific Styles */
.subpage {
    padding-top: 2rem;
}

/* Breadcrumb navigation */
.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    margin-right: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--primary-color);
    opacity: 0.7;
}

body.dark-mode .breadcrumb li:not(:last-child)::after {
    color: var(--dark-primary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

body.dark-mode .breadcrumb a {
    color: var(--dark-primary);
}

.breadcrumb a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

body.dark-mode .breadcrumb a:hover {
    color: var(--dark-accent);
}

/* Page header */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dark-mode .page-header h1 {
    background: linear-gradient(to right, var(--dark-primary), var(--dark-secondary));
    -webkit-background-clip: text;
    background-clip: text;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto;
}

body.dark-mode .page-header .subtitle {
    color: var(--dark-text);
}

/* Content sections */
.content-section {
    margin-bottom: 4rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

.text-content {
    line-height: 1.7;
}

.text-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
}

.text-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.text-content a:hover {
    color: var(--dark-primary);
    text-decoration: underline;

}

body.dark-mode .text-content h3 {
    color: var(--dark-primary);
}

.feature-list {
    list-style: none;
    margin: 1.5rem 0;
}

.feature-list li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.feature-list i {
    color: var(--secondary-color);
    margin-right: 0.8rem;
    font-size: 1.2rem;
}

body.dark-mode .feature-list i {
    color: var(--dark-secondary);
}

.styled-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.styled-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.styled-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

body.dark-mode .styled-list li::before {
    color: var(--dark-primary);
}

/* Content cards */
.content-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
}

body.dark-mode .content-card {
    background: var(--dark-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.content-card img {
    width: 100%;
    height: auto;
    display: block;
}

.card-caption {
    padding: 1.5rem;
}

.card-caption p {
    margin-bottom: 1rem;
}

/* Highlight section */
.highlight-section {
    background: linear-gradient(135deg, rgba(191, 135, 230, 0.1), rgba(255, 200, 87, 0.1));
    padding: 3rem 2rem;
    margin: 3rem 0;
    border-radius: 12px;
    text-align: center;
}

body.dark-mode .highlight-section {
    background: linear-gradient(135deg, rgba(165, 107, 214, 0.1), rgba(255, 187, 51, 0.1));
}

.highlight-content {
    max-width: 800px;
    margin: 0 auto;
}

.highlight-section h2 {
    color: var(--primary-color);
}

body.dark-mode .highlight-section h2 {
    color: var(--dark-primary);
}

/* Columns section */
.columns-section {
    margin: 4rem 0;
}

.columns-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.column {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

body.dark-mode .column {
    background: var(--dark-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.column:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--glow-color);
}

.column h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

body.dark-mode .column h3 {
    color: var(--dark-primary);
}

.column h3 i {
    margin-right: 0.8rem;
}

.column a {
    color: var(--primary-color);
    text-decoration: none;
}

.column a:hover {
    color: var(--accent-color);
}

/* Gallery section */
.gallery-section {
    margin: 4rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

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



/* ===== TEAM PAGE SPECIFIC STYLES ===== */
/* Add these to your existing styles.css */

.team-page {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Team Grid Layout */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

/* Team Card Styles */
.team-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

body.dark-mode .team-card {
    background: var(--dark-card);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--glow-color);
}

.card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-content h2 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

body.dark-mode .card-content h2 {
    color: var(--dark-primary);
}

.card-content h3 {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

body.dark-mode .card-content h3 {
    color: var(--dark-text);
}

.card-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

body.dark-mode .card-content p {
    color: var(--dark-text);
}

.contact-links {
    display: flex;
    gap: 1rem;
}

.contact-links a {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

body.dark-mode .contact-links a {
    color: var(--dark-primary);
}

.contact-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

body.dark-mode .contact-links a:hover {
    color: var(--dark-accent);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    position: relative;
}

body.dark-mode .modal-content {
    background: var(--dark-card);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

body.dark-mode .modal-header h2 {
    color: var(--dark-primary);
}

.close {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.dark-mode .close {
    color: var(--dark-text);
}

.close:hover {
    color: var(--accent-color);
    transform: rotate(90deg);
}

body.dark-mode .close:hover {
    color: var(--dark-accent);
}

/* Update modal body layout */
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Update modal image container */
.modal-image {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Style for contact links in modal */
.modal-image .contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

body.dark-mode .modal-image .contact-links {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.modal-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .modal-image img {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.modal-text {
    flex: 2;
}

.modal-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-text a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}
.modal-text a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
    text-decoration: underline;
}


/* Back link */
.back-link {
    margin: 3rem 0;
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 2rem auto;
        padding: 1.5rem;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-image {
        margin-bottom: 1.5rem;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 480px) {
    .team-page {
        padding: 1rem;
    }

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