
/* ========== BASE & THEME COLORS ========== */
.news-detail-page {
    min-height: 100vh;
    background: var(--body-bg, #f8fafc);
    /* Layout container'ından çık */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    position: relative;
    left: 0;
}

/* ========== CUSTOM CONTAINER ========== */
.news-detail-container {
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-right: auto;
    margin-left: auto;
    max-width: 1620px;
}

/* ========== PAGE LOAD ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.top-bar {
    animation: slideDown 0.5s ease-out forwards;
}

.article-card {
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
    opacity: 0;
}

.content-section {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
    opacity: 0;
}

.sidebar-card:nth-child(1) {
    animation: fadeInRight 0.5s ease-out 0.2s forwards;
    opacity: 0;
}

.sidebar-card:nth-child(2) {
    animation: fadeInRight 0.5s ease-out 0.35s forwards;
    opacity: 0;
}

.sidebar-card:nth-child(3) {
    animation: fadeInRight 0.5s ease-out 0.5s forwards;
    opacity: 0;
}

/* ========== TOP BAR ========== */
.top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.top-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid var(--primary-color, #667eea);
    background: var(--card-bg, white);
    color: var(--primary-color, #667eea);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .btn-icon:hover {
        background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
        border-color: transparent;
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--primary-shadow, 0 5px 15px rgba(102, 126, 234, 0.35));
    }

/* ========== ARTICLE CARD ========== */
.article-card {
    background: var(--card-bg, white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0,0,0,0.08));
    margin-bottom: 1.5rem;
}

.article-cover {
    position: relative;
    height: 350px;
    overflow: hidden;
}

    .article-cover img {
        width: 100%;
        height: 100%;
        /*object-fit: cover;*/
        transition: transform 0.5s ease;
    }

.article-card:hover .article-cover img {
    transform: scale(1.03);
}

.cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
}

.article-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: var(--primary-shadow, 0 5px 15px rgba(102, 126, 234, 0.35));
}

.article-body {
    padding: 2rem;
}

