/* Genel Ayarlar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    overflow-x: hidden; /* Mobilde yatay kaymayı engeller */
}

body {
    background-color: #f4f4f4;
}

/* Navbar */
.navbar {
    background: transparent;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: #253B6A;
}

.nav-logo { height: 30px; margin-right: 10px; }
.logo-area { display: flex; align-items: center; font-weight: bold; }

.navbar ul { 
    display: flex; 
    list-style: none; 
    align-items: center; /* Dikeyde ortalar */
}

.navbar ul li { 
    margin-left: 20px; 
    position: relative; /* Açılır menünün buraya göre konumlanması için kritik */
}

.navbar ul li a { 
    color: white; 
    text-decoration: none; 
    font-size: 14px; 
    display: block;
    padding: 10px 0;
}


/* --- DROPDOWN AYARLARI --- */

/* Açılır kutunun tasarımı */
.dropdown-content {
    display: none; /* ÖNCE GİZLE */
    opacity: 0;    /* Görünmez yap */
    visibility: hidden; /* Tıklanabilirliği kapat */
    position: absolute;
    background-color: #253B6A;
    min-width: 200px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.3);
    top: 100%;
    left: 0;
    padding: 0;
    list-style: none;
    border-radius: 0 0 5px 5px;
    flex-direction: column;
    transition: opacity 0.3s ease; /* Hafif bir geçiş efekti ekler */
}

/* Mouse ile üzerine gelince (Hover) */
.dropdown:hover .dropdown-content {
    display: flex;      /* Görünür yap */
    opacity: 1;         /* Tam opaklık */
    visibility: visible; /* Etkileşime aç */
}

/* Açılır menü içindeki li'leri sıfırla */
.dropdown-content li {
    margin: 0 !important;
    width: 100%;
}

