:root {
    --primary-color: #2c5530;
    --secondary-color: #4a7c59;
    --accent-color: #8fb996;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* استایل بخش اصلی */
#About {
    padding: 40px 5%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
    width: 100%;
}

.container-fluid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* استایل تب‌ها */
.nav-tabs {
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-light);
    font-weight: 600;
    padding: 15px 25px;
    margin: 0 5px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    transition: var(--transition);
    background: transparent;
    flex: 0 1 auto;
    text-align: center;
    white-space: nowrap;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    background: rgba(44, 85, 48, 0.1);
}

.nav-tabs .nav-link.active {
    color: white;
    background: var(--primary-color);
    border: none;
    box-shadow: 0 -4px 15px rgba(44, 85, 48, 0.3);
}

.nav-tabs .nav-link i {
    margin-left: 8px;
    font-size: 1.2rem;
}

/* استایل محتوای تب‌ها */
.tab-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-bottom: 30px;
    width: 100%;
}

.section-title {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 15px;
    line-height: 1.3;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 10px;
}

/* استایل محتوای وبلاگ */
#blog {
    width: 100%;
}

#blog h1 {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
    font-size: 2rem;
    line-height: 1.3;
}

#blog h2 {
    color: var(--secondary-color);
    font-weight: 700;
    margin: 40px 0 20px 0;
    padding-right: 15px;
    border-right: 4px solid var(--accent-color);
    font-size: 1.8rem;
    line-height: 1.4;
}

#blog h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin: 30px 0 15px 0;
    padding-right: 10px;
    font-size: 1.5rem;
    line-height: 1.4;
}

#blog p {
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 20px;
    color: var(--text-color);
    word-wrap: break-word;
}

.name4 {
    color: var(--secondary-color);
    font-weight: 700;
    display: block;
    margin: 15px 0 8px 0;
    font-size: 1.3rem;
    line-height: 1.4;
}

/* استایل ویدیو */
#blog video {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 20px auto;
    display: block;
    max-width: 100%;
    height: auto;
    border: 3px solid var(--accent-color);
}

/* استایل تصویر */
#imageSam {
    width: 100%;
    max-width: 600px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin: 20px auto;
    display: block;
    border: 3px solid var(--accent-color);
    height: auto;
}

/* استایل کارت‌های گالری */
.content-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 25px;
    background: white;
    width: 100%;
    height: auto;
}

.content-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.content-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.content-card:hover img {
    transform: scale(1.05);
}

.content-card .card-body {
    padding: 20px;
}

.content-card .card-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1.3rem;
    line-height: 1.4;
}

.content-card .card-text {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* استایل کارت‌های ویدیو */
.video-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    margin-bottom: 25px;
    background: white;
    width: 100%;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.video-card video {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    width: 100%;
    height: auto;
}

.video-card .card-body {
    padding: 20px;
}

.video-card h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin: 15px 0 10px 0;
    font-size: 1.2rem;
}

.video-card .text-muted {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* استایل‌های واکنش‌گرا برای دستگاه‌های بزرگ (1200px به بالا) */
@media (min-width: 1200px) {
    .section-title {
        font-size: 3rem;
    }

    #blog h1 {
        font-size: 2.5rem;
    }

    #blog h2 {
        font-size: 2rem;
    }

    #blog h4 {
        font-size: 1.8rem;
    }

    #blog p {
        font-size: 1.2rem;
    }

    .name4 {
        font-size: 1.5rem;
    }
}

