/**
 * WikiTR - Kim Kimdir Platform
 * Ana CSS Dosyası
 * Modern Ansiklopedi Tarzı
 */

/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
    --primary-color: #004d40;
    --secondary-color: #00796b;
    --accent-color: #ffd700;
    --dark-color: #333333;
    --light-gray: #f9f9f9;
    --body-bg: #f9f9f9;
    --card-bg: #ffffff;
}

/* ========================================
   GENEL STİLLER
   ======================================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark-color);
    background-color: var(--body-bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6, .logo-text {
    font-family: 'Merriweather', serif;
    font-weight: 700;
}

/* ========================================
   NAVBAR STİLLERİ
   ======================================== */
.navbar {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.2rem 0;
    background: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
    color: white !important;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.logo-slogan {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Navbar link stilleri Bootstrap Override bölümünde tanımlanmıştır */

.dropdown-menu {
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 0.75rem;
    padding: 0.5rem;
}

/* Dropdown stilleri Bootstrap Override bölümünde tanımlanmıştır */

/* ========================================
   ARAMA FORMU
   ======================================== */
.search-form {
    position: relative;
    max-width: 500px;
}

.search-form input {
    border-radius: 6px;
    padding: 0.7rem 3rem 0.7rem 1rem;
    border: none;
    background-color: white;
    color: var(--dark-color);
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-size: 0.95rem;
}

.search-form input::placeholder {
    color: #999999;
    font-style: italic;
}

.search-form input:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid var(--accent-color);
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
}

.search-form button:hover {
    background: var(--primary-color);
}

/* ========================================
   AUTOCOMPLETE DROPDOWN
   ======================================== */
.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    margin-top: 8px;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
    color: var(--dark-color);
}

.autocomplete-item:hover {
    background: #f8f9fa;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.autocomplete-info {
    flex: 1;
    min-width: 0;
}

.autocomplete-info h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.autocomplete-info small {
    color: #666;
    font-size: 0.85rem;
    display: block;
    margin-top: 2px;
}

/* ========================================
   CARD STİLLERİ
   ======================================== */
