﻿/* ============================
Project Page
============================ */
.project-content {
    max-width: 1050px;
    margin: 0 auto 3rem;
    color: #2b2b2b;
}

.project-lead {
    text-align: center;
    font-weight: 900;
    font-size: clamp(1rem, 1.75vw + .75rem, 1.75rem);
    line-height: 1.3;
    margin: 2rem 0 2.5rem;
}

.project-location-title {
    font-weight: 900;
    font-size: 1.2rem;
    margin: 0 0 .5rem;
}

/* 30/70 splits */
.project-location-row > .col-12:first-child,
.project-mission-row > .col-12:first-child {
    flex: 0 0 30%;
    max-width: 30%;
}

.project-location-row > .col-12:last-child,
.project-mission-row > .col-12:last-child {
    flex: 0 0 70%;
    max-width: 70%;
}

/* Section titles with images */
.section-title-img {
    display: block;
    width: auto;
    height: 40px;
    margin: 2rem 0 1rem;
}

/* ============================
   Image Frames & Stacks
============================ */
.img-frame-orange {
    display: block;
    background: none !important;
    border-radius: 0 !important;
    margin: 1rem 0;
}

    .img-frame-orange > img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 0 !important;
    }

.img-stack {
    display: flex;
    flex-direction: column;
    row-gap: 0.75rem;
}

    .img-stack .img-frame-orange {
        margin: 0;
    }

        .project-provide-row .img-frame-orange,
        .img-stack.project-provide-row .img-frame-orange,
        .img-stack .img-frame-orange[data-crop] {
            position: relative;
            overflow: hidden;
            padding: .5rem 0 !important;
        }

            .project-provide-row .img-frame-orange img {
                object-fit: cover;
                object-position: center;
            }

/* ============================
   Content Typography
============================ */
.project-content h3 {
    font-weight: 700;
    margin-top: 2rem;
}

.project-content p {
    line-height: 1.5;
    font-size: 1.25em;
}

/* ============================
   Timeline
============================ */
.timeline {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    margin-bottom: 3rem;
}

.timeline-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.timeline-date {
    font-weight: 700;
    min-width: 160px;
    text-align: right;
    color: var(--orange);
}

/* ============================
   Responsive
============================ */
@media (max-width: 991.98px) {
    .project-location-row > .col-12,
    .project-mission-row > .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 767.98px) {
    /* For iPhone and small tablets: stack image on top of text in mission section */
    .project-mission-row {
        flex-direction: column !important;
    }
    .project-mission-row > .col-12:first-child,
    .project-mission-row > .col-12:last-child {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    .project-mission-row > .col-12:first-child {
        order: 0;
        margin-bottom: 1.5rem;
    }
    .project-mission-row > .col-12:last-child {
        order: 1;
    }
    /* Add padding to Ready to Donate section on mobile */
    .chalco-content.my-5 {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Donation Receipt Table Responsive Fix for Mobile */
    .receipt-table {
        width: 100% !important;
        table-layout: fixed !important;
        word-break: break-word !important;
    }
    .receipt-table th,
    .receipt-table td {
        word-break: break-word !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        max-width: 120px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    /* For iPad portrait: stack image on top of text in mission section */
    .project-mission-row {
        flex-direction: column !important;
    }
    .project-mission-row > .col-12:first-child,
    .project-mission-row > .col-12:last-child {
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    .project-mission-row > .col-12:first-child {
        order: 0;
        margin-bottom: 1.5rem;
    }
    .project-mission-row > .col-12:last-child {
        order: 1;
    }
    /* Add padding to Ready to Donate section on iPad portrait */
    .chalco-content.my-5 {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .receipt-table {
        width: 100% !important;
        table-layout: fixed !important;
        word-break: break-word !important;
    }
    .receipt-table th,
    .receipt-table td {
        word-break: break-word !important;
        white-space: normal !important;
        overflow-wrap: break-word !important;
        max-width: 180px;
    }
}