.article-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--card-text, #1e293b);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color, #f1f5f9);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted, #64748b);
    font-size: 0.9rem;
}

    .meta-item i {
        color: var(--primary-color, #667eea);
    }

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--card-text, #334155);
}

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

    .article-content img {
        max-width: 100%;
        height: auto;
        border-radius: 12px;
        margin: 1.5rem 0;
    }

    .article-content h2, .article-content h3 {
        color: var(--card-text, #1e293b);
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .article-content a {
        color: var(--primary-color, #667eea);
    }

    .article-content blockquote {
        border-left: 4px solid var(--primary-color, #667eea);
        padding: 1rem 1.5rem;
        margin: 1.5rem 0;
        background: var(--body-bg, #f8fafc);
        border-radius: 0 12px 12px 0;
        font-style: italic;
        color: var(--text-muted, #64748b);
    }

/* ========== COMPACT GALLERY SECTION ========== */
.content-section {
    background: var(--card-bg, white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0,0,0,0.08));
}

.section-header-compact {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-icon-sm {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.section-title-sm {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--card-text, #1e293b);
    margin: 0;
    flex: 1;
}

.section-count {
    font-size: 0.8rem;
    color: var(--primary-color, #667eea);
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border: 2px solid var(--primary-color, #667eea);
    border-radius: 50px;
}

.gallery-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.gallery-thumb {
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

    .gallery-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .gallery-thumb:hover img {
        transform: scale(1.1);
    }

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color, rgba(102, 126, 234, 0.85)), var(--secondary-color, rgba(118, 75, 162, 0.85)));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
    font-size: 1.5rem;
}

.gallery-thumb:hover .thumb-overlay {
    opacity: 1;
}

/* ========== SIDEBAR ========== */
.sidebar-sticky {
    position: sticky;
    top: 1rem;
}

.sidebar-card {
    background: var(--card-bg, white);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow, 0 4px 20px rgba(0,0,0,0.08));
    margin-bottom: 1rem;
}

/* Info Card */
.info-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--card-text, #1e293b);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color, #f1f5f9);
}

    .info-header i {
        color: var(--primary-color, #667eea);
    }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.info-label {
    color: var(--text-muted, #64748b);
}

.info-value {
    font-weight: 600;
    color: var(--card-text, #1e293b);
}

/* Files Card */
.files-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color, #f1f5f9);
}

.files-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.files-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--card-text, #1e293b);
    margin: 0;
}

.files-count {
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--body-bg, #f8fafc);
    border-radius: 10px;
    transition: all 0.3s;
}

    .file-item:hover {
        background: var(--bg-hover, #f1f5f9);
        transform: translateX(3px);
    }

.file-icon-sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

    .file-icon-sm.pdf {
        background: #ef4444;
    }

    .file-icon-sm.word {
        background: #3b82f6;
    }

    .file-icon-sm.excel {
        background: #22c55e;
    }

    .file-icon-sm.ppt {
        background: #f97316;
    }

    .file-icon-sm.image {
        background: #8b5cf6;
    }

    .file-icon-sm.zip {
        background: #f59e0b;
    }

    .file-icon-sm.video {
        background: #ec4899;
    }

    .file-icon-sm.audio {
        background: #06b6d4;
    }

    .file-icon-sm.default {
        background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    }

.file-details {
    flex: 1;
    min-width: 0;
}

.file-name-sm {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--card-text, #1e293b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size-sm {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

.file-download-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

    .file-download-sm:hover {
        transform: scale(1.15) rotate(5deg);
        box-shadow: var(--primary-shadow, 0 5px 15px rgba(102, 126, 234, 0.35));
        color: white;
    }

/* Actions Card */
.actions-card {
    padding: 0;
    overflow: hidden;
}

.action-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color, #f1f5f9);
}

    .action-link:last-child {
        border-bottom: none;
    }

    .action-link:hover {
        background: var(--body-bg, #f8fafc);
        padding-left: 1.5rem;
    }

.action-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.action-link:hover .action-icon {
    transform: scale(1.1);
}

.action-icon.back {
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
}

.action-icon.home {
    background: linear-gradient(135deg, var(--secondary-color, #764ba2), var(--accent-color, #f472b6));
}

.action-text {
    flex: 1;
}

.action-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
}

.action-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--card-text, #1e293b);
}

.action-link > .bi-chevron-right {
    color: var(--primary-color, #667eea);
    transition: transform 0.3s;
}

.action-link:hover > .bi-chevron-right {
    transform: translateX(3px);
}

/* ========== LIGHTBOX ========== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

    .lightbox.active {
        display: flex;
        align-items: center;
        justify-content: center;
        animation: fadeIn 0.3s ease;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
}

.lightbox-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

    .lightbox-close:hover {
        background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
        transform: rotate(90deg);
    }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

    .lightbox-nav.prev {
        left: 20px;
    }

    .lightbox-nav.next {
        right: 20px;
    }

    .lightbox-nav:hover {
        background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
        transform: translateY(-50%) scale(1.1);
    }

.lightbox-content {
    max-width: 90%;
    max-height: 75vh;
    text-align: center;
    animation: scaleIn 0.4s ease;
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 70vh;
        border-radius: 12px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }

.lightbox-info {
    margin-top: 1rem;
    color: white;
}

.lightbox-counter {
    background: linear-gradient(135deg, var(--primary-color, #667eea), var(--secondary-color, #764ba2));
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 1rem;
}

.lightbox-caption {
    opacity: 0.8;
    font-size: 0.9rem;
}

.lightbox-thumbs {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    max-width: 80%;
    overflow-x: auto;
    padding: 10px;
}

.lightbox-thumb {
    width: 55px;
    height: 55px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s;
    border: 2px solid transparent;
    flex-shrink: 0;
}

    .lightbox-thumb:hover,
    .lightbox-thumb.active {
        opacity: 1;
        border-color: var(--primary-color, #667eea);
        transform: scale(1.1);
    }

    .lightbox-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* ========== RESPONSIVE ========== */
@media (max-width: 991px) {
    .sidebar-sticky {
        position: static;
    }

    .sidebar-card:nth-child(1),
    .sidebar-card:nth-child(2),
    .sidebar-card:nth-child(3) {
        animation: fadeInUp 0.5s ease-out forwards;
        animation-delay: 0.4s;
    }
}

@media (max-width: 768px) {
    .article-cover {
        height: 250px;
    }

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

    .article-body {
        padding: 1.5rem;
    }

    .article-content {
        font-size: 1rem;
    }

    .lightbox-wrapper {
        padding: 60px 20px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

        .lightbox-nav.prev {
            left: 10px;
        }

        .lightbox-nav.next {
            right: 10px;
        }

    .gallery-compact {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .gallery-compact {
        grid-template-columns: repeat(3, 1fr);
    }

    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .top-bar, .sidebar-card, .lightbox, .gallery-compact {
        display: none !important;
    }

    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .article-card {
        box-shadow: none;
        animation: none;
        opacity: 1;
    }
}

/*--------------*/
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between; /* kritik kısım */
    width: 100%;
    padding: 18px 24px;
    gap: 16px;
}

/* H1 solda kalır */
.article-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    flex: 1; /* alanı doldurur */
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Butonlar her zaman sağda */
.top-actions {
    display: flex;
    gap: 12px;
    margin-left: auto; /* ekstra garanti */
}

@media (max-width: 640px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .article-title {
        text-align: left;
    }

    .top-actions {
        justify-content: flex-end;
    }

    .article-title_sub {
        margin: 0;
        font-size: 1.25rem;
        font-weight: 700;
        color: #1e293b;
        flex: 1; /* alanı doldurur */
        text-align: left;
        white-space: nowrap;
        /*  overflow: hidden; */
        text-overflow: ellipsis;
    }
}

.bx-shdw {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}
