/* ===================================
   Improvements Section Styles
   Article-style improvements showcase
   =================================== */

/* Main Section Container */
.improvements-section {
    background-color: var(--bg-card-light, #ffffff);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-top: 2rem;
}

.improvements-section .section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.improvements-section .section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary-light, #333);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.improvements-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3a36e0, #6c63ff);
    border-radius: 3px;
}

.improvements-section .section-title i {
    margin-inline-end: 0.5rem;
    color: #3a36e0;
}

.improvements-section .section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary-light, #666);
    line-height: 1.8;
    max-width: 800px;
    margin: 1.5rem auto 0;
}

/* Improvements Article Content */
.improvements-article {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary-light, #555);
    margin-bottom: 2.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

[dir="rtl"] .improvements-article {
    text-align: right;
}

.improvements-article h2,
.improvements-article h3,
.improvements-article h4 {
    color: var(--text-primary-light, #333);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.improvements-article h2 {
    font-size: 1.8rem;
}

.improvements-article h3 {
    font-size: 1.5rem;
}

.improvements-article h4 {
    font-size: 1.25rem;
}

.improvements-article p {
    margin-bottom: 1.2rem;
}

.improvements-article ul,
.improvements-article ol {
    margin-bottom: 1.2rem;
    padding-inline-start: 1.5rem;
}

.improvements-article li {
    margin-bottom: 0.5rem;
}

.improvements-article img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.improvements-article blockquote {
    border-inline-start: 4px solid #3a36e0;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f8f9fc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

[dir="rtl"] .improvements-article blockquote {
    border-radius: 8px 0 0 8px;
}

/* Improvements Gallery */
.improvements-gallery {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.improvements-gallery h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: var(--text-primary-light, #333);
}

.improvements-gallery h3 i {
    color: #3a36e0;
    margin-inline-end: 0.5rem;
}

.improvements-gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.improvements-gallery .gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    cursor: pointer;
    height: 200px;
}

.improvements-gallery .gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(58, 54, 224, 0.15);
}

.improvements-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark Mode Support for Article */
body.dark-mode .improvements-article {
    color: var(--text-secondary-dark, #b0b0b0);
}

body.dark-mode .improvements-article h2,
body.dark-mode .improvements-article h3,
body.dark-mode .improvements-article h4 {
    color: var(--text-primary-dark, #e0e0e0);
}

body.dark-mode .improvements-article blockquote {
    background: #252525;
    color: #bbb;
}

body.dark-mode .improvements-gallery {
    border-top-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .improvements-gallery h3 {
    color: var(--text-primary-dark, #e0e0e0);
}

/* Improvements Blocks Container */
.improvements-blocks {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

/* Base Block Styles */
.improvement-block {
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border-radius: 10px;
    padding: 2rem;
    border-left: 4px solid #3a36e0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

[dir="rtl"] .improvement-block {
    border-left: none;
    border-right: 4px solid #3a36e0;
}

.improvement-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(58, 54, 224, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.improvement-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(58, 54, 224, 0.1);
}

.improvement-block .block-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary-light, #333);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.improvement-block .block-title i {
    color: #3a36e0;
    font-size: 1.2rem;
}

.improvement-block .block-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary-light, #555);
}

.improvement-block .block-content p {
    margin-bottom: 1rem;
}

.improvement-block .block-content p:last-child {
    margin-bottom: 0;
}

/* Text + Image Block */
.improvement-block.text-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.improvement-block.text-image.image-left {
    grid-template-columns: 1fr 1fr;
}

.improvement-block.text-image.image-left .block-image {
    order: -1;
}

.improvement-block.text-image .block-text {
    display: flex;
    flex-direction: column;
}

.improvement-block.text-image .block-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.improvement-block.text-image .block-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.improvement-block.text-image .block-image:hover img {
    transform: scale(1.03);
}

/* Image Only Block */
.improvement-block.image-only {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fc 0%, #eef1f7 100%);
}

.improvement-block.image-only .block-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    display: inline-block;
    max-width: 100%;
}

.improvement-block.image-only .block-image img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.improvement-block.image-only .block-image:hover img {
    transform: scale(1.02);
}

.improvement-block.image-only .image-caption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary-light, #666);
    font-style: italic;
}

/* Before/After Block */
.improvement-block.before-after {
    padding: 1.5rem;
}

.improvement-block.before-after .comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.improvement-block.before-after .comparison-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.improvement-block.before-after .comparison-item img {
    width: 100%;
    height: auto;
    display: block;
}

.improvement-block.before-after .comparison-label {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

[dir="rtl"] .improvement-block.before-after .comparison-label {
    left: auto;
    right: 10px;
}

.improvement-block.before-after .comparison-label.before {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.improvement-block.before-after .comparison-label.after {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* Features List Block */
.improvement-block.features-list .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.improvement-block.features-list .feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.improvement-block.features-list .feature-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(58, 54, 224, 0.1);
}

[dir="rtl"] .improvement-block.features-list .feature-item:hover {
    transform: translateX(-5px);
}

.improvement-block.features-list .feature-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3a36e0, #6c63ff);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.improvement-block.features-list .feature-text {
    font-size: 0.95rem;
    color: var(--text-secondary-light, #555);
    line-height: 1.6;
}

/* Stats Block */
.improvement-block.stats {
    background: linear-gradient(135deg, #3a36e0 0%, #6c63ff 100%);
    color: white;
    border-left-color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

[dir="rtl"] .improvement-block.stats {
    border-right-color: rgba(255, 255, 255, 0.3);
}

.improvement-block.stats .block-title {
    color: white;
    justify-content: center;
}

.improvement-block.stats .block-title i {
    color: rgba(255, 255, 255, 0.8);
}

.improvement-block.stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.improvement-block.stats .stat-item {
    text-align: center;
}

.improvement-block.stats .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.improvement-block.stats .stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Dark Mode Styles */
body.dark-mode .improvements-section {
    background-color: var(--bg-card-dark, #1e1e1e);
}

body.dark-mode .improvements-section .section-title {
    color: var(--text-primary-dark, #e0e0e0);
}

body.dark-mode .improvements-section .section-intro {
    color: var(--text-secondary-dark, #b0b0b0);
}

body.dark-mode .improvement-block {
    background: linear-gradient(135deg, #252525 0%, #1e1e1e 100%);
    border-left-color: #6c63ff;
}

[dir="rtl"] body.dark-mode .improvement-block {
    border-right-color: #6c63ff;
}

body.dark-mode .improvement-block::before {
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05) 0%, transparent 100%);
}

body.dark-mode .improvement-block .block-title {
    color: var(--text-primary-dark, #e0e0e0);
}

body.dark-mode .improvement-block .block-content {
    color: var(--text-secondary-dark, #b0b0b0);
}

body.dark-mode .improvement-block.image-only {
    background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
}

body.dark-mode .improvement-block.image-only .image-caption {
    color: var(--text-secondary-dark, #999);
}

body.dark-mode .improvement-block.features-list .feature-item {
    background: #2a2a2a;
}

body.dark-mode .improvement-block.features-list .feature-text {
    color: var(--text-secondary-dark, #b0b0b0);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .improvements-section {
        padding: 2rem;
    }

    .improvement-block.text-image {
        grid-template-columns: 1fr;
    }

    .improvement-block.text-image.image-left .block-image {
        order: 0;
    }

    .improvement-block.before-after .comparison-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .improvements-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .improvements-section .section-title {
        font-size: 1.6rem;
    }

    .improvements-section .section-intro {
        font-size: 1rem;
    }

    .improvement-block {
        padding: 1.5rem;
    }

    .improvement-block .block-title {
        font-size: 1.2rem;
    }

    .improvement-block .block-content {
        font-size: 1rem;
    }

    .improvement-block.stats .stat-value {
        font-size: 2rem;
    }

    .improvement-block.features-list .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .improvements-section {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .improvements-section .section-title {
        font-size: 1.4rem;
    }

    .improvement-block {
        padding: 1.25rem;
        border-left-width: 3px;
    }

    [dir="rtl"] .improvement-block {
        border-right-width: 3px;
    }

    .improvement-block.stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Animation on scroll */
.improvement-block {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.improvement-block:nth-child(1) {
    animation-delay: 0.1s;
}

.improvement-block:nth-child(2) {
    animation-delay: 0.2s;
}

.improvement-block:nth-child(3) {
    animation-delay: 0.3s;
}

.improvement-block:nth-child(4) {
    animation-delay: 0.4s;
}

.improvement-block:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}