/* ==========================================================================
   ŞİFA DERNEĞİ - FİNAL TEMİZLENMİŞ CSS
   ========================================================================== */

/* --- 1. TEMEL AYARLAR (RESET & VARIABLES) --- */
:root {
    --primary-color: #c0392b;   /* Şifa Kırmızısı */
    --primary-hover: #a93226;
    --secondary-color: #1e293b; /* Koyu Lacivert/Gri */
    --text-color: #475569;      /* Metin Grisi */
    --bg-light: #f8fafc;        /* Açık Arkaplan */
    --border-color: #e2e8f0;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.02);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.05);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; list-style: none; }
html, body { overflow-x: hidden; scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    color: var(--secondary-color);
    background-color: var(--bg-light);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- 2. HEADER & NAVİGASYON --- */
header {
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: relative; /* Sabit kalması için */
    z-index: 1000;      /* Diğer her şeyin üstünde */
    height: 80px;
    display: flex;
    align-items: center;
}

header .header-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
    transition: 0.3s;
}

/* Masaüstü Menü */
.nav-menu {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    transition: 0.3s;
    position: relative;
    padding: 5px 0;
}

.nav-links li a:hover, .nav-links li a.active {
    color: var(--primary-color);
}

.nav-links li a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Sağ Taraf (Butonlar & Profil) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.desktop-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Buton Stilleri */
.btn-login, .btn-register {
    font-family: var(--font-main);
    cursor: pointer;
    font-size: 14px;
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-login {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}
.btn-login:hover {
    background: #fff1f2;
    border-color: var(--primary-color);
}

.btn-register {
    background: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.2);
}
.btn-register:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Kullanıcı Profil (Chip) */
.user-menu { position: relative; cursor: pointer; }
.user-chip {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 4px 15px 4px 4px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}
.user-chip:hover { border-color: #cbd5e1; background: #f8fafc; }

.header-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
    background: #e2e8f0; color: #64748b;
}
.user-name-text { font-size: 14px; font-weight: 600; color: #334155; }

/* Dropdown Menü */
.dropdown-content {
    display: none;
    position: absolute;
    right: 0; top: 120%;
    background: #fff;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 2000;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    animation: fadeIn 0.2s ease;
}
.dropdown-content.show { display: block; }
.dropdown-content a {
    color: #334155;
    padding: 12px 20px;
    display: flex; align-items: center; gap: 10px;
    font-size: 14px;
    border-bottom: 1px solid #f8fafc;
    transition: 0.2s;
}
.dropdown-content a:hover { background: #fff1f2; color: var(--primary-color); }

/* Hamburger Menü */
.hamburger-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #334155;
    padding: 5px;
}

/* Mobil Kullanıcı İkonu */
.mobile-header-user-btn {
    display: none;
    cursor: pointer;
    align-items: center;
    margin-right: 10px;
    position: relative;
}
.mobile-header-user-btn .login-icon {
    width: 32px; height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; font-size: 14px;
    border: 1px solid var(--border-color);
}
.mobile-user-name { font-size: 13px; font-weight: 600; color: #334155; margin-left: 6px; }

/* HEADER RESPONSIVE (MOBİL) */
@media (max-width: 968px) {
    .logo img { height: 35px; }
    .nav-menu, .desktop-buttons { display: none !important; } /* Masaüstü öğelerini gizle */
    .hamburger-menu { display: block; }
    .mobile-header-user-btn { display: flex; }

    /* Mobil Menü Açılır Alanı */
    .nav-menu.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 80px; left: 0; width: 100%;
        background: #fff;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        border-top: 1px solid #f1f5f9;
        padding: 20px;
        animation: slideDown 0.3s ease forwards;
        z-index: 1999;
    }

    .nav-links { flex-direction: column; width: 100%; gap: 10px; }
    .nav-links li a {
        display: block;
        padding: 12px 15px;
        background: #f8fafc;
        border-radius: 8px;
        text-align: center;
        font-weight: 600;
    }
    
    .mobile-menu-user { display: block !important; width: 100%; }
    .mobile-auth-buttons {
        display: flex; gap: 10px; width: 100%; margin-top: 20px;
        padding-top: 20px; border-top: 1px solid var(--border-color);
    }
    .mobile-auth-buttons button { flex: 1; padding: 12px; font-size: 14px; }
}

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }


/* --- 3. ORTAK MODAL (AUTH & MEDYA) --- */
.auth-overlay, .modal-wrapper {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999; /* En üstte */
    align-items: center;
    justify-content: center;
}

.auth-modal, .modal-content-form {
    background: #fff;
    width: 90%; max-width: 450px;
    border-radius: 20px;
    padding: 30px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
}

.auth-close, .close-modal {
    position: absolute; top: 15px; right: 20px;
    font-size: 24px; cursor: pointer; color: #94a3b8;
}

.form-group, .form-row { margin-bottom: 15px; }
.form-group label, .form-row label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 6px; color: #475569;
}
.form-group input, .form-input, .form-group select {
    width: 100%; padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
    background: #fff;
}
.form-group input:focus, .form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.btn-auth, .btn-submit-form {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    font-size: 15px;
    transition: 0.3s;
}
.btn-auth:hover, .btn-submit-form:hover { background: var(--primary-hover); transform: translateY(-2px); }

