/* Arabic Storybook Styles */

.stories-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 80px);
    /* Account for header height */
}

.stories-header {
    text-align: center;
    margin-bottom: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.stories-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stories-header p {
    font-size: 1.3rem;
    color: #666;
}

.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.story-card {
    background: white;
    border-radius: 25px;
    padding: 35px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.story-card:hover::before {
    opacity: 0.1;
}

.story-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.story-card>* {
    position: relative;
    z-index: 1;
}

.story-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.story-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
}

.story-arabic {
    font-size: 2rem;
    font-family: 'Traditional Arabic', 'Arabic Typesetting', Arial, sans-serif;
    color: #764ba2;
    margin: 15px 0;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 8px;
}

.story-arabic:hover {
    background: rgba(118, 75, 162, 0.1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(118, 75, 162, 0.3);
}

.story-desc {
    font-size: 1rem;
    color: #666;
    margin-top: 10px;
}

/* Story Page Styles */
.story-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    background: white;
    min-height: 100vh;
}

.story-content {
    background: white;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.story-title {
    text-align: center;
    margin-bottom: 40px;
}

.story-title h1 {
    font-size: 2.5rem;
    color: #764ba2;
    margin-bottom: 10px;
}

.story-title .arabic-title {
    font-size: 3rem;
    font-family: 'Traditional Arabic', 'Arabic Typesetting', Arial, sans-serif;
    color: #667eea;
    margin-bottom: 20px;
}

.story-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.story-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.story-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.story-btn:active {
    transform: translateY(0);
}

.story-btn.playing {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.story-text {
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 20px;
    border-left: 5px solid #764ba2;
}

.arabic-text {
    font-size: 1.6rem;
    line-height: 2.5;
    direction: rtl;
    text-align: right;
    font-family: 'Traditional Arabic', 'Arabic Typesetting', Arial, sans-serif;
    color: #333;
    margin-bottom: 30px;
}

.finnish-text {
    font-size: 1.3rem;
    line-height: 2;
    color: #555;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px dashed #ddd;
}

.story-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    gap: 15px;
}

.nav-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.05);
}

.back-to-stories {
    text-align: center;
    margin-top: 30px;
}

.back-to-stories a {
    color: #764ba2;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.back-to-stories a:hover {
    color: #667eea;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .story-grid {
        grid-template-columns: 1fr;
    }

    .story-content {
        padding: 30px 20px;
    }

    .arabic-text {
        font-size: 1.4rem;
    }

    .finnish-text {
        font-size: 1.1rem;
    }
}