/* ============================================
   Shared Ministries CSS
   Christ Ekklesia Fellowship Chapel
   ============================================ */

:root {
    --primary-color: #4c1d95;
    --secondary-color: #6b21a8;
    --light-purple: #f3e8ff;
    --accent-color: #8b5cf6;
    --accent-gold: #f59e0b;
    --dark-purple: #312e81;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --off-white: #f9fafb;
    --gradient-primary: linear-gradient(135deg, #4c1d95 0%, #6b21a8 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #8b5cf6 100%);
    --shadow-sm:  0 2px 8px rgba(76, 29, 149, 0.08);
    --shadow-md:  0 4px 20px rgba(76, 29, 149, 0.12);
    --shadow-lg:  0 8px 32px rgba(76, 29, 149, 0.15);
    --shadow-xl:  0 16px 48px rgba(76, 29, 149, 0.20);
}

/* ─── Page background ─── */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8e4f0 100%);
    min-height: 100vh;
}

/* ─── Hero Section ─── */
.ministry-hero-section {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
}

.ministry-hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3Cpattern id='g' width='8' height='8' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 8 0 L 0 0 0 8' fill='none' stroke='rgba(255,255,255,0.07)' stroke-width='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23g)'/%3E%3C/svg%3E");
    pointer-events: none;
}

.ministry-hero-section .container {
    position: relative;
    z-index: 2;
}

.ministry-hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0,0,0,0.35);
    color: #fff;
}

.ministry-hero-section .lead {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255,255,255,0.92);
}

.breadcrumb-item a { transition: color .2s; }
.breadcrumb-item a:hover { color: var(--accent-gold) !important; }

/* ─── Content Wrapper ─── */
.ministry-content-wrapper {
    padding: 4rem 0;
}

/* ─── Enhanced Cards ─── */
.enhanced-card {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 24px;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-lg);
    transition: transform .4s cubic-bezier(.175,.885,.32,1.275), box-shadow .4s ease;
    position: relative;
    overflow: hidden;
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    transition: left .6s ease;
}

.enhanced-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); }
.enhanced-card:hover::before { left: 100%; }

/* card-header override (not Bootstrap's) */
.enhanced-card .ec-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.ec-icon {
    background: var(--gradient-primary);
    color: #fff;
    width: 70px; height: 70px;
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.8rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.ec-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

/* ─── Section Heading ─── */
.section-heading {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--light-purple);
}

/* ─── Ministry Intro Image ─── */
.ministry-intro-img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    margin-bottom: 2rem;
    transition: transform .4s ease;
}
.ministry-intro-img:hover { transform: scale(1.02); }

/* ─── Stats Bar ─── */
.stats-showcase {
    background: var(--gradient-primary);
    border-radius: 24px;
    padding: 3rem 2rem;
    margin: 2rem 0 3rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stats-showcase::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Ccircle cx='30' cy='40' r='3' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='170' cy='160' r='4' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='100' cy='100' r='2' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
    animation: floatBg 15s ease-in-out infinite;
}

@keyframes floatBg { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.stats-showcase .stat-item { position: relative; z-index: 1; text-align: center; padding: 1rem; }
.stats-showcase .stat-number {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem,4vw,3.5rem);
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: 0 2px 6px rgba(0,0,0,0.25);
    margin-bottom: .25rem;
}
.stats-showcase .stat-label {
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .9;
}

/* ─── Feature Grid ─── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-item {
    background: rgba(255,255,255,0.9);
    border-radius: 18px;
    padding: 1.8rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.feature-item::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform .3s ease;
}

.feature-item:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: var(--shadow-lg); }
.feature-item:hover::after { transform: scaleX(1); }

.feature-icon-wrap {
    width: 58px; height: 58px;
    background: var(--gradient-secondary);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    color: #fff;
    font-size: 1.4rem;
}

.feature-item h5 { color: var(--primary-color); font-family: 'Playfair Display', serif; margin-bottom: .5rem; }

/* ─── Guideline Cards ─── */
.guideline-card {
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: 1.8rem;
    border: 2px solid transparent;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.guideline-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform .3s ease;
}

.guideline-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: var(--shadow-lg); }
.guideline-card:hover::before { transform: scaleX(1); }

