/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', Arial, sans-serif;
}

:root {
    --primary: #ee4a62;
    --primary-dark: #d73a50;
    --secondary: #1EB980;
    --secondary-dark: #18a26f;
    --dark: #333;
    --light: #f5f5f5;
    --white: #ffffff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #f5f7fa 100%, #c3cfe2 0%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--white);
    padding: 12px 20px;
    border-radius: 40px;
    box-shadow: var(--shadow);
    max-width: 1120px;
    width: 90%;
    margin: 20px auto;
    position: relative;
    z-index: 100;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    color: var(--dark);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 50px;
    transition: var(--transition);
}

.nav-item i {
    margin-right: 6px;
    font-size: 1.1rem;
}

.nav-item:hover, .nav-item.active {
    background-color: #ffdddd;
    color: var(--primary);
}

.cta-button {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    color: var(--white);
}

/* Media queries for responsive navbar */
@media (max-width: 768px) {
    .navbar {
        padding: 15px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        width: 100%;
        padding: 20px;
        border-radius: 0 0 20px 20px;
        box-shadow: var(--shadow);
        display: none;
        margin-top: 10px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-item {
        width: 100%;
        padding: 12px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .navbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .cta-button {
        margin-left: auto;
    }
}

/* ===== Page Header ===== */
.page-header {
    background-color: var(--white);
    padding: 40px 0;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    text-align: center;
}

.section-divider {
    display: flex;
    justify-content: center;
    margin: 15px 0;
}

.divider-decoration {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ===== Institution Name ===== */
.institution-name {
    text-align: center;
    margin-bottom: 40px;
}

.institution-name h2 {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 500;
}

/* ===== Team Section ===== */
.team-section {
    margin-bottom: 60px;
}

.section-header {
    margin-bottom: 40px;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Team Members Grid ===== */
.team-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
    justify-content: center;
}

/* ===== Member Card with Flip Effect ===== */
.member-card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.member-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.member-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
}

.card-back {
    background-color: var(--light);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.member-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

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

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

.member-info {
    padding: 20px;
    text-align: center;
}

.member-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.member-designation {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 500;
}

.member-bio {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.5;
}

.member-institution {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

/* ===== Standard Card (No Flip) ===== */
.standard-card {
    height: auto;
    padding-bottom: 20px;
}

.standard-card .member-image {
    height: 250px;
}

/* ===== Advisory Board Section ===== */
.advisory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
}

.advisory-card {
    background-color: var(--white);
    border-top: 4px solid var(--primary);
    padding: 20px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.advisory-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advisor-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 5px;
}

.advisor-affiliation {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 5px;
    font-style: italic;
}

.advisor-location {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ===== Footer ===== */
.footer {
    background: #1a1a1a;
    color: var(--light);
    padding: 4rem 0 1.5rem;
    position: relative;
    overflow: hidden;
    margin-top: 60px;
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.footer-info {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    margin-bottom: 1.2rem;
}

.footer-logo h2 {
    color: var(--white);
    font-weight: 700;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.footer-logo h2 span {
    color: var(--primary);
}

.footer-logo h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--white);
    margin-top: 5px;
}

.footer p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer h3 {
    color: var(--white);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

.footer h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.contact-icon {
    margin-right: 0.8rem;
    background: rgba(238, 74, 98, 0.2);
    color: var(--primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.social-icons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-icons a:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
    color: var(--white);
}

.newsletter {
    margin-top: 2rem;
}

.newsletter form {
    display: flex;
    max-width: 400px;
    margin-top: 1rem;
}

.newsletter input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 4px 0 0 4px;
    outline: none;
}

.newsletter input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter button {
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 0 1.2rem;
    font-weight: 600;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter button:hover {
    background: var(--light-gray);
}

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

.footer-bottom strong {
    color: var(--secondary);
    font-weight: 600;
}

/* ===== Scroll to Top Button ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* ===== Animation Classes ===== */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.3s;
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.animate-fade-down {
    opacity: 0;
    transform: translateY(-30px);
    animation: fadeInDown 1s ease forwards;
    animation-delay: 0.3s;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* ===== Responsive Styles ===== */
@media (max-width: 1200px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 992px) {
    .navbar {
        width: 95%;
        padding: 10px 15px;
    }
    
    .team-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
    
    .advisory-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .member-card {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .institution-name h2 {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .team-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .member-card {
        height: 320px;
    }
    
    .standard-card .member-image {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .navbar {
        border-radius: 20px;
        width: 95%;
        margin: 15px auto;
    }
    
    .team-members-grid, .advisory-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .footer-info, .footer-contact, .footer-social {
        text-align: center;
    }
    
    .footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .newsletter form {
        margin: 0 auto;
    }
}