/* ===== Project Hero ===== */


.project-hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.project-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== Project Main ===== */
.project-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.project-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.project-info h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.project-info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #e63946;
}

.info-list {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.info-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #495057;
    width: 100px;
}

.info-value {
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-value svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

/* ===== Description Section ===== */
.project-description,
.project-additional,
.project-gallery {
    margin: 50px 0;
}

.project-description h2,
.project-additional h2,
.project-gallery h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.project-description h2::after,
.project-additional h2::after,
.project-gallery h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #e63946;
}

.description-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    line-height: 1.8;
    color: #495057;
    /* جلوگیری از بیرون زدن متن */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* ===== Additional Information (مهمترین بخش برای رفع مشکل) ===== */
.additional-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    line-height: 1.8;
    /* جلوگیری از بیرون زدن متن */
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

/* استایل تگ‌های HTML داخل additional_content */
.additional-content h1,
.additional-content h2,
.additional-content h3,
.additional-content h4,
.additional-content h5,
.additional-content h6 {
    margin: 20px 0 10px;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.additional-content p {
    margin: 10px 0;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.additional-content ul,
.additional-content ol {
    margin: 10px 0 10px 30px;
    padding-left: 20px;
}

.additional-content li {
    margin: 5px 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.additional-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
    display: block;
}

.additional-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    overflow-x: auto;
    display: block;
    max-width: 100%;
}

.additional-content th,
.additional-content td {
    border: 1px solid #e9ecef;
    padding: 8px;
    text-align: left;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.additional-content th {
    background: #e9ecef;
    font-weight: 600;
}

.additional-content blockquote {
    border-left: 4px solid #e63946;
    padding: 10px 20px;
    margin: 15px 0;
    background: #f1f3f5;
    font-style: italic;
}

.additional-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    max-width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.additional-content code {
    background: #e9ecef;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* ===== Gallery ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ===== Back Link ===== */
.back-link {
    margin-top: 40px;
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 12px 30px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 50px;
    border: 1px solid #e9ecef;
    transition: all 0.3s;
}

.back-link a:hover {
    background: #e63946;
    color: white;
    border-color: #e63946;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .project-hero h1 {
        font-size: 2.2rem;
    }
    
    .project-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-label {
        width: auto;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .description-content,
    .additional-content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .project-hero h1 {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .additional-content table {
        font-size: 14px;
    }

    .pages-hero-section h1{
        font-size: 20px;
    }
}