/* style/about.css */

/* Variables and Base Styles */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-login-btn: #C30808;
    --register-login-font: #FFFF00;
    --text-dark: #333333;
    --text-light: #ffffff;
    --bg-light: #ffffff;
    --bg-dark-card: rgba(255, 255, 255, 0.1); /* Semi-transparent white for dark background cards */
    --border-light: #e0e0e0;
}

/* Base styling for the page-about content wrapper */
.page-about {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    /* Body background is dark from shared.css, so default text color should be light */
    color: var(--text-light); 
    background-color: transparent; /* Inherit from body or shared.css */
}

/* Container for consistent content width */
.page-about__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Headings */
.page-about__heading {
    font-size: 2.5em;
    color: var(--text-light); /* Default for dark background */
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}

.page-about__heading::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.page-about__sub-heading {
    font-size: 1.8em;
    color: var(--text-light); /* Default for dark background */
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
}

/* Paragraphs and Lists */
.page-about__text {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--text-light); /* Default for dark background */
}

.page-about__text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.page-about__text-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: bold;
}

.page-about__list-item {
    font-size: 1.1em;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    list-style: none; /* Remove default list style */
    color: var(--text-light); /* Default for dark background */
}

.page-about__list-item::before {
    content: '✅'; /* Custom bullet point */
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.2em;
    line-height: 1;
}

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

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

.page-about__dark-section .page-about__heading,
.page-about__dark-section .page-about__sub-heading,
.page-about__dark-section .page-about__text,
.page-about__dark-section .page-about__list-item {
    color: var(--text-light);
}

/* Hero Section */
.page-about__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    box-sizing: border-box;
}

.page-about__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.page-about__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
    z-index: -1;
}

.page-about__hero-content {
    position: relative;
    z-index: 1;
    color: var(--text-light);
    max-width: 800px;
}

.page-about__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--secondary-color);
}

.page-about__hero-description {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.page-about__hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    text-align: center;
}

.page-about__btn-primary {
    background-color: var(--register-login-btn); /* Custom color for register/login */
    color: var(--register-login-font); /* Custom font color */
    border: 2px solid var(--register-login-btn);
}

.page-about__btn-primary:hover {
    background-color: #a30707; /* Slightly darker red */
    color: var(--register-login-font);
}

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

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

/* Content Flex Layout */
.page-about__content-flex {
    display: flex;
    gap: 40px;
    align-items: center;
}

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

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

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

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

.page-about__card {
    background-color: var(--bg-light); /* Light background for cards */
    color: var(--text-dark); /* Dark text for light background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.page-about__card .page-about__text {
    color: var(--text-dark); /* Ensure text is dark on light card background */
}

/* Feature Cards */
.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-dark-card); /* Semi-transparent white for dark section */
    color: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-about__feature-image {
    width: 100%; /* Ensure images fill card width */
    height: 200px; /* Fixed height for consistency, object-fit will handle aspect ratio */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

.page-about__feature-title {
    font-size: 1.6em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

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

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

.page-about__faq-item {
    background-color: var(--bg-dark-card);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-about__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.15); /* Slightly lighter for question */
    color: var(--text-light);
    font-size: 1.2em;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-about__faq-question:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.page-about__faq-title {
    margin: 0;
    color: var(--text-light);
    font-size: 1.2em;
}

.page-about__faq-toggle {
    font-size: 1.8em;
    line-height: 1;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.page-about__faq-item.active .page-about__faq-toggle {
    transform: rotate(45deg); /* Change to X or rotate for minus sign */
    color: var(--secondary-color);
}

.page-about__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px; /* Initial padding 0 */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: var(--bg-dark-card);
    color: var(--text-light);
}

.page-about__faq-item.active .page-about__faq-answer {
    max-height: 1000px !important; /* Sufficiently large value */
    padding: 20px !important; /* Padding when active */
}

.page-about__faq-answer p {
    margin: 0;
    color: var(--text-light); /* Ensure text is light on dark background */
}

/* CTA Bottom Section */
.page-about__cta-bottom {
    background-color: var(--bg-light); /* Light background */
    color: var(--text-dark); /* Dark text */
    text-align: center;
}

.page-about__cta-bottom .page-about__heading,
.page-about__cta-bottom .page-about__text {
    color: var(--text-dark); /* Ensure text is dark on light background */
}

.page-about__cta-content {
    padding: 60px 20px;
    border-radius: 10px;
    background-color: var(--bg-light);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.page-about__cta-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow wrapping */
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__hero-title {
        font-size: 3em;
    }
    .page-about__hero-description {
        font-size: 1.2em;
    }
    .page-about__heading {
        font-size: 2em;
    }
    .page-about__sub-heading {
        font-size: 1.6em;
    }
    .page-about__content-flex {
        flex-direction: column;
    }
    .page-about__image-block {
        order: -1; /* Image above text on smaller screens */
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-about {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-about__hero-section {
        height: 500px;
    }
    .page-about__hero-title {
        font-size: 2.5em;
    }
    .page-about__hero-description {
        font-size: 1.1em;
    }
    .page-about__hero-actions {
        flex-direction: column;
        gap: 15px;
    }
    .page-about__btn-primary,
    .page-about__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-about__heading {
        font-size: 1.8em;
    }
    .page-about__sub-heading {
        font-size: 1.4em;
    }
    .page-about__section {
        padding: 40px 0;
    }
    .page-about__container {
        padding: 0 15px; /* Adjust padding for smaller screens */
    }

    /* Mobile image responsive 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__image-block,
    .page-about__feature-card,
    .page-about__faq-item,
    .page-about__cta-bottom,
    .page-about__cta-content {
        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 for hero section to ensure padding-top is correct for mobile */
    .page-about__hero-section {
        padding-top: var(--header-offset, 120px) !important;
    }

    /* FAQ specific mobile padding */
    .page-about__faq-question,
    .page-about__faq-answer {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .page-about__faq-item.active .page-about__faq-answer {
        padding: 15px !important; /* Adjust padding for active state on mobile */
    }

    /* Ensure buttons in group wrap */
    .page-about__hero-actions,
    .page-about__cta-actions {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .page-about__hero-section {
        height: 400px;
    }
    .page-about__hero-title {
        font-size: 2em;
    }
    .page-about__hero-description {
        font-size: 1em;
    }
    .page-about__heading {
        font-size: 1.5em;
    }
    .page-about__sub-heading {
        font-size: 1.2em;
    }
    .page-about__btn-primary,
    .page-about__btn-secondary {
        padding: 12px 20px;
        font-size: 1em;
    }
    .page-about__card,
    .page-about__feature-card {
        padding: 20px;
    }
    .page-about__feature-image {
        height: 150px; /* Adjust for smaller screens */
    }
}