/* Success Stories Cards - Main Styles */

/* Import Arabic fonts */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

/* Container */
.success-stories-container {
    display: grid;
    gap: 30px;
    padding: 20px;
    direction: rtl;
    font-family: 'Tajawal', Arial, sans-serif;
}

.success-stories-container.columns-1 {
    grid-template-columns: 1fr;
}

.success-stories-container.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.success-stories-container.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.success-stories-container.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Responsive */
@media (max-width: 1200px) {
    .success-stories-container.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .success-stories-container.columns-3,
    .success-stories-container.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .success-stories-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
        padding: 15px;
    }
}

/* Card Base Styles */
.success-story-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f1f5f9;
    padding: 0;
    text-align: right;
    width: var(--card-width, 350px);
    height: var(--card-height, auto);
    min-height: var(--card-min-height, 400px);
    display: flex;
    flex-direction: column;
}

.success-story-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
}

/* Featured Card */
.success-story-card.featured-card {
    border: 2px solid #fbbf24;
}

.success-story-card.featured-card:hover {
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
}

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.3);
}

/* Card Image */
.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8fafc;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.success-story-card:hover .card-image img {
    transform: scale(1.05);
}

.placeholder-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
    font-size: 14px;
}

.placeholder-image .dashicons {
    font-size: 40px;
    margin-bottom: 10px;
}

/* Star Rating */
.star-rating {
    padding: 15px 20px 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.star-rating .star {
    font-size: 18px;
    margin: 0 1px;
    text-shadow: 0 1px 3px rgba(251, 191, 36, 0.3);
    transition: all 0.2s ease;
}

.star-rating .star.filled {
    color: #fbbf24;
}

.star-rating .star.empty {
    color: #e2e8f0;
}

.star-rating .rating-text {
    font-size: 12px;
    color: #64748b;
    margin-right: 8px;
    font-weight: 500;
}

/* Story Title */
.story-title {
    padding: 0 20px 15px;
    text-align: center;
}

.story-title h3 {
    font-size: 19px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.5;
    font-family: 'Tajawal', Arial, sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Story Description */
.story-description {
    padding: 0 20px 20px;
    text-align: right;
    flex: 1;
}

.story-description p {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
    margin: 0;
    font-family: 'Tajawal', Arial, sans-serif;
    font-weight: 400;
}

/* Statistics Grid */
.statistics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 20px 15px;
}

.stat-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #6b7280;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.stat-box:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 8px;
    font-family: 'Tajawal', Arial, sans-serif;
}

/* كلاس مخصص لتسميات البطاقات - لون أسود واضح */
.stat-label2 {
    font-size: 14px;
    color: #000000;
    font-weight: 600;
    font-family: 'Tajawal', Arial, sans-serif;
}

/* كلاس مخصص للنصوص الداخلية في البطاقة لضمان اللون الأسود */
.card-text-black {
    color: #000000 !important;
    font-weight: 600;
}

/* ===== COMPLETED PROJECTS SECTION ===== */

/* Projects Section Container */
.completed-projects-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    direction: rtl;
    font-family: 'Tajawal', Arial, sans-serif;
}

/* Projects Header */
.projects-header {
    text-align: center;
    margin-bottom: 40px;
}

.projects-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 15px;
    line-height: 1.2;
}

.projects-subtitle {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Projects Filter */
.projects-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Tajawal', Arial, sans-serif;
    outline: none;
}

.filter-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #f59e0b;
    color: white;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.projects-grid.columns-1 {
    grid-template-columns: 1fr;
}

.projects-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.projects-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.projects-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Project Card */
.project-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f1f5f9;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
/* Hidden state for filtering */
.project-card.hidden {
    display: none !important;
}

.project-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Project Image */
.project-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

/* Project Category Badge */
.project-category {
    position: absolute;
    bottom: 15px;
    right: 15px;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Project Content */
.project-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 10px;
    line-height: 1.3;
}

.project-location {
    font-size: 0.95rem;
    color: #718096;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-icon::before {
    content: "📍";
    font-size: 1rem;
}

.project-description {
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

/* Project Meta */
.project-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
    gap: 15px;
}

.project-year,
.project-capacity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.meta-label {
    font-size: 1.1rem;
}

.meta-value {
    font-weight: 600;
    color: #2d3748;
}

/* Responsive Design for Projects */
@media (max-width: 1200px) {
    .projects-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .projects-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 900px) {
    .projects-grid.columns-3,
    .projects-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-title {
        font-size: 2rem;
    }
    
    .projects-filter {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 600px) {
    .completed-projects-section {
        padding: 30px 15px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .projects-title {
        font-size: 1.8rem;
    }
    
    .projects-subtitle {
        font-size: 1rem;
    }
    
    .projects-filter {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .project-card {
        height: auto;
        min-height: 350px;
    }
    
    .project-image {
        height: 180px;
    }
    
    .project-content {
        padding: 20px;
    }
    
    .project-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Filter Animation */
.project-card {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Loading State */
.projects-loading {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-size: 1.1rem;
}

/* Empty State */
.projects-empty {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.projects-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #4a5568;
}

.projects-empty p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Stat Box Color Variants */
.stat-box.stat-primary {
    border-top-color: #0ea5e9;
}

.stat-box.stat-primary .stat-value {
    color: #111827;
}

.stat-box.stat-secondary {
    border-top-color: #eab308;
}

.stat-box.stat-secondary .stat-value {
    color: #111827;
}

.stat-box.stat-tertiary {
    border-top-color: #22c55e;
}

.stat-box.stat-tertiary .stat-value {
    color: #111827;
}

.stat-box.stat-quaternary {
    border-top-color: #ec4899;
}

.stat-box.stat-quaternary .stat-value {
    color: #111827;
}

/* Customer Info */
.customer-info {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #fafbfc;
    border-top: 1px solid #e5e7eb;
    margin-top: auto;
}

.customer-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
}

.customer-avatar .dashicons {
    color: white;
    font-size: 20px;
}

.customer-avatar .profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.customer-details {
    flex: 1;
    text-align: right;
}

.customer-name {
    font-size: 15px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 5px;
    font-family: 'Tajawal', Arial, sans-serif;
}

.customer-meta {
    font-size: 13px;
    color: #374151;
    font-family: 'Tajawal', Arial, sans-serif;
}

.customer-flag {
    margin-right: 10px;
    flex-shrink: 0;
}

.flag-icon {
    font-size: 20px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
}

/* Featured Card Customer Info */
.success-story-card.featured-card .customer-info {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-top-color: #fbbf24;
}

/* Animation for featured cards */
.success-story-card.featured-card {
    animation: gentle-glow 3s ease-in-out infinite alternate;
}

@keyframes gentle-glow {
    0% {
        box-shadow: 0 4px 20px rgba(251, 191, 36, 0.15);
    }
    100% {
        box-shadow: 0 8px 30px rgba(251, 191, 36, 0.25);
    }
}

/* Single Card Display */
.success-stories-container.single-card-display {
    display: flex;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

.success-stories-container.single-card-display .success-story-card {
    width: 100%;
    max-width: 350px;
}

/* RTL Support */
[dir="rtl"] .success-stories-container,
.success-stories-container {
    direction: rtl;
}

[dir="rtl"] .success-story-card,
.success-story-card {
    text-align: right;
}

/* Print Styles */
@media print {
    .success-story-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .success-story-card.featured-card {
        border: 2px solid #fbbf24;
    }
}
