/* KSBÜ Etkinlik Sistemi - Global Stil Dosyası */
/* Public (Halka Açık) Sayfalar İçin */

:root { --card-radius: 20px; }
:root { --ksbu-navy: #002855; --ksbu-cyan: #00b4d8; --ksbu-light: #f8f9fa; }

html, body {
    overflow-x: hidden; /* Yatay taşmayı engelle */
    max-width: 100%;
}

/* --- TÜM SAYFALAR İÇİN ORTAK NAVBAR BOŞLUĞU --- */
/* Apply.html mantığını tüm sayfalara yayıyoruz */
body.home-page,
body.apply-page,
body.submit-news-page,
body.event-detail-page,
body.news-list-page,
body.news-detail-page,
body.apply-success-page {
    padding-top: 110px !important; /* Navbar yüksekliği + ferah boşluk (apply.html standardı) */
}

/* Navbar Marka Alanı Genişlik Kontrolü (Taşmayı Önler) */
.navbar-brand {
    max-width: 70%; /* Masaüstü varsayılan */
}

@media (max-width: 991px) {
    .navbar-brand {
        max-width: 50%; /* Mobil ve Tablette hamburger menüye yer aç */
    }
}

/* Navbar Styles */
.navbar { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.btn-ksbu-primary { background-color: var(--ksbu-navy); color: white; border-radius: 50rem; padding: 8px 25px; transition: 0.3s; }
.btn-ksbu-primary:hover { background-color: var(--ksbu-cyan); color: white; }
.hover-link { transition: 0.3s; } .hover-link:hover { color: var(--ksbu-cyan) !important; }

@media (min-width: 992px) {
    .w-lg-auto {
        width: auto !important;
    }
}

.form-card {
    background: white; border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 40, 85, 0.08);
    border: none; overflow: hidden;
}
.form-header {
    background: var(--ksbu-navy); color: white;
    padding: 40px; text-align: center;
    background-image: linear-gradient(135deg, var(--ksbu-navy) 0%, #001f3f 100%);
}
.form-control, .form-select {
    border-radius: 10px; padding: 12px 15px;
    border: 2px solid #eee; transition: 0.3s;
    color: #333; background-color: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--ksbu-cyan);
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}
.form-label { font-weight: 600; color: var(--ksbu-navy); font-size: 0.9rem; margin-bottom: 8px; }

.apply-page .section-title, .submit-news-page .section-title {
    color: var(--ksbu-cyan); font-weight: 700; margin-bottom: 20px;
    display: flex; align-items: center; gap: 10px;
}
.apply-page .section-title::after, .submit-news-page .section-title::after { content: ""; flex: 1; height: 1px; background: #eee; }

.btn-submit {
    background: var(--ksbu-navy); color: white;
    padding: 15px 40px; border-radius: 50rem;
    font-weight: 700; border: none; transition: 0.3s; width: 100%;
}
.btn-submit:hover:not(:disabled) { background: var(--ksbu-cyan); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 180, 216, 0.3); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; filter: grayscale(1); }

.kvkk-section {
    background-color: #fff5f5; border: 1px solid #fed7d7;
    border-radius: 10px; padding: 15px; margin-top: 15px;
    color: #742a2a;
}

/* HERO BÖLÜMÜ (Sinematik Başlık) */
.event-hero {
    position: relative;
    min-height: 400px; /* Sabit yükseklik yerine min-height */
    height: auto;      /* İçeriğe göre uzasın */
    background-color: #0a2540;
    overflow: hidden;
    display: flex;
    align-items: end;
}

/* Arka plandaki bulanık resim */
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4); /* Bulanık ve karanlık */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-bottom: 40px;
}

/* İçerik Kutusu */
.content-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 -20px 40px rgba(0,0,0,0.05);
    margin-top: -60px; /* Hero'nun içine girsin */
    position: relative;
    z-index: 3;
}

/* Sağdaki Sabit Kayıt Kutusu */
.sticky-ticket {
    position: sticky;
    top: 100px; /* Navbar payı */
    z-index: 10;
}

/* --- İÇERİK TAŞMA DÜZELTMESİ --- */
.event-content-body {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}
.event-content-body img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 10px;
    margin: 15px 0;
}
.event-content-body iframe,
.event-content-body video {
    max-width: 100% !important;
    border-radius: 10px;
}
.event-content-body table {
    width: 100% !important;
    display: block;
    overflow-x: auto;
}

