/* Stories Page Styles */
.stories-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    text-align: center;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #1a3e6f;
    position: relative;
}

.page-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: #e63946;
    margin: 1rem auto;
}

.page-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 3rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.story-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.story-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-image {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.5));
}

.story-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.story-content h3 {
    margin-top: 0;
    color: #1a3e6f;
    font-size: 1.4rem;
}

.story-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more {
    align-self: flex-start;
    background: none;
    border: none;
    color: #e63946;
    font-weight: bold;
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #1a3e6f;
}

.read-more .arrow {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.read-more:hover .arrow {
    transform: translateX(5px);
}

/* Modal Styles */
.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #e63946;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-stories {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #1a3e6f;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
}

.modal-body {
    padding: 3rem 2rem;
}

.modal-body h2 {
    color: #1a3e6f;
    margin-top: 0;
}

.modal-body img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 4px;
    margin: 1.5rem 0;
}

.modal-body p {
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

/* RTL Support */
body.rtl .page-title,
body.rtl .page-subtitle {
    direction: rtl;
}

body.rtl .read-more .arrow {
    margin-left: 0;
    margin-right: 0.5rem;
    transform: rotate(180deg);
}

body.rtl .read-more:hover .arrow {
    transform: rotate(180deg) translateX(5px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 1rem auto;
    }
    
    .modal-body {
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .story-content {
        padding: 1rem;
    }
}