/* style/news.css */

/* Variables for consistency */
:root {
    --primary-color: #1A237E;
    --secondary-color: #FFD700;
    --text-light: #ffffff;
    --text-dark: #333333;
    --background-dark: #0a0a0a;
    --card-bg-dark-mode: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
    --padding-section: 60px 20px;
}

.page-news {
    font-family: 'Arial', sans-serif;
    color: var(--text-light); /* Body background is dark, so text should be light */
    background-color: var(--background-dark);
    line-height: 1.6;
}

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

.page-news__section {
    padding: var(--padding-section);
    text-align: center;
}

.page-news__dark-section {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__dark-bg {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__section-title {
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.2;
}

.page-news__section-description {
    font-size: 1.1em;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.page-news__hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color); /* Ensure dark background for hero */
}

.page-news__hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    text-align: center;
    padding: 20px;
}

.page-news__hero-title {
    font-size: 3.2em;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 900;
}

.page-news__hero-description {
    font-size: 1.3em;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.page-news__hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: 40px;
}

.page-news__hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure long words break */
    max-width: 100%; /* Ensure button doesn't overflow */
}

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

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

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

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

.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 20px;
    margin-top: 30px;
    max-width: 100%; /* Ensure container doesn't overflow */
    box-sizing: border-box;
    overflow: hidden;
}

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

.page-news__news-card,
.page-news__guide-card {
    background-color: var(--card-bg-dark-mode); /* Semi-transparent white for dark background */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards have equal height */
}

.page-news__news-card img,
.page-news__guide-card img,
.page-news__promo-item img,
.page-news__step-item img {
    width: 100%;
    height: 220px; /* Fixed height for consistent card image display */
    object-fit: cover;
    display: block;
    border-bottom: 1px solid var(--border-color);
}

.page-news__card-content {
    padding: 25px;
    flex-grow: 1; /* Allow content to grow and fill space */
    display: flex;
    flex-direction: column;
}

.page-news__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.3;
    color: var(--secondary-color);
}

.page-news__card-link {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-news__card-link:hover {
    color: var(--text-light);
}

.page-news__card-excerpt {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1; /* Allow excerpt to take available space */
}

.page-news__read-more {
    display: inline-block;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--secondary-color);
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    align-self: flex-start; /* Align to the start of the card content */
}

.page-news__read-more:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Promotions Section */
.page-news__promo-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__promo-item {
    background-color: var(--card-bg-dark-mode);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    text-align: left;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.page-news__promo-description {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Download Guide Section */
.page-news__download-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.page-news__step-item {
    background-color: var(--card-bg-dark-mode);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.page-news__step-item img {
    width: 100%;
    max-width: 250px; /* Smaller max-width for step images */
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
    border: none; /* No border for step images */
    border-radius: 0;
}

.page-news__step-title {
    font-size: 1.3em;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.page-news__step-description {
    font-size: 0.95em;
    color: var(--text-light);
    flex-grow: 1;
}

/* FAQ Section */
.page-news__faq-section {
    text-align: left;
}

.page-news__faq-list {
    max-width: 800px;
    margin: 40px auto 0 auto;
    border-top: 1px solid var(--border-color);
}

.page-news__faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.page-news__faq-question:hover {
    color: var(--text-light);
}

.page-news__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(45deg);
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 15px; /* Initial padding 0 */
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 15px; /* Padding when active */
}

.page-news__faq-answer p {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 0; /* Remove default paragraph margin */
}

/* Final CTA Section */
.page-news__cta-final {
    padding: var(--padding-section);
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-news__text-center {
    text-align: center;
}

/* Video Section */
.page-news__video-section {
    padding: var(--padding-section);
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

.page-news__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    max-width: 900px; /* Max width for video */
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background-color: #000; /* Black background for video area */
}

.page-news__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Ensure it's block for max-width to work */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.2em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__news-card img,
    .page-news__guide-card img,
    .page-news__promo-item img {
        
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-news__hero-section {
        padding-bottom: 40px;
    }
    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.8em;
    }
    .page-news__section-description {
        font-size: 1em;
    }
    .page-news__container {
        padding: 0 15px;
    }
    .page-news__section {
        padding: 40px 15px;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-news__hero-image-wrapper,
    .page-news__news-card,
    .page-news__guide-card,
    .page-news__promo-item,
    .page-news__step-item,
    .page-news__faq-section,
    .page-news__cta-final,
    .page-news__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Buttons responsiveness */
    .page-news__btn-primary,
    .page-news__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        margin: 10px 0 !important; /* Stack buttons vertically */
    }
    .page-news__cta-buttons {
        flex-direction: column !important; /* Stack buttons */
        gap: 10px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }

    /* Card image heights on mobile */
    .page-news__news-card img,
    .page-news__guide-card img,
    .page-news__promo-item img {
        height: auto;
        max-height: 200px; /* Cap max height to avoid overly tall images */
    }

    /* FAQ padding-top adjustment for mobile if hero is not full width/height */
    .page-news__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }

    /* Video responsiveness */
    .page-news__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
        margin-left: auto;
        margin-right: auto;
        padding-bottom: 56.25% !important; /* Keep aspect ratio */
    }

    .page-news__video {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }

    .page-news__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 0.9em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__news-card img,
    .page-news__guide-card img,
    .page-news__promo-item img {
        height: auto;
        
    }
}