/* Paylaşım Butonları İçin Turkuaz Stil */
.btn-outline-ksbu {
    color: var(--ksbu-cyan);
    border-color: var(--ksbu-cyan);
}
.btn-outline-ksbu:hover {
    background-color: var(--ksbu-cyan);
    color: white;
}

/* --- NEWS DETAIL (public/news_detail.html) --- */
body.news-detail-page { 
    background-color: var(--ksbu-light); 
    color: #333; 
}
.news-header { background-color: #f8f9fa; padding: 3rem 0; border-bottom: 1px solid #eee; }
.news-content { 
    word-wrap: break-word; overflow-wrap: break-word; word-break: break-word; display: flow-root; 
}
.news-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.news-content iframe { width: 100%; aspect-ratio: 16/9; border-radius: 10px; margin: 20px 0; }
.pulse-btn {
    animation: pulse-animation 2s infinite;
}
@keyframes pulse-animation {
    0% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(13, 110, 253, 0); }
    100% { box-shadow: 0 0 0 0 rgba(13, 110, 253, 0); }
}

/* --- NEWS LIST (public/news_list.html) --- */
body.news-list-page {
    background-color: var(--ksbu-light);
    color: #333;
    overflow-x: hidden;
}

/* CINEMATIC SLIDER */
.news-hero {
    position: relative;
    height: 600px; /* Yüksek ve etkileyici */
    overflow: hidden;
    margin-top: 0; /* Navbar ile bitişik */
}

.news-hero .swiper-slide {
    overflow: hidden;
    position: relative;
}

/* Arka Plan Resmi (Ken Burns Efekti için) */
.slide-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 8s ease; /* Yavaşça yaklaşma efekti */
}

/* Aktif slaytta resim büyüsün */
.swiper-slide-active .slide-bg { transform: scale(1.1); }

/* Karanlık Katman */
.overlay-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(0, 40, 85, 0.9) 0%, rgba(0, 40, 85, 0.4) 60%, transparent 100%);
    z-index: 1;
}

/* İçerik Kutusu */
.slide-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column; justify-content: center;
    padding-left: 5%; color: white; max-width: 800px;
}

/* Metin Animasyonları */
.slide-content h1, .slide-content p, .slide-content .btn-area {
    opacity: 0; transform: translateY(30px); transition: all 0.8s ease;
}
.swiper-slide-active .slide-content h1 { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }
.swiper-slide-active .slide-content p { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.swiper-slide-active .slide-content .btn-area { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }

.news-badge {
    background-color: var(--ksbu-cyan); color: white; padding: 5px 15px;
    border-radius: 50rem; font-weight: 700; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 1px; display: inline-block; margin-bottom: 15px;
}
.news-title {
    font-family: 'Rajdhani', sans-serif; font-size: 3.5rem; font-weight: 700;
    line-height: 1.1; margin-bottom: 20px; text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Slider Navigasyon Butonları */
.news-hero .swiper-button-next, .news-hero .swiper-button-prev {
    color: white; background: rgba(255,255,255,0.1); width: 50px; height: 50px;
    border-radius: 50%; backdrop-filter: blur(5px); transition: 0.3s;
}
.news-hero .swiper-button-next:hover, .news-hero .swiper-button-prev:hover { background: var(--ksbu-cyan); }
.news-hero .swiper-button-next::after, .news-hero .swiper-button-prev::after { font-size: 1.2rem; font-weight: bold; }

.news-grid-section { padding: 60px 0; }
.news-grid-section .card-img-wrap { height: 250px; }
.news-list-page .search-container { margin-top: 40px; }

@media (max-width: 768px) {
    .news-hero { height: 450px; }
    .news-title { font-size: 2rem; }
    .slide-content { padding-left: 20px; padding-right: 20px; }
}

/* --- HOME PAGE (public/index.html) --- */
/* ARKA PLAN (PARTİKÜLLER) */
.bg-particles {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e9f2 100%);
    overflow: hidden; /* Partiküllerin taşmasını engelle */
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 180, 216, 0.1);
    animation: float 20s infinite linear;
}
@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.5; }
    100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* HERO SLIDER */
