:root {
    --primary-color: #1A202C; /* Deep Charcoal/Black */
    --secondary-color: #FFD700; /* Gold */
    --text-color-dark-bg: #ffffff;
    --text-color-light-bg: #333333;
    --background-dark: #121212; /* From shared.css body */
    --card-background-dark-bg: rgba(255, 255, 255, 0.08);
    --border-color-dark-bg: rgba(255, 255, 255, 0.15);
}

/* Base styles for the news page */
.page-news {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark-bg); /* Default text color for dark body background */
    background-color: var(--background-dark); /* Inherited from body, but explicitly set for clarity */
    padding-top: 120px; /* Adjust for fixed header */
}

.page-news__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.page-news__hero-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d0d0d 100%);
    color: var(--text-color-dark-bg);
    padding-top: 10px; /* Specific padding for hero section to avoid header overlap */
}

.page-news__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    font-weight: bold;
    line-height: 1.2;
}

.page-news__description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #e0e0e0;
}

.page-news__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
}

.page-news__btn-primary {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.page-news__btn-primary:hover {
    background: hsl(45, 100%, 40%); /* Darken gold */
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-news__btn-secondary {
    background: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.page-news__btn-secondary:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Section Titles */
.page-news__section-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 25px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.page-news__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px auto;
    color: #cccccc;
}

.page-news__sub-title {
    font-size: 2em;
    color: var(--secondary-color);
    margin-top: 40px;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
}

.page-news__text-block {
    margin-bottom: 20px;
    font-size: 1.05em;
    line-height: 1.7;
    color: #e0e0e0;
}

/* Categories Section */
.page-news__categories-section {
    padding: 60px 0;
    background-color: #1A202C;
    color: var(--text-color-dark-bg);
}

.page-news__category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__category-card {
    background: var(--card-background-dark-bg);
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color-dark-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color-dark-bg);
}

.page-news__category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background-color: rgba(255, 255, 255, 0.12);
}

.page-news__category-image {
    width: 100%;
    max-width: 300px; /* Ensure images are not tiny */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-news__category-title {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.page-news__category-excerpt {
    font-size: 0.95em;
    color: #cccccc;
}

/* Latest Articles Section */
.page-news__latest-articles-section {
    padding: 80px 0;
    background-color: var(--background-dark);
    color: var(--text-color-dark-bg);
}

.page-news__article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__article-card {
    background: var(--card-background-dark-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color-dark-bg);
}

.page-news__article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.page-news__article-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.page-news__article-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

.page-news__article-content {
    padding: 20px;
}

.page-news__article-category {
    display: inline-block;
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 10px;
}

.page-news__article-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--secondary-color);
    line-height: 1.4;
}

.page-news__article-excerpt {
    font-size: 0.95em;
    color: #cccccc;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit excerpt to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-news__article-date {
    font-size: 0.85em;
    color: #999999;
    display: block;
    text-align: right;
}

.page-news__view-more-cta {
    text-align: center;
    margin-top: 50px;
}

/* About ibet188 Section */
.page-news__about-ibet188-section {
    padding: 80px 0;
    background-color: #1A202C;
    color: var(--text-color-dark-bg);
}

/* Final CTA Section */
.page-news__final-cta-section {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(45deg, #0d0d0d 0%, var(--primary-color) 100%);
    color: var(--text-color-dark-bg);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__main-title {
        font-size: 2.8em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__sub-title {
        font-size: 1.8em;
    }
    .page-news__article-title {
        font-size: 1.2em;
    }
}

@media (max-width: 768px) {
    .page-news {
        padding-top: 100px !important; /* Mobile fixed header adjustment */
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__hero-section,
    .page-news__categories-section,
    .page-news__latest-articles-section,
    .page-news__about-ibet188-section,
    .page-news__final-cta-section {
        padding: 40px 0;
    }
    .page-news__main-title {
        font-size: 2.2em;
    }
    .page-news__description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .page-news__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-news__sub-title {
        font-size: 1.6em;
        margin-top: 30px;
        margin-bottom: 15px;
    }
    .page-news__category-grid,
    .page-news__article-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-news__category-card {
        padding: 20px;
    }
    .page-news__category-image {
        max-width: 100%;
    }
    .page-news__article-image {
        height: 180px;
    }
    /* Ensure all images are responsive */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__hero-section .page-news__container,
    .page-news__categories-section .page-news__container,
    .page-news__latest-articles-section .page-news__container,
    .page-news__about-ibet188-section .page-news__container,
    .page-news__final-cta-section .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .page-news__main-title {
        font-size: 1.8em;
    }
    .page-news__section-title {
        font-size: 1.6em;
    }
    .page-news__cta-button {
        font-size: 0.9em;
        padding: 10px 20px;
    }
    .page-news__article-title {
        font-size: 1.1em;
    }
}