.person-card {
    border: none;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: 100%;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.person-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.person-card:hover img {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.person-card-body {
    padding: 1rem;
}

.person-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* ========================================
   PREMIUM BADGE
   ======================================== */
.badge-premium {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================
   STATİSTİKLER
   ======================================== */
.stat-item {
    display: inline-flex;
    align-items: center;
    margin-right: 1rem;
    font-size: 0.9rem;
    color: #64748b;
}

.stat-item i {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-family: 'Merriweather', serif;
}

.section-header p {
    color: #666666;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* ========================================
   LIKE BUTTON
   ======================================== */
.btn-like {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-like:hover {
    background: var(--accent-color);
    color: white;
}

.btn-like.liked {
    background: var(--accent-color);
    color: white;
}

/* ========================================
   TOAST BİLDİRİMLERİ
   ======================================== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

/* ========================================
   RESPONSİVE
   ======================================== */
@media (max-width: 768px) {
    .person-card img {
        aspect-ratio: 1 / 1;
    }
    
    .info-card-image {
        aspect-ratio: 1 / 1;
        display: block !important;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .info-sidebar {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 2rem;
    }
}

/* ========================================
   DETAY SAYFA STİLLERİ
   ======================================== */
.main-content {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.person-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-family: 'Merriweather', serif;
    line-height: 1.2;
}

.person-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* İçindekiler Tablosu */
.table-of-contents {
    background: #f0f7f4;
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.table-of-contents h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.table-of-contents ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.table-of-contents a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Biyografi İçeriği */
.bio-section {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.bio-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.bio-content {
    text-align: left;
    line-height: 1.9;
    font-size: 1.05rem;
}

/* Kariyer Tablosu */
.career-table {
    width: 100%;
    margin-top: 1rem;
}

.career-table thead {
    background: var(--primary-color);
    color: white;
}

.career-table tbody tr:hover {
    background: #f0f7f4;
}

.career-table td,
.career-table th {
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

/* Kariyer Tab Butonları */
.career-tab-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.career-tab-btn:hover {
    background: rgba(0, 77, 64, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.career-tab-btn.active {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Sticky Sidebar */
.info-sidebar {
    position: sticky;
    top: 100px;
}

.info-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.info-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-bottom: 4px solid var(--accent-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.info-card-image:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.info-card-body {
    padding: 1.5rem;
}

.info-table {
    width: 100%;
    margin-bottom: 1.5rem;
}

.info-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.info-table td {
    padding: 0.8rem 0;
}

.info-table td:first-child {
    font-weight: 600;
    color: #666;
    width: 40%;
}

.info-table td:last-child {
    color: var(--dark-color);
}

/* Etkileşim Butonları */
.interaction-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.interaction-btn {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.interaction-btn:hover {
    background: var(--primary-color);
    color: white;
}

.interaction-btn.liked {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

/* Action Buttons */
.action-btn {
    width: 100%;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-compare {
    background: var(--secondary-color);
    color: white;
    border: none;
}

.btn-compare:hover {
    background: var(--primary-color);
    color: white;
}

/* ========================================
   KARŞILAŞTIRMA SAYFA STİLLERİ
   ======================================== */
.compare-profile-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.compare-profile-image:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ========================================
   BOOTSTRAP OVERRIDE (MAVİ → YEŞİL)
   ======================================== */

/* TÜM PRIMARY BUTONLAR - BOOTSTRAP OVERRIDE */
.btn-primary,
.btn-info,
.btn-secondary,
button[class*="btn-"].btn-primary,
a[class*="btn-"].btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

/* Nav Pills & Nav Tabs - GÜÇLÜ OVERRIDE */
.nav-pills .nav-link,
.nav-tabs .nav-link,
ul.nav-pills > li > button.nav-link,
button.nav-link {
    background: transparent !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-pills .nav-link:hover,
.nav-tabs .nav-link:hover,
button.nav-link:hover {
    background: rgba(0, 77, 64, 0.1) !important;
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.nav-pills .nav-link.active,
.nav-tabs .nav-link.active,
button.nav-link.active,
.nav-pills .show > .nav-link,
.nav-tabs .show > .nav-link {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Primary Badge */
.badge-primary,
.badge.bg-primary,
.badge.badge-primary,
span.badge.bg-primary {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Links - HER YERDE (Navbar ve Dropdown HARİÇ) */
a:not(.navbar-brand):not(.navbar-nav .nav-link):not(.dropdown-item):not(.logo-text),
a:link:not(.navbar-brand):not(.navbar-nav .nav-link):not(.dropdown-item):not(.logo-text) {
    color: var(--secondary-color) !important;
    text-decoration: none;
    transition: color 0.3s;
}

a:not(.navbar-brand):not(.navbar-nav .nav-link):not(.dropdown-item):not(.logo-text):hover,
a:not(.navbar-brand):not(.navbar-nav .nav-link):not(.dropdown-item):not(.logo-text):focus {
    color: var(--primary-color) !important;
}

/* Navbar Brand - BEYAZ */
.navbar-brand,
.navbar-brand:hover,
.navbar-brand:focus {
    color: white !important;
}

.logo-text {
    color: white !important;
}

/* Navbar Linkleri - BEYAZ KALSIN */
.navbar-nav .nav-link,
.navbar-nav .nav-link.dropdown-toggle {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.dropdown-toggle:hover {
    color: white !important;
    background-color: rgba(255,255,255,0.1);
    border-radius: 0.5rem;
}

/* Form Controls Focus */
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(0, 77, 64, 0.25) !important;
    outline: none !important;
}

/* Modal Header - GÜÇLÜ */
.modal-header,
div.modal-header {
    background: var(--primary-color) !important;
    color: white !important;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Liste Grup Aktif */
.list-group-item.active,
.list-group-item-action.active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: rgba(0, 77, 64, 0.05) !important;
    color: var(--primary-color) !important;
}

/* Pagination */
.page-link {
    color: var(--primary-color) !important;
}

.page-link:hover {
    color: var(--secondary-color) !important;
    background-color: rgba(0, 77, 64, 0.1) !important;
    border-color: var(--primary-color) !important;
}

.page-item.active .page-link {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Dropdown Menu */
.dropdown-item {
    color: var(--dark-color) !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(0, 77, 64, 0.1) !important;
    color: var(--primary-color) !important;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Alert Primary */
.alert-primary {
    background-color: rgba(0, 77, 64, 0.1) !important;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

/* Progress Bar */
.progress-bar,
.progress-bar-striped {
    background-color: var(--primary-color) !important;
}

/* ========================================
   INSTAGRAM STORY CAROUSEL
   ======================================== */

/* Story Carousel Container */
.story-carousel-wrapper {
    margin-bottom: 3rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
}

.story-carousel-wrapper::-webkit-scrollbar {
    height: 6px;
}

.story-carousel-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.story-carousel-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.story-carousel {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Story Item */
.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.story-item:hover {
    transform: translateY(-5px);
}

/* Avatar Container */
.story-avatar-container {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 0.5rem;
}

/* Dönen Gradient Ring (Instagram Benzeri) */
.story-gradient-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(45deg, 
        #f09433 0%, 
        #e6683c 25%, 
        #dc2743 50%, 
        #cc2366 75%, 
        #bc1888 100%);
    animation: rotate-gradient 3s linear infinite;
    z-index: 1;
}

@keyframes rotate-gradient {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Avatar Image */
.story-avatar {
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Story Name */
.story-name {
    font-size: 0.75rem;
    color: var(--dark-color);
    text-align: center;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.story-item:hover .story-name {
    color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .story-carousel {
        gap: 1rem;
    }
    
    .story-avatar-container {
        width: 75px;
        height: 75px;
    }
    
    .story-name {
        font-size: 0.7rem;
        max-width: 75px;
    }
}
