/* style/about.css */

/* Base styles for the About Us page */
.page-about {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333; /* Default dark text for light body background */
    background-color: #ffffff; /* Assuming body background is light for content areas */
}

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

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

.page-about__section-title {
    font-size: 36px;
    color: #017439; /* Brand color for titles */
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.3;
}

.page-about__subtitle {
    font-size: 18px;
    color: #555555;
    margin-bottom: 40px;
}

/* HERO Section */
.page-about__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
    background: linear-gradient(135deg, #e0ffe0, #ffffff); /* Light gradient background */
    overflow: hidden; /* Prevent image overflow */
}

.page-about__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.page-about__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

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

.page-about__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    padding: 0 15px;
}

.page-about__main-title {
    font-size: 48px;
    color: #017439;
    margin-bottom: 15px;
    line-height: 1.2;
    font-weight: bold;
}

.page-about__intro-text {
    font-size: 20px;
    color: #333333;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-about__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    text-decoration: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(195, 8, 8, 0.4);
}

.page-about__cta-button:hover {
    background: #A80707; /* Darker red on hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(195, 8, 8, 0.6);
}

/* General Content Sections */
.page-about__content-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
}

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

.page-about__text-block {
    flex: 1;
    padding: 20px;
}

.page-about__text-block h3 {
    color: #017439;
    font-size: 24px;
    margin-bottom: 15px;
}

.page-about__text-block p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.7;
    color: #333333;
}

.page-about__image-block {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-about__image-block img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 8px;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

/* Dark Section */
.page-about__dark-section {
    background-color: #017439; /* Primary brand color for dark sections */
    color: #ffffff; /* White text for dark background */
}

.page-about__dark-section .page-about__section-title,
.page-about__dark-section .page-about__subtitle,
.page-about__dark-section .page-about__text-block h3 {
    color: #ffffff;
}

.page-about__dark-section .page-about__text-block p {
    color: #f0f0f0;
}

.page-about__link-more {
    display: inline-block;
    color: #FFFF00; /* Yellow for links in dark section */
    text-decoration: underline;
    margin-top: 15px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.page-about__link-more:hover {
    color: #ffffff;
}

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

.page-about__card {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333333; /* Dark text for light card background */
    border: 1px solid #e0e0e0;
}

.page-about__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-about__card-title {
    font-size: 22px;
    color: #017439;
    margin-bottom: 15px;
    font-weight: bold;
}

.page-about__card p {
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
}

.page-about__button-group {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* For mobile responsiveness */
}

.page-about__btn-primary,
.page-about__btn-secondary {
    display: inline-block;
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box; /* Crucial for responsive buttons */
    max-width: 100%; /* Crucial for responsive buttons */
    white-space: normal; /* Allow text wrap */
    word-wrap: break-word; /* Allow text wrap */
}

.page-about__btn-primary {
    background: #C30808; /* Register/Login color */
    color: #FFFF00; /* Register/Login font color */
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(195, 8, 8, 0.4);
}

.page-about__btn-primary:hover {
    background: #A80707;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(195, 8, 8, 0.6);
}

.page-about__btn-secondary {
    background: #ffffff;
    color: #017439;
    border: 2px solid #017439;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-about__btn-secondary:hover {
    background: #017439;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

.page-about__faq-item {
    margin-bottom: 15px;
    border-radius: 5px;
    overflow: hidden;
}

.page-about__faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
    padding: 0 15px;
    opacity: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
}

.page-about__faq-item.active .page-about__faq-answer {
    max-height: 2000px !important; /* 🚨 Use !important and sufficiently large value */
    padding: 20px 15px !important;
    opacity: 1;
    background: #f9f9f9;
    border-radius: 0 0 5px 5px;
}

.page-about__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-about__faq-question:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

.page-about__faq-question:active {
    background: #eeeeee;
}

.page-about__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none; /* Prevent h3 from blocking click event */
    color: #333333;
}

.page-about__faq-toggle {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    color: #666;
    transition: transform 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
    pointer-events: none; /* Prevent icon from blocking click event */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.page-about__faq-item.active .page-about__faq-toggle {
    color: #017439; /* Brand color when active */
    transform: rotate(45deg); /* Rotate to form an 'X' or just change to '-' */
}


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

.page-about__blog-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: left;
    text-decoration: none;
    color: #333333;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.page-about__blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-about__blog-card img {
    width: 100%;
    height: 200px; /* Fixed height for blog images */
    object-fit: cover;
    display: block;
    min-width: 200px; /* Min image size */
    min-height: 200px; /* Min image size */
}

.page-about__blog-card .page-about__card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-about__blog-title {
    font-size: 20px;
    color: #017439;
    margin-top: 15px;
    margin-bottom: 10px;
    font-weight: bold;
    line-height: 1.4;
}

.page-about__blog-excerpt {
    font-size: 15px;
    color: #555555;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-about__read-more {
    display: inline-block;
    color: #C30808; /* Action color */
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-about__read-more:hover {
    color: #A80707;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-about__section-title {
        font-size: 32px;
    }
    .page-about__main-title {
        font-size: 40px;
    }
    .page-about__intro-text {
        font-size: 18px;
    }
    .page-about__content-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .page-about__content-wrapper--reversed {
        flex-direction: column;
    }
    .page-about__text-block,
    .page-about__image-block {
        width: 100%;
        flex: none;
    }
    .page-about__image-block img {
        max-width: 80%;
    }
}

@media (max-width: 768px) {
    .page-about__hero-section {
        padding-top: var(--header-offset, 120px) !important; /* Mobile padding-top */
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .page-about__hero-image {
        border-radius: 8px;
    }

    .page-about__main-title {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .page-about__intro-text {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .page-about__cta-button {
        padding: 12px 30px;
        font-size: 16px;
        width: 100% !important; /* Ensure button full width */
        max-width: 300px !important; /* Max width for mobile button */
        margin-left: auto;
        margin-right: auto;
    }

    .page-about__section {
        padding: 40px 0;
    }

    .page-about__section-title {
        font-size: 28px;
    }

    .page-about__subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .page-about__content-wrapper {
        gap: 20px;
    }

    .page-about__text-block {
        padding: 0;
    }

    .page-about__text-block p {
        font-size: 15px;
    }

    .page-about__image-block img {
        max-width: 100% !important; /* Mobile image full width */
        width: 100% !important;
        height: auto !important;
        min-width: 200px;
        min-height: 200px;
    }

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

    .page-about__card {
        padding: 25px;
    }

    .page-about__card-title {
        font-size: 20px;
    }

    .page-about__button-group {
        flex-direction: column; /* Stack buttons vertically */
        gap: 15px;
        padding: 0 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-about__btn-primary,
    .page-about__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 16px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-about__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .page-about__faq-question h3 {
        font-size: 15px;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    
    .page-about__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 20px;
    }
    
    .page-about__faq-answer {
        padding: 0 15px;
    }
    
    .page-about__faq-item.active .page-about__faq-answer {
        padding: 15px !important;
    }

    .page-about__blog-card img {
        
    }
    .page-about__blog-title {
        font-size: 18px;
    }
    .page-about__blog-excerpt {
        font-size: 14px;
    }

    /* Ensure all content containers are responsive */
    .page-about__section,
    .page-about__card,
    .page-about__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .page-about__container {
        padding-left: 15px;
        padding-right: 15px;
    }
}