/**
 * Impact Section Component - Isolated Styles (BEM Naming)
 * Component prefix: ee-impact-section
 */

/* Component Root - Isolated from global styles */
.ee-impact-section {
    /* Reset inherited styles */
    all: initial;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    /* Component styles */
    background: white;
    padding: 56px 0; /* var(--section-spacing) */
}

.ee-impact-section__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.ee-impact-section__loading {
    text-align: center;
    padding: 2rem;
    color: #333;
}

/* Section header: legacy = event name (main title) + org name (sub-title, blue link) */
.ee-impact-section__header {
    margin-bottom: 1.25rem;
    text-align: left;
}

.ee-impact-section__event-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    color: #2c3e50;
}

.ee-impact-section__org-subtitle {
    font-size: 1rem;
    margin: 0;
    color: #2c3e50;
}

.ee-impact-section__org-link {
    color: #0066cc;
    text-decoration: none;
}

.ee-impact-section__org-link:hover {
    text-decoration: underline;
}

/* Content area: gallery floats left, text wraps around (no bordered box) */
.ee-impact-section__content-area {
    margin-bottom: 1.5rem;
}
.ee-impact-section__content-area::after {
    content: '';
    display: table;
    clear: both;
}

/* Gallery - float left so content wraps; no heavy border/shadow */
.ee-impact-section__gallery {
    float: left;
    width: 42%;
    max-width: 420px;
    margin-right: 1.75rem;
    margin-bottom: 1rem;
}

.ee-impact-section__gallery .carousel {
    border-radius: 8px;
    overflow: hidden;
}

.ee-impact-section__gallery .carousel-inner {
    border-radius: 8px;
}

.ee-impact-section__gallery-img {
    object-fit: contain;
    width: 100%;
    aspect-ratio: 4/3;
    background: #fff; /* blends with page when image doesn't fill aspect ratio (e.g. landscape) */
    border: 1px solid #ddd; /* grey border keeps a clear placeholder frame */
    border-radius: 8px; /* match carousel container */
}

.ee-impact-section__gallery .carousel-control-prev,
.ee-impact-section__gallery .carousel-control-next {
    opacity: 0.8;
}

/* Main content - no card; flows around gallery */
.ee-impact-section__content-html {
    color: #333;
    line-height: 1.6;
}

.ee-impact-section__content-html p {
    margin-bottom: 1rem;
}

.ee-impact-section__content-html p:last-child {
    margin-bottom: 0;
}

/* Impact Card - full width below content area */
.ee-impact-section__impact-card {
    margin-top: 0.5rem;
}

.ee-impact-section__impact-card-inner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    height: 100%;
}

.ee-impact-section__impact-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.ee-impact-section__impact-label {
    font-size: 1.2rem;
    opacity: 0.9;
}

.ee-impact-section__impact-divider {
    border-color: rgba(255,255,255,0.3);
    margin: 2rem 0;
    border-width: 1px;
    border-style: solid;
    border-top: none;
    border-left: none;
    border-right: none;
}

/* Mobile: stack gallery above content, no float */
@media (max-width: 768px) {
    .ee-impact-section {
        padding: 1.25rem 0;
    }
    
    .ee-impact-section__event-title {
        font-size: 1.5rem;
    }
    
    .ee-impact-section__gallery {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 1.25rem;
    }
    
    .ee-impact-section__impact-card-inner {
        padding: 1.5rem;
    }
    
    .ee-impact-section__impact-number {
        font-size: 2rem;
    }
    
    .ee-impact-section__impact-label {
        font-size: 1rem;
    }
}