.hero-section {
    padding: 3rem 0 60px 0; /* apply.html py-5 ile aynı */
}
.section-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: var(--ksbu-navy);
    letter-spacing: 1px;
}

.hero-section .swiper-slide {
    width: 380px;
    height: 500px; /* 410px'den 500px'e çıkarıldı (Boyu uzatıldı) */
    background: white;
    border-radius: var(--card-radius); /* Yumuşak Köşe */
    box-shadow: 0 15px 40px rgba(0, 40, 85, 0.15); /* Yumuşak Gölge */
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    background-color: #e9ecef; /* Resim sığmazsa arkada görünecek renk */
}

.hero-section .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Kutuyu tamamen doldur, gerekirse fazlalığı kes */
    object-position: top center; /* Eğer keseceksen ALT taraftan kes, ÜST (başlık/logo) kalsın */
    background-color: transparent;
}

.slide-overlay {
    background: linear-gradient(to top, rgba(0, 40, 85, 0.9), transparent);
    position: absolute; bottom: 0; left: 0; width: 100%;
    padding: 30px 20px;
    color: white;
    border-bottom-left-radius: var(--card-radius);
    border-bottom-right-radius: var(--card-radius);
}

/* ETKİNLİK KARTLARI (Yumuşak Tasarım) */
.event-grid-section {
    padding: 40px 0 80px 0;
}

.soft-card {
    background: white;
    border: none;
    border-radius: var(--card-radius); /* Yumuşak Köşe */
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.soft-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 180, 216, 0.15);
}

.card-img-wrap {
    width: 100%;
    overflow: hidden;
    border-top-left-radius: var(--card-radius);
    border-top-right-radius: var(--card-radius);
    position: relative;
    background-color: #f0f2f5; /* Resim sığmazsa arkada görünecek renk */
    display: flex;             /* Resmi ortalamak için */
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee; /* Altına ince bir çizgi */
}

.event-grid-section .card-img-wrap {
    height: auto; /* Yüksekliği artırdık ki dikey afişler daha iyi sığsın */
    aspect-ratio: 1 / 1;
}

.card-img-wrap img {
    width: 100%; 
    height: 100%;
    object-fit: cover; 
    transition: 0.5s;
    padding: 2px; /* Kenarlara yapışmasın diye hafif boşluk */
}

/* Hover durumunda resim hafif büyüsün */
.soft-card:hover .card-img-wrap img { 
    transform: scale(1.03); 
}

/* Yumuşak Tarih Balonu */
.date-badge-soft {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    color: var(--ksbu-navy);
    padding: 8px 15px;
    border-radius: 15px; /* Hap şeklinde */
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    line-height: 1.1;
}

/* TAKVİM TASARIMI (KSBÜ Theme) */
.calendar-section {
    padding: 25px;
    background: white;
    position: relative;
    z-index: 2;
    margin-top: -30px;
    width: 100%;
    border-radius: 20px; /* Köşeleri biraz daha keskinleştirdik */
    box-shadow: 0 5px 25px rgba(0,0,0,0.05); /* Gölgeyi hafiflettik */
    margin-bottom: 30px;
}
.fc .fc-daygrid-day-frame {
    min-height: 80px !important; /* Hücrenin asgari boyunu kısalttık */
}

/* Takvim başlığı (Ay ismi) ile tablo arasındaki boşluğu azalt */
.fc-header-toolbar {
    margin-bottom: 0.5rem !important; 
}

#calendar {
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
}

/* Takvim Başlığı */
.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: var(--ksbu-navy);
    text-transform: uppercase;
}

/* Butonlar */
.fc-button-primary {
    background-color: var(--ksbu-navy) !important;
    border-color: var(--ksbu-navy) !important;
    border-radius: 50rem !important; /* Hap buton */
    text-transform: capitalize;
    font-weight: 600;
    padding: 8px 20px !important;
}
.fc-button-primary:hover {
    background-color: var(--ksbu-cyan) !important;
    border-color: var(--ksbu-cyan) !important;
}

/* Gün Hücreleri */
.fc-daygrid-day {
    transition: 0.2s;
}
.fc-daygrid-day:hover {
    background-color: #f8f9fa;
}

/* Etkinlik Etiketi */
.fc-event {
    border-radius: 5px;
    padding: 2px 5px;
    cursor: pointer;
    transition: 0.2s;
    border: none !important;
}
.fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 40, 85, 0.3);
}

