/* css/news.css */
/* News Page Specific Styles */

.news-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 80px 20px 60px;
    margin-top: 70px;
}

.news-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.news-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.news-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* News Tabs */
.news-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 1rem;
}

.news-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
    text-decoration: none;
}

.news-tab i {
    font-size: 1rem;
}

.news-tab:hover {
    color: var(--primary-color);
    background: rgba(135, 188, 212, 0.1);
}

.news-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(135, 188, 212, 0.3);
}

/* Featured News Section */
.featured-news {
    margin-bottom: 3rem;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
}

.featured-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #dc3545;
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

.featured-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-source {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.source-name {
    color: var(--primary-color);
    font-weight: 600;
}

.featured-date {
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.featured-title {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-description {
    color: var(--gray-700);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.8rem;
}

.news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(135, 188, 212, 0.2);
}

.news-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.news-card-content {
    padding: 1.2rem;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    font-size: 0.7rem;
}

.news-card-source {
    color: var(--primary-color);
    font-weight: 600;
}

.news-card-date {
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-description {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid var(--gray-200);
}

.read-more-small {
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s;
}

.read-more-small:hover {
    gap: 0.5rem;
}

.share-icon {
    color: var(--gray-400);
    cursor: pointer;
    transition: color 0.3s;
}

.share-icon:hover {
    color: var(--primary-color);
}

/* Loading Spinner */
.news-loader {
    text-align: center;
    padding: 3rem;
}

.news-loader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-news {
    text-align: center;
    padding: 4rem;
    background: var(--white);
    border-radius: 20px;
}

.empty-news i {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.empty-news h3 {
    font-size: 1.3rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-news p {
    color: var(--gray-500);
}

/* Newsletter Section */
.newsletter-section {
    margin-top: 4rem;
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 24px;
    text-align: center;
    color: white;
}

.newsletter-section h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.newsletter-section p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0.5rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 30px;
    font-size: 0.9rem;
    outline: none;
}

.newsletter-form button {
    padding: 0.8rem 1.5rem;
    background: var(--gray-900);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-form button:hover {
    background: var(--gray-800);
    transform: translateY(-2px);
}

/* Toast Notification */
.public-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.public-toast.error {
    background: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modal Styles */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.news-modal.active {
    display: flex;
}

.modal-content {
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    background: white;
    border-radius: 24px;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: sticky;
    top: 10px;
    right: 20px;
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    margin: 10px;
    z-index: 10;
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.modal-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
}

/* Dark Mode Styles */
body.dark-mode .news-card,
body.dark-mode .featured-card,
body.dark-mode .empty-news {
    background: #1f2937;
}

body.dark-mode .news-card-title,
body.dark-mode .featured-title,
body.dark-mode .modal-title {
    color: #e5e5e5;
}

body.dark-mode .news-card-description,
body.dark-mode .featured-description,
body.dark-mode .modal-description {
    color: #cbd5e1;
}

body.dark-mode .news-card-footer {
    border-top-color: #374151;
}

body.dark-mode .news-tabs {
    border-bottom-color: #374151;
}

body.dark-mode .news-tab {
    color: #9ca3af;
}

body.dark-mode .news-tab.active {
    color: white;
}

body.dark-mode .newsletter-form input {
    background: #1f2937;
    color: #e5e5e5;
}

body.dark-mode .modal-content {
    background: #1f2937;
}

/* Responsive */
@media (max-width: 992px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .news-hero {
        padding: 60px 20px 40px;
        margin-top: 60px;
    }
    
    .news-hero h1 {
        font-size: 1.8rem;
    }
    
    .news-container {
        padding: 2rem 1rem;
    }
    
    .news-tabs {
        gap: 0.5rem;
    }
    
    .news-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    
    .featured-title {
        font-size: 1.2rem;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-section {
        padding: 2rem 1.5rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .news-hero h1 {
        font-size: 1.5rem;
    }
    
    .featured-image {
        height: 200px;
    }
    
    .featured-content {
        padding: 1.2rem;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .modal-image {
        height: 200px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
}