﻿:root {
    --primary-green: #bd5eff;
    --light-green: #f5f1f8;
    --dark-green: #752196;
    --light-gray: #f8f9f1;
    --border-color: #e0e0e0;
    --text-primary: #352d36;
    --text-secondary: #636e72;
    --text-muted: #888;
}

@font-face {
    font-family: 'estedad-regular';
    src: url('../fonts/estedad-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'vazir-light-fd';
    src: url('../fonts/vazir-light-fd.woff2') format('woff2');
}

body {
    font-family: estedad-regular, 'Segoe UI', Tahoma, sans-serif;
    background-color: #fafafa;
    color: var(--text-primary);
    line-height: 1.7;
}

/* ===== LAYOUT STYLES ===== */

/* هدر مینیمال - از _Layout */
.main-header {
    background: #edfcf4;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.logo-placeholder {
    width: 180px;
    height: 100px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-size: 1.5rem;
}

.site-title {
    color: #2d3436;
    font-weight: 800;
    font-size: 1.8rem;
    margin: 12px;
}

.site-subtitle {
    color: #636e72;
    font-size: 0.9rem;
    margin: 0;
}

.normalText {
    font-size: 0.9rem;
}

/* هدر بهبود یافته - از _NewsLayout */
.main-header-enhanced {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: 2px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-placeholder-enhanced {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    box-shadow: 0 4px 6px rgba(39, 174, 96, 0.15);
}

.site-title-enhanced {
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.7rem;
    margin: 12px 12px 0 12px;
    letter-spacing: -0.5px;
}

.site-subtitle-enhanced {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-right: 12px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== CATEGORY STYLES ===== */

.category-slider {
    padding: 5px 0;
    background-color: white;
}

.category-item {
    text-align: center;
    padding-bottom: 0px;
    padding-top: 20px;
    transition: all 0.3s ease;
    border-radius: 12px;
    flex: 0 0 auto;
    width: 90px;
    margin: 0 4px;
}

    .category-item:hover {
        background-color: #f1f8f4;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(39, 174, 96, 0.1);
    }

.category-icon {
    width: 48px;
    height: 48px;
    background-color: #f1f8f4;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    color: #9427ae;
    font-size: 20px;
    transition: all 0.3s ease;
}

.category-item:hover .category-icon {
    background-color: #8727ae;
    color: white;
    transform: scale(1.05);
}

.category-name {
    font-size: 1.0rem;
    color: #555;
    font-weight: 500;
    line-height: 1.3;
}

.category-slider .row {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 5px;
}

    .category-slider .row::-webkit-scrollbar {
        display: none;
    }

/* ===== SIDEBAR STYLES ===== */

.sticky-sidebar {
    position: sticky;
    top: 140px;
    z-index: 100;
}

.news-menu {
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
}

.news-menu-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3436;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-green);
    margin-bottom: 15px;
}

.news-menu-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

    .news-menu-item:last-child {
        border-bottom: none;
    }

    .news-menu-item a {
        color: #555;
        text-decoration: none;
        transition: all 0.2s;
        display: flex;
        align-items: center;
    }

        .news-menu-item a:hover {
            color: var(--primary-green);
        }

    .news-menu-item i {
        margin-left: 8px;
        font-size: 0.9rem;
    }

.ad-box {
    background: var(--light-green);
    border-radius: 8px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-green);
    font-weight: 600;
    border: 1px dashed var(--primary-green);
}

.news-sidebar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-green);
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.1s ease;
}

    .news-item:last-child {
        border-bottom: none;
    }

    .news-item:hover {
        background-color: var(--light-green);
        padding-right: 3px;
        border-radius: 8px;
    }

.news-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.4;
    display: block;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 20px;
}

    .news-link::before {
        content: "›";
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        color: var(--primary-green);
        opacity: 0;
        transition: all 0.2s ease;
    }

    .news-link:hover {
        color: var(--primary-green);
    }

        .news-link:hover::before {
            opacity: 1;
            right: -3px;
        }

.news-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== NEWS CARD STYLES ===== */

.featured-news {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
}

.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    height: 170px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

    .news-card:hover {
        box-shadow: 0 5px 15px rgb(164, 39, 174, 0.20);
        transform: translateY(-2px);
    }