/* Tablar (Giriş/Kayıt) */
.auth-tabs { display: flex; margin-bottom: 25px; background: #f1f5f9; padding: 5px; border-radius: 12px; }
.auth-tab { flex: 1; padding: 10px; text-align: center; cursor: pointer; color: #64748b; font-weight: 600; border-radius: 8px; transition: 0.3s; font-size: 14px; }
.auth-tab.active { background: #fff; color: var(--primary-color); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.view-section { display: none; }
.view-section.active { display: block; }
@keyframes popIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }


/* --- 4. MEDYA SAYFASI STİLLERİ --- */
.media-hero.gallery-mode {
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.95)), url('https://images.unsplash.com/photo-1524334228333-0f6db392f8a1?q=80&w=1920&auto=format&fit=crop');
    background-size: cover; background-position: center;
    padding: 100px 0 60px 0; text-align: center; color: #fff; margin-bottom: 40px;
}
.media-hero h1 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 10px; color: #fff; }
.media-hero p { font-size: 1.1rem; opacity: 0.8; max-width: 600px; margin: 0 auto; }

/* Admin Kontrolleri */
.admin-controls { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; padding: 20px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-sm); flex-wrap: wrap; }
.btn-add { background: #22c55e; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: 0.3s; }
.btn-add.blue { background: #3b82f6; }
.btn-add.orange { background: #f97316; }

/* Filtreler */
.filter-bar { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.filter-btn {
    background: #fff; border: 1px solid var(--border-color);
    padding: 10px 25px; border-radius: 50px;
    font-weight: 600; color: #64748b; cursor: pointer;
    transition: all 0.3s; display: flex; align-items: center; gap: 8px;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color); color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

.sub-filter-bar { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; }
.sub-btn { background: transparent; border: none; font-weight: 600; color: #64748b; cursor: pointer; padding: 8px 20px; border-radius: 20px; }
.sub-btn.active { background: #1e293b; color: #fff; }

/* Medya Kartları (Genel) */
.media-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.media-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9;
    display: flex; flex-direction: column; height: 100%; transition: 0.3s;
}
.media-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

.m-thumb { height: 200px; overflow: hidden; position: relative; }
.m-thumb img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.media-card:hover .m-thumb img { transform: scale(1.05); }

.m-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; justify-content: space-between; }
.category { font-size: 12px; font-weight: 800; text-transform: uppercase; color: #e67e22; margin-bottom: 5px; display: block; }
.m-body h4 { font-size: 18px; font-weight: 700; color: #1e293b; margin-bottom: 15px; }
.m-footer-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

.read-btn-styled {
    color: var(--primary-color); font-weight: 600; font-size: 13px;
    display: inline-flex; align-items: center; gap: 5px;
    background: #fff0f3; padding: 6px 15px; border-radius: 20px;
}
.read-btn-styled:hover { background: var(--primary-color); color: #fff; }

/* Duvar Kağıtları */
.wallpaper-grid-mobile { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.wallpaper-grid-mobile .m-thumb { height: 320px; }
.wallpaper-grid-desktop { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }

/* Masonry (Görseller) */
.masonry-grid { column-count: 4; column-gap: 20px; }
.masonry-item { break-inside: avoid; margin-bottom: 20px; border-radius: 16px; overflow: hidden; position: relative; }
.masonry-item img { width: 100%; display: block; }

.download-overlay-btn, .delete-overlay-btn {
    position: absolute; top: 10px; width: 35px; height: 35px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; opacity: 0; transition: 0.3s; z-index: 10;
}
.download-overlay-btn { right: 10px; background: rgba(0,0,0,0.6); }
.delete-overlay-btn { left: 10px; background: rgba(239, 68, 68, 0.9); }
.media-card:hover .download-overlay-btn, .media-card:hover .delete-overlay-btn,
.masonry-item:hover .download-overlay-btn, .masonry-item:hover .delete-overlay-btn { opacity: 1; }

@media (max-width: 900px) { .masonry-grid { column-count: 3; } }
@media (max-width: 600px) {
    .masonry-grid { column-count: 2; }
    .wallpaper-grid-mobile { grid-template-columns: 1fr 1fr; }
    .download-overlay-btn, .delete-overlay-btn { opacity: 1; } /* Mobilde hep görünsün */
}

/* --- 5. FOOTER --- */
footer {
    background-color: #0f172a;
    color: #cbd5e1;
    padding: 60px 0 20px;
    margin-top: auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h4 { color: #fff; font-size: 18px; margin-bottom: 20px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #94a3b8; transition: 0.3s; }
.footer-links a:hover { color: #fff; padding-left: 5px; }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* --- 6. EDİTÖR TOOLBAR --- */
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; background: #f1f5f9; border-radius: 8px 8px 0 0; border: 1px solid #cbd5e1; }
.tool-btn { background: #fff; border: 1px solid #cbd5e1; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 4px; }
.tool-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.editor-content { min-height: 200px; border: 1px solid #cbd5e1; border-top: none; padding: 15px; border-radius: 0 0 8px 8px; }