/* Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Dokunmatik hedefler için minimum boyutlar */
a, button, .btn, input[type="button"], input[type="submit"] {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
}

/* Küçük ikonlar ve metin bağlantıları için istisna */
a.text-link, a.icon-link {
    min-height: auto;
    min-width: auto;
    padding: 4px;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    transition: var(--transition-base);
    /* Mobilde overflow'u kesinlikle engelle */
    max-width: 100vw;
}

/* Layout Components */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.site-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    backdrop-filter: blur(10px);
}

.site-main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Bootstrap Overrides */
.row {
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.container-fluid {
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Utility Classes */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-weight: 500;
    box-shadow: 0 2px 4px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: var(--transition-base);
}

.badge i {
    color: var(--secondary-color);
    font-size: 1rem;
}

.badge:hover {
    background-color: var(--light-gray);
}

/* Editor Styles */
.ql-editor {
    padding: 0;
}

.ql-editor * {
    max-width: 100%;
}

.ql-editor img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
}

.ql-editor p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.ql-editor h1,
.ql-editor h2,
.ql-editor h3,
.ql-editor h4,
.ql-editor h5,
.ql-editor h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.ql-editor ul,
.ql-editor ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--text-color);
}

.ql-editor li {
    margin-bottom: 0.5rem;
}

.ql-editor a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition-base);
}

.ql-editor a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

.ql-editor blockquote {
    border-left: 4px solid var(--border-color);
    margin: 1.5rem 0;
    padding: 0.5rem 0 0.5rem 1rem;
    color: var(--blockquote-color);
}

.ql-editor pre {
    background-color: var(--code-bg);
    border-radius: 4px;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.ql-editor code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
}

/* Responsive Video */
.ql-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 1.5rem 0;
}

.ql-video iframe,
.ql-video embed,
.ql-video object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Editor Tables */
.ql-editor table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.ql-editor th,
.ql-editor td {
    border: 1px solid var(--table-border);
    padding: 0.75rem;
}

.ql-editor th {
    background-color: var(--table-header-bg);
}

/* Editor Image Alignment */
.ql-editor .ql-align-left {
    text-align: left;
}

.ql-editor .ql-align-center {
    text-align: center;
}

.ql-editor .ql-align-right {
    text-align: right;
}

.ql-editor .ql-align-justify {
    text-align: justify;
}

.ql-editor p.ql-align-center img {
    margin-left: auto;
    margin-right: auto;
}

.ql-editor p.ql-align-left img {
    margin-left: 0;
    margin-right: auto;
}

.ql-editor p.ql-align-right img {
    margin-left: auto;
    margin-right: 0;
}

/* Editor Float Images */
.ql-editor img.ql-float-left {
    float: left;
    margin: 0 1rem 1rem 0;
}

.ql-editor img.ql-float-right {
    float: right;
    margin: 0 0 1rem 1rem;
}

/* Float Clearfix */
.ql-editor p:after {
    content: '';
    display: table;
    clear: both;
}

/* Theme Toggle - Sağ üstte sabit */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-nav);
    background: transparent;
    border: none;
    color: #212529;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition-base);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

/* Mobil görünümde pozisyon ayarı */
@media (max-width: 767px) {
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
    }
}

.theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

/* Dark mode için theme toggle */
.dark-mode .theme-toggle {
    background: transparent;
    border: none;
    color: white;
}

.dark-mode .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Icon visibility */
.light-icon {
    display: block;
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.dark-icon {
    display: none;
    font-size: 1.3rem;
    filter: drop-shadow(0 1px 2px rgba(255, 255, 255, 0.3));
}

.dark-mode .light-icon {
    display: none;
}

.dark-mode .dark-icon {
    display: block;
}

/* Profile section üzerindeyken theme toggle görünürlüğü */
.profile-section:not(.shrink) ~ .theme-toggle .light-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.profile-section:not(.shrink) ~ .theme-toggle .dark-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Page Headers - Ortak Başlık Stilleri */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.page-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    gap: 1rem;
}

.page-divider .divider-line {
    flex: 1;
    max-width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, #333, #000, #333, transparent);
}

.page-divider .divider-center {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.75rem;
}

.page-divider .divider-center i {
    font-size: 1.1rem;
    color: #333;
    transition: all 0.3s ease;
}

.page-divider .divider-dot {
    width: 5px;
    height: 5px;
    background-color: #333;
    border-radius: 50%;
}

.page-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary, #666);
    margin: 0;
    font-weight: 400;
}

/* Dark Mode Page Header Styles */
.dark-mode .page-divider .divider-line {
    background: linear-gradient(to right, transparent, #ccc, #fff, #ccc, transparent);
}

.dark-mode .page-divider .divider-center i {
    color: #fff;
}

.dark-mode .page-divider .divider-dot {
    background-color: #fff;
}

/* Responsive for Page Headers */
@media (max-width: 991px) {
    .page-header {
        padding-top: 4rem; /* Mobile header yüksekliği için boşluk */
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding-top: 3.5rem;
        margin-bottom: 1.5rem;
    }

    .page-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }

    .page-divider {
        margin: 0.75rem 0;
    }

    .page-divider .divider-line {
        max-width: 60px;
    }

    .page-divider .divider-center {
        gap: 0.4rem;
        padding: 0 0.5rem;
    }

    .page-divider .divider-center i {
        font-size: 1rem;
    }

    .page-subtitle {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding-top: 3rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-divider .divider-center i {
        font-size: 0.9rem;
    }

    .page-divider .divider-dot {
        width: 4px;
        height: 4px;
    }
}

/* Responsive Typography */
@media (max-width: 768px) {
    .ql-editor {
        font-size: 0.95rem;
    }

    .ql-editor h1 { font-size: 1.75rem; }
    .ql-editor h2 { font-size: 1.5rem; }
    .ql-editor h3 { font-size: 1.25rem; }
}
