/* style/about.css */

/* Base styles for the About Us page */
.page-about {
    color: var(--text-main, #333333); /* Default text color from palette */
    background-color: var(--background-color, #F5F7FA); /* Default background from palette */
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

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

/* Hero Section */
.page-about__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    padding-top: 10px; /* Small top padding, body handles --header-offset */
    text-align: center;
    background-color: var(--background-color, #F5F7FA);
}

.page-about__hero-image-wrapper {
    width: 100%;
    max-width: 1200px; /* Ensure image wrapper does not exceed container */
    margin-bottom: 30px;
}

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

.page-about__hero-content {
    max-width: 800px;
    z-index: 1;
    position: relative; /* Ensure content is above any potential overlay */
}

.page-about__main-title {
    font-weight: 700;
    color: var(--primary-color, #E53935);
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    max-width: 100%; /* Ensure H1 does not overflow */
    box-sizing: border-box;
    font-size: clamp(28px, 4vw, 48px); /* Responsive H1 font size */
}

.page-about__description {
    font-size: 1.1em;
    color: var(--text-main, #333333);
    margin-bottom: 30px;
}

.page-about__btn-primary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    background: linear-gradient(180deg, #FF5A4F 0%, #E53935 100%);
    color: #ffffff; /* Always white for primary button */
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

.page-about__btn-primary:hover {
    background: linear-gradient(180deg, #E53935 0%, #FF5A4F 100%);
}

/* Mission Section */
.page-about__mission-section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--card-bg, #FFFFFF); /* Light background for contrast */
    color: var(--text-main, #333333);
}

.page-about__section-title {
    font-size: 2.5em;
    color: var(--primary-color, #E53935);
    margin-bottom: 20px;
    font-weight: 600;
}

.page-about__text-block {
    font-size: 1.05em;
    max-width: 800px;
    margin: 0 auto 40px auto;
}

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

.page-about__feature-card {
    background-color: var(--card-bg, #FFFFFF);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-align: center;
    color: var(--text-main, #333333); /* Ensure text is dark on light card background */
}

.page-about__feature-icon {
    width: 100%; /* Card images should fill card width */
    height: auto;
    max-width: 400px; /* Ensure images are not too small */
    display: block;
    margin: 0 auto 20px auto;
    border-radius: 4px;
}

.page-about__feature-title {
    font-size: 1.5em;
    color: var(--primary-color, #E53935);
    margin-bottom: 15px;
    font-weight: 600;
}

.page-about__feature-description {
    font-size: 0.95em;
    color: var(--text-main, #333333);
}

/* Why Choose Us Section */
.page-about__why-choose-us {
    padding: 80px 0;
    background-color: var(--primary-color, #E53935); /* Dark background */
    color: #ffffff; /* White text on dark background */
    text-align: center;
}

.page-about__why-choose-us .page-about__section-title {
    color: #ffffff; /* White title on dark background */
}

.page-about__why-choose-us .page-about__text-block {
    color: #f0f0f0;
}

.page-about__advantages-list {
    list-style: none;
    padding: 0;
    margin: 40px auto;
    max-width: 900px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted minmax to fit larger icons */
    gap: 30px;
}

.page-about__advantage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for items */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: #ffffff; /* Text color on dark background */
}

.page-about__advantage-icon {
    width: 200px; /* Enforce minimum 200x200 */
    height: 200px; /* Enforce minimum 200x200 */
    margin-bottom: 20px; /* Space below icon */
    object-fit: contain;
    border-radius: 8px; /* Optional: make it look like a small card */
    background-color: rgba(255, 255, 255, 0.1); /* Background for icon itself */
}

.page-about__advantage-content {
    flex-grow: 1;
}

.page-about__advantage-title {
    font-size: 1.3em;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
}

.page-about__advantage-description {
    font-size: 0.95em;
    color: #f0f0f0;
}

.page-about__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    background: #ffffff;
    color: var(--primary-color, #E53935); /* Text is primary color on white background */
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, color 0.3s ease;
    border: 2px solid var(--primary-color, #E53935);
    cursor: pointer;
    margin-top: 40px;
    max-width: 100%;
    box-sizing: border-box;
    white-space: normal;
    word-wrap: break-word;
}

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

/* Contact CTA Section */
.page-about__contact-cta {
    padding: 80px 0;
    background-color: var(--card-bg, #FFFFFF); /* Light background */
    color: var(--text-main, #333333);
}

.page-about__contact-flex {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-about__contact-content {
    flex: 1;
    min-width: 300px;
}

.page-about__contact-image {
    flex: 1;
    min-width: 300px;
    text-align: right;
}

.page-about__contact-img {
    width: 100%;
    height: auto;
    max-width: 500px; /* Max width for the image */
    display: block;
    margin-left: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .page-about__hero-content {
        max-width: 700px;
    }

    .page-about__main-title {
        font-size: clamp(24px, 5vw, 40px);
    }

    .page-about__section-title {
        font-size: 2em;
    }

    .page-about__contact-flex {
        flex-direction: column;
        text-align: center;
    }

    .page-about__contact-image {
        text-align: center;
        margin-top: 30px;
    }
}

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

    .page-about__container {
        padding: 0 15px; /* Add padding for mobile content */
    }

    .page-about__hero-section,
    .page-about__mission-section,
    .page-about__why-choose-us,
    .page-about__contact-cta {
        padding: 40px 0;
    }

    .page-about__hero-section {
        padding-top: 10px !important; /* body handles --header-offset */
    }

    .page-about__main-title {
        font-size: clamp(22px, 6vw, 36px);
        margin-bottom: 15px;
    }

    .page-about__description {
        font-size: 1em;
        margin-bottom: 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-left: 15px;
        padding-right: 15px;
        margin-top: 20px;
    }

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

    .page-about__advantage-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .page-about__advantage-icon {
        margin-bottom: 20px; /* Space below icon */
    }

    /* All images responsive */
    .page-about img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    /* All image containers responsive */
    .page-about__hero-image-wrapper,
    .page-about__feature-card,
    .page-about__contact-image,
    .page-about__container,
    .page-about__hero-content,
    .page-about__mission-section,
    .page-about__why-choose-us,
    .page-about__contact-cta,
    .page-about__contact-flex,
    .page-about__contact-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Color contrast enforcement */
.page-about__light-bg {
    background-color: var(--card-bg, #FFFFFF);
    color: var(--text-main, #333333);
}

.page-about__dark-bg {
    background-color: var(--primary-color, #E53935);
    color: #ffffff;
}

/* Ensure specific elements always have good contrast */
.page-about p,
.page-about li,
.page-about__feature-description {
    color: var(--text-main, #333333); /* Default for light backgrounds */
}
.page-about__dark-bg p,
.page-about__dark-bg li,
.page-about__dark-bg .page-about__feature-description {
    color: #f0f0f0; /* Lighter text for dark backgrounds */
}