.news-card-img {
    width: 150px;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.news-card-body {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 70px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

    .news-card-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;
    }

        .news-card-title a:hover {
            color: var(--primary-green);
        }

.news-card-date {
    color: #777;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

    .news-card-date i {
        margin-left: 5px;
        color: var(--primary-green);
    }

.news-card-summary {
    color: #555;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 0;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Responsive styles for news-card */
@media (min-width: 992px) {
    .news-card {
        height: 180px;
    }

    .news-card-img {
        width: 200px;
    }

    .news-card-body {
        padding: 20px;
    }

    .news-card-title {
        font-size: 1rem;
        height: 65px;
        margin-bottom: 12px;
    }

    .news-card-date {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .news-card-summary {
        font-size: 0.85rem;
        height: 70px;
    }
}

@media (max-width: 768px) {
    .news-card {
        height: 140px;
        margin-bottom: 15px;
    }

    .news-card-img {
        width: 140px;
    }

    .news-card-body {
        padding: 12px;
    }

    .news-card-title {
        font-size: 0.9rem;
        height: 60px;
        margin-bottom: 8px;
    }

    .news-card-date {
        font-size: 0.7rem;
        margin-bottom: 8px;
    }

    .news-card-summary {
        font-size: 0.75rem;
        height: 60px;
    }
}

@media (max-width: 576px) {
    .news-card {
        height: 130px;
    }

    .news-card-img {
        width: 130px;
    }

    .news-card-body {
        padding: 10px;
    }

    .news-card-title {
        font-size: 0.85rem;
        height: 56px;
    }

    .news-card-summary {
        height: 56px;
    }
}

/* ===== NEWS CONTENT STYLES ===== */

.news-content {
    background-color: #fafafa;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    padding: 36px;
    margin: 32px 0;
    margin-left: 50px;
    position: relative;
}

.back-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    transition: all 0.2s;
}

    .back-link:hover {
        color: var(--dark-green);
        transform: translateX(-3px);
    }

.news-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
}

.news-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

    .news-meta span {
        display: inline-flex;
        align-items: center;
    }

    .news-meta i {
        margin-left: 6px;
        font-size: 0.9rem;
    }

.news-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 32px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.news-summary {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    padding: 20px;
    background-color: var(--light-green);
    border-radius: 10px;
    border-right: 4px solid var(--primary-green);
    line-height: 1.8;
}



.news-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--text-secondary);
    transition: all 0.2s;
}

    .share-btn:hover {
        background: var(--primary-green);
        color: white;
        transform: translateY(-2px);
    }

/* ===== RELATED NEWS STYLES ===== */

.related-news {
    margin: 48px 0;
}

.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
}

    .related-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }

.related-card-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
}

.related-card-body {
    padding: 20px;
}

.related-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.5;
}

.related-card-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

/* ===== SECTION TITLES ===== */

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 23px;
    color: #2d3436;
    text-align: right;
}

    .section-title:after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 60px;
        height: 3px;
        background-color: var(--primary-green);
    }

.section-title-enhanced {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

    .section-title-enhanced::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 60px;
        height: 3px;
        background-color: var(--primary-green);
        border-radius: 3px;
    }

/* ===== BUTTON STYLES ===== */

