/* ==========================================================================
   AYŞEGÜL OĞUL - BLOG & ADMIN SYSTEM STYLES
   Futuristic Glassmorphism + Responsive Design + Dark & Light Theme Alignment
   ========================================================================== */

/* Blog Hero Header */
.blog-hero {
    position: relative;
    padding: 60px 0 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 40px;
    background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.12), transparent 70%);
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--primary-light);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.blog-main-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 30px auto;
}

/* Controls Bar (Search Bar) */
.blog-controls-bar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .blog-controls-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.search-box-wrapper {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.25);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

/* Featured Spotlight Post */
.featured-post-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 48px;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 900px) {
    .featured-post-card {
        grid-template-columns: 1.2fr 1fr;
        gap: 36px;
        padding: 32px;
    }
}

.featured-post-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.featured-img-box {
    position: relative;
    width: 100%;
    height: 260px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

@media (min-width: 900px) {
    .featured-img-box {
        height: 100%;
        min-height: 280px;
    }
}

.featured-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post-card:hover .featured-img-box img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: linear-gradient(135deg, var(--primary), #0284c7);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-meta-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.badge-cat {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-weight: 600;
}

.featured-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-title:hover {
    color: var(--primary-light);
}

.featured-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Post Cards Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 60px;
}

.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.post-card-thumb {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: var(--bg-surface);
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-thumb img {
    transform: scale(1.06);
}

.post-card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 12px;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-title:hover {
    color: var(--primary-light);
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-default);
    margin-top: auto;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.read-more-link:hover {
    gap: 10px;
}

.post-tags-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tag-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 3px 9px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-default);
}

/* Detailed Post View Page */
.article-header {
    margin-bottom: 36px;
    text-align: center;
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding: 8px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.article-back-link:hover {
    color: var(--text-primary);
    border-color: var(--primary);
    transform: translateX(-4px);
}

.article-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    margin: 16px 0 20px 0;
}

.article-meta-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.author-inline-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--primary);
}

.article-hero-cover {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-default);
    margin-bottom: 40px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* Article Body Typography */
.article-content {
    max-width: 820px;
    margin: 0 auto 60px auto;
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-primary);
}

.article-content p {
    margin-bottom: 1.6rem;
}

.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4 {
    font-family: var(--font-display);
    color: var(--text-primary);
    font-weight: 700;
    margin: 2.2rem 0 1rem 0;
    line-height: 1.3;
}

.article-content h1 { font-size: 2rem; border-bottom: 1px solid var(--border-default); padding-bottom: 10px; }
.article-content h2 { font-size: 1.6rem; color: var(--primary-light); }
.article-content h3 { font-size: 1.3rem; }

.article-content blockquote {
    margin: 2rem 0;
    padding: 20px 24px;
    background: rgba(14, 165, 233, 0.08);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-primary);
}

.article-content ul, .article-content ol {
    margin: 1.4rem 0 1.8rem 1.8rem;
}

.article-content li {
    margin-bottom: 0.6rem;
}

.article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-default), transparent);
    margin: 3rem 0;
}

.article-content a {
    color: var(--primary-light);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.article-content a:hover {
    color: var(--text-primary);
}

.post-figure {
    margin: 2.2rem 0;
    text-align: center;
}

.post-figure img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}

.post-figure figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Code Syntax Blocks */
.code-block-wrapper {
    position: relative;
    margin: 2rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-default);
    background: #090f1d;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-default);
}

.code-lang {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--primary-light);
    text-transform: uppercase;
    font-weight: 700;
}

.copy-code-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-code-btn:hover {
    color: #ffffff;
    background: var(--primary);
    border-color: var(--primary);
}

.code-block-wrapper pre {
    padding: 18px 20px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: #f8fafc;
    line-height: 1.6;
}

.inline-code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 3px 8px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid var(--border-default);
    border-radius: 5px;
    color: var(--primary-light);
}

/* Author Box & Share */
.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin: 40px 0;
}

.author-box-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.author-box-info h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.author-box-info p {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.social-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-default);
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 16px;
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.section-subtitle {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

/* ==========================================================================
   ADMIN PANEL STYLES
   ========================================================================== */
.admin-login-box {
    max-width: 420px;
    margin: 80px auto;
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(16px);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 30px;
}

.admin-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-default);
    padding-bottom: 12px;
    overflow-x: auto;
}

.admin-tab-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.admin-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface);
}

.admin-tab-btn.active {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .form-row-2 { grid-template-columns: 1fr 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Editor Toolbar */
.markdown-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 5px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.15s ease;
}

.toolbar-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.editor-textarea {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    min-height: 320px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Admin Posts Table */
.admin-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th, .admin-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-default);
}