.guideline-card h4 {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.guideline-card ul { list-style: none; padding: 0; margin: 0; }
.guideline-card li {
    padding: .45rem 0 .45rem 1.4rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    font-size: .95rem;
    color: var(--text-dark);
}
.guideline-card li:last-child { border-bottom: none; }
.guideline-card li::before { content: '▶'; position: absolute; left: 0; color: var(--accent-color); font-size: .7rem; top: .6rem; }

/* ─── Gallery Grid ─── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: all .4s cubic-bezier(.175,.885,.32,1.275);
}

.gallery-item:hover { transform: scale(1.03) translateY(-5px); box-shadow: var(--shadow-xl); }

.gallery-image {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-item:hover .gallery-image { transform: scale(1.1); }

.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.82));
    color: #fff;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.175,.885,.32,1.275);
}

.gallery-item:hover .gallery-overlay { transform: translateY(0); }
.gallery-overlay h4 { font-family: 'Playfair Display', serif; margin-bottom: .4rem; font-size: 1.1rem; }
.gallery-overlay p { font-size: .9rem; opacity: .9; margin: 0; }

/* ─── Contact Showcase ─── */
.contact-showcase {
    background: rgba(255,255,255,0.97);
    border-radius: 30px;
    padding: 3.5rem;
    margin: 3rem 0;
    box-shadow: var(--shadow-xl);
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    background: rgba(76,29,149,0.04);
    border-radius: 16px;
    border: 2px solid transparent;
    transition: all .3s ease;
}

.contact-item:hover { background: rgba(76,29,149,0.09); transform: translateX(8px); border-color: var(--accent-color); box-shadow: var(--shadow-sm); }

.contact-icon {
    background: var(--gradient-primary);
    color: #fff;
    width: 54px; height: 54px;
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    margin-right: 1.2rem;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

/* ─── Timeline ─── */
.timeline-wrap { position: relative; padding: 2rem 0; }

.timeline-wrap::before {
    content: '';
    position: absolute;
    left: 50%; top: 0; bottom: 0;
    width: 4px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
    border-radius: 2px;
}

.tl-item {
    position: relative;
    width: 50%;
    padding-bottom: 2rem;
}

.tl-item:nth-child(odd) { left: 0; padding-right: 3.5rem; text-align: right; }
.tl-item:nth-child(even) { left: 50%; padding-left: 3.5rem; }

.tl-dot {
    position: absolute;
    top: 1rem;
    width: 22px; height: 22px;
    background: var(--accent-gold);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--accent-color);
    z-index: 1;
}

.tl-item:nth-child(odd) .tl-dot  { right: -11px; }
.tl-item:nth-child(even) .tl-dot { left: -11px; }

.tl-content {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent-color);
    transition: all .3s ease;
}

.tl-item:nth-child(odd) .tl-content { border-left: none; border-right: 4px solid var(--accent-color); }

.tl-content:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tl-content h4 { color: var(--primary-color); font-family: 'Playfair Display', serif; margin-bottom: .6rem; font-size: 1.05rem; }

/* ─── Value Cards ─── */
.value-card {
    background: linear-gradient(135deg, #f8f6ff 0%, #fff 100%);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--accent-color);
    transition: all .3s ease;
    display: flex;
    align-items: center;
}
.value-card:hover { transform: translateX(6px); box-shadow: var(--shadow-md); border-left-color: var(--accent-gold); }
.value-icon { font-size: 1.4rem; color: var(--primary-color); margin-right: 1rem; width: 1.8rem; flex-shrink: 0; }
.value-card h5 { margin: 0 0 .15rem; font-size: 1rem; color: var(--text-dark); }
.value-card p { margin: 0; font-size: .9rem; color: var(--text-light); }

/* ─── Leader Card ─── */
.leader-card {
    background: #fff;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform .3s ease, box-shadow .3s ease;
    height: 100%;
}
.leader-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.leader-card img {
    width: 100px; height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--light-purple);
    margin-bottom: 1rem;
}
.leader-card h4 { font-family: 'Playfair Display', serif; color: var(--primary-color); margin-bottom: .25rem; font-size: 1.1rem; }
.leader-card .role { color: var(--text-light); font-size: .9rem; margin-bottom: .8rem; }
.leader-card .contact-line { font-size: .9rem; color: var(--text-dark); margin-bottom: .3rem; }
.leader-card .contact-line i { color: var(--accent-color); margin-right: .5rem; }

/* ─── Activity Cards ─── */
.activity-card {
    background: #fff;
    border-radius: 18px;
    padding: 1.8rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--accent-color);
    transition: all .3s ease;
    height: 100%;
}
.activity-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-top-color: var(--accent-gold); }
.activity-card i { color: var(--primary-color); margin-bottom: 1rem; }
.activity-card h4 { font-family: 'Playfair Display', serif; color: var(--primary-color); margin-bottom: .6rem; }
.activity-card p { color: var(--text-light); font-size: .95rem; margin-bottom: .5rem; }
.activity-card .schedule { font-size: .88rem; color: var(--accent-color); font-weight: 500; }

