/* Success Stories Enhanced Styling */

.success-story-card {
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

/* Logo Container - Fixed Size */
.story-logo {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
}

.story-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

.success-story-card:hover .story-logo img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Content */
.story-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-client-name {
    font-size: 22px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 60px;
}

.story-project-description {
    font-size: 15px;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
    flex: 1;
}

.story-achievements {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.7;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Metrics */
.story-metrics {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #fff;
}

.metric-item:last-child {
    margin-bottom: 0;
}

.metric-label {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.95;
    white-space: nowrap;
    margin-right: 15px;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* LTR/RTL Text Alignment */
.story-content,
.story-client-name,
.story-project-description,
.story-achievements {
    text-align: center;
}

[dir="rtl"] .story-achievements {
    border-left: none;
    border-right: 4px solid #667eea;
}

[dir="rtl"] .metric-label {
    margin-right: 0;
    margin-left: 15px;
}

/* Dark Mode Support */
body.dark-mode .success-story-card {
    background: rgba(30, 30, 30, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .success-story-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .story-logo {
    background: rgba(40, 40, 40, 0.8);
}

body.dark-mode .story-client-name {
    color: #fff;
}

body.dark-mode .story-project-description {
    color: #ccc;
}

body.dark-mode .story-achievements {
    background: rgba(40, 40, 40, 0.8);
    color: #ddd;
}

/* Responsive Design */
@media (max-width: 991px) {
    .success-stories-area {
        padding: 60px 0;
    }

    .story-logo {
        height: 100px;
    }

    .story-client-name {
        font-size: 20px;
        min-height: auto;
    }

    .story-project-description {
        font-size: 14px;
    }

    .metric-label {
        font-size: 12px;
    }

    .metric-value {
        font-size: 14px;
    }
}

@media (max-width: 767px) {
    .success-stories-area {
        padding: 50px 0;
    }

    .success-story-card {
        padding: 20px;
    }

    .story-logo {
        height: 80px;
        margin-bottom: 20px;
    }

    .story-client-name {
        font-size: 18px;
        min-height: auto;
    }

    .story-project-description,
    .story-achievements {
        font-size: 13px;
    }

    .metric-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 12px 15px;
    }

    .metric-label {
        margin-right: 0;
        margin-left: 0;
    }
}

/* Success Stories Section Enhancement */
.success-stories-area {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.success-stories-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    z-index: 0;
}

.success-stories-area .container {
    position: relative;
    z-index: 1;
}

/* Grid Layout Enhancement */
.success-stories-area .row {
    display: flex;
    flex-wrap: wrap;
    margin: -15px;
    margin-right: -15px;
    padding: 15px;
}

.success-stories-area .row > [class*="col-"] {
    display: flex;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 768px) {
    .success-stories-area .row > .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767px) {
    .success-stories-area .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
