/* style/news.css */

/* Custom Colors */
:root {
    --qibet-main-color: #11A84E;
    --qibet-secondary-color: #22C768;
    --qibet-card-bg: #11271B;
    --qibet-background: #08160F;
    --qibet-text-main: #F2FFF6;
    --qibet-text-secondary: #A7D9B8;
    --qibet-border: #2E7A4E;
    --qibet-glow: #57E38D;
    --qibet-gold: #F2C14E;
    --qibet-divider: #1E3A2A;
    --qibet-deep-green: #0A4B2C;
    --qibet-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
}

/* Global styles for .page-news scope */
.page-news {
    background-color: var(--qibet-background);
    color: var(--qibet-text-main);
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

.page-news__section-title,
.page-news__hero-title,
.page-news__cta-title {
    color: var(--qibet-gold);
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.page-news__hero-title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--qibet-text-main);
}

.page-news__section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--qibet-text-main);
}

.page-news__section-intro {
    text-align: center;
    max-width: 800px;
    margin: -10px auto 40px auto;
    color: var(--qibet-text-secondary);
    font-size: 1.1em;
}

.page-news p {
    color: var(--qibet-text-secondary);
}

.page-news a {
    color: var(--qibet-gold);
    text-decoration: none;
}

.page-news a:hover {
    text-decoration: underline;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
    max-width: 100%; /* Ensure button adapts to container */
}

.page-news__btn-primary {
    background: var(--qibet-button-gradient);
    color: #ffffff; /* White text for contrast */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-news__btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.page-news__btn-secondary:hover {
    background: var(--qibet-border);
    color: var(--qibet-text-main);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px; /* Small top padding as body handles header offset */
    padding-bottom: 60px;
    overflow: hidden;
    box-sizing: border-box;
}

.page-news__hero-image-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 30px; /* Space between image and content */
}

.page-news__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    min-height: 200px;
}

.page-news__hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 1;
}

.page-news__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--qibet-text-secondary);
}

/* Latest News Section */
.page-news__latest-news-section {
    padding: 60px 0;
    background-color: var(--qibet-card-bg);
    border-top: 1px solid var(--qibet-divider);
    border-bottom: 1px solid var(--qibet-divider);
}

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

.page-news__news-card {
    background-color: var(--qibet-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

.page-news__news-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.page-news__news-card-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--qibet-text-main);
    line-height: 1.3;
    flex-grow: 1;
}

.page-news__news-card-title a {
    color: inherit;
    text-decoration: none;
}

.page-news__news-card-title a:hover {
    color: var(--qibet-gold);
    text-decoration: underline;
}

.page-news__news-card-date {
    font-size: 0.9em;
    color: var(--qibet-text-secondary);
    margin-bottom: 15px;
    display: block;
}

.page-news__news-card-summary {
    font-size: 1em;
    color: var(--qibet-text-secondary);
    margin-bottom: 20px;
}

.page-news__news-card .page-news__btn-secondary {
    align-self: flex-start;
    padding: 8px 18px;
    font-size: 0.9em;
}

.page-news__view-all-button-wrapper {
    text-align: center;
    margin-top: 50px;
}

/* Video Section */
.page-news__video-section {
    padding: 60px 0;
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    margin: 40px auto;
    width: 100%; /* Desktop width */
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
    min-width: 200px;
    min-height: 200px;
}

.page-news__video-description {
    max-width: 800px;
    margin: 20px auto 30px auto;
    font-size: 1.1em;
    color: var(--qibet-text-secondary);
}

.page-news__video-cta {
    margin-top: 20px;
}

/* In-depth Analysis Section */
.page-news__in-depth-section {
    padding: 60px 0;
    background-color: var(--qibet-card-bg);
    border-top: 1px solid var(--qibet-divider);
}

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

