/* Stories Page Styles */
:root {
    --story-primary: #3a0ca3;
    --story-primary-dark: #240046;
    --story-accent: #f72585;
    --story-secondary: #4cc9f0;
    --story-light: #f8f9fa;
    --story-dark: #212529;
    --story-gray: #6c757d;
    --story-light-gray: #e9ecef;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Styles */
body.dark-mode {
    --story-light: #212529;
    --story-dark: #f8f9fa;
    --story-gray: #adb5bd;
    --story-light-gray: #343a40;
}

/* Stories Hero Section */
.stories-hero {
    min-height: 40vh;
    background: linear-gradient(135deg, var(--story-primary), var(--story-primary-dark));
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 0 5%;
}

.stories-hero .hero-content {
    max-width: 600px;
    z-index: 2;
}

.stories-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.stories-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.hero-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Stories Section */
.stories-section {
    padding: 5rem 0;
    background-color: var(--story-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--story-dark);
}

.section-subtitle {
    color: var(--story-gray);
    font-size: 1.125rem;
}

/* Category Filter */
.category-filter {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 800px;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    border: none;
    background-color: var(--story-light-gray);
    color: var(--story-dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover {
    background-color: var(--story-primary);
    color: white;
}

.filter-btn.active {
    background-color: var(--story-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.story-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

body.dark-mode .story-card {
    background-color: var(--story-light);
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(0,0,0,0.02);
}

body.dark-mode .card-header {
    background-color: rgba(255,255,255,0.05);
}

.card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--story-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-date {
    font-size: 0.75rem;
    color: var(--story-gray);
}

.card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.story-card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    position: relative;
}

.story-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--story-dark);
}

.story-excerpt {
    color: var(--story-gray);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.language-toggle {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
}

.lang-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--story-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--story-primary);
}

.card-footer {
    padding: 0 1.5rem 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--story-primary);
    font-weight: 500;
    transition: var(--transition);
}

.read-more:hover {
    gap: 0.75rem;
    color: var(--story-accent);
}

/* Newsletter Section */
.newsletter-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--story-primary), var(--story-primary-dark));
    color: white;
}

.newsletter-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem 3rem;
    color: var(--story-dark);
    box-shadow: var(--shadow-lg);
}

.newsletter-text h2 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.newsletter-text p {
    color: var(--story-gray);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    min-width: 300px;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--story-light-gray);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
}

.newsletter-form button {
    background-color: var(--story-primary);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background-color: var(--story-primary-dark);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stories-hero h1 {
        font-size: 3rem;
    }
    
    .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .stories-hero {
        min-height: 30vh;
        text-align: center;
    }
    
    .stories-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-pattern {
        display: none;
    }
    
    .newsletter-container {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    
    .newsletter-form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stories-hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .filter-group {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
}