:root {
    --font-main: 'Outfit', sans-serif;
    --color-bg: #000000;
    --color-text: #ffffff;
    --color-text-dim: rgba(255, 255, 255, 0.65);
    --color-accent: #FF8C00;

    /* Liquid Glass Variables Consistent with Style.css */
    --glass-bg: rgba(60, 60, 60, 0.35);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-blur: 35px;
    --glass-radius: 32px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

body {
    background-color: var(--color-bg);
    background-image: url('assets/dexlogo_full.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    color: var(--color-text);
    font-family: var(--font-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Add a pseudo-element overlay to darken the background image for readability */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Dark overlay */
    z-index: -1;
}

/* Header styles removed to use style.css defaults */

/* Main Content */
.team-container {
    /* Added margin-top to compensate for removed header margin-bottom */
    margin-top: 40px;
    padding: 0 5% 60px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Main Content */
.team-container {
    padding: 120px 5% 60px;
    max-width: var(--max-width, 1400px);
    margin: 0 auto;
    text-align: center;
}

.page-title {
    font-family: 'ITC Avant Garde Gothic', sans-serif;
    font-size: 3rem;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.page-subtitle {
    color: var(--color-text-dim);
    margin-bottom: 60px;
    font-weight: 400;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    justify-content: center;
}

.team-card {
    /* Liquid Glass Card */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius);
    padding: 0;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    height: 500px;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.team-card:hover {
    transform: scale(1.02);
    /* Lighter glass on hover */
    background: rgba(80, 80, 80, 0.45);
    border-color: rgba(255, 255, 255, 0.3);
}

.team-card::after {
    /* Smooth gradient overlay */
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

.member-photo-container {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    overflow: hidden;
    margin: 0;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    filter: grayscale(20%);

    /* Blur edges using mask */
    -webkit-mask-image: radial-gradient(ellipse 90% 90% at center, black 60%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 90% at center, black 60%, transparent 100%);
}

.team-card:hover .member-photo {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.member-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
    z-index: 2;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.member-role {
    font-size: 1rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    z-index: 2;
    position: relative;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.view-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    background: var(--color-accent);
    color: #000;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 30px;
    /* Space from bottom */
    z-index: 2;
    position: relative;
}

.team-card:hover .view-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    /* JS toggles this */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* --- MODAL DÜZENLENMİŞ KISIM --- */

.modal-content {
    /* Liquid Glass Modal */
    background: rgba(40, 40, 40, 0.6);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 40px;

    width: 90%;
    max-width: 900px;
    padding: 50px;
    
    /* YAN YANA DİZİLİM İÇİN KRİTİK AYARLAR */
    display: flex !important;
    flex-direction: row !important; 
    align-items: center; 
    gap: 50px;
    
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--color-text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.close-modal:hover {
    color: var(--color-accent);
}

.modal-img-container {
    /* Resmin genişliğini sabitliyoruz */
    flex: 0 0 300px !important; 
    max-width: 300px;
}

.modal-img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    display: block;
}

.modal-info {
    /* Metin alanının kalan boşluğu doldurmasını sağlıyoruz */
    flex: 1 !important; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left; /* Metinleri sola yasla */
}

.modal-name {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 5px;
    text-shadow: 0 0 20px rgba(196, 139, 96, 0.3);
}

.modal-role {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 20px;
    opacity: 0.9;
}

.modal-bio {
    color: var(--color-text-dim);
    line-height: 1.6;
}

/* MOBİL GÖRÜNÜM (768px altı ekranlar için otomatik alt alta geçer) */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column !important; 
        padding: 30px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        gap: 20px;
    }

    .modal-img-container {
        flex: 0 0 auto !important;
        max-width: 150px;
        margin: 0 auto;
    }

    .modal-info {
        text-align: center;
    }
}

/* --- MOBİL GRİD DÜZENLEMESİ --- */

/* Tablet ve küçük ekranlar için (992px altı) */
@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr); /* Yan yana 2 adet */
        gap: 20px; /* Boşlukları biraz daraltalım */
        padding: 0 10px;
    }

    .team-card {
        height: 400px; /* Kart yüksekliğini mobilde biraz küçültelim ki ekranı kaplamasın */
    }

    .member-name {
        font-size: 1.4rem; /* İsim boyutunu dengeleyelim */
    }
}

/* Çok küçük telefonlar için (480px altı) isteğe bağlı: */
@media (max-width: 480px) {
    .team-container {
        padding-top: 80px; /* Üst boşluğu azalt */
    }
    
    .page-title {
        font-size: 2rem;
    }

    .team-card {
        height: 350px; /* Daha küçük telefonlarda daha ideal yükseklik */
    }
}