/* Modern Growth module styles */
.growth-card {
    background: linear-gradient(180deg, rgba(228, 183, 2, 0.9), rgba(167, 123, 3, 0.85));
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.growth-card h3 {
    color: #6b7280;
    font-weight: 600;
}

.growth-counter {
    display: inline-block;
    min-width: 2ch;
}

.growth-progress {
    transition: width 1.2s cubic-bezier(.2, .9, .2, 1);
}

@media (prefers-reduced-motion: reduce) {
    .growth-progress {
        transition: none;
    }
}

/* Small responsive tweaks */
/* Growth module styles — centered timeline with round images */
:root {
    --gj-accent-1: #f59e0b;
    --gj-accent-2: #b45309;
    --gj-bg: #fffbf6;
    --gj-card-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --gj-img-size: 8rem;
    --gj-img-size-sm: 4.5rem;
    --gj-side-gap: 18px;
    /* default gap from image */
    --gj-side-gap-even: 2.5rem;
    /* larger gap for right-side (even) items */
}

.gj-timeline {
    position: relative;
    margin-top: 0.5rem;
}

/* vertical center line */
.gj-timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    /* start the line slightly below the center of the first image; images sit above the line */
    top: calc(var(--gj-img-size) / 2);
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.4), rgba(180, 83, 9, 0.2), rgba(245, 158, 11, 0.1));
    transform: translateX(-50%);
    z-index: -1;
    border-radius: 2px;
}

.gj-timeline::after {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(var(--gj-img-size) / 2);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.8), rgba(180, 83, 9, 0.6));
    transform: translateX(-50%);
    z-index: -1;
    border-radius: 2px;
    animation: progress-line 2s ease-out forwards;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

@keyframes progress-line {
    to {
        height: calc(100% - var(--gj-img-size) / 2);
    }
}

.gj-item {
    position: relative;
    padding: calc(var(--gj-img-size) / 2 + 1rem) 0;
}

.gj-item:first-child {
    padding-top: calc(var(--gj-img-size) / 2 + 0.5rem);
}

/* round image (centered over the line on md+) */
.gj-img {
    width: var(--gj-img-size-sm);
    height: var(--gj-img-size-sm);
    border-radius: 9999px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 0 0 0 rgba(245, 158, 11, 0.4);
    z-index: 100;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    /* sit above the line */
}

.gj-img::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(180, 83, 9, 0.3));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.gj-img:hover {
    /* keep visual emphasis but no movement */
    transform: none;
    box-shadow: 0 22px 60px rgba(180, 83, 9, 0.28), 0 0 36px rgba(245, 158, 11, 0.45);
}

.gj-img:hover::before {
    opacity: 1;
    animation: pulse-glow 1.8s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.35;
        box-shadow: 0 0 6px rgba(245, 158, 11, 0.18);
    }

    50% {
        opacity: 0.75;
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.32);
    }
}

@media(min-width:768px) {
    .gj-img {
        width: var(--gj-img-size);
        height: var(--gj-img-size);
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 0;
    }

    /* preserve horizontal centering on hover for desktop */
    .gj-img:hover {
        transform: translateX(-50%);
    }

    .gj-content {
        /* position content absolutely so it sits flush beside the centered image
           and vertically centers to the image */
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 50;
        /* keep content above the center line but below image */
        /* maximum available width on each side */
        max-width: calc(50% - (var(--gj-img-size) / 2) - 1rem);
        padding-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0.25rem;
    }

    /* ensure each item is at least as tall as the image so centering works reliably */
    .gj-item {
        /* provide a bit more vertical breathing room while keeping the image and
           badge alignment stable */
        min-height: calc(var(--gj-img-size) + 1.5rem);
        display: block;
    }

    /* Layout: odd items sit to the LEFT of the centered image; even items sit to the RIGHT */
    .gj-item:nth-child(odd) .gj-content {
        /* place content to the left of the image, flush with its right edge */
        right: calc(50% + (var(--gj-img-size) / 2) + var(--gj-side-gap));
        text-align: right;
    }

    .gj-item:nth-child(even) .gj-content {
        /* place content to the right of the image, flush with its left edge; use larger gap */
        left: calc(50% + (var(--gj-img-size) / 2) + var(--gj-side-gap-even));
        text-align: left;
    }

    /* increase vertical breathing room for Establish (2) and Edify (3) */


    .gj-item:nth-child(1) {
        margin-bottom: 5.5rem;
        /* larger than default mb-12 (3rem) */
    }



    .gj-item:nth-child(2) {
        margin-bottom: 7.5rem;
        /* larger than default mb-12 (3rem) */
    }

    .gj-item:nth-child(3) {
        margin-bottom: 7.5rem;
        /* larger than default mb-12 (3rem) */
    }

    .gj-item:nth-child(4) {
        margin-bottom: 5.5rem;
        /* larger than default mb-12 (3rem) */
    }




    /* first-child follows the odd rule above and will be positioned left with 15px gap */
}