.btn-outline-green {
    color: var(--primary-green);
    border-color: var(--primary-green);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

    .btn-outline-green:hover {
        background-color: var(--primary-green);
        color: white;
    }

.btn-outline-green-enhanced {
    color: var(--primary-green);
    border: 1.5px solid var(--primary-green);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .btn-outline-green-enhanced:hover {
        background-color: var(--primary-green);
        color: white;
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
    }

/* ===== SCROLL TOP BUTTON ===== */

.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

    .scroll-top.active {
        opacity: 1;
        visibility: visible;
    }

    .scroll-top:hover {
        background: var(--dark-green);
        transform: translateY(-3px);
    }

/* ===== FOOTER STYLES ===== */

footer {
    background-color: #2d3436;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-title {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links a {
    color: #dfe6e9;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

    .footer-links a:hover {
        color: var(--primary-green);
    }

.copyright {
    border-top: 1px solid #3c4043;
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    color: #b2bec3;
    font-size: 0.85rem;
}

/* فوتر بهبود یافته - از _NewsLayout */
footer.enhanced {
    background-color: #2d3436;
    color: white;
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-title.enhanced {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 12px;
}

    .footer-title.enhanced::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 40px;
        height: 2px;
        background-color: var(--primary-green);
    }

.footer-links.enhanced a {
    color: #dfe6e9;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

    .footer-links.enhanced a:hover {
        color: var(--primary-green);
        transform: translateX(-3px);
    }

.copyright.enhanced {
    border-top: 1px solid #3c4043;
    padding-top: 20px;
    margin-top: 40px;
    text-align: center;
    color: #b2bec3;
    font-size: 0.85rem;
}

/* ===== VOICE SECTION STYLES ===== */

.voice-scroll-container {
    position: relative;
    margin: 0 -10px;
    padding: 0 10px;
}

.voice-scroll-wrapper {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
    padding-bottom: 15px;
}

    .voice-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

.voice-slider {
    display: flex;
    gap: 15px;
    padding: 5px;
}

.voice-item {
    flex: 0 0 300px;
}

    .voice-item .news-card {
        height: 100%;
        margin-bottom: 0;
        transform: scale(0.95);
        transition: transform 0.3s ease;
    }

.voice-meta {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.voice-navigation {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    gap: 10px;
}

.voice-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-green);
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .voice-nav-btn:hover {
        background: var(--primary-green);
        color: white;
    }

/* ===== CAROUSEL STYLES ===== */

.carousel-main {
    margin-right: 200px;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

    .carousel-main .carousel-item {
        height: 100%;
    }

        .carousel-main .carousel-item a {
            display: block;
            height: 100%;
            width: 100%;
        }

    .carousel-main img {
        object-fit: cover;
        object-position: center center;
        min-height: 400px;
        max-height: 400px;
    }

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 15px 20px;
    right: 15%;
    left: 15%;
    bottom: 30px;
    text-align: center;
}

    .carousel-caption h5 {
        font-size: 1.4rem;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 0;
    }

/* ===== FEATURED NEWS WITH THUMBNAILS ===== */

.featured-news-with-thumb {
    position: relative;
}

.featured-thumbnails {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 200px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.featured-thumb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

    .featured-thumb-item.active {
        opacity: 1;
        background-color: var(--light-green);
    }

.featured-thumb-img {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-thumb-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d3436;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

/* ===== BREADCRUMB STYLES ===== */

.breadcrumb-nav {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 20px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

    .breadcrumb-item + .breadcrumb-item::before {
        content: "›";
        color: var(--text-muted);
        font-size: 1.1rem;
        margin: 0 8px;
    }

.breadcrumb-link {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

    .breadcrumb-link:hover {
        color: var(--dark-green);
        text-decoration: none;
    }

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== UTILITY CLASSES ===== */

.text-green {
    color: var(--primary-green) !important;
}

.bg-light-green {
    background-color: var(--light-green) !important;
}

/* ===== SCROLLBAR STYLES ===== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--dark-green);
    }

/* ===== COMMENTS SECTION STYLES ===== */

.comments-section {
    border-top: 2px solid #e9ecef;
    padding-top: 2rem;
}

.comments-title {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.comment-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
}

    .comment-form h5 {
        color: #495057;
        font-weight: 600;
        margin-bottom: 1rem;
    }

.comment-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef !important;
    transition: box-shadow 0.2s ease-in-out;
}


.comment-header {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-size: 0.95rem;
}

.comment-date {
    font-size: 0.85rem;
}

.comment-content {
    line-height: 1.6;
    color: #495057;
    font-size: 0.95rem;
}

/* ===== FORM VALIDATION STYLES ===== */

.needs-validation .form-control:invalid {
    border-color: #dc3545;
}

.needs-validation .form-control:valid {
    border-color: #28a745;
}

/* ===== RESPONSIVE STYLES ===== */

@media (max-width: 768px) {
    .voice-item {
        flex: 0 0 85%;
    }

        .voice-item .news-card {
            transform: scale(0.92);
        }

    .carousel-caption {
        right: 10%;
        left: 10%;
        bottom: 20px;
        padding: 10px 15px;
    }

        .carousel-caption h5 {
            font-size: 1.1rem;
            margin-bottom: 5px;
        }

        .carousel-caption p {
            font-size: 0.9rem;
        }

        .carousel-caption.d-none.d-md-block {
            display: block !important;
        }

    .news-content {
        padding: 24px;
        margin: 20px 0;
    }

    .news-title {
        font-size: 1.8rem;
    }

    .news-meta {
        flex-direction: column;
        gap: 10px;
    }

    .news-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .logo-placeholder {
        width: 140px;
        height: 75px;
    }

    .news-sidebar {
        padding: 20px;
        margin-bottom: 24px;
    }

    .sidebar-title {
        font-size: 1.2rem;
    }

    .news-item {
        padding: 12px 0;
    }

    .comment-form {
        padding: 1rem;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .comment-date {
        margin-top: 0.25rem;
    }
}

@media (max-width: 576px) {
    .carousel-main {
        height: 300px;
        margin-right: 0;
    }

        .carousel-main img {
            object-fit: cover;
            object-position: center center;
            min-height: 300px;
            max-height: 300px;
        }

    .carousel-caption {
        right: 5%;
        left: 5%;
        bottom: 10px;
        padding: 8px 12px;
    }

        .carousel-caption h5 {
            font-size: 1rem;
        }

        .carousel-caption p {
            font-size: 0.8rem;
        }
}

@media (max-width: 992px) {
    .featured-thumbnails {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        border-left: none;
        padding: 10px 5px;
    }

    .featured-thumb-item {
        flex: 0 0 auto;
        width: 180px;
    }

    .carousel-main {
        margin-right: 0;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 100%;
    }
}

@media (min-width: 900px) {
    .container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }

    .main-header-enhanced {
        max-width: 100% !important;
        padding-right: 1px !important;
        padding-left: 1px !important;
    }
}

/* ===== BOOTSTRAP OVERRIDES ===== */

.dl-horizontal dt {
    white-space: normal;
}

input,
select,
textarea {
    max-width: 280px;
}





/* استایل‌های بهبود یافته برای صفحه جزئیات خبر */
.news-detail-container {
    margin: 0 auto;
    padding: 0 15px;
}



.back-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    transition: all 0.2s;
    padding: 8px 16px;
    border-radius: 8px;
    background-color: var(--light-green);
}

    .back-link:hover {
        color: var(--dark-green);
        transform: translateX(-3px);
        background-color: #e3f5ec;
    }

.news-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.4;
    text-align: right;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 15px;
}

.news-meta {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    justify-content: flex-start;
}

    .news-meta span {
        display: inline-flex;
        align-items: center;
        background-color: #f8f9fa;
        padding: 6px 12px;
        border-radius: 20px;
    }

    .news-meta i {
        margin-left: 6px;
        font-size: 0.9rem;
        color: var(--primary-green);
    }

.news-image-container {
    margin-bottom: 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.news-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.news-summary {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    padding: 20px;
    background-color: var(--light-green);
    border-radius: 10px;
    border-right: 4px solid var(--primary-green);
    line-height: 1.8;
    font-weight: 500;
}

.news-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(189, 94, 255, 0.06);
    font-size: 1rem;
    direction: rtl;
}

.news-body h2{
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 400;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.news-body h3 {
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 250;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.news-body th,
.news-body td {
    border: 1px solid var(--border-color);
    padding: 10px 16px;
    text-align: right;
    vertical-align: middle;
}

.news-body th {
    background: var(--light-green);
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.05rem;
}

.news-body tr:nth-child(even) {
    background: #faf6ff;
}

.news-body tr:hover {
    background: #f5eaff;
}

.news-body blockquote {
    border-right: 4px solid var(--primary-green);
    background: #f8f9fa;
    color: var(--text-secondary);
    margin: 28px 0;
    padding: 18px 24px;
    border-radius: 8px;
    font-style: italic;
    font-size: 1.08rem;
    position: relative;
}

    .news-body blockquote:before {
        content: "“";
        color: var(--primary-green);
        font-size: 2.5rem;
        position: absolute;
        right: 12px;
        top: 0;
        line-height: 1;
        opacity: 0.2;
    }

    .news-body blockquote footer,
    .news-body blockquote cite {
        display: block;
        margin-top: 12px;
        color: var(--text-muted);
        font-size: 0.95rem;
        font-style: normal;
    }

.news-body ul,
.news-body ol {
    margin: 18px 0 18px 24px;
    padding-right: 24px;
}

.news-body ul {
    list-style: disc inside;
}

.news-body ol {
    list-style: decimal inside;
}

.news-body li {
    margin-bottom: 8px;
    line-height: 1.8;
}

.news-body pre {
    background: #f5f1f8;
    color: #6c3483;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    font-size: 0.98rem;
    margin: 24px 0;
    direction: ltr;
    text-align: left;
}

.news-body code {
    background: #f5f1f8;
    color: #6c3483;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.97em;
    font-family: 'Consolas', 'monospace';
}

.news-body hr {
    border: none;
    border-top: 2px dashed var(--primary-green);
    margin: 32px 0;
    opacity: 0.4;
}

.news-body a {
    color: var(--primary-green);
    text-decoration: underline;
    transition: color 0.2s;
    word-break: break-all;
}

    .news-body a:hover {
        color: var(--dark-green);
        text-decoration: none;
    }

.news-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.share-buttons {
    display: flex;
    gap: 12px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    color: var(--text-secondary);
    transition: all 0.2s;
    text-decoration: none;
}

    .share-btn:hover {
        background: var(--primary-green);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
    }

/* استایل‌های بخش نظرات */
.comments-section {
    border-top: 2px solid var(--light-green);
    padding-top: 2rem;
}

.comments-title {
    color: var(--text-primary);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.comment-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    margin-bottom: 2rem;
}

    .comment-form h5 {
        color: var(--text-primary);
        font-weight: 600;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
    }

        .comment-form h5:before {
            content: "✎";
            margin-left: 8px;
            color: var(--primary-green);
        }

.comment-item {
    background-color: #ffffff;
    border: 1px solid #e9ecef !important;
    transition: box-shadow 0.2s ease-in-out;
    border-radius: 8px;
    overflow: hidden;
}



.comment-header {
    border-bottom: 1px solid #f1f3f4;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comment-author {
    font-size: 0.95rem;
    font-weight: 600;
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.comment-content {
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 0.5rem 0;
}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .news-content {
        padding: 24px;
        margin: 20px 0;
    }

    .news-title {
        font-size: 1.8rem;
    }

    .news-meta {
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
    }

    .news-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .share-buttons {
        margin-top: 15px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .comment-date {
        margin-top: 0.5rem;
    }

    /* Full width news content on mobile */
    .news-detail-container {
        padding: 0 10px;
        max-width: 100%;
    }

        /* Make news content full width on mobile */
        .news-detail-container .col-lg-9 {
            width: 100% !important;
            flex: 0 0 100% !important;
            max-width: 100% !important;
        }

        /* Hide sidebar on mobile for full width experience */
        .news-detail-container .col-lg-3 {
            display: none;
        }
}

@media (min-width: 1200px) {
    .news-detail-container {
        padding: 0 30px;
    }
}

.news-card-horizontal {
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin-bottom: 25px;
    height: 100%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

    .news-card-horizontal:hover {
        box-shadow: 0 5px 15px rgb(173, 39, 174, 0.20);
    }

.news-img-container {
    margin: 15px 15px 0 15px;
    border-radius: 8px;
    overflow: hidden;
    height: 160px;
}

.news-card-img-horizontal {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card-horizontal:hover .news-card-img-horizontal {
    transform: scale(1.03);
}

.news-card-body-horizontal {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title-horizontal {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3436;
    margin-bottom: 10px;
    line-height: 1.5;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

    .news-card-title-horizontal a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;
    }

        .news-card-title-horizontal a:hover {
            color: var(--primary-green);
        }

.news-card-date-horizontal {
    color: #777;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

    .news-card-date-horizontal i {
        margin-left: 5px;
        color: var(--primary-green);
    }

.news-card-summary-horizontal {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0px;
    flex-grow: 1;
    height: 68px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.btn-green-horizontal {
    background-color: transparent;
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
}

    .btn-green-horizontal:hover {
        background-color: var(--primary-green);
        color: white;
    }

    .btn-green-horizontal i {
        margin-right: 5px;
        font-size: 0.8rem;
    }

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .news-card-body-horizontal {
        padding: 12px;
    }

    .news-card-title-horizontal {
        font-size: 1rem;
        height: auto;
    }

    .news-card-summary-horizontal {
        height: auto;
    }

    .news-img-container {
        margin: 12px 12px 0 12px;
        height: 140px;
    }
}

/* Authentication Styles */
.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

    .auth-buttons .btn {
        white-space: nowrap;
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .user-info .username {
        color: #6c757d;
        font-size: 0.9rem;
    }

/* Form validation styles */
.was-validated .form-control:valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.88-1.88'/%3e%3c/svg%3e");
}

.was-validated .form-control:invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4 1.4-1.4'/%3e%3c/svg%3e");
}
