/* ==========================================================================
   Afyaplus Homepage Refinements
   Loaded after style.css / responsive.css — only adds to / overrides what
   the homepage needs, so other pages that share style.css are unaffected.
   ========================================================================== */

/* ---------- 1. Hero section ---------- */
.hero-section {
    position: relative;
    padding: 170px 0 130px;
}

.hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 18px;
    backdrop-filter: blur(2px);
}

.hero-content h1 {
    font-size: clamp(28px, 4.6vw, 50px);
    line-height: 1.2;
    margin-bottom: 18px;
}

.hero-content p {
    font-size: clamp(15px, 2vw, 19px);
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
}

.btn-hero-primary,
.btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    white-space: nowrap;
}

.btn-hero-primary {
    background: var(--secondary-color, #ee104f);
    color: #fff;
    box-shadow: 0 8px 22px rgba(238, 16, 79, 0.35);
}

.btn-hero-primary:hover {
    background: #c50e3f;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(238, 16, 79, 0.4);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.75);
}

.btn-hero-secondary:hover {
    background: #fff;
    color: var(--dark-color, #333);
    transform: translateY(-3px);
}

.hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: heroScrollBounce 2.2s ease-in-out infinite;
}

.hero-scroll-cue:hover { color: #fff; border-color: #fff; }

@keyframes heroScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ---------- 2. Core Agendas ---------- */
.agendas-subtitle {
    text-align: center;
    max-width: 620px;
    margin: -30px auto 40px;
    color: var(--gray-color, #6c757d);
}

.agenda-item {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--agenda-accent, var(--primary-color));
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.agenda-item:hover {
    transform: translateY(-8px);
}

.agenda-item:hover .agenda-icon {
    transform: scale(1.08);
    background-color: var(--agenda-accent, var(--primary-color));
}

.agenda-icon {
    background-color: var(--agenda-accent, var(--primary-color));
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.agenda-item h5 {
    margin-bottom: 8px;
    font-size: 17px;
}

.agenda-item p {
    font-size: 14px;
    color: var(--gray-color, #6c757d);
    margin-bottom: 16px;
    flex-grow: 1;
}

.agenda-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--agenda-accent, var(--primary-color));
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agenda-link i { transition: transform 0.2s ease; }
.agenda-link:hover i { transform: translateX(4px); }

/* ---------- 3. Video playlist fixes ---------- */
.playlist-item.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.playlist-item.is-disabled:hover {
    background-color: transparent;
}

.playlist-item.active {
    box-shadow: inset 4px 0 0 var(--secondary-color, #ee104f);
}

/* ---------- 4. Impact section + informatics chart ---------- */
/* Swap assets/images/maji.JPG for a high-res community/WASH photo whenever one is available */
.impact-section {
    position: relative;
    background:
        linear-gradient(135deg, rgba(10, 26, 42, 0.90), rgba(10, 103, 126, 0.85)),
        url('../images/maji.JPG') center center / cover no-repeat;
    background-attachment: fixed;
    isolation: isolate;
}

.impact-section .section-header h2,
.impact-section .section-header p {
    color: #fff;
}

.impact-eyebrow {
    display: inline-block;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.impact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.impact-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-top: 3px solid var(--impact-accent, #fff);
    border-radius: 14px;
    padding: 28px 20px;
    flex: 1 1 190px;
    max-width: 220px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.impact-item:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.impact-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--impact-accent, rgba(255, 255, 255, 0.18));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.impact-number {
    font-size: 40px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.impact-title {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.95;
    margin-top: 6px;
}

.impact-chart-wrap {
    max-width: 700px;
    margin: 60px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 36px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 28px;
}

.impact-chart-figure {
    width: 180px;
    flex-shrink: 0;
}

.impact-donut { width: 100%; height: auto; }

.donut-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 18;
}

.donut-seg {
    fill: none;
    stroke-width: 18;
    stroke-linecap: butt;
    stroke-dashoffset: 439.82; /* start fully hidden until in-view */
    transition: stroke-dashoffset 1.1s ease;
}

.impact-chart-wrap.in-view .donut-seg--schools { stroke-dashoffset: 0; transition-delay: 0.1s; }
.impact-chart-wrap.in-view .donut-seg--wash { stroke-dashoffset: -303.80; transition-delay: 0.35s; }
.impact-chart-wrap.in-view .donut-seg--pad { stroke-dashoffset: -393.24; transition-delay: 0.6s; }

.donut-seg--schools { stroke: #ffffff; }
.donut-seg--wash { stroke: #ffe082; }
.donut-seg--pad { stroke: #ff8fab; }

.donut-center-value {
    font-size: 28px;
    font-weight: 800;
    fill: #fff;
    text-anchor: middle;
    font-family: 'Montserrat', sans-serif;
}

.donut-center-label {
    font-size: 10px;
    fill: rgba(255, 255, 255, 0.85);
    text-anchor: middle;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.impact-chart-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

.impact-chart-legend em { opacity: 0.8; font-style: normal; }

.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}

.legend-swatch--schools { background: #ffffff; }
.legend-swatch--wash { background: #ffe082; }
.legend-swatch--pad { background: #ff8fab; }

.impact-cta-ribbon {
    max-width: 900px;
    margin: 48px auto 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 26px 32px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.impact-cta-text h4 {
    color: #fff;
    font-size: 19px;
    margin-bottom: 4px;
}

.impact-cta-text p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    margin: 0;
}

.impact-cta-btn { flex-shrink: 0; }

/* ---------- 5. Projects / storytelling spotlight ---------- */
.projects-section {
    padding: 100px 0;
    background-color: #fff;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 18px;
}

.project-card {
    position: relative;
    display: block;
    border-radius: 12px;
    overflow: hidden;
    grid-column: span 2;
    color: #fff;
}

.project-card--large {
    grid-column: span 4;
    grid-row: span 2;
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.project-card:hover img { transform: scale(1.08); }

.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 26, 42, 0) 35%, rgba(10, 26, 42, 0.92) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.project-tag {
    align-self: flex-start;
    background: var(--primary-color, #07bde7);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.project-card h3 {
    font-size: 19px;
    margin-bottom: 6px;
    color: #fff;
}

.project-card p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    max-width: 90%;
}

.project-card .project-link {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-card .project-link i { transition: transform 0.2s ease; }
.project-card:hover .project-link i { transform: translateX(4px); }

/* ---------- 6. News section polish ---------- */
.news-cta-wrap {
    margin-top: 20px;
}

/* ---------- 7. Partners section ---------- */
.logo-scroll img {
    filter: grayscale(100%);
    opacity: 0.75;
    transition: filter 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.logo-scroll img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ---------- 8. Mobile experience ---------- */
@media (max-width: 991.98px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .project-card--large {
        grid-column: span 2;
        grid-row: span 1;
    }
    .impact-chart-wrap {
        flex-direction: column;
        text-align: center;
    }
    .impact-chart-legend { align-items: center; }
    .impact-section { background-attachment: scroll; }
}

@media (max-width: 767.98px) {
    .hero-section { padding: 130px 0 90px; }
    .hero-cta-group { flex-direction: column; align-items: stretch; }
    .btn-hero-primary, .btn-hero-secondary { justify-content: center; }
    .hero-scroll-cue { display: none; }

    .projects-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 220px;
    }
    .project-card, .project-card--large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .impact-item { flex: 1 1 45%; max-width: 47%; padding: 22px 14px; }

    .impact-cta-ribbon { flex-direction: column; text-align: center; }

    .agendas-subtitle { margin-top: -18px; }
}

@media (max-width: 575.98px) {
    .impact-item { flex: 1 1 100%; max-width: 100%; }
    .impact-chart-wrap { padding: 20px; }
}

/* ---------- 9. Performance: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero-scroll-cue {
        animation: none;
    }
    .agenda-item,
    .impact-item,
    .project-card img,
    .logo-scroll img,
    .btn-hero-primary,
    .btn-hero-secondary,
    .donut-seg {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
    .logo-scroll {
        animation: none !important;
    }
}