/* mobile: revert to default spacing for those items */
@media (max-width: 767px) {

    .gj-item:nth-child(1),
    .gj-item:nth-child(2),
    .gj-item:nth-child(3),
    .gj-item:nth-child(4),
    .gj-item:nth-child(5) {
        margin-bottom: 1rem;
        /* match Tailwind mb-12 */
    }
}

/* small screens: image sits inline left of content */

/* Modern Literature/Book Cards with Flip Animation */
.perspective-1000 {
    perspective: 1000px;
}

.book-card-wrapper {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: bookEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes bookEntrance {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.book-card {
    position: relative;
    width: 100%;
    height: 520px;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
}

.book-card:hover {
    transform: rotateY(180deg);
}

.book-card-front,
.book-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.book-card-front {
    background: linear-gradient(135deg, #ffffff 0%, #fffbf5 100%);
    display: flex;
    flex-direction: column;
}

.book-card-back {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.book-image-wrapper {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, rgba(217, 119, 6, 0.1) 100%);
}

.book-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-card:hover .book-image {
    transform: scale(1.05);
}

.book-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
    pointer-events: none;
}

.book-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.book-card-front:hover .book-shine {
    transform: translateX(100%);
}

.book-front-content {
    padding: 1.5rem 2rem 2rem;
    text-align: center;
    background: white;
}

.book-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.book-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.flip-hint {
    display: inline-block;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0.5rem 1rem;
    border: 1px dashed #d1d5db;
    border-radius: 9999px;
    transition: all 0.3s;
}

.book-card:hover .flip-hint {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #92400e;
}

.book-back-content {
    text-align: center;
    color: white;
}

.book-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.book-title-back {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.book-divider {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.book-description {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.book-cta {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: white;
    color: #d97706;
    font-weight: 700;
    border-radius: 9999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.book-card-back:hover .book-cta {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .book-card {
        height: 480px;
    }

    .book-title {
        font-size: 1.25rem;
    }

    .book-image {
        padding: 1.5rem;
    }

    /* Enable tap on mobile */
    .book-card {
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-card-wrapper {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .book-card,
    .book-image,
    .book-shine {
        transition: none;
    }
}

/* Journey card reveal and hover animations */
.journey-card {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    transition: opacity 0.6s cubic-bezier(0.2, 0.9, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.25s;
    will-change: transform, opacity;
}

.journey-card.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.journey-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
}

.journey-card .w-28 {
    transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1), box-shadow 0.35s;
}

.journey-card:hover .w-28 {
    transform: scale(1.06);
}

@media (prefers-reduced-motion: reduce) {

    .journey-card,
    .journey-card .w-28 {
        transition: none !important;
        animation: none !important;
    }
}

@media(max-width:767px) {
    .gj-item {
        display: flex;
        gap: 1.25rem;
        align-items: center;
    }

    .gj-img {
        width: 4.5rem;
        height: 4.5rem;
        position: static;
        transform: none;
    }

    .gj-content {
        width: auto;
    }
}

/* typography */
.gj-content {
    transition: transform 0.3s ease;
}

.gj-item:hover .gj-content {
    transform: translateY(-4px);
}

.gj-content h3 {
    color: var(--gj-accent-2);
    margin: 0;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.gj-content h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gj-accent-1), var(--gj-accent-2));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gj-item:hover .gj-content h3::after {
    width: 100%;
}

.gj-content p {
    color: #334155;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

.gj-item:hover .gj-content p {
    color: #1e293b;
}

.gj-content .text-sm {
    color: var(--gj-accent-1);
    font-weight: 700;
}

.gj-content ul li {
    transition: transform 0.2s ease, color 0.2s ease;
}

.gj-content ul li:hover {
    transform: translateX(8px);
    color: var(--gj-accent-2);
}

@keyframes gj-fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes gj-slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gj-slide-in-right {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gj-item {
    opacity: 0;
    animation: gj-fade-up 700ms ease both;
}

.gj-item:nth-child(1) {
    animation-delay: 100ms;
}

.gj-item:nth-child(2) {
    animation-delay: 200ms;
}

.gj-item:nth-child(3) {
    animation-delay: 300ms;
}

.gj-item:nth-child(4) {
    animation-delay: 400ms;
}

.gj-item:nth-child(5) {
    animation-delay: 500ms;
}

.gj-item.gj-visible .gj-content {
    animation: gj-slide-in-left 800ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gj-item:nth-child(even).gj-visible .gj-content {
    animation: gj-slide-in-right 800ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@media (prefers-reduced-motion:reduce) {

    .gj-item,
    .gj-item .gj-content {
        animation: none !important;
        opacity: 1 !important;
    }
}

/* About section animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-animate .fade-item {
    opacity: 0;
    transform: translateY(18px);
    animation-name: fadeInUp;
    animation-duration: 700ms;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: forwards;
}

/* Stagger helper: set inline style="--delay: 120ms" on elements for cascading effect */
.about-animate .fade-item[data-delay] {
    animation-delay: attr(data-delay ms, 0ms);
}

/* Fallback stagger using nth-child where attr() unsupported */
.about-animate .fade-item:nth-child(1) {
    animation-delay: 60ms;
}

.about-animate .fade-item:nth-child(2) {
    animation-delay: 160ms;
}

.about-animate .fade-item:nth-child(3) {
    animation-delay: 260ms;
}

.about-animate .fade-item:nth-child(4) {
    animation-delay: 360ms;
}

.about-animate .fade-item:nth-child(5) {
    animation-delay: 460ms;
}

/* small micro-interactions */
.pastor-card:hover,
.mv-card:hover,
.value-card:hover {
    transform: translateY(-6px) scale(1.01);
    transition: transform 220ms ease;
}


/* badge showing step number beside the image */
.gj-badge {
    display: inline-block;
    font-weight: 800;
    color: var(--gj-accent-2);
    background: transparent;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    z-index: 200;
}

@media(min-width:768px) {
    .gj-badge {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .gj-item:nth-child(odd) .gj-badge {
        left: calc(50% - var(--gj-img-size) - var(--gj-side-gap));
        text-align: right;
    }

    .gj-item:nth-child(even) .gj-badge {
        right: calc(50% - var(--gj-img-size) - var(--gj-side-gap-even));
        text-align: left;
    }
}

@media(max-width:767px) {
    .gj-badge {
        display: inline-block;
        margin-right: 0.5rem;
        font-size: 0.95rem;
    }
}

/* Modern Community card styles */
.community-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffbf3 100%);
    border: 1px solid rgba(15, 23, 42, 0.04);
    overflow: hidden;
    position: relative;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

.community-card img {
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: cover;
    border-radius: 0.5rem;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.community-card:hover img {
    transform: scale(1.06);
}

/* About section styles */
.pastor-card .pastor-photo {
    background-blend-mode: multiply;
    background-color: rgba(0, 0, 0, 0.25);
}

.pastor-card .p-8 {
    padding: 2rem !important;
}

.pastor-card blockquote {
    border-left: 4px solid rgba(245, 158, 11, 0.25);
    padding-left: 1rem;
    color: #475569;
}

.mv-card .icon-circle {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

/* Enhanced styles for Vision / Mission cards */
.mv-card {
    background: linear-gradient(180deg, #fffaf5 0%, #ffffff 100%);
    border: 1px solid rgba(245, 158, 11, 0.08);
    transition: transform 220ms ease, box-shadow 220ms ease;
    overflow: hidden;
}

.mv-card:hover {
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.mv-card h4 {
    margin: 0;
    line-height: 1.1;
}

.mv-card h4::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: rgba(245, 158, 11, 0.9);
    border-radius: 2px;
    margin-top: 6px;
}

.mv-card p {
    color: #475569;
    margin-top: 6px;
}

.mv-card .icon-circle {
    width: 54px;
    height: 54px;
    font-size: 1.25rem;
}

.value-card {
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.08);
}

@media (min-width: 768px) {
    .pastor-card .pastor-photo {
        height: 18rem;
    }
}

.community-card .card-content {
    padding-top: 0.75rem;
    text-align: left;
    display: flex;
    flex-direction: column;
}

/* Scroll-reveal defaults for community cards (revealed when section is visible) */
.community-card {
    opacity: 0;
    transform: translateY(18px);
    transition: transform 420ms cubic-bezier(.2, .9, .3, 1), opacity 420ms ease;
}

.community-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.community-card h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #111827;
    font-weight: 700;
}

.community-card p {
    color: #4b5563;
}

.community-card .change-btn {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.5rem 0.9rem;
    background: #f59e0b;
    color: #fff;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.12);
}

.community-card .img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.community-card .title-badge {
    display: inline-block;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.28rem 0.6rem;
    border-radius: 8px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: 1rem;
    line-height: 1;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

@media (min-width: 768px) {
    .community-card .title-badge {
        font-size: 1.05rem;
        padding: 0.35rem 0.7rem;
    }
}

.community-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(.2, .9, .3, 1);
}

.community-card:hover img {
    transform: scale(1.06);
}

.community-card .img-wrapper .absolute {
    pointer-events: none;
}

.community-card .icon-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 9999px;
    padding: 8px;
    font-size: 1.25rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

@media(min-width:768px) {
    .community-card img {
        max-height: 220px;
    }
}

/* Featured cards on hero */
.featured-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    border: 1px solid rgba(15, 23, 42, 0.04);
}

.featured-card:hover {
    transform: translateY(-6px);
}

.featured-card .text-3xl {
    color: #b45309;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    background: linear-gradient(90deg, #f59e0b, #b45309);
    color: white;
    padding: 0.5rem 0.65rem;
    border-radius: 9999px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    cursor: pointer;
    z-index: 60;
}