/* ============================= */
/* KULLANICI PROFİL SAYFASI      */
/* ============================= */

.publicProfilePage {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Josefin Sans', sans-serif;
    min-height: calc(100vh - 350px);
}

/* Üst Başlık Alanı - SIKI VE MERKEZİ TASARIM */
.publicProfileHeader {
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: center !important; /* Sistemi kesin olarak merkeze kilitler */
    gap: 25px !important; /* Aradaki boşluğu minimum seviyeye indirir */
    margin-bottom: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.profileAvatarBox {
    flex-shrink: 0;
    margin: 0 !important; /* Başka dosyalardan gelen gizli dış boşlukları siler */
    padding: 0 !important; /* Başka dosyalardan gelen gizli iç boşlukları siler */
}

.profileAvatarBox img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff5b00;
    padding: 4px;
    background: #111827;
}

.profileInfoBox {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 450px; 
    margin: 0 !important; /* Gizli itme paylarını yok eder */
    padding: 0 !important;
}

.profileInfoBox h2 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 5px 0 !important;
}

.profileInfoBox span {
    display: block;
    color: #ff5b00;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px !important;
}

.profileInfoBox p {
    color: #9ca3af;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 15px 0 !important;
}

/* MESAJ GÖNDER BUTONU TASARIMI */
.messageAuthorBtn {
    background: #ffffff; 
    color: #111827; 
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex; 
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); 
    transition: 0.2s ease;
}

.messageAuthorBtn:hover {
    background: #ff5b00; 
    color: #ffffff; 
    border-color: #ff5b00;
}

body.dark-mode .messageAuthorBtn {
    background: #1f2937;
    color: #ffffff;
    border-color: #374151;
}

body.dark-mode .messageAuthorBtn:hover {
    background: #ff5b00;
    border-color: #ff5b00;
}

/* Yazılar Alanı */
.postsTitle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.postsTitle h3 {
    color: #131313;
    font-size: 22px;
    font-weight: 900;
}

.postCount {
    background: rgba(255, 91, 0, 0.1);
    color: #ff5b00;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

/* Post Grid Yapısı */
.postsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.postCard {
    background: #1f2937;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.postCard:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 91, 0, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.postImage img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.postContent {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.postContent h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    line-height: 1.4;
}

.postDate {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
}

.emptyPosts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #1f2937;
    border-radius: 20px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.emptyPosts p {
    color: #9ca3af;
    font-size: 15px;
    font-style: italic;
}

/* Mobil Uyumluluk */
@media (max-width: 650px) {
    .publicProfileHeader {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 15px !important;
    }
    .profileInfoBox {
        align-items: center;
    }
}


/* ========================================= */
/* PROFIL FOTOĞRAFI MODALI (LIGHTBOX)        */
/* ========================================= */

.profile-image-modal {
    display: none; /* Varsayılan olarak gizli tutarız */
    position: fixed;
    z-index: 99999; /* En üstte durması için */
    padding-top: 100px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(17, 24, 39, 0.85); /* Arka planı karartır */
    backdrop-filter: blur(8px); /* Modern cam bulanıklığı efekti */
    -webkit-backdrop-filter: blur(8px);
}

/* Modalın İçindeki Fotoğraf */
.modal-content-img {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 400px;
    border-radius: 50%; /* Profil fotoğrafı gibi yuvarlak kalmasını sağlar */
    border: 4px solid #ff5b00; /* Etrafına temanın renginde çerçeve atar */
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease; /* Açılırken yumuşak büyüme efekti */
}

/* Büyüme Animasyonu */
@keyframes zoomIn {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Sağ Üst Çaprazdaki Kapatma Tuşu */
.close-modal-btn {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #f1f1f1;
    font-size: 45px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: #ff5b00; /* Üzerine gelince turuncu olsun */
    transform: scale(1.1);
}

/* Mobilde fotoğraf biraz daha küçük ve yukarıda dursun */
@media only screen and (max-width: 700px){
    .modal-content-img { width: 90%; }
    .close-modal-btn { right: 25px; top: 15px; }
}