/* Bugünün Rengi */
.fc-day-today {
    background-color: rgba(0, 180, 216, 0.05) !important;
}

/* TAKVİM İSİM DÜZENLEMESİ (Tam Görünüm) */
.fc-event-title {
    white-space: normal !important; /* Yazıyı kesme, alt satıra indir */
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
}

.fc-daygrid-event {
    white-space: normal !important;
    align-items: center;
}

/* Takvim Yüksekliğini Kontrol Altına Al */
.fc-view-harness {
    background-color: #fff;
}

/* Takvim Başlıklarını Küçült */
.fc-col-header-cell-cushion {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ksbu-navy);
    text-decoration: none !important;
}

.fc-daygrid-day-number {
    font-size: 0.9rem;
    color: #6c757d;
    text-decoration: none !important;
}

/* MOBİL UYUMLULUK (DÜZELTİLMİŞ & ORTALANMIŞ) */
@media (max-width: 768px) {
    /* 1. Hero Başlıkları Küçült */
    .display-4 { font-size: 2.2rem; }
    .hero-section { padding: 3rem 0 40px 0; } /* Mobilde üst boşluk apply.html ile aynı */
    
    /* 2. Slider Ortalaması */
    .hero-section .swiper-slide {
        width: 85% !important; 
        height: 450px !important; /* Mobilde de kart boyu uzatıldı */
        /* Mobilde kartın tam ortada durması için */
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* 3. Takvim ve Arama Kutularını Ekrana Oturt */
    .calendar-section, 
    .search-container {
        width: 100% !important;       /* Genişliği fulle */
        margin-left: auto !important; /* Ortala */
        margin-right: auto !important;/* Ortala */
        padding: 20px 15px !important;/* İç boşluk */
        box-sizing: border-box;       /* Padding genişliği patlatmasın */
    }
    
    /* 4. Navbar Markasını Küçült */
    .navbar-brand span { font-size: 0.8rem !important; white-space: normal; }
    .navbar-brand img { height: 45px !important; width: 45px !important; object-fit: contain; }
    
    /* 5. Takvim Butonlarını Düzenle */
    .fc-toolbar-title { font-size: 1.1rem !important; }
    .fc-header-toolbar { flex-direction: column; gap: 10px; }
}

/* SAYFALAMA (PAGINATION) TASARIMI */
.pagination {
    justify-content: center;
    gap: 5px;
}

.page-link {
    color: var(--ksbu-navy);
    border: 1px solid #dee2e6;
    border-radius: 50% !important; /* Yuvarlak butonlar */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #e9ecef;
    color: var(--ksbu-navy);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background-color: var(--ksbu-navy);
    border-color: var(--ksbu-navy);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 40, 85, 0.3);
}

.page-item.disabled .page-link {
    color: #ccc;
    background-color: transparent;
    border-color: #eee;
}

/* ARAMA ÇUBUĞU TASARIMI (Bütünleşik İkon) */
.search-container {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    border: 1px solid #f0f2f5;
}

/* Bu sınıf artık Input'u değil, dışındaki kapsayıcıyı temsil ediyor */
.input-wrapper {
    border: 2px solid #eee;
    border-radius: 50rem; /* Tam yuvarlak */
    padding: 5px 20px;    /* İkon ve yazı için iç boşluk */
    display: flex;
    align-items: center;
    transition: all 0.3s;
    background: white;
}

/* Kullanıcı inputa tıkladığında DIŞ kutu parlasın */
.input-wrapper:focus-within {
    border-color: var(--ksbu-cyan);
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.1);
}

/* İkonun rengi */
.input-icon {
    color: #adb5bd;
    font-size: 1.1rem;
    margin-right: 10px;
}

/* Gerçek Input: Kenarlıksız ve Şeffaf */
.clean-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    width: 100%;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #333;
}

/* Buton */
.btn-search {
    border-radius: 50rem;
    padding: 12px 30px;
    font-weight: 600;
    background-color: var(--ksbu-navy);
    border: none;
    color: white;
    width: 100%; /* Buton bulunduğu kolonu doldursun */
}
.btn-search:hover {
    background-color: var(--ksbu-cyan);
    color: white;
}