/* style/news.css */

/* Variables and general styling */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-color-dark: #333333;
    --text-color-light: #FFFFFF;
    --button-register: #C30808;
    --button-login: #C30808;
    --button-text-yellow: #FFFF00;
    --bg-color-light: #FFFFFF;
    --border-color: #e0e0e0;
}

.page-news {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark); /* Default text color for light backgrounds */
    background-color: var(--bg-color-light); /* Default page background */
}

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

.page-news__section {
    padding: 60px 0;
}

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

.page-news__dark-section .page-news__section-title,
.page-news__dark-section .page-news__subsection-title {
    color: var(--text-color-light);
}

.page-news__dark-section .page-news__text-block a,
.page-news__dark-section .page-news__list-item a {
    color: var(--button-text-yellow); /* Links in dark sections */
}

.page-news__light-bg {
    background-color: var(--bg-color-light);
    color: var(--text-color-dark);
}

.page-news__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
}

.page-news__subsection-title {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-news__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-news__text-block a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-news__list {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.page-news__list-item {
    margin-bottom: 10px;
}

.page-news__list-item strong {
    color: var(--primary-color);
}

/* Hero Section */
.page-news__hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
}

.page-news__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.page-news__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
    z-index: 2;
}

.page-news__hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    padding: 20px;
    color: var(--text-color-light);
}

.page-news__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--text-color-light);
}

.page-news__hero-description {
    font-size: 1.5em;
    margin-bottom: 30px;
    line-height: 1.5;
}

.page-news__hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.page-news__btn-primary,
.page-news__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
}

.page-news__btn-primary {
    background-color: var(--button-register); /* Specific color for register/login */
    color: var(--button-text-yellow); /* Specific text color */
    border: 2px solid var(--button-register);
}

.page-news__btn-primary:hover {
    background-color: #AE0707; /* Darken on hover */
    border-color: #AE0707;
}

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

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

/* Call to Action Buttons Group */
.page-news__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* Images */
.page-news__image-full {
    width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Product Grid */
.page-news__product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.page-news__product-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    color: var(--text-color-dark);
}

.page-news__product-image {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover;
    margin-bottom: 15px;
    display: block; /* Ensure it behaves like a block element */
}

.page-news__product-title {
    font-size: 1.4em;
    margin-bottom: 10px;
    color: var(--primary-color);
    padding: 0 15px;
}

.page-news__product-title a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.page-news__product-description {
    font-size: 0.95em;
    color: var(--text-color-dark);
    padding: 0 15px;
}

/* FAQ Section */
.page-news__faq-list {
    margin-top: 30px;
}

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

.page-news__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

.page-news__faq-question:hover {
    background-color: #f0f0f0;
}

.page-news__faq-question h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--primary-color);
}

.page-news__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-news__faq-item.active .page-news__faq-toggle {
    transform: rotate(0deg); /* No rotation for '-' */
}

.page-news__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: var(--secondary-color);
    color: var(--text-color-dark);
}

.page-news__faq-item.active .page-news__faq-answer {
    max-height: 1000px !important; /* Sufficient height for content */
    padding: 15px 25px;
}

.page-news__faq-answer p {
    margin: 0;
    padding-bottom: 10px; /* Adjust as needed */
    font-size: 1em;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-news__hero-title {
        font-size: 2.8em;
    }
    .page-news__hero-description {
        font-size: 1.3em;
    }
    .page-news__section-title {
        font-size: 2em;
    }
    .page-news__subsection-title {
        font-size: 1.6em;
    }
}

@media (max-width: 768px) {
    .page-news {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-news__container {
        padding: 0 15px; /* Adjust padding for smaller screens */
    }

    .page-news__hero-section {
        min-height: 400px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    }

    .page-news__hero-title {
        font-size: 2.2em;
    }
    .page-news__hero-description {
        font-size: 1.1em;
    }
    .page-news__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .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;
        padding: 12px 20px; /* Adjust padding for smaller buttons */
    }

    .page-news__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-news__subsection-title {
        font-size: 1.4em;
    }

    .page-news__text-block,
    .page-news__list-item,
    .page-news__product-description,
    .page-news__faq-answer p {
        font-size: 1em;
    }

    /* Images responsiveness */
    .page-news img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        object-fit: cover !important; /* Ensure images maintain aspect ratio if needed */
    }

    .page-news__section,
    .page-news__card,
    .page-news__container,
    .page-news__product-card {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-news__product-grid {
        grid-template-columns: 1fr;
    }
    .page-news__product-image {
        height: 250px; /* Adjust height for mobile */
    }

    .page-news__faq-question {
        padding: 15px 20px;
    }
    .page-news__faq-question h3 {
        font-size: 1.1em;
    }
    .page-news__faq-toggle {
        font-size: 1.5em;
    }
    .page-news__faq-answer {
        padding: 0 20px;
    }
    .page-news__faq-item.active .page-news__faq-answer {
        padding: 15px 20px;
    }

    .page-news__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px; /* Ensure buttons also have padding */
    }
}

@media (max-width: 480px) {
    .page-news__hero-title {
        font-size: 1.8em;
    }
    .page-news__hero-description {
        font-size: 1em;
    }
    .page-news__section-title {
        font-size: 1.5em;
    }
    .page-news__subsection-title {
        font-size: 1.2em;
    }
}

/* Ensure no image filters are used */
.page-news img {
    filter: none !important;
}

/* Specific button styles for Register/Login */
.page-news__btn-register {
    background-color: var(--button-register);
    color: var(--button-text-yellow);
    border: 2px solid var(--button-register);
}
.page-news__btn-register:hover {
    background-color: #AE0707;
    border-color: #AE0707;
}
.page-news__btn-login {
    background-color: var(--button-login);
    color: var(--button-text-yellow);
    border: 2px solid var(--button-login);
}
.page-news__btn-login:hover {
    background-color: #AE0707;
    border-color: #AE0707;
}

/* Ensure content area images are not too small */
/* Any img within .page-news should be at least 200px wide/high for display */
.page-news img:not(.page-news__hero-image) { /* Exclude hero image as it's full width */
    min-width: 200px;
    min-height: 200px;
}
/* Override specific smaller elements if they become img */
.page-news__product-image {
    min-width: 280px;
    min-height: 200px;
}
/* For any img directly in text-block or list-item, ensure minimum size */
.page-news__text-block img,
.page-news__list-item img {
    min-width: 200px;
    min-height: 200px;
}

/* Color contrast fixes */
.page-news__contrast-fix {
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #e0e0e0 !important;
}

.page-news__text-contrast-fix {
  color: #333333 !important;
  text-shadow: none !important;
}