/* Initiatives Section */
.initiatives-section {
    padding: 6rem 0;
    /* background: linear-gradient(135deg, var(--lavender) 0%, rgba(139, 95, 191, 0.1) 100%); */
    position: relative;
}

.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.initiative-card {
    min-width: 350px;
    /* layout as two columns: content on the left, logo on the right */
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: 1rem;
    align-items: start;
    background: rgba(250, 251, 252, 0.92); /* slightly translucent so all cards match */
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: slideInUp 0.6s ease-out forwards;
}

.initiative-card:nth-child(1) { animation-delay: 0.2s; }
.initiative-card:nth-child(2) { animation-delay: 0.4s; }
.initiative-card:nth-child(3) { animation-delay: 0.6s; }

.initiative-card.featured {
    /* no visual difference from regular cards */
    background: rgba(250, 251, 252, 0.92);
    color: inherit;
    transform: translateY(30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.initiative-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.initiative-card.featured:hover {
    /* same hover behavior as other cards */
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* New: distinct, accessible hover/focus effect for initiative cards */
.initiative-card {
    transition: transform 320ms cubic-bezier(.2,.9,.3,1), box-shadow 320ms ease, background 320ms ease;
    will-change: transform, box-shadow;
}

/* left accent bar that grows from top on hover */
.initiative-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--dark-turquoise), var(--deep-purple));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 320ms cubic-bezier(.2,.9,.3,1);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    z-index: 1;
}

.initiative-card:hover::before,
.initiative-card:focus-within::before {
    transform: scaleY(1);
}

.initiative-card:hover,
.initiative-card:focus-within {
    transform: translateY(-12px) scale(1.006);
    box-shadow: 0 28px 60px rgba(12,12,20,0.12);
    background: rgba(255,255,255,0.98);
}

/* Slight logo scale on hover, but keep it static (no rotate) */
.initiative-card:hover .initiative-icon,
.initiative-card:focus-within .initiative-icon {
    transform: scale(1.06);
}

/* Ensure the left accent doesn't overlap card content by increasing content z-index */
.initiative-card > * { position: relative; z-index: 2; }

/* Keyboard accessibility: visible focus ring */
.initiative-card:focus-within {
    outline: none;
}

.initiative-card:focus-within .initiative-icon,
.initiative-card:focus-within .initiative-title {
    /* subtle visual hint on keyboard focus */
    filter: brightness(1.02);
}

/* Initiative CTA: present as a plain inline link (not a button/pill) */
.initiative-cta {
    display: inline; /* inline link, not a button */
    padding: 0;
    margin-top: 1rem;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--deep-purple);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
    transition: color 160ms ease, transform 160ms ease, text-decoration-color 160ms ease;
}

/* Remove the arrow pseudo-element — keep CTA visually simple */
.initiative-cta::after { content: none !important; }

.initiative-cta:hover,
.initiative-cta:focus-visible {
    color: var(--primary-teal);
    transform: translateY(-2px);
    text-decoration-color: var(--primary-teal);
    box-shadow: none;
}

.initiative-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--deep-purple);
    text-decoration: none;
    position: relative;
    transition: color 0.25s ease, transform 0.25s ease;
}

.initiative-link i {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

/* Underline animation */
.initiative-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-teal), var(--deep-purple));
    transition: width 0.3s ease;
}

.initiative-link:hover::after,
.initiative-link:focus-visible::after {
    width: 100%;
}

.initiative-link:hover {
    color: var(--primary-teal);
    transform: translateY(-2px);
}

.initiative-link:hover i {
    transform: translateX(4px);
}


@media (max-width: 600px) {
    /* keep it readable on small screens; allow it to occupy full line when needed */
    .initiative-cta { display: inline-block; width: 100%; text-align: left; padding: 0.25rem 0; }
}

.initiative-icon {
    /* place logo into the right grid column and make it larger */
    width: 120px;
    height: 120px;
    background: transparent; /* show logo image fully without a colored container */
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0; /* no bottom margin when using grid */
    transition: transform 180ms ease;
    overflow: visible;
    padding: 0;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
}

/* Logo image inside initiative icon: show the full logo, centered and contained */
.initiative-icon .initiative-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.initiative-card.featured .initiative-icon {
    background: transparent; /* keep featured cards consistent with others */
}

.initiative-card:hover .initiative-icon {
    transform: none; /* keep logos static on hover */
}

.initiative-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.initiative-description {
    line-height: 1.6;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.initiative-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-teal);
}

.initiative-card.featured .stat-number {
    color: var(--primary-teal);
}

.stat-label {
    font-size: 0.8rem;
    opacity: 0.8;
}


/* Initiative Card Layout Fix */
.initiative-card {
    display: flex;
    flex-direction: column;
}

/* Top row: title on left, logo on right */
.initiative-top {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Title left side */
.initiative-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Logo right side */
.initiative-icon {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    margin-left: 1rem;
}

.initiative-icon .initiative-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Everything below flows normally */
.initiative-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Section CTA */
.section-cta {
    text-align: center;
    position: relative;
    z-index: 2;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fillProgress {
    to {
        width: var(--progress, 0%);
    }
}
/* Animate In Classes for JavaScript */
.animate-in .project-card,
.animate-in .initiative-card {
    opacity: 1;
    transform: translateY(0);
}

.animate-in .section-subtitle {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Enhanced hover effects */
.tech-tag {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.project-link {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Glowing effects for cards */
.project-card {
    position: relative;
}

.project-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-purple), var(--primary-teal), var(--primary-pink));
    border-radius: 22px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 0.3;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.5;
    }
}

/* Loading animation for elements */
@keyframes loadIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Floating animation for icons removed to keep logos static */
.initiative-icon {
    animation: none !important; /* explicitly disable any animation on logos */
}

/* Shimmer effect for featured card */
.initiative-card.featured::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}