/* Açılır menü içindeki linkler */
.dropdown-content li a {
    padding: 12px 20px 12px 35px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dropdown-content li a:hover {
    background-color: #E87820e6; /* Senin turuncu rengin */
}

/* Mouse ile üzerine gelince göster */
.dropdown:hover .dropdown-content {
    display: flex; /* Flex olarak göster ki içerik düzgün dizilsin */
}

/* Hamburger Butonu — Masaüstünde gizli */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Bölümü (Mevcut kodun) */
.hero {
    height: 80vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('img/banner.webp');
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

/* ŞU KISMI EKLE: .hero-content'in genişliğini tam almasını sağla */
.hero-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* GÜNCELLE: main-text-logo özelliklerini güçlendir */
/* Ana Logo - Boyutu küçültüldü */
.main-text-logo { 
    width: 80%; /* Orijinal %90 veya %100 değerinden %80'e düşürdük */
    max-width: 880px; /* 1100px'in %80'i olarak sınırı daralttık */
    height: auto;
    margin-bottom: 0; /* Altındaki ekstra dış boşluğu sıfırladık */
}

.subtitle { 
    font-size: 24px; 
    margin-top: -20px; /* DİKKAT: Yazıyı logoya yaklaştırmak için eksi değer kullanıyoruz. Gerekirse bu sayıyı -40px veya -20px yaparak göz kararı ayarlayabilirsin */
    letter-spacing: 2px; 
}

/* Tanıtım Metni */
.intro {
    padding: 40px 10%;
    text-align: center;
    color: #253B6A;
    line-height: 1.6;
    font-size: 1.2rem;
}

/* Yeniler Başlığı */
.news-header {
    background-color: #e60000; /* Kırmızı Şerit */
    color: white;
    text-align: center;
    padding: 20px;
}

/* Takımlar Bölümü (Koyu Mavi Alan) */
.teams-section {
    background-color: #253B6A;
    padding: 60px 10%;
    display: flex; /* Yanyana durmalarını sağlar */
    justify-content: center; /* Ortada birleştirir */
    align-items: flex-start; /* Logoları aynı hizada tutar */
    gap: 60px; /* İki kartın arasındaki boşluk (çok bitişik olmasınlar diye) */
    flex-wrap: wrap; /* DİKKAT: Mobilde ekran küçülünce alt alta geçmesini sağlayan kural budur */
    color: white;
}

/* Her Bir Takım Kartı */
.team-card { 
    flex: 1 1 300px; /* Esnek yapı: minimum 300px'e kadar küçül, sonra alta düş */
    max-width: 480px; /* Bilgisayarda çok genişleyip alt alta düşmelerini engeller */
    text-align: center; /* Logoyu ve başlığı kartın tam ortasında tutar */
}

/* Logoların Link Ayarı */
.team-card a {
    text-decoration: none;
    display: inline-block; 
}

/* Logoların Efektleri */
.team-logo { 
    width: 216px; 
    max-width: 100%;
    margin-bottom: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    cursor: pointer;
}

.team-logo:hover {
    transform: scale(1.05);
    opacity: 0.9; 
}

/* Başlıklar */
.team-card h3 { 
    margin-bottom: 15px; 
    letter-spacing: 1px; 
}

/* SADECE Paragraflar (Senin istediğin iki yana yaslama ayarı) */
.team-card p { 
    font-size: 15px; 
    opacity: 0.85; 
    text-align: justify; /* Yazıları sağa ve sola tam yaslar */
    line-height: 1.7; /* Okunabilirliği artırmak için satır aralığı */
}

/* Footer Genel Ayarları */
.main-footer {
    background-color: #EBEBEB;
    color: #253b6a;
    padding: 10px 10px 15px 10px;
    text-align: center;
    font-family: 'Century Gothic', sans-serif;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-plane {
    width: 200px;
    max-width: 60%;
    height: auto;
    margin-bottom: -25px;
    opacity: 0.8;
}

.footer-disclaimer {
    font-size: 11px;
    font-weight: 300;
    font-family: 'Century Gothic', sans-serif;
    max-width: 1000px;
    margin: 0 auto 10px auto;
    line-height: 1.3;
    letter-spacing: 0.5px;
    padding: 0 10px 10px 10px;
}

.footer-bottom {
    font-size: 13px;
    letter-spacing: 1px;
    font-family: 'Century Gothic', sans-serif;
}

.footer-bottom a {
    color: #253B6A;
    text-decoration: underline;
    margin: 0 5px;
    transition: opacity 0.3s;
}

.footer-bottom a:hover {
    opacity: 0.7;
}

/* =========================================================
   TEMPLATE SAYFALARI İÇİN EK STİLLER
   ========================================================= */

.page-header {
    background-color: #253B6A; /* Resim yüklenmezse veya resim koymazsan görünecek yedek renk */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax efekti burada sağlanıyor */
    color: white;
    padding: 180px 10% 140px 10%;
    text-align: center;
}

/* Alt sayfalar (Terms of Use vb.) için daha dar başlık alanı */
.page-header.compact {
    padding: 120px 10% 60px 10%; /* Üstten 120px, alttan 60px - İhtiyacına göre değiştirebilirsin */
}

.page-header-content h1 {
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.page-header-content p {
    font-size: 1.1rem;
    opacity: 0.85;
}

.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 5%;
    color: #253B6A;
    line-height: 1.7;
}

.content-block {
    margin-bottom: 40px;
}

.content-block h2 {
    color: #E87820e6;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.content-block p {
    font-size: 1.05rem;
    text-align: justify; /* Metni sağa ve sola tam yaslar */
}

/* =========================================================
   POP-UP  (taşma ve kapatma butonu sorunları düzeltildi)
   ========================================================= */
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 60px 20px 30px 20px; /* close-btn'a üstte yer açmak için */
    overflow-y: auto; /* Çok uzun görsellerde scroll'a izin ver */
}

.popup-content {
    position: relative;
    max-width: 500px;
    width: 100%;
    max-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - 100px); /* Viewport'u hiç aşmasın */
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    cursor: pointer;
    display: block;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 35px;
    line-height: 1;
    color: white;
    cursor: pointer;
    font-family: Arial, sans-serif;
    z-index: 2;
    padding: 0 6px;
}

.close-btn:hover {
    color: #ff0000;
}

/* =========================================================
   YENİLER BLOĞU
   ========================================================= */
.news-header {
    background-color: #ed1c24;
    padding: 10px;
    text-align: center;
}

.news-inner-box {
    background-image: url('img/yeniler.jpg');
    background-size: cover;
    background-position: center;
    margin: 0 auto;
    padding: 20px 20px 30px 20px; 
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.contest-image {
    width: 100%;
    max-width: 280px;
    border-radius: 6px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.contest-image:hover {
    transform: scale(1.1);
}

.animated-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    display: inline-block;
    background: linear-gradient(90deg, #fff, #ffcc00, #fff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.click-instruction {
    margin-top: 15px;
    font-size: 1.1rem;
    color: #ffffff;
    font-weight: bold;
    font-style: italic;
    letter-spacing: 1px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9); 
}

/* =========================================================
   RESPONSIVE  —  TABLET  (≤1024px)
   ========================================================= */
@media (max-width: 1024px) {
    /* iOS Safari ve macOS Safari'de background-attachment: fixed
       genellikle bozuk render veriyor. Mobilde/tablette scroll'a çek. */
    .hero {
        background-attachment: scroll;
        height: 65vh;
    }

    .navbar { padding: 10px 25px; }

    .teams-section { padding: 50px 6%; }

    .page-header { padding: 110px 6% 35px 6%; }
}

/* =========================================================
   RESPONSIVE  —  MOBİL  (≤768px)
   ========================================================= */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 16px;
    }

    .logo-area span {
        font-size: 14px;
    }

    .nav-logo { height: 26px; }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #253B6A;
        padding: 10px 0 20px 0;
    }

    .nav-menu.open {
        display: block;
    }

    .navbar ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        gap: 0;
    }

    .navbar ul li {
        margin-left: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar ul li:last-child {
        border-bottom: none;
    }

    .navbar ul li a {
        padding: 14px 0;
        font-size: 14px;
    }

    .hero {
        height: 55vh;
        background-attachment: scroll;
    }

    /* index.html'deki inline transform: scale(2) mobilde
       logoyu ekran dışına taşırıyor. !important ile nötrle. */
    .main-text-logo {
        transform: scale(1) !important;
        max-width: 85%;
    }

    .subtitle {
        font-size: 16px;
        letter-spacing: 1px;
        padding: 0 15px;
    }

    .intro {
        padding: 30px 6%;
        font-size: 1rem;
    }

    .intro br { display: none; } /* Zorlama satır sonu mobilde kötü duruyor */

    /* Takımlar artık alt alta, tam genişlikte */
    .teams-section {
        flex-direction: column;
        align-items: center;
        padding: 40px 6%;
        gap: 40px;
    }

    .team-card {
        max-width: 100%;
        padding: 10px 0;
    }

    .team-logo { width: 170px; }

    /* Yeniler bölümü */
    .animated-title { font-size: 1.7rem; }
    .news-inner-box { padding: 15px 10px 20px 10px; }
    .contest-image { max-width: 220px; }
    .click-instruction {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

    /* Popup — mobilde daha güvenli boyutlar */
    .popup-overlay {
        padding: 50px 15px 20px 15px;
    }
    .popup-content img {
        max-height: calc(100vh - 90px);
        border-radius: 8px;
    }
    .close-btn {
        top: -34px;
        font-size: 30px;
    }

    /* Footer */
    .footer-plane { width: 140px; }
    .footer-disclaimer { font-size: 10px; padding: 8px; }
    .footer-bottom { font-size: 11px; letter-spacing: 0.5px; }
    .footer-bottom p { padding: 0 10px; }

    /* Template sayfa başlığı */
    .page-header { padding: 100px 5% 30px 5%; }
    .page-header-content h1 { font-size: 1.8rem; letter-spacing: 1px; }
    .page-header-content p { font-size: 0.95rem; }
    .page-content { padding: 40px 5%; }
}

/* =========================================================
   RESPONSIVE  —  KÜÇÜK TELEFON  (≤480px)
   ========================================================= */
@media (max-width: 480px) {
    .logo-area span { font-size: 12px; }
    .nav-logo { height: 22px; margin-right: 6px; }

    .hero { height: 50vh; }

    .main-text-logo {
        transform: scale(1) !important;
        max-width: 80%;
    }

    .subtitle { font-size: 14px; }

    .animated-title { font-size: 1.4rem; }
    .contest-image { max-width: 190px; }

    .team-logo { width: 150px; }
    .team-card h3 { font-size: 1rem; }
    .team-card p { font-size: 13px; }

    /* Popup mini ekranlarda */
    .popup-overlay { padding: 45px 10px 15px 10px; }
    .close-btn { top: -32px; right: 4px; font-size: 28px; }
}

@media (max-width: 768px) {
    .page-header.compact {
        padding: 90px 5% 40px 5%; /* Mobilde daha da dar olsun */
    }
}




/* =========================================================
   İÇERİK LİSTESİ (Yarışmalar, Etkinlikler vb. için resim-metin)
   ========================================================= */
.content-row {
    display: flex;
    align-items: center; /* Dikeyde ortalar */
    gap: 40px; /* Resim ve metin arasındaki boşluk */
    margin-bottom: 60px; /* Her bir yarışma bloğu arası boşluk */
}

/* Resim Alanı ve 4x5 Oranı */
.content-img {
    flex: 0 0 35%; /* Resim kapsayıcı genişliği (metne daha fazla yer kalsın diye %35 idealdir) */
    max-width: 320px;
    border-radius: 8px;
    overflow: hidden; /* Zoom efektinin taşmasını önler */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); /* Senin tasarımına uygun şık bir gölge */
}

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