.admin-table th {
    background: var(--bg-surface);
    font-size: 0.82rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    color: var(--text-muted);
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg-surface);
}

.status-badge {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

.status-published { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.status-draft { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }

/* Dashboard Cards */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
}

.stat-val {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-light);
}

.stat-lbl {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.alert-message {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid var(--accent-emerald); color: var(--accent-emerald); }
.alert-danger { background: rgba(244, 63, 94, 0.15); border: 1px solid var(--accent-rose); color: var(--accent-rose); }

/* ==========================================================================
   EXPLICIT LIGHT THEME OVERRIDES FOR PERFECT LIGHT MODE CONTRAST
   ========================================================================== */
html[data-theme="light"] .blog-hero {
    background: radial-gradient(circle at 50% 0%, rgba(79, 119, 123, 0.15), transparent 70%) !important;
    border-bottom-color: rgba(57, 73, 83, 0.12) !important;
}

html[data-theme="light"] .blog-tag {
    background: rgba(79, 119, 123, 0.12) !important;
    border-color: rgba(79, 119, 123, 0.28) !important;
    color: #2b5258 !important;
}

html[data-theme="light"] .blog-main-title {
    color: #213039 !important;
    background: none !important;
    -webkit-text-fill-color: #213039 !important;
}

html[data-theme="light"] .blog-hero-desc {
    color: #52616b !important;
}

html[data-theme="light"] .search-input {
    background: rgba(235, 229, 218, 0.95) !important;
    border-color: rgba(57, 73, 83, 0.18) !important;
    color: #26323a !important;
}

html[data-theme="light"] .search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 14px rgba(79, 119, 123, 0.25) !important;
}

html[data-theme="light"] .featured-post-card,
html[data-theme="light"] .post-card {
    background: rgba(235, 229, 218, 0.94) !important;
    border-color: rgba(57, 73, 83, 0.16) !important;
    box-shadow: 0 10px 26px rgba(71, 57, 37, 0.08) !important;
}

html[data-theme="light"] .featured-title,
html[data-theme="light"] .post-card-title,
html[data-theme="light"] .article-title,
html[data-theme="light"] .section-subtitle {
    color: #213039 !important;
}

html[data-theme="light"] .featured-excerpt,
html[data-theme="light"] .post-card-excerpt {
    color: #52616b !important;
}

html[data-theme="light"] .post-meta-row {
    color: #71808a !important;
}

html[data-theme="light"] .tag-pill {
    background: rgba(57, 73, 83, 0.09) !important;
    border-color: rgba(57, 73, 83, 0.14) !important;
    color: #52616b !important;
}

html[data-theme="light"] .article-back-link {
    background: rgba(225, 219, 208, 0.85) !important;
    border-color: rgba(57, 73, 83, 0.15) !important;
    color: #26323a !important;
}

html[data-theme="light"] .article-content,
html[data-theme="light"] .article-content p,
html[data-theme="light"] .article-content li {
    color: #26323a !important;
}

html[data-theme="light"] .article-content h1,
html[data-theme="light"] .article-content h2,
html[data-theme="light"] .article-content h3,
html[data-theme="light"] .article-content h4 {
    color: #213039 !important;
}

html[data-theme="light"] .article-content blockquote {
    background: rgba(79, 119, 123, 0.12) !important;
    border-left-color: #4f777b !important;
    color: #26323a !important;
}

html[data-theme="light"] .code-block-wrapper {
    background: #1e293b !important;
    border-color: rgba(57, 73, 83, 0.2) !important;
}

html[data-theme="light"] .inline-code {
    background: rgba(79, 119, 123, 0.15) !important;
    border-color: rgba(79, 119, 123, 0.25) !important;
    color: #2b5258 !important;
}

html[data-theme="light"] .author-box {
    background: rgba(235, 229, 218, 0.94) !important;
    border-color: rgba(57, 73, 83, 0.16) !important;
}

html[data-theme="light"] .author-box-info h4 {
    color: #213039 !important;
}

html[data-theme="light"] .author-box-info p {
    color: #52616b !important;
}

html[data-theme="light"] .share-btn {
    background: rgba(225, 219, 208, 0.85) !important;
    border-color: rgba(57, 73, 83, 0.16) !important;
    color: #26323a !important;
}

html[data-theme="light"] .admin-login-box,
html[data-theme="light"] .admin-table-wrapper,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .form-control {
    background: rgba(235, 229, 218, 0.95) !important;
    border-color: rgba(57, 73, 83, 0.18) !important;
    color: #26323a !important;
}

html[data-theme="light"] .admin-table th {
    background: rgba(215, 208, 196, 0.7) !important;
    color: #52616b !important;
}

html[data-theme="light"] .admin-table td strong {
    color: #213039 !important;
}
