:root {
    --primary-color: #017439; /* Main color */
    --secondary-color: #FFFFFF; /* Auxiliary color */
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-text-yellow: #FFFF00;
}

/* Base styles for the page content */
.page-about {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark); /* Default text color for light background */
    background-color: var(--secondary-color); /* Matches body background */
}

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

.page-about__section {
    padding: 60px 0;
    text-align: center;
}

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

.page-about__light-bg {
    background-color: var(--secondary-color);
    color: var(--text-dark);
}

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

.page-about__section-title {
    font-size: 36px;
    margin-bottom: 40px;
    font-weight: bold;
    color: inherit; /* Inherit color from parent section */
}

.page-about__section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--button-register-bg); /* Use a contrasting accent color */
    margin: 15px auto 0;
    border-radius: 2px;
}

.page-about__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color) 50%, #005a2e 100%); /* Darker gradient for hero */
    color: var(--text-light);
    overflow: hidden; /* Prevent image overflow if any */
}

.page-about__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.page-about__hero-image {
    width: 100%;
    margin-bottom: 30px;
}

.page-about__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-about__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 20px;
}

.page-about__hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-light);
}

.page-about__hero-description {
    font-size: 20px;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-about__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.page-about__btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
}

.page-about__btn-primary:hover {
    background: #005a2e; /* Manually darkened */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-about__btn-secondary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin-left: 20px;
}

.page-about__btn-secondary:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Content wrapper for text and image */
.page-about__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}

.page-about__text-block {
    flex: 1;
    padding: 20px;
    line-height: 1.8;
}

.page-about__text-block p {
    margin-bottom: 15px;
    font-size: 16px;
}

.page-about__image-block {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-about__image-block img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-about__introduction .page-about__content-wrapper {
    flex-direction: row;
}

.page-about__commitment .page-about__content-wrapper {
    flex-direction: row;
}

.page-about__responsible-gaming .page-about__content-wrapper {
    flex-direction: row;
}

/* Why Choose Section Grid */
.page-about__features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.page-about__feature-item {
    background-color: var(--secondary-color);
    color: var(--text-dark);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

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

.page-about__feature-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.page-about__feature-item p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
}

.page-about__center-image {
    text-align: center;
    margin-top: 40px;
}

/* FAQ Section */
.page-about__faq-list {
  max-width: 900px;
  margin: 0 auto 40px auto;
  text-align: left;
}

.page-about__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
}

.page-about__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 15px;
  opacity: 0;
}

.page-about__faq-item.active .page-about__faq-answer {
  max-height: 2000px !important; /* 🚨 Using !important ensures priority, value large enough to contain any content */
  padding: 20px 15px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}

.page-about__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-about__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-about__faq-question:active {
  background: #eeeeee;
}

.page-about__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevents h3 from blocking click event */
  color: var(--text-dark);
}

.page-about__faq-toggle {
  font-size: 24px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevents icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.page-about__faq-item.active .page-about__faq-toggle {
  color: var(--button-register-bg); /* Use accent color when active */
  transform: rotate(45deg); /* Example: rotate for 'x' effect */
}

/* Bottom CTA Section */
.page-about__cta-bottom {
    padding: 80px 20px;
    background-color: var(--primary-color);
    color: var(--text-light);
}

.page-about__cta-bottom .page-about__section-title {
    color: var(--text-light);
}

.page-about__cta-bottom p {
    font-size: 18px;
    max-width: 800px;
    margin: 20px auto 40px auto;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.page-about__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__hero-title {
        font-size: 40px;
    }
    .page-about__hero-description {
        font-size: 18px;
    }
    .page-about__section-title {
        font-size: 30px;
    }
    .page-about__content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-about__text-block,
    .page-about__image-block {
        padding: 0;
        width: 100%;
    }
    .page-about__image-block img {
        margin-top: 30px;
    }
    .page-about__features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Mobile header offset */
    .page-about__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-about__hero-image img {
        border-radius: 8px;
    }

    .page-about__hero-title {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .page-about__hero-description {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .page-about__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        margin-top: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-about__btn-secondary {
        margin-left: 0;
        margin-top: 15px;
    }

    .page-about__cta-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px; /* Add padding to container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-about__section {
        padding: 40px 0;
    }

    .page-about__section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    .page-about__content-wrapper {
        gap: 20px;
    }

    .page-about__text-block p {
        font-size: 15px;
    }

    .page-about__image-block img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px; /* Ensure min size is kept */
        min-height: 200px; /* Ensure min size is kept */
        box-sizing: border-box !important;
    }
    
    .page-about__section,
    .page-about__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* FAQ Mobile */
    .page-about__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-about__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-about__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-about__faq-answer {
        padding: 0 15px;
    }
    
    .page-about__faq-item.active .page-about__faq-answer {
        padding: 15px !important;
    }

    .page-about__cta-bottom p {
        font-size: 16px;
        margin-bottom: 30px;
    }
    
    /* Reverse order for some sections on mobile */
    .page-about__reverse-order-mobile {
        flex-direction: column-reverse;
    }
}