/* =====================================================
   ملف CSS لصفحة تفاصيل قصة النجاح - تصميم احترافي
   Story Details Page - Professional Design
   ===================================================== */

/* Story Details Page Layout */
.story-details-page {
    padding: 0;
    background: #f8fafc;
    min-height: 100vh;
}

/* Story Hero Section */
.story-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    color: white;
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.story-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    opacity: 0.8;
}

.story-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="30" height="30" patternUnits="userSpaceOnUse"><circle cx="15" cy="15" r="1.5" fill="white" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.4;
}

.story-hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.story-hero h1 {
    font-size: 4rem;
    margin-bottom: 2rem;
    font-weight: 800;
    text-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
    letter-spacing: -0.03em;
    background: linear-gradient(45deg, #ffffff, #f0f9ff, #e0f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1) drop-shadow(0 0 20px rgba(255,255,255,0.3)); }
    100% { filter: brightness(1.1) drop-shadow(0 0 30px rgba(255,255,255,0.5)); }
}

.story-hero .hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
}

.story-hero .story-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.story-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255,255,255,0.2);
    padding: 1rem 1.5rem;
    border-radius: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.story-meta-item:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.story-meta-item i {
    font-size: 1.1rem;
    opacity: 0.9;
    color: #f0f9ff;
}

/* Story Content */
.story-content {
    max-width: 900px;
    margin: -3rem auto 0;
    padding: 5rem 3rem;
    background: white;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.story-image {
    width: 100%;
    max-width: 600px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    margin: 0 auto 4rem;
    display: block;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.story-image:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

.story-text {
    font-size: 1.2rem;
    line-height: 1.9;
    color: #374151;
    margin: 3rem 0;
    text-align: justify;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2.5rem;
    border-radius: 20px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.story-text::first-letter {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    float: right;
    line-height: 1;
    margin: 0 0.5rem 0 0;
    padding: 0.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Story Achievements */
.story-achievements {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem;
    border-radius: 25px;
    margin: 4rem 0;
    border: none;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
}

.story-achievements::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.story-achievements h3 {
    text-align: center;
    margin-bottom: 2.5rem;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    border: none;
    transition: all 0.4s ease;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
}

.achievement-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    background: rgba(255, 255, 255, 1);
}

.achievement-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.achievement-item:hover .achievement-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.achievement-content h4 {
    margin: 0 0 0.75rem 0;
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.achievement-content p {
    margin: 0 0 0.5rem 0;
    color: #4b5563;
    line-height: 1.6;
    font-size: 1rem;
}

.achievement-content p:last-child {
    font-weight: 700;
    color: #059669;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Author Card */
.author-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin: 4rem 0;
    text-align: center;
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    opacity: 0.5;
}

.author-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 2rem;
    display: block;
    border: 5px solid #667eea;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.author-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
}

.author-name {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.author-title {
    color: #4b5563;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s ease;
    font-size: 1rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.share-btn:hover::before {
    left: 100%;
}

.share-btn.facebook {
    background: linear-gradient(135deg, #1877f2, #42a5f5);
}

.share-btn.twitter {
    background: linear-gradient(135deg, #1da1f2, #42a5f5);
}

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25d366, #4caf50);
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

/* Related Stories */
.related-stories {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 4rem 0;
    position: relative;
}

.related-stories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(102,126,234,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.related-story-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 2px solid rgba(102, 126, 234, 0.1);
    position: relative;
    z-index: 2;
}

.related-story-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.related-story-card a {
    text-decoration: none;
    color: inherit;
}

.related-story-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.related-story-card:hover .related-story-image {
    transform: scale(1.05);
}

.related-story-content {
    padding: 2rem;
}

.related-story-title {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    line-height: 1.4;
}

.related-story-author {
    color: #4b5563;
    font-size: 1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .story-hero {
        padding: 5rem 0 4rem;
        min-height: 60vh;
    }
    
    .story-hero h1 {
        font-size: 3rem;
    }
    
    .story-hero .hero-subtitle {
        font-size: 1.2rem;
        padding: 0.75rem 1.5rem;
    }
    
    .story-hero .story-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .story-content {
        padding: 4rem 2rem;
        margin-top: -2rem;
    }
    
    .story-image {
        height: 280px;
    }
    
    .story-text {
        font-size: 1.1rem;
        padding: 2rem;
    }
    
    .story-text::first-letter {
        font-size: 4rem;
    }
    
    .achievement-item {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    .achievement-item:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .share-btn {
        width: 250px;
        justify-content: center;
    }
    
    .author-card {
        padding: 2.5rem;
    }
    
    .author-avatar {
        width: 100px;
        height: 100px;
    }
    
    .author-name {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .story-hero {
        padding: 4rem 0 3rem;
        min-height: 50vh;
    }
    
    .story-hero h1 {
        font-size: 2.5rem;
    }
    
    .story-hero .hero-subtitle {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }
    
    .story-content {
        padding: 3rem 1.5rem;
    }
    
    .story-achievements {
        padding: 2.5rem;
    }
    
    .achievement-item {
        padding: 1.5rem;
    }
    
    .achievement-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .related-story-content {
        padding: 1.5rem;
    }
    
    .author-card {
        padding: 2rem;
    }
    
    .author-avatar {
        width: 90px;
        height: 90px;
    }
}

/* Print Styles */
@media print {
    .story-hero {
        background: white !important;
        color: black !important;
        padding: 1rem 0;
    }
    
    .story-meta-item {
        background: white !important;
        border: 1px solid #ccc !important;
        color: black !important;
    }
    
    .share-buttons {
        display: none;
    }
    
    .related-stories {
        display: none;
    }
    
    .story-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .story-details-page {
        background: #111827;
    }
    
    .story-content {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .story-text {
        color: #d1d5db;
    }
    
    .story-achievements {
        background: #374151;
        border-color: #4b5563;
    }
    
    .achievement-item {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .author-card {
        background: #1f2937;
        color: #f9fafb;
        border-color: #4b5563;
    }
    
    .related-stories {
        background: #111827;
    }
    
    .related-story-card {
        background: #1f2937;
        color: #f9fafb;
        border-color: #4b5563;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .story-hero {
        background: #000;
        color: #fff;
    }
    
    .story-meta-item {
        border: 2px solid #fff;
    }
    
    .achievement-item {
        border-left: 6px solid #1e40af;
    }
    
    .share-btn {
        border: 2px solid #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