.page-news__analysis-card {
    background-color: var(--qibet-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-news__analysis-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.page-news__analysis-card-image {
    width: 100%;
    height: 300px; /* Fixed height */
    object-fit: cover;
    display: block;
    min-width: 200px;
    min-height: 200px;
}

.page-news__analysis-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.page-news__analysis-card-title {
    font-size: 1.4em;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--qibet-text-main);
    line-height: 1.3;
    flex-grow: 1;
}

.page-news__analysis-card-title a {
    color: inherit;
    text-decoration: none;
}

.page-news__analysis-card-title a:hover {
    color: var(--qibet-gold);
    text-decoration: underline;
}

.page-news__analysis-card-date {
    font-size: 0.9em;
    color: var(--qibet-text-secondary);
    margin-bottom: 15px;
    display: block;
}

.page-news__analysis-card-summary {
    font-size: 1em;
    color: var(--qibet-text-secondary);
    margin-bottom: 20px;
}

.page-news__analysis-card .page-news__btn-secondary {
    align-self: flex-start;
    padding: 8px 18px;
    font-size: 0.9em;
}

/* Call to Action Section 2 */
.page-news__cta-section-2 {
    padding: 80px 0;
    background-color: var(--qibet-deep-green);
    text-align: center;
    border-top: 1px solid var(--qibet-border);
    border-bottom: 1px solid var(--qibet-border);
}

.page-news__cta-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.page-news__cta-title {
    color: var(--qibet-text-main);
    margin-bottom: 20px;
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.page-news__cta-description {
    font-size: 1.2em;
    color: var(--qibet-text-secondary);
    margin-bottom: 40px;
}

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* FAQ Section */
.page-news__faq-section {
    padding: 60px 0;
}

.page-news__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__faq-item {
    background-color: var(--qibet-background);
    border: 1px solid var(--qibet-divider);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--qibet-text-main);
    background-color: var(--qibet-card-bg);
    border-bottom: 1px solid var(--qibet-divider);
}

.page-news__faq-item[open] .page-news__faq-question {
    border-bottom: 1px solid var(--qibet-border);
}

.page-news__faq-qtext {
    flex-grow: 1;
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--qibet-gold);
}

.page-news__faq-answer {
    padding: 20px 25px;
    color: var(--qibet-text-secondary);
    font-size: 1em;
}

.page-news__faq-answer p {
    margin-bottom: 0;
}

/* Details/Summary specific styling to hide default marker */
.page-news__faq-item summary {
    list-style: none;
}

.page-news__faq-item summary::-webkit-details-marker {
    display: none;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }
    .page-news__section-title {
        font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    }
}

@media (max-width: 768px) {
    .page-news__container {
        padding: 0 15px;
    }

    .page-news__hero-section,
    .page-news__latest-news-section,
    .page-news__video-section,
    .page-news__in-depth-section,
    .page-news__cta-section-2,
    .page-news__faq-section {
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .page-news__hero-section {
        padding-bottom: 40px;
    }

    .page-news__hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .page-news__hero-description {
        font-size: 1em;
    }

    .page-news__news-grid,
    .page-news__analysis-grid {
        grid-template-columns: 1fr;
    }

    .page-news__news-card-image,
    .page-news__analysis-card-image {
        height: auto;
        min-height: 200px;
        max-height: 300px;
    }

    .page-news__video-wrapper {
        padding-bottom: 56.25% !important; /* 16:9 Aspect Ratio */
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }
    
    .page-news__cta-buttons {
        flex-direction: column !important;
        gap: 15px;
        padding: 0 15px;
    }

    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        padding: 12px 15px !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-news__section-title,
    .page-news__cta-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .page-news__faq-question {
        font-size: 1.1em;
        padding: 15px 20px;
    }

    .page-news__faq-answer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .page-news__hero-section {
        padding-bottom: 30px;
    }

    .page-news__latest-news-section,
    .page-news__video-section,
    .page-news__in-depth-section,
    .page-news__cta-section-2,
    .page-news__faq-section {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .page-news__hero-title {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }

    .page-news__hero-description {
        font-size: 0.9em;
    }

    .page-news__news-card-title,
    .page-news__analysis-card-title {
        font-size: 1.2em;
    }

    .page-news__faq-question {
        font-size: 1em;
    }
}