/* --- CSS DEĞİŞKENLERİ (TEMA İÇİN) --- */
:root {
    /* Açık Tema Varsayılanları */
    --primary-color: #d32f2f;
    --primary-dark: #a52a2a;
    --bg-body: #f0f0f0;
    --bg-content: #fff;
    --bg-dark: #000;
    --bg-nav: #1a1a1a;
    --text-color: #333;
    --text-light: white;
    --border-color: #ddd;
    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.2);
}

/* KOYU TEMA */
body.dark-mode {
    --bg-body: #121212;
    --bg-content: #1e1e1e;
    --bg-dark: #000; 
    --bg-nav: #212121;
    --text-color: #f0f0f0;
    --text-light: #fff;
    --border-color: #444;
    --shadow-light: rgba(0,0,0,0.5);
    --shadow-medium: rgba(0,0,0,0.8);
}

/* --- GENEL STİLLER --- */
* { box-sizing: border-box; }
body { 
    font-family: 'Poppins', sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: var(--bg-body); 
    color: var(--text-color);
    transition: background-color 0.5s, color 0.5s; 
}

h1, h2, h3 { 
    font-family: 'Oswald', sans-serif; 
    color: var(--text-color);
}
hr {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* --- BAŞLIK (HEADER) --- */
header {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-medium);
}
header h1 {
    margin: 0;
    font-size: 1.8em;
    flex-grow: 1;
    text-align: center;
    color: var(--text-light);
}
.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}
#theme-toggle {
    background: none;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s, color 0.3s;
}
#theme-toggle:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

/* --- NAVİGASYON (NAV) --- */
nav {
    background-color: var(--bg-nav);
    position: sticky;
    top: 70px; /* Header yüksekliği */
    z-index: 999;
    box-shadow: 0 2px 5px var(--shadow-light);
}
#nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}
nav a, nav button {
    color: var(--text-light);
    text-decoration: none;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 600;
    font-size: 0.95em;
    background: none;
    border: none;
    cursor: pointer;
}
nav button.nav-btn {
    border-radius: 0;
}
nav a:hover, nav button:hover, nav button.active {
    background-color: var(--primary-dark);
    color: var(--text-light);
}
.nav-icon {
    margin-right: 8px;
    font-size: 1.2em;
}
#menu-toggle {
    display: none;
    width: 100%;
    justify-content: center;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-dark);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px var(--shadow-medium);
    z-index: 1;
    border-radius: 0 0 5px 5px;
}
.dropdown-content a {
    color: var(--text-light);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}
.dropdown-content a:hover {
    background-color: var(--primary-color);
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* --- ANA İÇERİK --- */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}
.page-section {
    display: none;
    padding: 20px 0;
}
.page-section.active {
    display: block;
}
.info-section {
    background-color: var(--bg-content);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-light);
}
.primary-button {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}
.primary-button:hover {
    background-color: var(--primary-dark);
}

/* --- ANASAYFA --- */

/* Öne Çıkan Haber */
.featured-news {
    display: flex;
    background-color: var(--bg-content);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary-color);
}
.featured-image {
    flex: 2;
    min-width: 300px;
    max-height: 350px;
    overflow: hidden;
    cursor: pointer;
}
.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.featured-text {
    flex: 3;
    padding: 20px;
}
.featured-text h2 {
    margin-top: 0;
    color: var(--primary-color);
}
.news-date {
    color: #999;
    font-size: 0.9em;
    margin-bottom: 10px;
}
.read-more-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    display: inline-block;
    transition: background-color 0.3s;
}
.read-more-btn:hover {
    background-color: var(--primary-dark);
}

/* Haber Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.news-item {
    background-color: var(--bg-content);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow-light);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-medium);
}
.news-item img, .news-item-placeholder {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.news-item-placeholder {
    background-color: var(--border-color);
    color: #777;
    text-align: center;
    line-height: 180px;
    font-style: italic;
    font-size: 0.9em;
}
.news-item .news-content {
    padding: 15px;
}
.news-item h3 {
    margin-top: 0;
    font-size: 1.1em;
    height: 3.3em; /* 3 satır için yer tutar */
    overflow: hidden;
    line-height: 1.1;
    color: var(--text-color);
}
/* Haber Detay Sayfası */
#detail-news-content p {
    margin-bottom: 1em;
}

