/* style/about.css */

/* Variables and Base Styles */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --btn-register-bg: #C30808;
    --btn-login-bg: #C30808;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #ffffff;
    --bg-dark-section: #017439; /* Using primary color for dark sections */
    --border-light: #e0e0e0;
}

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

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

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

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

/* Dark background sections for contrast */
.page-about__dark-section {
    background-color: var(--bg-dark-section);
    color: var(--text-light);
}

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

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

/* Hero Section */
.page-about__hero-section {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column; /* Image above text */
    align-items: center;
    justify-content: center;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    padding-bottom: 60px; /* Ensure space below content */
    background-color: var(--bg-light); /* Ensure light background for text content */
}

.page-about__hero-image-wrapper {
    width: 100%;
    overflow: hidden;
    margin-bottom: 30px; /* Space between image and text */
}

.page-about__hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-about__hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    box-sizing: border-box;
    z-index: 1; /* Ensure content is above any potential background layers */
}

.page-about__main-title {
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
}

.page-about__intro-text {
    font-size: 1.15em;
    color: var(--text-dark);
    margin-bottom: 30px;
}

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

.page-about__btn-primary,
.page-about__btn-secondary,
.page-about__btn-link {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Ensure text wraps within button */
}

.page-about__btn-primary {
    background-color: var(--btn-register-bg); /* Custom color for register */
    color: var(--text-light); /* Ensure high contrast with red background */
    border: 2px solid var(--btn-register-bg);
}

.page-about__btn-primary:hover {
    background-color: #A30606; /* Darker red for hover */
    border-color: #A30606;
}

.page-about__btn-secondary {
    background-color: var(--secondary-color); /* White background */
    color: var(--primary-color); /* Primary color text */
    border: 2px solid var(--primary-color);
}

.page-about__btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.page-about__btn-link {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 8px 15px;
    font-size: 0.9em;
    border-radius: 5px;
    margin-top: 10px;
}
.page-about__btn-link:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}


/* General Introduction & other text sections */
.page-about__general-introduction p,
.page-about__history-milestones p,
.page-about__vision-mission p,
.page-about__responsible-gambling p,
.page-about__team-section p,
.page-about__achievements p,
.page-about__connect-us p {
    font-size: 1.05em;
    margin-bottom: 1em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}
.page-about__general-introduction p:last-child,
.page-about__history-milestones p:last-child,
.page-about__vision-mission p:last-child,
.page-about__responsible-gambling p:last-child,
.page-about__team-section p:last-child,
.page-about__achievements p:last-child,
.page-about__connect-us p:last-child {
    margin-bottom: 0;
}

/* Content Grids (for sections with text and image side-by-side) */
.page-about__content-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
}

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

.page-about__text-block,
.page-about__image-block {
    flex: 1;
    min-width: 300px; /* Ensure blocks don't get too small */
}

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

/* Vision and Mission List */
.page-about__mission-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
    text-align: left;
}

.page-about__mission-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.page-about__mission-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}
.page-about__dark-section .page-about__mission-list li::before {
    color: var(--secondary-color);
}

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

.page-about__feature-card {
    background-color: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dark);
    height: 100%; /* Ensure cards are same height */
    box-sizing: border-box;
}

.page-about__dark-section .page-about__feature-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark background */
    color: var(--text-light);
}

.page-about__feature-icon {
    width: 100%;
    max-width: 200px; /* Constrain icon size, but ensure it's > 200px if original is large */
    height: auto;
    margin-bottom: 20px;
    border-radius: 5px;
}
.page-about__feature-title {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--primary-color); /* Ensure contrast on light background */
}
.page-about__dark-section .page-about__feature-title {
    color: var(--text-light); /* Ensure contrast on dark background */
}

.page-about__feature-card p {
    font-size: 1em;
    text-align: center;
    flex-grow: 1; /* Allow paragraph to take up remaining space */
}

/* Responsible Gambling List */
.page-about__responsibility-list {
    list-style: disc;
    padding-left: 40px;
    margin-top: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.page-about__responsibility-list li {
    margin-bottom: 10px;
    font-size: 1.05em;
}

/* Connect Us Section */
.page-about__cta-buttons--centered {
    margin-top: 30px;
}


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

.page-about__faq-item {
    background-color: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    color: var(--text-dark);
}
.page-about__dark-section .page-about__faq-item {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.page-about__faq-item summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    font-size: 1.15em;
    font-weight: bold;
    cursor: pointer;
    list-style: none; /* Hide default marker */
    color: var(--primary-color); /* Question text color */
}
.page-about__dark-section .page-about__faq-item summary {
    color: var(--text-light);
}

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

.page-about__faq-qtext {
    flex-grow: 1;
}

.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 plus to become cross */
}

.page-about__faq-answer {
    padding: 0 25px 20px 25px;
    font-size: 1em;
    color: var(--text-dark);
    line-height: 1.5;
    max-height: 0; /* For JS based accordion, if details not used */
    overflow: hidden; /* For JS based accordion */
    transition: max-height 0.3s ease-out, padding-top 0.3s ease-out; /* For JS based accordion */
}
.page-about__dark-section .page-about__faq-answer {
    color: var(--text-light);
}

/* For <details> tag, browser handles visibility, so max-height is not needed */
.page-about__faq-item[open] .page-about__faq-answer {
    max-height: fit-content; /* Allow content to expand */
    padding-top: 10px; /* Add some space above the answer */
}


/* Utility classes for text alignment */
.page-about__text-center {
    text-align: center;
}
.page-about__text-left {
    text-align: left;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__section-title {
        font-size: 2em;
    }
    .page-about__main-title {
        font-size: clamp(1.8em, 5vw, 3em);
    }
    .page-about__content-grid {
        flex-direction: column;
        gap: 30px;
    }
    .page-about__content-grid--reverse {
        flex-direction: column; /* Revert for mobile */
    }
    .page-about__text-block,
    .page-about__image-block {
        width: 100%;
    }
    .page-about__hero-image-wrapper {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .page-about__section {
        padding: 40px 0;
    }
    .page-about__hero-section {
        padding-bottom: 40px;
    }
    .page-about__section-title {
        font-size: 1.8em;
    }
    .page-about__main-title {
        font-size: clamp(1.5em, 6vw, 2.5em);
    }
    .page-about__intro-text {
        font-size: 1em;
    }
    .page-about__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-about__btn-primary,
    .page-about__btn-secondary,
    .page-about__btn-link {
        width: 100% !important; /* Force full width on mobile */
        max-width: 100% !important;
        padding: 12px 15px;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Mobile image adaptation */
    .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__hero-section,
    .page-about__hero-content,
    .page-about__image-block,
    .page-about__text-block,
    .page-about__feature-card,
    .page-about__faq-item {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important; /* Prevent horizontal scroll */
    }
    .page-about__hero-section {
        padding-top: 10px !important; /* body already handles --header-offset */
    }
    .page-about__faq-item summary {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-about__faq-answer {
        padding: 0 20px 15px 20px;
    }
    .page-about__mission-list,
    .page-about__responsibility-list {
        padding-left: 20px;
    }
    .page-about__mission-list li,
    .page-about__responsibility-list li {
        font-size: 0.95em;
        padding-left: 25px;
    }
}

/* Ensure images within content areas do not fall below 200px */
.page-about__content-area img,
.page-about__image-block img,
.page-about__feature-card img {
  min-width: 200px;
  min-height: 200px;
}
.page-about__feature-icon {
  max-width: 200px; /* These are smaller feature icons, but still > 200px if source is large */
  min-width: 200px; /* Enforce min width */
  min-height: 200px; /* Enforce min height */
}