/* ============================================
   HHAM Charitable Activities Page Styles
   ============================================ */

/* Hero Section */
.charity-hero {
    background: linear-gradient(135deg, #1a5276 0%, #2c5aa0 40%, #27ae60 100%);
    padding: 8rem 0 4rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.charity-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/logo.jpg') no-repeat center center;
    background-size: 200px;
    opacity: 0.05;
}

.charity-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
}

.charity-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 650px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.charity-hero .back-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
    position: relative;
}

.charity-hero .back-home:hover {
    opacity: 1;
}

/* Year Tabs */
.charity-year-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 0 1rem;
    flex-wrap: wrap;
}

.charity-year-tab {
    background: #e9ecef;
    color: #495057;
    border: 2px solid transparent;
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.charity-year-tab:hover {
    background: #dee2e6;
}

.charity-year-tab.active {
    background: linear-gradient(135deg, #2c5aa0 0%, #27ae60 100%);
    color: white;
    border-color: transparent;
}

/* Summary Stats */
.charity-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 0 2.5rem;
    flex-wrap: wrap;
}

.charity-stat-item {
    text-align: center;
    min-width: 120px;
}

.charity-stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #2c5aa0;
    line-height: 1.2;
}

.charity-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Timeline Container */
.charity-timeline-section {
    padding: 0 0 4rem;
    background: #f8f9fa;
}

.charity-timeline {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Vertical Timeline Line */
.charity-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #2c5aa0, #27ae60);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Month Group */
.charity-month-group {
    position: relative;
    margin-bottom: 3rem;
}

/* Month Label */
.charity-month-label {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.charity-month-pill {
    background: linear-gradient(135deg, #2c5aa0 0%, #1a5276 100%);
    color: white;
    padding: 0.6rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

/* Timeline Item */
.charity-timeline-item {
    position: relative;
    width: 45%;
    margin-bottom: 2rem;
}

.charity-timeline-item:nth-child(odd) {
    margin-left: 5%;
}

.charity-timeline-item:nth-child(even) {
    margin-left: 50%;
}

/* Connector dot */
.charity-timeline-item::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid #2c5aa0;
    border-radius: 50%;
    top: 1.5rem;
    z-index: 2;
}

.charity-timeline-item:nth-child(odd)::before {
    right: -8%;
    transform: translateX(50%);
}

.charity-timeline-item:nth-child(even)::before {
    left: -8%;
    transform: translateX(-50%);
}

/* Connector line from dot to card */
.charity-timeline-item::after {
    content: '';
    position: absolute;
    top: 2rem;
    width: 3%;
    height: 3px;
    background: #2c5aa0;
}

.charity-timeline-item:nth-child(odd)::after {
    right: -5%;
}

.charity-timeline-item:nth-child(even)::after {
    left: -5%;
}

/* Timeline Card */
.charity-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.charity-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.charity-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.charity-card-body {
    padding: 1.25rem;
}

.charity-card-date {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.4rem;
}

.charity-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.charity-card-title-en {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.6rem;
    font-style: italic;
}

.charity-card-desc {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.charity-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.charity-amount-badge {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.charity-location-badge {
    background: #eef2ff;
    color: #2c5aa0;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.charity-beneficiary-badge {
    background: #fef3f2;
    color: #ec008c;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Type icon */
.charity-type-icon {
    display: inline-block;
    margin-right: 0.3rem;
}

/* Homepage Summary Cards (reuse scroll-card pattern) */
.charity-summary-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    min-width: 300px;
    max-width: 350px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.charity-summary-card:hover {
    transform: translateY(-3px);
}

.charity-summary-month {
    background: linear-gradient(135deg, #2c5aa0 0%, #27ae60 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.charity-summary-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.charity-summary-stat {
    font-size: 0.85rem;
    color: #555;
}

.charity-summary-stat strong {
    color: #2c5aa0;
}

.charity-summary-highlight {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.5;
}

/* CTA Button */
.charity-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #2c5aa0 0%, #27ae60 100%);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.charity-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(44, 90, 160, 0.4);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .charity-hero h1 {
        font-size: 2rem;
    }

    .charity-hero p {
        font-size: 1rem;
    }

    .charity-stats {
        gap: 1rem;
    }

    .charity-stat-number {
        font-size: 1.5rem;
    }

    /* Timeline: single column, line on left */
    .charity-timeline::before {
        left: 20px;
        transform: none;
    }

    .charity-timeline-item,
    .charity-timeline-item:nth-child(odd),
    .charity-timeline-item:nth-child(even) {
        width: calc(100% - 50px);
        margin-left: 50px;
    }

    .charity-timeline-item::before,
    .charity-timeline-item:nth-child(odd)::before,
    .charity-timeline-item:nth-child(even)::before {
        left: -38px;
        right: auto;
        transform: none;
    }

    .charity-timeline-item::after,
    .charity-timeline-item:nth-child(odd)::after,
    .charity-timeline-item:nth-child(even)::after {
        left: -22px;
        right: auto;
        width: 22px;
    }

    .charity-month-label {
        justify-content: flex-start;
        padding-left: 50px;
    }

    .charity-summary-card {
        min-width: 260px;
    }
}

@media (max-width: 480px) {
    .charity-hero {
        padding: 6rem 0 3rem;
    }

    .charity-hero h1 {
        font-size: 1.6rem;
    }

    .charity-card-image {
        height: 140px;
    }

    .charity-card-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