/* --- TAKIM SAYFASI --- */

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: var(--bg-content);
    border-radius: 8px;
    overflow: hidden;
}
.data-table th {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 12px 8px;
    text-align: center;
    font-weight: 700;
}
#squad-table tbody td, .fixture-table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}
#squad-table tbody tr:hover, .fixture-table tbody tr:hover {
    background-color: rgba(var(--primary-color), 0.1);
    cursor: pointer;
}
#squad-table tbody tr:last-child td, .fixture-table tbody tr:last-child td {
    border-bottom: none;
}

/* Teknik Kadro Grid */
.staff-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    text-align: center;
}
.staff-card {
    background-color: var(--bg-body);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    flex: 1 1 200px;
    max-width: 250px;
}

/* Altyapı Grid */
.academy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.academy-card {
    background-color: var(--bg-body);
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--border-color);
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: border-left-color 0.3s;
}
.leader-card {
    border-left-color: var(--primary-color);
    background-color: var(--primary-dark);
    color: var(--text-light);
}
.leader-card h3, .leader-card p {
    color: var(--text-light);
}

/* Oyuncu Detay Sayfası */
.advanced-player-header {
    display: flex;
    gap: 30px;
    align-items: center;
    border-left: 5px solid var(--primary-color);
}
.player-modal-photo {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 4px 10px var(--shadow-medium);
}
.adv-player-info h1 {
    margin-top: 0;
    font-size: 2em;
}
.adv-player-info p {
    margin: 5px 0;
    font-size: 1.1em;
}

/* Heatmap Simülasyonu */
.heatmap-placeholder {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}
.heatmap-placeholder img {
    opacity: 0.7;
}
.heatmap-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    font-family: 'Oswald', sans-serif;
}

/* --- FİKSTÜR VE MAÇ ÖZETLERİ --- */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
.highlight-card {
    background-color: var(--bg-content);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
}
.video-embed iframe {
    width: 100%;
    border-radius: 4px;
}

/* --- GALERİ VE LIGHTBOX --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: transform 0.3s;
}
.gallery-item:hover {
    transform: scale(1.03);
}
.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 0.9em;
    text-align: center;
}
/* Lightbox (Modal) */
.modal {
    display: none; /* Varsayılan olarak gizli */
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
}
.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 90vh;
    object-fit: contain;
}
#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    background: none;
    border: none;
    cursor: pointer;
}
.close-btn:hover, .close-btn:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Fikstür Önizleme Modalı İçin */
.modal-content-inner {
    background-color: var(--bg-content);
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.modal-content-inner h2 {
    text-align: center;
}
.squad-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    background-color: var(--bg-body);
}
.squad-list li {
    padding: 5px 0;
    border-bottom: 1px dotted var(--border-color);
}
.squad-list li:last-child {
    border-bottom: none;
}

/* --- İLETİŞİM SAYFASI --- */
.contact-form label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-body);
    color: var(--text-color);
}
.contact-form textarea {
    resize: vertical;
}


/* --- STORE (MAĞAZA) VE E-BİLET --- */
.product-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}
.product-card {
    background-color: var(--bg-body);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: transform 0.3s;
    text-align: center;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px var(--shadow-medium);
}
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.product-content {
    padding: 15px;
}
.product-category {
    color: #999;
    font-size: 0.8em;
    margin-bottom: 5px;
}
.product-price {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 10px 0 15px 0;
}


/* --- TARİHÇE (TIMELINE) --- */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}
/* Ana dikey çizgi */
.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}
/* Olay konteyneri */
.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}
/* Sağa hizalı öğeler */
.timeline-item.right {
    left: 50%;
}
/* Sol tarafta hizalı öğeler */
.timeline-item.left {
    left: 0;
}
/* Olay Noktası (Dot) */
.timeline-dot {
    width: 30px;
    height: 30px;
    position: absolute;
    top: 20px;
    border-radius: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 0 0 3px var(--bg-content), 0 0 0 6px var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}
