/* style/about.css */

/* Custom properties for colors */
:root {
    --primary-color: #11A84E;
    --secondary-color: #22C768;
    --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
    --card-background: #11271B;
    --background-dark: #08160F;
    --text-main: #F2FFF6;
    --text-secondary: #A7D9B8;
    --border-color: #2E7A4E;
    --glow-color: #57E38D;
    --gold-color: #F2C14E;
    --divider-color: #1E3A2A;
    --deep-green: #0A4B2C;
}

/* Base styles for the page-about scope */
.page-about {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-main); /* Light text on dark body background */
    background-color: var(--background-dark); /* Default background for sections */
}

/* Ensure content sections have appropriate padding and max-width */
.page-about__section {
    padding: 60px 0;
    position: relative;
    background-color: var(--background-dark); /* Default background for sections */
}

.page-about__dark-section {
    background-color: var(--card-background); /* Darker background for specific sections */
}

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

.page-about__section-title {
    font-size: 2.5em;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 40px;
    font-weight: bold;
    line-height: 1.2;
}

.page-about__sub-title {
    font-size: 1.8em;
    color: var(--text-main);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.page-about__paragraph,
.page-about__text-block,
.page-about p,
.page-about li {
    font-size: 1.1em;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

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

.page-about li p {
    margin-bottom: 0; /* Prevent double margin for paragraphs inside list items */
}

/* Hero Section */
.page-about__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 10px; /* Small top padding, body handles header offset */
    padding-bottom: 60px; /* Ensure content is not too close to the bottom */
}

.page-about__hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    max-height: 600px; /* Limit hero image height */
}

.page-about__hero-content {
    position: relative; /* Ensure content is above the image but not absolutely positioned over it */
    padding: 40px 20px;
    max-width: 900px;
    margin-top: -80px; /* Pull content up slightly over the image, but still below it in DOM */
    z-index: 1; /* Ensure content is above image if any overlap happens */
    background-color: var(--card-background); /* Dark background for readability */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-about__main-title {
    font-size: clamp(2em, 4vw, 3.5em); /* Use clamp for H1 */
    color: var(--gold-color);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.1;
}

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

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Allow text to break words */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.page-about__btn-primary {
    background: var(--button-gradient);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-about__btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
}

.page-about__btn-secondary {
    background-color: transparent;
    color: var(--text-main); /* Adjusted for contrast on dark backgrounds */
    border: 2px solid var(--text-main); /* Adjusted for contrast on dark backgrounds */
}

.page-about__btn-secondary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.page-about__cta-buttons {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    width: 100%; /* Ensure container takes full width */
    max-width: 100%; /* Ensure container takes full width */
    box-sizing: border-box;
}

.page-about__cta-buttons--center {
    justify-content: center;
}

/* Image with text block */
.page-about__image-text-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-about__image-text-block .page-about__content-image {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-about__image-text-block .page-about__text-content {
    flex: 2;
    min-width: 300px;
}

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

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

.page-about__feature-card:hover {
    transform: translateY(-5px);
}

.page-about__feature-icon {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 5px;
}

.page-about__card-title {
    font-size: 1.5em;
    color: var(--gold-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-about__card-description {
    color: var(--text-secondary);
    font-size: 1em;
}

/* Timeline Section */
.page-about__timeline {
    position: relative;
    max-width: 900px;
    margin: 60px auto;
    padding: 20px 0;
}

.page-about__timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 0;
}

.page-about__timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

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

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

.page-about__timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--gold-color);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

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

.page-about__timeline-year {
    font-size: 1.6em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.page-about__timeline-description {
    font-size: 1em;
    color: var(--text-secondary);
}

.page-about__journey-image {
    margin-top: 40px;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Responsible Gaming */
.page-about__responsible-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
}

.page-about__responsible-text {
    flex: 2;
    min-width: 300px;
}

.page-about__responsible-content .page-about__content-image {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Call to Action section */
.page-about__call-to-action .page-about__container {
    text-align: center;
    padding: 60px 40px;
    border-radius: 10px;
    background: var(--card-background);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.page-about__call-to-action .page-about__section-title {
    color: var(--gold-color);
    margin-bottom: 20px;
}

.page-about__call-to-action .page-about__text-block {
    font-size: 1.15em;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* FAQ Section */
.page-about__faq-section {
    padding-bottom: 80px;
}

.page-about__faq-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

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

.page-about__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    background-color: var(--deep-green);
    color: var(--gold-color);
    transition: background-color 0.3s ease;
    list-style: none; /* For <summary> tag */
}

.page-about__faq-question::-webkit-details-marker { /* For <summary> tag */
    display: none;
}

.page-about__faq-question:hover {
    background-color: var(--primary-color);
}

.page-about__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    color: var(--gold-color);
}

/* General image styling for content images */
.page-about__content-image {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* --- Responsive Design --- */

/* Tablet and smaller desktops */
@media (max-width: 1024px) {
    .page-about__section-title {
        font-size: 2em;
    }

    .page-about__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }

    .page-about__hero-content {
        margin-top: -60px;
        padding: 30px;
    }

    .page-about__image-text-block,
    .page-about__responsible-content {
        flex-direction: column;
        gap: 30px;
    }

    .page-about__timeline::before {
        left: 20px;
    }

    .page-about__timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 20px;
    }

    .page-about__timeline-item::after {
        left: 10px;
    }

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

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

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

    .page-about__container {
        padding: 0 15px;
    }

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

    .page-about__sub-title {
        font-size: 1.5em;
    }

    .page-about__main-title {
        font-size: clamp(1.5em, 6vw, 2.5em) !important; /* Ensure H1 scales down */
    }

    .page-about__hero-content {
        margin-top: -40px;
        padding: 20px;
    }

    .page-about__btn-primary,
    .page-about__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 15px; /* Adjust padding for smaller screens */
    }

    .page-about__cta-buttons {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 15px;
        padding: 0 15px; /* Add horizontal padding to button container */
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Images responsive */
    .page-about img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* Image containers responsive */
    .page-about__hero-section,
    .page-about__mission-vision,
    .page-about__why-choose,
    .page-about__journey-achievements,
    .page-about__responsible-gaming,
    .page-about__join-community,
    .page-about__faq-section,
    .page-about__call-to-action,
    .page-about__feature-card,
    .page-about__image-text-block,
    .page-about__responsible-content,
    .page-about__timeline-item,
    .page-about__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }

    /* Specific padding adjustments for sections that already have container padding */
    .page-about__hero-section,
    .page-about__section {
        padding-left: 0;
        padding-right: 0;
    }

    .page-about__hero-section {
        padding-top: 10px !important; /* body handles --header-offset, this is for visual spacing */
    }

    .page-about__timeline::before {
        left: 20px;
    }

    .page-about__timeline-item {
        padding-left: 60px;
        padding-right: 15px;
        text-align: left;
    }

    .page-about__timeline-item:nth-child(even)::after,
    .page-about__timeline-item::after {
        left: 10px;
    }

    .page-about__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }
    .page-about__faq-answer {
        padding: 0 15px 15px;
    }
}