/* Homepage Updates CSS */

/* Premium Purple Shared Theme (Impact + CTA + Membership CTA) */
.premium-purple-section {
    --pp-950: #1e0b3d;
    --pp-900: #2e1065;
    --pp-800: #4c1d95;
    --pp-700: #5b21b6;
    --pp-600: #6d28d9;
    --pp-accent: #fbbf24;
    --pp-text: rgba(255, 255, 255, 0.92);

    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 520px at 12% 10%, rgba(251, 191, 36, 0.14), transparent 60%),
        radial-gradient(800px 500px at 86% 20%, rgba(124, 58, 237, 0.55), transparent 62%),
        linear-gradient(135deg, var(--pp-900) 0%, var(--pp-700) 45%, #312e81 100%);
}

.premium-purple-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    opacity: 0.14;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.premium-purple-section > .container,
.premium-purple-section > .position-absolute,
.premium-purple-section .container {
    position: relative;
    z-index: 1;
}

.premium-purple-section h1,
.premium-purple-section h2,
.premium-purple-section h3,
.premium-purple-section h4,
.premium-purple-section h5,
.premium-purple-section h6 {
    color: #fff;
}

.premium-purple-section p,
.premium-purple-section small,
.premium-purple-section span {
    color: var(--pp-text);
}

/* Force Full Screen Hero */
.hero-carousel {
    height: 100vh !important;
    min-height: 100vh !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Success Stories Layout */
.success-stories-container {
    padding: 60px 0;
    background: #f8f9fa;
}

.story-grid-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 991px) {
    .story-grid-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Video Slider (Left) */
.video-slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-slide.active {
    opacity: 1;
    z-index: 10;
}

.video-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    display: flex;
    gap: 10px;
}

.video-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.video-btn:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.1);
}

/* Right Side Image Grid */
.story-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 240px);
    gap: 20px;
}

.story-img-item {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.story-img-item:hover {
    transform: translateY(-5px);
}

.story-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-img-item:hover img {
    transform: scale(1.1);
}

/* Youtube Links Section */
.youtube-links-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.yt-link-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    height: 180px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    text-decoration: none;
}

.yt-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.yt-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(14, 165, 233, 0.88);
    border-radius: 50%;
    display: flex;

    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s;
}

.yt-link-card:hover .yt-overlay {
    background: #0ea5e9;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Certificates & Awards Redesign */
.cert-gallery-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.cert-image-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    background: #fff;
    padding: 10px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.cert-image-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.12);
}

.cert-img {
    width: 100%;
    height: 300px; /* Vertical orientation for certs */
    object-fit: contain;
    border-radius: 5px;
    background: #f9f9f9;
}

.cert-overlay-info {
    text-align: center;
    padding-top: 15px;
}

.cert-year-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 5px;
}

.cert-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin: 5px 0 0;
    font-size: 1rem;
}

/* New Impact Section */
.impact-stats-section {
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.impact-stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 22px 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, background 0.25s ease;
}

.impact-stat-item:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.11);
}

.impact-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}

.impact-icon i {
    font-size: 1.2rem;
    color: var(--pp-accent);
}

.impact-stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.impact-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'Playfair Display', serif;
}

.impact-label {
    font-size: 1.1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Volunteer CTA */
.volunteer-cta-section {
    padding: 90px 0;
    text-align: center;
    color: white;
}

.volunteer-cta-section .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.75);
}

.volunteer-cta-section .btn-outline-light:hover {
    border-color: rgba(255, 255, 255, 0.9);
}