.timeline-item.left .timeline-dot {
    right: -15px;
}
.timeline-item.right .timeline-dot {
    left: -15px;
}
/* İçerik Kutusu */
.timeline-content {
    padding: 20px;
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 10px var(--shadow-light);
}
.timeline-content h2 {
    color: var(--primary-color);
    margin-top: 0;
}
/* Oklar */
.timeline-item.left .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    right: -10px;
    border: medium solid var(--bg-content);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--bg-content);
}
.timeline-item.right .timeline-content::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    left: -10px;
    border: medium solid var(--bg-content);
    border-width: 10px 10px 10px 0;
    border-color: transparent var(--bg-content) transparent transparent;
}


/* --- YENİ SPONSOR SLIDER STİLLERİ (Geliştirme 1) --- */

.sponsor-slider-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap; /* Resimlerin alt alta geçmesini engeller */
    padding: 10px 0;
}
.sponsor-track {
    display: inline-block; /* Tek bir satırda kalmasını sağlar */
    animation: scroll-sponsors 30s linear infinite; /* Animasyon hızı ayarlanabilir */
}
.sponsor-logo {
    height: 60px; /* Logo yüksekliği */
    margin: 0 30px;
    vertical-align: middle;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: opacity 0.3s, filter 0.3s;
}
.sponsor-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}
/* Sponsor Kaydırma Animasyonu */
@keyframes scroll-sponsors {
    from {
        transform: translateX(0);
    }
    to {
        /* İçeriğin tam yarısı kadar kaydırarak sonsuz döngü hissi verir (8 logo varsa 4 logo genişliği) */
        transform: translateX(-50%); 
    }
}


/* --- MOBİL UYARLILIK (768px'den küçük cihazlar için) --- */
@media (max-width: 768px) {
    
    header h1 {
        font-size: 1.5em;
    }
    nav {
        top: 65px; /* Yeni header yüksekliğine göre ayarlanabilir */
    }
    #nav-links {
        flex-direction: column;
        display: none; /* Varsayılan olarak kapalı */
        position: absolute;
        width: 100%;
        background-color: var(--bg-nav);
    }
    #menu-toggle {
        display: flex;
    }
    nav a, nav button {
        padding: 10px 20px;
        width: 100%; /* Dropdown'ın içindeki butonun genişliği için */
    }

    .dropdown-content {
        position: static; /* Mobil: Dropdown'ı akışta göster */
        min-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
    .dropdown-content a {
        padding-left: 30px; /* Alt linklere girinti */
        background-color: var(--primary-dark);
    }

    /* Anasayfa Mobil */
    .featured-news {
        flex-direction: column;
    }
    .featured-image {
        min-width: 100%;
        max-height: 250px;
    }
    .featured-text {
        padding: 15px;
    }

    /* Oyuncu Detay Mobil */
    .advanced-player-header {
        flex-direction: column;
        text-align: center;
        border-left: none;
    }
    .player-modal-photo {
        margin-bottom: 10px;
    }

    /* Tarihçe Mobil */
    .timeline::after {
        left: 31px; /* Çizgiyi sola kaydır */
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px; /* İçeriği çizginin sağına kaydır */
        padding-right: 10px;
    }
    .timeline-item.right {
        left: 0; /* Hepsi sola hizalanır */
    }
    .timeline-item.right .timeline-dot {
        left: 21px; /* Çizginin üzerine oturur */
    }
    .timeline-item.left .timeline-dot {
        right: auto;
        left: 21px; /* Çizginin üzerine oturur */
    }
    .timeline-item.left .timeline-content::before, .timeline-item.right .timeline-content::before {
        border: medium solid var(--bg-content);
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--bg-content) transparent transparent;
        left: -10px;
        right: auto;
    }

    /* Sponsor Kaydırıcısı Mobil */
    .sponsor-track {
        animation-duration: 40s; /* Mobil cihazlarda daha yavaş kayar */
    }
}