/* style/about.css */

/* Base styles and variables */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --dark-background: #1a1a1a; /* From shared.css body background */
    --light-text-color: #ffffff;
    --dark-text-color: #333333;
    --button-register-bg: #C30808;
    --button-login-bg: #C30808;
    --button-text-color: #FFFF00;
    --card-background-dark-mode: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.2);
    --hover-color: #029d4c; /* Slightly lighter green for hover */
}

/* Page content wrapper */
.page-about {
    color: var(--light-text-color); /* Default text color for dark body background */
    background-color: var(--dark-background); /* Ensure consistency */
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
}

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

/* Hero Section */
.page-about__hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    background-color: var(--primary-color);
    overflow: hidden;
    padding: 80px 20px;
    box-sizing: border-box;
    color: var(--light-text-color);
}

.page-about__hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin-right: 40px; /* Space for image */
}

.page-about__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--light-text-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-about__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    line-height: 1.6;
    color: var(--light-text-color);
}

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

.page-about__hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.3; /* Subtle background image */
}

.page-about__hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7); /* Darken image for text contrast */
}

/* General Section Styling */
.page-about__section-title {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.page-about__section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.page-about__section-title--light {
    color: var(--light-text-color);
}
.page-about__section-title--light::after {
    background-color: var(--light-text-color);
}

.page-about__text-block {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: justify;
    color: var(--light-text-color);
}

.page-about__image-content {
    display: block;
    margin: 40px auto;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    width: 100%; /* Ensure responsiveness */
    height: auto;
    min-width: 200px; /* Minimum size enforcement */
    min-height: 200px; /* Minimum size enforcement */
}

.page-about__image-full-width {
    display: block;
    margin: 40px auto;
    width: 100%;
    max-width: 1000px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    height: auto;
    min-width: 200px; /* Minimum size enforcement */
    min-height: 200px; /* Minimum size enforcement */
}

/* Why Choose Section (Dark Background) */
.page-about__dark-section {
    background-color: var(--primary-color); /* Using brand primary color */
    color: var(--light-text-color);
    padding: 60px 20px;
}

.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: var(--card-background-dark-mode); /* Semi-transparent white */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.page-about__feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

.page-about__product-card {
    background: var(--card-background-dark-mode);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--light-text-color);
}

.page-about__product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-about__product-image {
    width: 100%;
    height: 200px; /* Fixed height for product images */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    min-width: 200px; /* Minimum size enforcement */
    min-height: 200px; /* Minimum size enforcement */
}

.page-about__product-title {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.page-about__product-title a {
    color: var(--light-text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-about__product-title a:hover {
    color: var(--hover-color);
    text-decoration: underline;
}

.page-about__product-description {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 20px;
    color: var(--light-text-color);
}

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

.page-about__commitment-item {
    background: var(--card-background-dark-mode);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--light-text-color);
}

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

.page-about__commitment-description {
    font-size: 1em;
    line-height: 1.7;
    color: var(--light-text-color);
}

.page-about__link-text {
    color: var(--light-text-color);
    text-decoration: underline;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.page-about__link-text:hover {
    color: var(--hover-color);
}

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

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

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

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

.page-about__faq-question h3 {
    margin: 0;
    color: var(--light-text-color);
}

.page-about__faq-toggle {
    font-size: 1.5em;
    font-weight: normal;
    transition: transform 0.3s ease;
    color: var(--light-text-color);
}

.page-about__faq-item.active .page-about__faq-toggle {
    transform: rotate(45deg);
}

.page-about__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.page-about__faq-item.active .page-about__faq-answer {
    max-height: 1000px !important; /* Sufficiently large */
    padding: 15px 25px 25px;
}

.page-about__faq-answer p {
    margin: 0;
    font-size: 1em;
    line-height: 1.7;
    color: var(--light-text-color);
}

.page-about__link-button {
    display: inline-block;
    background-color: var(--button-register-bg); /* Use register button color for CTA in FAQ */
    color: var(--button-text-color);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s ease;
}

.page-about__link-button:hover {
    background-color: #a30606; /* Darken on hover */
}


/* Call to Action Section */
.page-about__cta-section {
    background-color: var(--primary-color);
    padding: 80px 20px;
    text-align: center;
    color: var(--light-text-color);
}

.page-about__cta-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-about__cta-description {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 40px;
    color: var(--light-text-color);
}

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

.page-about__cta-buttons--center {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.page-about__btn-primary,
.page-about__btn-secondary,
.page-about__btn-tertiary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-about__btn-primary {
    background-color: var(--button-register-bg); /* Use register color */
    color: var(--button-text-color); /* Use button text color */
    border: 2px solid var(--button-register-bg);
}

.page-about__btn-primary:hover {
    background-color: #a30606; /* Slightly darker red */
    border-color: #a30606;
}

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

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

.page-about__btn-tertiary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    font-size: 0.95em;
    border-radius: 5px;
}

.page-about__btn-tertiary:hover {
    background-color: var(--hover-color);
    border-color: var(--hover-color);
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__hero-section {
        flex-direction: column;
        text-align: center;
        min-height: 500px;
        padding: 60px 20px;
    }

    .page-about__hero-content {
        margin-right: 0;
        margin-bottom: 40px;
    }

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

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

    .page-about__image-content,
    .page-about__image-full-width {
        max-width: 100%;
        margin: 30px auto;
    }
}

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

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

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

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

    .page-about__hero-cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

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

    .page-about__section-title::after {
        width: 60px;
        height: 3px;
    }

    .page-about__content-area {
        padding: 30px 15px;
    }

    .page-about__dark-section {
        padding: 40px 15px;
    }

    .page-about__features-grid,
    .page-about__product-grid,
    .page-about__commitment-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .page-about__product-image {
        height: 180px;
    }

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

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

    .page-about__faq-item.active .page-about__faq-answer {
        padding: 10px 20px 20px;
    }

    .page-about__cta-section {
        padding: 50px 15px;
    }

    .page-about__cta-description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-about__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }

    /* Mobile image responsiveness */
    .page-about img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important; /* Enforce min size even on mobile */
        min-height: 200px !important; /* Enforce min size even on mobile */
    }

    /* Content area image CSS width/height must not be less than 200px */
    .page-about__hero-image,
    .page-about__image-content,
    .page-about__image-full-width,
    .page-about__product-image {
        min-width: 200px !important;
        min-height: 200px !important;
    }

    /* Mobile button responsiveness */
    .page-about__cta-button,
    .page-about__btn-primary,
    .page-about__btn-secondary,
    .page-about__btn-tertiary,
    .page-about a[class*="button"],
    .page-about a[class*="btn"],
    .page-about__link-button {
        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;
        text-align: center; /* Center button text when it wraps */
    }

    .page-about__cta-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__cta-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .page-about__hero-title {
        font-size: 1.8em;
    }
    .page-about__section-title {
        font-size: 1.8em;
    }
    .page-about__hero-section {
        min-height: 350px;
    }
}