.content-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5; /* 4x5 Dikey oran zorlaması */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-in-out;
}

/* Üzerine gelince büyüme efekti */
.content-img:hover img {
    transform: scale(1.08);
}

/* Metin Alanı ve Senin Renklerin */
.content-text {
    flex: 1; /* Kalan boşluğu doldurur */
}

.content-text h2 {
    color: #E87820e6; /* Senin temanın turuncu başlık rengi */
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.content-text p {
    font-size: 1.05rem;
    text-align: justify; /* Senin temanın yaslama ayarı */
    line-height: 1.7;
    color: #253B6A; /* Lacivert metin rengin */
}

/* =========================================================
   İÇERİK LİSTESİ MOBİL UYUM (Mevcut 768px kuralına alternatif)
   ========================================================= */
@media (max-width: 768px) {
    .content-row {
        flex-direction: column; /* Mobilde alt alta dizer */
        gap: 25px;
        margin-bottom: 50px;
    }
    
    .content-img {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* =========================================================
   GENEL METİN BLOKLARI (Reusable Text Blocks)
   ========================================================= */

/* Ortak Özellikler (Padding, font boyutu ve yaslama) */
.text-block-base {
    padding: 60px 10%;
    text-align: justify; /* Sağa sola yaslı metin */
    line-height: 1.8;
    font-size: 1.15rem;
}

/* Lacivert Blok */
.text_block_navy {
    background-color: #253B6A;
    color: #FFFFFF;
}

/* Turuncu Blok */
.text_block_orange {
    background-color: #E87820e6;
    color: #FFFFFF;
}

/* Gri Blok (EBEBEB) */
.text_block_grey {
    background-color: #EBEBEB;
    color: #253B6A;
}

/* Beyaz Blok */
.text_block_white {
    background-color: #FFFFFF;
    color: #253B6A;
}

/* Blok içi başlık ayarı (Opsiyonel: Blok içindeki h2'lerin rengini beyaz yapar) */
.text_block_navy h2, .text_block_orange h2 {
    color: #FFFFFF;
    margin-bottom: 20px;
    text-align: center; /* Başlıklar genellikle ortalı daha şık durur */
}

.text_block_grey h2, .text_block_white h2 {
    color: #E87820e6; /* Senin turuncu başlık rengin */
    margin-bottom: 20px;
    text-align: center;
}

/* Metin blokları içindeki resimlerin genel ayarı */
.text-block-base img {
    display: block; /* Ortalamak için blok yapıyoruz */
    margin: 30px auto; /* Üst-alt 30px, sağ-sol otomatik (ortalar) */
    max-width: 600px; /* Resmin çok devasa olmasını engeller, dilediğin gibi değiştirebilirsin */
    width: 90%; /* Mobilde ekranın dışına taşmaz */
    border-radius: 8px;
    cursor: zoom-in; /* Tıklanabilir olduğunu hissettirir */
    
    /* İndirmeyi zorlaştırmak için (Görsel engel) */
    -webkit-user-drag: none; /* Sürükleyip masaüstüne bırakmayı engeller */
    user-select: none; /* Metin seçerken resmin seçilmesini engeller */
    pointer-events: auto; /* Tıklamaya izin verir */
}
/* =========================================================
   SAYFA İÇİ RESİM AYARI (Küçültme ve Ortalama)
   ========================================================= */
.lightbox-img {
    display: block;
    margin: 30px auto;
    max-width: 450px;
    width: 90%;
    border-radius: 8px;
    cursor: zoom-in;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    
    /* İndirme Engelleri */
    -webkit-user-drag: none;
    user-select: none;

    /* --- YENİ: BÜYÜME EFEKTİ İÇİN GEÇİŞ AYARI --- */
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease;
}

/* --- YENİ: ÜZERİNE GELİNCE (HOVER) OLACAKLAR --- */
.lightbox-img:hover {
    transform: scale(1.05); /* Resmi %5 oranında büyütür */
    box-shadow: 0 10px 25px rgba(0,0,0,0.4); /* Gölgesini derinleştirir */
    opacity: 1; /* Eski kodda opacity varsa bunu 1 yaparak netleştiriyoruz */
}

/* =========================================================
   REUSABLE LIGHTBOX (Tam Ekran Gösterim)
   ========================================================= */
.lightbox-overlay {
    display: none; /* Varsayılan olarak gizli */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92); /* Koyu siyah arka plan */
    z-index: 10000; /* Navbar dahil her şeyin üstünde görünmesini sağlar */
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease; /* Yumuşak geçiş efekti */
}

/* JS ile "active" class'ı eklendiğinde görünür olur */
.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95vh;
}

.lightbox-content img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 90vh; /* Ekrana tam sığması için */
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.8);
    
    /* İndirmeyi ve Kopyalamayı Zorlaştıran CSS Kodları */
    -webkit-user-drag: none;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: -45px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ed1c24; /* Kapanış butonu üzerine gelince kırmızı olsun */
}
