/* Base styles for the promotions page */
.page-promotions {
    font-family: 'Arial', sans-serif;
    color: #333333; /* Default text color for light background */
    background-color: #f9f9f9; /* Light background for the page */
    line-height: 1.6;
    padding-bottom: 40px;
}

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

/* Hero Section */
.page-promotions__hero-section {
    position: relative;
    padding-top: 10px; /* Small top padding, relying on body padding for header offset */
    margin-bottom: 40px;
    color: #ffffff; /* White text for dark background */
    text-align: center;
    overflow: hidden;
    background-color: #017439; /* Brand primary color as background */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-promotions__hero-image {
    width: 100%;
    max-height: 600px; /* Limit height for hero image */
    overflow: hidden;
    margin-bottom: 20px;
}

.page-promotions__hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Cover the area, may crop sides */
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

.page-promotions__hero-image img:hover {
    transform: scale(1.03);
}

.page-promotions__hero-content {
    position: relative;
    z-index: 1;
    padding: 20px 0 40px;
    max-width: 900px;
    text-align: center;
}

.page-promotions__main-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-promotions__hero-description {
    font-size: 18px;
    margin-bottom: 30px;
    color: #f0f0f0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Section titles and text blocks */
.page-promotions__section {
    padding: 40px 0;
    margin-bottom: 20px;
}

.page-promotions__section-title {
    font-size: 36px;
    font-weight: 700;
    color: #017439; /* Brand primary color for titles */
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.3;
}

.page-promotions__text-block {
    font-size: 17px;
    margin-bottom: 20px;
    text-align: justify;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-promotions__text-link {
    color: #017439;
    text-decoration: underline;
    font-weight: 600;
}

.page-promotions__text-link:hover {
    color: #005a2d;
}

.page-promotions__image-content {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 30px auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* List styles */
.page-promotions__list {
    max-width: 900px;
    margin: 0 auto 30px;
    padding-left: 25px;
    list-style: disc;
}

.page-promotions__list-item {
    font-size: 17px;
    margin-bottom: 10px;
    color: #333333;
}

.page-promotions__list-item strong {
    color: #017439;
}

.page-promotions__guide-list {
    list-style: decimal;
    max-width: 900px;
    margin: 0 auto 30px;
    padding-left: 25px;
}

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

.page-promotions__promo-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-promotions__card-title {
    font-size: 20px;
    font-weight: 600;
    color: #017439;
    padding: 15px 20px 10px;
    line-height: 1.4;
}

.page-promotions__card-text {
    font-size: 15px;
    color: #555555;
    padding: 0 20px 15px;
    flex-grow: 1;
}

.page-promotions__card-button {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    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;
}

/* Buttons */
.page-promotions__btn-primary {
    background: #C30808; /* Register/Login button color */
    color: #ffffff; /* White text for WCAG AA contrast */
    border: 2px solid transparent;
}

.page-promotions__btn-primary:hover {
    background: #a30606;
    color: #ffffff;
}

.page-promotions__btn-secondary {
    background: #ffffff;
    color: #017439; /* Brand primary color */
    border: 2px solid #017439;
}

.page-promotions__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
}

/* Background color sections for contrast */
.page-promotions__light-bg {
    background-color: #f0f0f0;
    color: #333333;
}

.page-promotions__dark-section {
    background-color: #017439;
    color: #ffffff;
}

.page-promotions__dark-section .page-promotions__section-title {
    color: #ffffff;
}

.page-promotions__dark-section .page-promotions__text-block {
    color: #f0f0f0;
}

.page-promotions__dark-section .page-promotions__text-link {
    color: #FFFF00; /* Yellow for links on dark background */
}

.page-promotions__dark-section .page-promotions__text-link:hover {
    color: #fff;
}

/* FAQ styles - using <details> */
details.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  background: #fff;
}
details.page-promotions__faq-item summary.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: background-color 0.3s ease;
}
details.page-promotions__faq-item summary.page-promotions__faq-question::-webkit-details-marker {
  display: none;
}
details.page-promotions__faq-item summary.page-promotions__faq-question:hover {
  background: #f5f5f5;
}
.page-promotions__faq-qtext {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-align: left;
  color: #333333; /* Ensure contrast */
}
.page-promotions__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  color: #666;
  flex-shrink: 0;
  margin-left: 15px;
  width: 28px;
  text-align: center;
}
details.page-promotions__faq-item .page-promotions__faq-answer {
  padding: 0 20px 20px;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
  color: #555555; /* Ensure contrast */
}
details.page-promotions__faq-item .page-promotions__faq-answer p {
    margin-top: 0;
    margin-bottom: 0;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .page-promotions__main-title {
        font-size: 40px;
    }
    .page-promotions__hero-description {
        font-size: 17px;
    }
    .page-promotions__section-title {
        font-size: 32px;
    }
    .page-promotions__text-block,
    .page-promotions__list-item {
        font-size: 16px;
    }
}

