/*CSS Variables and Global Styles*/
:root {
    --primary-color: #EC368F;
    --secondary-color: #3E4095;
    --dark-color: #021e40;
    --light-color: #ffffff;
    --text-color: #555;
    --heading-color: #111;
    --bg-light-gray: #f7f8fc;
    --border-color: #e9ecef;
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-strong: 0 8px 25px rgba(0, 0, 0, 0.1);
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.6s;
    --border-radius: 12px;
}

/* --- Basic Resets & Defaults --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; height: 100%;}
body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--light-color);
    overflow-x: hidden;
    flex-grow: 1;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

h1, h2, h3, h4 { color: var(--heading-color); line-height: 1.3; font-weight: 700; }
h3 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 1rem; }
p { margin-bottom: 1.25rem; }

a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--secondary-color); }
img { max-width: 100%; height: auto; display: block; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.8rem 1.8rem; border-radius: 5px; font-weight: 600; text-align: center; transition: all 0.3s ease; border: none; cursor: pointer; }
.btn-primary { background: linear-gradient(145deg, var(--primary-color), var(--secondary-color)); color: var(--light-color); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: var(--shadow-strong); color: var(--light-color); text-decoration: none; }

/*Header & Navigation*/
.site-header { background-color: var(--light-color); box-shadow: var(--shadow-soft); position: sticky; top: 0; width: 100%; z-index: 1000; }
.main-nav .container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.nav-logo img { max-height: 50px; }
.nav-links { list-style: none; display: flex; align-items: center; gap: 2rem; }
.nav-links a {
    color: var(--heading-color);
    font-weight: 600;
    padding: 1.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.nav-links > li > a::after { content: ''; position: absolute; bottom: 0; left: 50%; width: 0; height: 3px; background-color: var(--primary-color); transition: all 0.3s ease-out; transform: translateX(-50%); }
.nav-links > li > a:hover::after, .nav-links li.active > a::after { width: 100%; left: 0; transform: translateX(0); }
.nav-links .dropdown > a i { font-size: 0.8em; transition: transform 0.3s ease; }
.dropdown { position: relative; }
.submenu { display: none; position: absolute; top: 100%; left: 0; background-color: var(--light-color); box-shadow: var(--shadow-strong); list-style: none; padding: 0.5rem 0; min-width: 240px; border-radius: var(--border-radius); opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease; z-index: 1001; }
.dropdown:hover .submenu { display: block; opacity: 1; transform: translateY(0); }
.dropdown:hover > a i { transform: rotate(180deg); }
.submenu li a { padding: 0.75rem 1.5rem; width: 100%; display: block; font-weight: 500; }
.submenu li a::after { display: none; }
.submenu li a:hover { background-color: var(--bg-light-gray); color: var(--primary-color); }

.nav-apply-btn {
    margin-left: 1rem; 
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.nav-toggle { display: none; font-size: 1.5rem; background: none; border: none; color: var(--dark-color); cursor: pointer; }

/*Team Page Specific Styles*/
.team-section { padding: 5rem 0; }
.section-intro { max-width: 800px; margin: 0 auto 4rem; text-align: center; }
.section-title { margin-bottom: 1rem; }
.team-category { margin-bottom: 4rem; }
.team-category-title { font-size: 2rem; text-align: center; margin-bottom: 2.5rem; position: relative; padding-bottom: 1rem; }
.team-category-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background-color: var(--primary-color); }

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    justify-items: center;
}

/*Card Flip Structure & Animation */
.team-card {
    background-color: transparent;
    width: 100%;
    height: 380px;
    perspective: 1500px;
    border: none;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform var(--transition-speed) ease;
    transform-style: preserve-3d;
}

/* The hover effect that triggers the flip */
.team-card:hover .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front, .team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-strong);
    overflow: hidden;
}

/* --- Front of the Card --- */
.team-card-front {
    background-color: var(--light-color);
    display: flex;
    flex-direction: column;
}

.team-card-image {
    width: 100%;
    height: 70%;
}
.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}
.team-card-content {
    padding: 1rem;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.team-member-name {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}
.team-member-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin: 0;
}

/* --- Back of the Card --- */
.team-card-back {
    background: linear-gradient(145deg, var(--secondary-color), var(--primary-color));
    color: var(--light-color);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.team-card-back .team-member-name {
    color: var(--light-color);
    font-size: 1.3rem;
}
.team-card-back .team-member-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.team-card-social {
    display: flex;
    gap: 1rem;
}
.team-card-social a {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s ease;
}
.team-card-social a:hover {
    background-color: rgba(255, 255, 255, 0.4);
    color: var(--light-color);
}


/* --- Specific Card Layouts --- */
.team-card-single-top {
    display: block;
    margin: 0 auto 2rem auto;
    max-width: 300px;
    height: 400px;
}

/*Footer*/
.site-footer {
    background-color: var(--dark-color);
    color: #c0c0c0;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
}

/*Responsive Styles*/
@media (max-width: 1024px) {
    .team-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

@media (max-width: 768px) {
    html { font-size: 16px; }
    h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
    section { padding: 3rem 0; }
    .nav-toggle { display: block; z-index: 1001; }
    .nav-apply-btn { display: none; }
    .nav-links { display: block; position: fixed; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px); background-color: var(--dark-color); flex-direction: column; align-items: flex-start; gap: 0; padding: 2rem 0; transform: translateX(100%); transition: transform 0.35s ease-in-out; overflow-y: auto; z-index: 1000; }
    .nav-links.active { transform: translateX(0); }
    .nav-links li { width: 100%; }
    .nav-links a { color: var(--light-color); font-size: 1.1rem; padding: 1rem 2rem; width: 100%; display: flex; justify-content: space-between; align-items: center; }
    .nav-links a:hover { background-color: rgba(255, 255, 255, 0.05); }
    .nav-links > li > a::after { display: none; }
    .nav-links .dropdown > a > i { display: none; }
    .dropdown > a::after { content: '▼'; font-size: 0.8em; font-weight: bold; transition: transform 0.3s ease; }
    .dropdown.open > a::after { transform: rotate(180deg); }
    .dropdown .submenu { display: none; position: static; opacity: 1; transform: none; box-shadow: none; background-color: rgba(0, 0, 0, 0.2); padding: 0; min-width: 100%; border-radius: 0; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; }
    .dropdown.open > .submenu { display: block; max-height: 500px; }
    .dropdown .submenu li a { padding-left: 3rem; font-size: 1rem; font-weight: 400; color: #e0e0e0; }
}

@media (max-width: 480px) {
    html { font-size: 15px; }
    .team-card { height: 360px; }
}