/* =========================================
   RAYS NEWS MODULE STYLES
   ========================================= */

/* News Layout */
.news-header-bg {
    background-color: var(--secondary-color);
    padding-top: 100px;
    /* Space for fixed header */
    padding-bottom: 40px;
    color: white;
    text-align: center;
}

.news-header-bg h1 {
    font-size: 3rem;
    font-weight: 800;
}

.news-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    /* Main content + Sidebar */
    gap: 40px;
    padding: 50px 0;
}

/* News Hero (Top Section) */
.news-hero-section {
    grid-column: 1 / -1;
    display: block;
    margin-bottom: 50px;
}

.hero-news-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
    transition: transform 0.3s;
}

.hero-news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-news-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 30px;
    color: white;
}

.news-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hero-news-overlay h2 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-news-overlay .meta {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Secondary Hero Items */
.hero-side-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero-small-card {
    display: flex;
    gap: 15px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.hero-small-card img {
    width: 120px;
    object-fit: cover;
}

.hero-small-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-small-content h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

/* Filter Bar */
.news-filters {
    grid-column: 1 / -1;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
    margin-top: 30px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    background: white;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Main News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    border: 1px solid #f1f5f9;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.news-card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-body {
    padding: 20px;
}

.news-card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--secondary-color);
    line-height: 1.4;
}

.news-card-body p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Sidebar */
.news-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-widget {
    background: white;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #e2e8f0;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-color);
    color: var(--secondary-color);
}

.ad-block {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    border: 1px dashed #cbd5e1;
}

.ad-block img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-label {
    font-size: 0.7rem;
    color: #94a3b8;
    padding: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Featured Partner Widget */
.partner-widget {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
}

.partner-logo-area {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-logo-area img {
    max-height: 50px;
    max-width: 100%;
}

.partner-widget .btn {
    width: 100%;
    margin-top: 15px;
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--accent-color);
    color: white;
}

.newsletter-widget input {
    width: 100%;
    padding: 10px;
    border-radius: 4px;
    border: none;
    margin-bottom: 10px;
}

.newsletter-widget button {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 992px) {
    .news-layout {
        grid-template-columns: 1fr;
    }

    .news-hero-section {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NEWS MODAL STYLES
   ========================================= */

.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.news-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--secondary-color);
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: 0.2s;
}

.modal-close-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: rotate(90deg);
}

.modal-header-img {
    height: 400px;
    width: 100%;
    object-fit: cover;
}

.modal-body {
    padding: 40px;
}

.modal-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
    align-items: center;
}

.modal-category {
    background: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    line-height: 1.2;
    color: var(--secondary-color);
}

.modal-text {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.05rem;
}

.modal-text p {
    margin-bottom: 20px;
}

/* Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (max-width: 768px) {
    .modal-header-img {
        height: 250px;
    }

    .modal-body {
        padding: 25px;
    }

    .modal-title {
        font-size: 1.8rem;
    }
}