/* ─── Rehearsal Info ─── */
.rehearsal-info {
    background: rgba(76,29,149,0.05);
    border-radius: 14px;
    padding: 1.5rem 2rem;
    border-left: 4px solid var(--primary-color);
}
.rehearsal-info p { margin-bottom: .5rem; color: var(--text-dark); }
.rehearsal-info p:last-child { margin-bottom: 0; }
.rehearsal-info i { color: var(--primary-color); margin-right: .5rem; }

/* ─── Scripture Quote ─── */
.scripture-quote {
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}
.scripture-quote::before { content: '\201C'; position: absolute; top: -20px; left: 20px; font-size: 8rem; opacity: .1; font-family: Georgia, serif; line-height: 1; }
.scripture-quote p { font-style: italic; font-size: 1.1rem; margin-bottom: .5rem; position: relative; z-index: 1; }
.scripture-quote cite { font-size: .9rem; opacity: .85; font-weight: 600; }

/* ─── CTA Block ─── */
.ministry-cta-block {
    background: var(--gradient-primary);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}
.ministry-cta-block::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(245,158,11,.15), transparent 60%);
}
.ministry-cta-block h3 { font-family: 'Playfair Display', serif; margin-bottom: 1rem; position: relative; z-index: 1; }
.ministry-cta-block p  { opacity: .9; margin-bottom: 1.5rem; position: relative; z-index: 1; }
.ministry-cta-block .btn-cta-light  { background: #fff; color: var(--primary-color); font-weight: 600; border-radius: 50px; padding: .75rem 2rem; border: none; transition: all .3s ease; }
.ministry-cta-block .btn-cta-light:hover  { background: var(--accent-gold); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ministry-cta-block .btn-cta-outline { border: 2px solid rgba(255,255,255,.7); color: #fff; border-radius: 50px; padding: .75rem 2rem; background: transparent; transition: all .3s ease; }
.ministry-cta-block .btn-cta-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); transform: translateY(-2px); }

/* ─── Accordion overrides ─── */
.accordion-item { border: none; margin-bottom: .75rem; border-radius: 14px !important; overflow: hidden; box-shadow: var(--shadow-sm); }
.accordion-button {
    background: rgba(76,29,149,0.06);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 14px !important;
}
.accordion-button:not(.collapsed) {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: none;
}
.accordion-button::after { filter: none; }
.accordion-button:not(.collapsed)::after { filter: brightness(10); }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(76,29,149,.25); }
.accordion-body { background: #fff; padding: 1.5rem 2rem; }

/* ─── Emergency Card ─── */
.emergency-card {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    height: 100%;
}
.emergency-card h4 { color: #fff; font-family: 'Playfair Display', serif; margin-bottom: 1rem; }
.emergency-card li { padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.emergency-card li:last-child { border-bottom: none; }

/* ─── List with icons ─── */
.icon-list { list-style: none; padding: 0; margin: 0; }
.icon-list li { padding: .5rem 0 .5rem 1.8rem; position: relative; border-bottom: 1px solid rgba(0,0,0,.05); font-size: .97rem; }
.icon-list li:last-child { border-bottom: none; }
.icon-list li::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; color: var(--accent-color); font-size: .9rem; top: .55rem; }
.icon-list.cross li::before { content: '\f057'; color: #dc3545; }

/* ─── Quick Info Cards ─── */
.quick-info-card {
    text-align: center;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all .3s ease;
    height: 100%;
}
.quick-info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.quick-info-card i { color: var(--primary-color); margin-bottom: .75rem; }
.quick-info-card h6 { color: var(--text-dark); font-weight: 600; margin-bottom: .5rem; }
.quick-info-card p { color: var(--text-light); font-size: .88rem; margin: 0; }

/* ─── Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp .7s ease-out forwards;
}

.fade-in-up:nth-child(1) { animation-delay: .05s; }
.fade-in-up:nth-child(2) { animation-delay: .15s; }
.fade-in-up:nth-child(3) { animation-delay: .25s; }
.fade-in-up:nth-child(4) { animation-delay: .35s; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .enhanced-card { padding: 1.8rem; }
    .contact-showcase { padding: 2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
    .feature-grid { grid-template-columns: 1fr 1fr; }
    .timeline-wrap::before { left: 24px; }
    .tl-item { width: 100%; left: 0 !important; padding-left: 60px !important; padding-right: 1rem !important; text-align: left !important; }
    .tl-item .tl-dot { left: 14px !important; right: auto !important; }
    .tl-item:nth-child(odd) .tl-content { border-left: 4px solid var(--accent-color); border-right: none; }
    .stats-showcase .stat-number { font-size: 2rem; }
}

@media (max-width: 480px) {
    .ministry-hero-section { min-height: 300px; }
    .feature-grid { grid-template-columns: 1fr; }
    .ec-header { flex-direction: column; text-align: center; }
    .ec-icon { margin-right: 0; margin-bottom: 1rem; }
}
