/* style/about.css */

/* Base styles for the About page */
.page-about {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Dark text for light background */
    background-color: #ffffff; /* Explicitly set for clarity */
}

/* Hero Section */
.page-about__hero-section {
    position: relative;
    padding: 80px 20px;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #26A9E0; /* Brand primary color for hero background */
    color: #ffffff; /* White text for dark background */
    overflow: hidden; /* Ensure no overflow from images/content */
    min-height: 600px; /* Ensure hero section has a decent height */
    justify-content: center;
}

.page-about__hero-content {
    max-width: 900px;
    margin-bottom: 40px;
    z-index: 1; /* Ensure content is above image */
}

.page-about__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.page-about__hero-description {
    font-size: 1.3em;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

.page-about__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
}

.page-about__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2; /* Subtle background image */
}

/* General Section Styles */
.page-about__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page-about__section-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    color: #26A9E0; /* Primary color for titles on light background */
}

.page-about__dark-bg .page-about__section-title {
    color: #ffffff; /* White for titles on dark background */
}

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

.page-about__text-link {
    color: #26A9E0;
    text-decoration: none;
    font-weight: bold;
}

.page-about__text-link:hover {
    text-decoration: underline;
}

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

/* Intro Section */
.page-about__intro-section {
    background-color: #ffffff;
    color: #333333;
}

/* History Section */
.page-about__history-section {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Values Section */
.page-about__values-section {
    background-color: #f5f5f5; /* Light grey background */
    color: #333333;
}

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

.page-about__value-card {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    color: #333333;
}

.page-about__card-title {
    font-size: 1.5em;
    color: #26A9E0;
    margin-bottom: 15px;
}

.page-about__card-text {
    font-size: 1em;
    color: #555555;
}

/* Products Section */
.page-about__products-section {
    background-color: #26A9E0;
    color: #ffffff;
}

.page-about__game-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 40px 0;
}

.page-about__game-item {
    flex: 0 0 auto;
    width: 200px; /* Fixed width for game items */
    text-align: center;
}

.page-about__game-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.page-about__game-link:hover {
    transform: translateY(-5px);
}

.page-about__game-icon {
    width: 200px; /* Minimum allowed size */
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-width: 200px; /* Enforce minimum size */
    min-height: 200px;
}

.page-about__game-name {
    font-size: 1.1em;
}

/* Technology & Security Section */
.page-about__tech-security-section {
    background-color: #ffffff;
    color: #333333;
}

/* Team Section */
.page-about__team-section {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Responsibility Section */
.page-about__responsibility-section {
    background-color: #f5f5f5;
    color: #333333;
    text-align: center;
}

/* Vision & Mission Section */
.page-about__vision-mission-section {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Contact Section */
.page-about__contact-section {
    background-color: #ffffff;
    color: #333333;
    text-align: center;
}

/* FAQ Section */
.page-about__faq-section {
    background-color: #26A9E0;
    color: #ffffff;
}

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

.page-about__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    color: #ffffff;
}

.page-about__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    list-style: none; /* For details/summary */
}

.page-about__faq-question::-webkit-details-marker {
    display: none; /* Hide default marker for details/summary */
}

.page-about__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.page-about__faq-item[open] .page-about__faq-toggle {
    transform: rotate(45deg); /* Rotate for 'open' state */
}

.page-about__faq-answer {
    padding: 0 20px 20px;
    font-size: 1em;
    color: #f0f0f0;
}

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box; /* Ensure padding is included in width */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow word breaking */
    max-width: 100%; /* Ensure buttons don't overflow */
}

.page-about__btn-primary {
    background-color: #EA7C07; /* Login/CTA orange */
    color: #ffffff;
    border: 2px solid #EA7C07;
}

.page-about__btn-primary:hover {
    background-color: #d46c06;
    border-color: #d46c06;
}

.page-about__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-about__btn-secondary:hover {
    background-color: #ffffff;
    color: #26A9E0;
}

.page-about__light-bg .page-about__btn-primary {
    background-color: #26A9E0; /* Primary color for buttons on light background */
    color: #ffffff;
    border: 2px solid #26A9E0;
}
.page-about__light-bg .page-about__btn-primary:hover {
    background-color: #1f8ec4;
    border-color: #1f8ec4;
}

.page-about__light-bg .page-about__btn-secondary {
    background-color: transparent;
    color: #26A9E0;
    border: 2px solid #26A9E0;
}
.page-about__light-bg .page-about__btn-secondary:hover {
    background-color: #26A9E0;
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__hero-title {
        font-size: 2.8em;
    }
    .page-about__section-title {
        font-size: 2em;
    }
    .page-about__values-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

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

    .page-about__hero-section {
        padding: 60px 15px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
    }

    .page-about__hero-content {
        margin-bottom: 30px;
    }

    .page-about__hero-title {
        font-size: 2.2em;
    }

    .page-about__hero-description {
        font-size: 1.1em;
    }

    .page-about__hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-about__btn-primary,
    .page-about__btn-secondary,
    .page-about a[class*="button"],
    .page-about 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;
    }
    
    .page-about__hero-buttons,
    .page-about__button-group,
    .page-about__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        flex-wrap: wrap !important;
        gap: 10px;
    }

    .page-about__container {
        padding: 30px 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

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

    .page-about__text-block {
        font-size: 1em;
    }

    .page-about__values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-about__value-card {
        padding: 25px;
    }

    .page-about__game-list {
        flex-direction: column; /* Stack game items vertically */
        align-items: center;
        gap: 15px;
    }

    .page-about__game-item {
        width: 100%; /* Full width for mobile */
        max-width: 250px; /* Max width for individual items to not stretch too much */
    }

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

    .page-about__section,
    .page-about__card,
    .page-about__container,
    .page-about__video-section,
    .page-about__video-container,
    .page-about__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important; /* Ensure no overflow */
    }
    
    .page-about__faq-question {
        font-size: 1.1em;
        padding: 15px;
    }

    .page-about__faq-answer {
        padding: 0 15px 15px;
    }
}