@media (max-width: 849px) {
    .page-promotions__hero-image img {
        object-fit: contain !important; /* Prevent cropping on smaller screens */
        aspect-ratio: unset !important; /* Allow natural aspect ratio */
        max-height: 400px; /* Adjust max height for mobile hero */
    }
}

@media (max-width: 768px) {
    .page-promotions {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-promotions__container {
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* HERO Section */
    .page-promotions__hero-section {
        padding-top: 10px; /* Small top padding, not --header-offset */
        margin-bottom: 30px;
    }
    .page-promotions__hero-image {
        margin-bottom: 15px;
        max-height: 300px;
    }
    .page-promotions__hero-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-promotions__hero-content {
        padding: 15px 0 30px;
    }
    .page-promotions__main-title {
        font-size: clamp(28px, 8vw, 38px); /* Clamp for responsive H1 */
        margin-bottom: 15px;
    }
    .page-promotions__hero-description {
        font-size: 15px;
        margin-bottom: 20px;
        padding: 0 10px;
    }
    .page-promotions__hero-cta {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-promotions__btn-primary,
    .page-promotions__btn-secondary,
    .page-promotions a[class*="button"],
    .page-promotions a[class*="btn"] {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* General Section */
    .page-promotions__section {
        padding: 30px 0;
        margin-bottom: 15px;
    }
    .page-promotions__section-title {
        font-size: clamp(24px, 7vw, 30px); /* Clamp for responsive H2 */
        margin-bottom: 20px;
        padding: 0 10px;
    }
    .page-promotions__text-block {
        font-size: 15px;
        margin-bottom: 15px;
        padding: 0 10px;
    }
    .page-promotions__image-content {
        margin: 20px auto;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Lists */
    .page-promotions__list,
    .page-promotions__guide-list {
        margin: 0 auto 20px;
        padding-left: 20px;
        max-width: 100%;
    }
    .page-promotions__list-item {
        font-size: 15px;
        margin-bottom: 8px;
    }

    /* Promo Grid */
    .page-promotions__promo-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
        margin-top: 20px;
        overflow-x: hidden; /* Prevent horizontal scroll */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }
    .page-promotions__promo-card {
        max-width: 100%;
    }
    .page-promotions__card-image {
        height: 180px; /* Adjust card image height */
    }
    .page-promotions__card-title {
        font-size: 18px;
        padding: 12px 15px 8px;
    }
    .page-promotions__card-text {
        font-size: 14px;
        padding: 0 15px 12px;
    }
    .page-promotions__card-button {
        width: calc(100% - 30px);
        margin: 0 15px 15px;
        padding: 10px 15px;
    }

    /* FAQ */
    details.page-promotions__faq-item summary.page-promotions__faq-question { padding: 15px; }
    .page-promotions__faq-qtext { font-size: 15px; }
    details.page-promotions__faq-item .page-promotions__faq-answer { padding: 0 15px 15px; }

    /* CTA Buttons group */
    .page-promotions__cta-buttons {
        flex-direction: column;
        gap: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 15px;
    }
}