/* Membership CTA polishing */
.membership-cta-section .backdrop-blur {
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.membership-benefit-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* -----------------------------
   Home: Our Reach + Programs
------------------------------ */

.section-title-kicker {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-title-display {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.section-title-sub {
    color: var(--dark-text);
    font-size: 1.05rem;
    max-width: 820px;
    margin: 0;
}

@media (max-width: 768px) {
    .section-title-display {
        font-size: 2.2rem;
    }
}

/* Reach */
.home-reach-section {
    background: #ffffff;
    color-scheme: light;
}

@supports (forced-color-adjust: none) {
    .home-reach-section {
        forced-color-adjust: none;
    }
}

.reach-map-card {
    background: transparent;
    border-radius: 18px;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

.reach-map {
    width: 100%;
    height: 800px;
    position: relative;
    background: #ffffff;
    color-scheme: light;
}

@supports (forced-color-adjust: none) {
    .reach-map {
        forced-color-adjust: none;
    }
}

@media (max-width: 576px) {
    .reach-map {
        height: 620px;
    }
}

.reach-map svg.reach-svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
    filter: none;
}

.reach-map .reach-state {
    fill: rgba(14, 165, 233, 0.18);
    stroke: rgba(255, 255, 255, 0.95);
    stroke-width: 1.2;
    cursor: pointer;
    transition: fill 160ms ease, filter 160ms ease;
}

.reach-map .reach-state.is-available {
    fill: rgba(14, 165, 233, 0.28);
}

.reach-map .reach-state.is-hover,
.reach-map .reach-state.is-selected {
    filter: drop-shadow(0 10px 18px rgba(2, 132, 199, 0.22));
}

.reach-map .reach-state-label {
    font-size: 11px;
    font-weight: 800;
    fill: rgba(15, 23, 42, 0.72);
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    paint-order: stroke;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 3px;
}

@media (max-width: 576px) {
    .reach-map .reach-state-label {
        display: none;
    }
}

.reach-tooltip {
    position: absolute;
    left: 14px;
    top: 14px;
    bottom: auto;
    z-index: 5;
    width: min(270px, calc(100% - 28px));
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.reach-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reach-tooltip .rt-title {
    font-weight: 800;
    font-size: 1rem;
    margin: 0 0 6px;
}

.reach-tooltip .rt-kicker {
    margin-top: 8px;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(15, 23, 42, 0.62);
}

.reach-tooltip .rt-list {
    margin: 0;
    padding-left: 18px;
    color: rgba(15, 23, 42, 0.82);
    font-weight: 600;
}

.reach-tooltip .rt-list li {
    margin: 2px 0;
}

.reach-map-note {
    padding: 12px 14px;
    font-size: 0.95rem;
    color: rgba(15, 23, 42, 0.75);
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    margin-top: 10px;
}

.reach-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    align-content: start;
}

.reach-points {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.reach-points__title {
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
}

.reach-points__list {
    list-style: none;
    margin: 0;
    padding: 0;
    color: rgba(15, 23, 42, 0.78);
    font-weight: 700;
}

.reach-points__list li {
    margin: 8px 0;
    line-height: 1.35;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.reach-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-top: 5px;
    flex: 0 0 10px;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}

.reach-dot--blue { background: #0ea5e9; }
.reach-dot--green { background: #22c55e; }
.reach-dot--amber { background: #f59e0b; }

@media (max-width: 991px) {
    .reach-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.reach-stat {
    text-align: center;
    padding: 10px;
}

.reach-stat-circle {
    width: 140px;
    height: 140px;
    margin: 0 auto 10px;
    border-radius: 999px;
    border: 5px solid rgba(14, 165, 233, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.reach-stat-circle span {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
}

.reach-stat-label {
    font-weight: 700;
    color: rgba(15, 23, 42, 0.75);
    font-size: 0.95rem;
    line-height: 1.25;
}

@media (max-width: 576px) {
    .reach-stat-circle {
        width: 120px;
        height: 120px;
    }
    .reach-stat-circle span {
        font-size: 1.8rem;
    }
}

/* Programs (3D flip cards) */
.home-programs-section {
    background: #f8fafc;
}

.flip-card {
    background: transparent;
    perspective: 1100px;
    height: 190px;
    outline: none;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.flip-card:hover .flip-card-inner,
.flip-card:focus .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    border-radius: 18px;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
}

.flip-card-front {
    background: #0b3a63;
    color: #ffffff;
}

.flip-icon {
    font-size: 2.4rem;
    margin-bottom: 14px;
}

.flip-title {
    font-weight: 800;
    font-size: 1.15rem;
    text-align: center;
}

.flip-underline {
    width: 42px;
    height: 3px;
    border-radius: 99px;
    background: #22d3ee;
    margin-top: 12px;
    opacity: 0.9;
}

.flip-card-back {
    transform: rotateY(180deg);
    background: #0f172a;
    color: #ffffff;
    text-align: center;
}

.flip-back-title {
    font-weight: 900;
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.flip-back-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.35;
    margin-bottom: 14px;
}

.flip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    color: #0f172a;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.25);
}

.flip-link:hover {
    color: #0f172a;
    filter: brightness(1.03);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .flip-card-inner {
        transition: none;
    }
}