/* استایل‌های واکنش‌گرا برای تبلت‌های بزرگ (992px تا 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }

    #blog h1 {
        font-size: 2rem;
    }

    #blog h2 {
        font-size: 1.7rem;
    }

    #blog h4 {
        font-size: 1.5rem;
    }

    .tab-content {
        padding: 30px;
    }

    .nav-tabs .nav-link {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* استایل‌های واکنش‌گرا برای تبلت‌ها (768px تا 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    #About {
        padding: 30px 4%;
    }

    .section-title {
        font-size: 2rem;
    }

    #blog h1 {
        font-size: 1.8rem;
    }

    #blog h2 {
        font-size: 1.5rem;
    }

    #blog h4 {
        font-size: 1.4rem;
    }

    .nav-tabs .nav-link {
        padding: 12px 18px;
        font-size: 0.9rem;
        margin: 0 3px;
    }

    .tab-content {
        padding: 25px;
    }

    #blog p {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .content-card .card-title {
        font-size: 1.2rem;
    }
}

/* استایل‌های واکنش‌گرا برای موبایل‌های بزرگ (576px تا 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    #About {
        padding: 20px 3%;
    }

    .section-title {
        font-size: 1.7rem;
        margin-bottom: 25px;
    }

    #blog h1 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }

    #blog h2 {
        font-size: 1.4rem;
        margin: 30px 0 15px 0;
        padding-right: 10px;
    }

    #blog h4 {
        font-size: 1.3rem;
        margin: 25px 0 12px 0;
    }

    .tab-content {
        padding: 20px;
        margin-bottom: 20px;
    }

    .nav-tabs .nav-link {
        padding: 10px 15px;
        margin: 0 2px;
        font-size: 0.85rem;
    }

    .nav-tabs .nav-link i {
        font-size: 1rem;
        margin-left: 5px;
    }

    #blog p {
        font-size: 1rem;
        line-height: 1.7;
        text-align: right;
    }

    .name4 {
        font-size: 1.2rem;
    }

    .content-card img {
        height: 200px;
    }

    .content-card .card-body {
        padding: 15px;
    }
}

/* استایل‌های واکنش‌گرا برای موبایل‌های کوچک (575px و پایین‌تر) */
@media (max-width: 575px) {
    #About {
        padding: 15px 2%;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    .section-title::after {
        width: 80px;
        height: 3px;
    }

    #blog h1 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    #blog h2 {
        font-size: 1.3rem;
        margin: 25px 0 12px 0;
        padding-right: 8px;
        border-right-width: 3px;
    }

    #blog h4 {
        font-size: 1.2rem;
        margin: 20px 0 10px 0;
        padding-right: 8px;
    }

    .tab-content {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .nav-tabs {
        display: flex;
        flex-direction: column;
        align-items: center;
        border-bottom: none;
        margin-bottom: 20px;
    }

    .nav-tabs .nav-link {
        margin: 3px 0;
        border-radius: var(--border-radius);
        width: 100%;
        max-width: 280px;
        padding: 12px 15px;
    }

    .nav-tabs .nav-link.active {
        border-radius: var(--border-radius);
        box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    }

    .nav-tabs .nav-link i {
        font-size: 0.9rem;
        margin-left: 5px;
    }

    #blog p {
        font-size: 0.95rem;
        line-height: 1.7;
        text-align: right;
    }

    .name4 {
        font-size: 1.1rem;
    }

    .content-card {
        margin-bottom: 20px;
    }

    .content-card img {
        height: 180px;
    }

    .content-card .card-body {
        padding: 15px;
    }

    .content-card .card-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .video-card .card-body {
        padding: 15px;
    }

    .video-card h5 {
        font-size: 1.1rem;
    }
}

/* استایل‌های واکنش‌گرا برای دستگاه‌های بسیار کوچک (360px و پایین‌تر) */
@media (max-width: 360px) {
    #About {
        padding: 10px 1%;
    }

    .section-title {
        font-size: 1.3rem;
    }

    #blog h1 {
        font-size: 1.2rem;
    }

    #blog h2 {
        font-size: 1.1rem;
    }

    #blog h4 {
        font-size: 1.05rem;
    }

    .tab-content {
        padding: 12px;
    }

    .nav-tabs .nav-link {
        padding: 10px 12px;
        font-size: 0.8rem;
    }

    #blog p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .name4 {
        font-size: 1rem;
    }
}

/* افکت‌های ویژه */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* هایلایت متن */
.highlight {
    background: linear-gradient(120deg, var(--accent-color) 0%, var(--accent-color) 100%);
    background-repeat: no-repeat;
    background-size: 100% 0.4em;
    background-position: 0 88%;
    transition: background-size 0.3s ease;
}

.highlight:hover {
    background-size: 100% 88%;
}

/* بهبود برای حالت landscape در موبایل */
@media (max-height: 500px) and (orientation: landscape) {
    #About {
        min-height: auto;
        padding: 20px 2%;
    }

    .section-title {
        margin-bottom: 15px;
        font-size: 1.4rem;
    }

    .tab-content {
        padding: 15px;
    }
}

/* بهبود برای نمایش در حالت چاپ */
@media print {
    .nav-tabs, .video-card, .content-card:hover {
        display: none;
    }

    .tab-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    #About {
        background: white;
    }
}
