:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --text-dark: #333333;
    --text-light: #ffffff;
    --button-register: #C30808;
    --button-login: #C30808;
    --button-text-yellow: #FFFF00;
    --border-light: #e0e0e0;
    --background-light-grey: #f9f9f9;
}

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

/* Fixed header spacing for desktop */
.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), var(--secondary-color));
    color: var(--text-dark); /* Default for hero content on gradient background */
}

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

.page-about__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.page-about__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    border-radius: 12px;
    object-fit: cover;
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-about__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.85); /* Semi-transparent white background for readability */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-50px); /* Lift content slightly over image */
    margin-bottom: -50px; /* Adjust for lift */
}

.page-about__hero-title {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

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

.page-about__cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-about__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center; /* Ensure text is centered within button */
}

.page-about__btn-register {
    background: var(--button-register);
    color: var(--button-text-yellow);
    border: 2px solid var(--button-register);
}

.page-about__btn-register:hover {
    background: #a90707; /* Darken for hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-about__btn-login {
    background: var(--button-login);
    color: var(--button-text-yellow);
    border: 2px solid var(--button-login);
}

.page-about__btn-login:hover {
    background: #a90707; /* Darken for hover */
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.page-about__section {
    padding: 80px 20px;
    text-align: center;
}

.page-about__container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.page-about__section-title {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

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

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

.page-about__dark-section .page-about__section-title,
.page-about__dark-section .page-about__section-description,
.page-about__dark-section .page-about__sub-title,
.page-about__dark-section .page-about__text-block p,
.page-about__dark-section .page-about__list li,
.page-about__dark-section .page-about__timeline-year,
.page-about__dark-section .page-about__timeline-item p,
.page-about__dark-section .page-about__feature-title,
.page-about__dark-section .page-about__feature-item p {
    color: var(--text-light);
}

.page-about__content-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    text-align: left;
}

.page-about__content-grid--reverse {
    flex-direction: row-reverse;
}

.page-about__text-block {
    flex: 1;
}

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

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

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

.page-about__dark-section .page-about__sub-title {
    color: var(--text-light);
}

.page-about__list {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.page-about__list li {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.page-about__dark-section .page-about__list li {
    color: var(--text-light);
}

.page-about__timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 20px 0;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.page-about__timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--text-light);
    transform: translateX(-50%);
}

.page-about__timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 50%;
    padding: 10px 20px;
    box-sizing: border-box;
}

.page-about__timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 40px;
}

.page-about__timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 40px;
}

.page-about__timeline-item::before {
    content: '';
    position: absolute;
    top: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-light);
    border: 2px solid var(--primary-color);
    z-index: 1;
}

.page-about__timeline-item:nth-child(odd)::before {
    right: -6px;
}

.page-about__timeline-item:nth-child(even)::before {
    left: -6px;
}

.page-about__timeline-year {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-light);
}

.page-about__timeline-item p {
    font-size: 1em;
    color: var(--text-light);
}

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

.page-about__game-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-about__game-card p {
    color: var(--text-dark);
}

.page-about__image-full-width {
    width: 100%;
    margin-top: 40px;
}

.page-about__image-full-width img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px; /* Enforce minimum size */
}

.page-about__btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 30px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 2px solid var(--primary-color);
}

.page-about__btn-primary:hover {
    background: #005a2e; /* Darken for hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-about__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 30px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 2px solid var(--primary-color);
}

.page-about__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-about__feature-item {
    background: rgba(255, 255, 255, 0.1); /* Light background on dark section */
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    color: var(--text-light);
}

.page-about__feature-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-light);
}

.page-about__feature-item p {
    color: var(--text-light);
}

/* FAQ Section */
.page-about__faq-section {
    background-color: var(--background-light-grey);
    padding: 80px 20px;
}

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

.page-about__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--secondary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.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;
    color: var(--text-dark);
}

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

.page-about__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: var(--secondary-color);
    border: 1px solid var(--border-light);
    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: 1.1em;
    font-weight: 600;
    line-height: 1.5;
    color: var(--primary-color);
    pointer-events: none; /* Prevent h3 from blocking click event */
}

.page-about__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent 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(--primary-color);
    transform: rotate(45deg); /* Change to 'X' or other visual */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__hero-title {
        font-size: 2.2em;
    }
    .page-about__hero-description {
        font-size: 1em;
    }
    .page-about__section-title {
        font-size: 2em;
    }
    .page-about__content-grid {
        flex-direction: column;
        gap: 30px;
    }
    .page-about__content-grid--reverse {
        flex-direction: column; /* Also column for reverse on tablet */
    }
    .page-about__timeline::before {
        left: 20px; /* Adjust timeline line position */
    }
    .page-about__timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 50px !important;
        padding-right: 20px !important;
        text-align: left !important;
    }
    .page-about__timeline-item::before {
        left: 14px !important;
        right: auto !important;
    }
    .page-about__image-block img {
        min-width: 200px;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .page-about {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-about__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile specific header offset */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-about__hero-image {
        margin-bottom: 20px;
        border-radius: 8px;
    }
    .page-about__hero-image img {
        border-radius: 8px;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px; /* Maintain minimum size */
        min-height: 200px; /* Maintain minimum size */
    }
    .page-about__hero-content {
        padding: 15px;
        transform: translateY(-30px);
        margin-bottom: -30px;
        border-radius: 8px;
    }
    .page-about__hero-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    .page-about__hero-description {
        font-size: 0.95em;
        margin-bottom: 20px;
    }
    .page-about__cta-group {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        width: 100%; /* Ensure group takes full width */
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box !important;
    }
    .page-about__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 100% !important; /* Force full width for buttons */
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-about__section {
        padding: 40px 15px;
    }
    .page-about__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }
    .page-about__section-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-about__sub-title {
        font-size: 1.3em;
        margin-top: 20px;
        margin-bottom: 10px;
    }
    .page-about__list {
        padding-left: 20px;
    }
    .page-about__image-block img,
    .page-about__image-full-width img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-width: 200px; /* Maintain minimum size */
        min-height: 200px; /* Maintain minimum size */
    }
    .page-about__timeline::before {
        left: 15px;
    }
    .page-about__timeline-item {
        padding-left: 40px !important;
    }
    .page-about__timeline-item::before {
        left: 9px !important;
    }
    .page-about__games-grid,
    .page-about__features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-about__game-card,
    .page-about__feature-item {
        padding: 20px;
    }
    .page-about__game-title {
        font-size: 1.2em;
    }
    .page-about__btn-primary,
    .page-about__btn-secondary {
        padding: 12px 25px;
        font-size: 0.95em;
        margin-top: 20px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* FAQ Mobile Specifics */
    .page-about__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-about__faq-question h3 {
        font-size: 1em;
        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;
    }
}