/* =====================================================
   Elite-Church — Programs Frontend Styles
   ===================================================== */

/* ── Section ── */
.ec-programs-wrap { max-width: 1300px; margin: 0 auto; padding: 40px 20px; }

.ec-programs-section { margin-bottom: 60px; }

.ec-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    padding-bottom: 14px;
}
.ec-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #7c3aed, #2563eb);
}

/* ── Grid ── */
.ec-prog-grid {
    display: grid;
    gap: 24px;
}
.ec-grid-cols-1  { grid-template-columns: repeat(1,  1fr); }
.ec-grid-cols-2  { grid-template-columns: repeat(2,  1fr); }
.ec-grid-cols-3  { grid-template-columns: repeat(3,  1fr); }
.ec-grid-cols-4  { grid-template-columns: repeat(4,  1fr); }
.ec-grid-cols-5  { grid-template-columns: repeat(5,  1fr); }
.ec-grid-cols-6  { grid-template-columns: repeat(6,  1fr); }
.ec-grid-cols-7  { grid-template-columns: repeat(7,  1fr); }
.ec-grid-cols-8  { grid-template-columns: repeat(8,  1fr); }
.ec-grid-cols-9  { grid-template-columns: repeat(9,  1fr); }
.ec-grid-cols-10 { grid-template-columns: repeat(10, 1fr); }
.ec-grid-cols-11 { grid-template-columns: repeat(11, 1fr); }
.ec-grid-cols-12 { grid-template-columns: repeat(12, 1fr); }
.ec-grid-cols-13 { grid-template-columns: repeat(13, 1fr); }
.ec-grid-cols-14 { grid-template-columns: repeat(14, 1fr); }
.ec-grid-cols-15 { grid-template-columns: repeat(15, 1fr); }

@media (max-width: 1024px) {
    [class*="ec-grid-cols-"] { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 600px) {
    [class*="ec-grid-cols-"] { grid-template-columns: 1fr; }
}

/* ── Carousel ── */
.ec-carousel-wrap { position: relative; overflow: hidden; }
.ec-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.4s ease;
    padding-bottom: 16px;
}
.ec-carousel-track .ec-prog-card {
    min-width: 300px;
    flex: 0 0 300px;
}
.ec-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #7c3aed;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: background 0.2s;
}
.ec-carousel-btn:hover { background: #5b21b6; }
.ec-carousel-prev { left: 0; }
.ec-carousel-next { right: 0; }

/* ── Card ── */
.ec-prog-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}
.ec-prog-card:hover {
    transform: translateY(-6px);
}

.ec-shadow-sm { box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
.ec-shadow-md { box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.ec-shadow-lg { box-shadow: 0 8px 32px rgba(0,0,0,0.2);  }

.ec-prog-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.ec-prog-card-body {
    padding: 20px;
}
.ec-prog-title {
    margin: 0 0 12px;
    line-height: 1.3;
}
.ec-prog-date,
.ec-prog-time {
    margin: 6px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.ec-prog-icon { font-size: 1.1rem; }
.ec-prog-excerpt {
    margin: 10px 0;
    line-height: 1.6;
    opacity: 0.85;
}
.ec-prog-know-more-btn {
    margin-top: 16px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
    display: inline-block;
}
.ec-prog-know-more-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ── Animations ── */
@keyframes ec-fadeInUp   { from { opacity:0; transform:translateY(30px); } to { opacity:1; transform:translateY(0); } }
@keyframes ec-fadeIn     { from { opacity:0; } to { opacity:1; } }
@keyframes ec-slideInLeft{ from { opacity:0; transform:translateX(-40px); } to { opacity:1; transform:translateX(0); } }
@keyframes ec-zoomIn     { from { opacity:0; transform:scale(0.85); } to { opacity:1; transform:scale(1); } }
@keyframes ec-bounceIn   { 0%{opacity:0;transform:scale(.3)} 50%{opacity:1;transform:scale(1.05)} 70%{transform:scale(.9)} 100%{transform:scale(1)} }

.ec-anim-fadeInUp    { animation: ec-fadeInUp    0.6s ease-out both; }
.ec-anim-fadeIn      { animation: ec-fadeIn      0.6s ease-out both; }
.ec-anim-slideInLeft { animation: ec-slideInLeft 0.6s ease-out both; }
.ec-anim-zoomIn      { animation: ec-zoomIn      0.5s ease-out both; }
.ec-anim-bounceIn    { animation: ec-bounceIn    0.7s both; }

/* ── Know More Modal ── */
.ec-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ec-fadeIn 0.25s ease;
}
.ec-modal-box {
    background: #fff;
    border-radius: 14px;
    max-width: 700px;
    width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    position: relative;
    animation: ec-zoomIn 0.25s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.ec-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: background 0.2s;
    z-index: 5;
}
.ec-modal-close:hover { background: #e5e7eb; }
.ec-modal-image img { width:100%; max-height:340px; object-fit:cover; border-radius:14px 14px 0 0; display:block; }
.ec-modal-body { padding: 28px; }
.ec-modal-title { font-size:1.6rem; font-weight:700; color:#1f2937; margin:0 0 16px; }
.ec-modal-meta { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:20px; }
.ec-modal-meta span { background:#f3f4f6; padding:6px 14px; border-radius:20px; font-size:0.875rem; color:#374151; }
.ec-modal-description { color:#374151; line-height:1.7; }

/* ── Popup Overlay ── */
.ec-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99980;
    display: flex;
}
.ec-popup-box {
    position: absolute;
    width: 480px;
    max-width: 96vw;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
    overflow: hidden;
    animation: ec-zoomIn 0.35s ease;
}

/* Popup positions */
.ec-popup-position-top-left     { top:30px;  left:30px; }
.ec-popup-position-top-center   { top:30px;  left:50%; transform:translateX(-50%); }
.ec-popup-position-top-right    { top:30px;  right:30px; }
.ec-popup-position-center-left  { top:50%;   left:30px;  transform:translateY(-50%); }
.ec-popup-position-center-center{ top:50%;   left:50%;   transform:translate(-50%,-50%); }
.ec-popup-position-center-right { top:50%;   right:30px; transform:translateY(-50%); }
.ec-popup-position-bottom-left  { bottom:30px; left:30px; }
.ec-popup-position-bottom-center{ bottom:30px; left:50%; transform:translateX(-50%); }
.ec-popup-position-bottom-right { bottom:30px; right:30px; }

.ec-popup-image img { width:100%; max-height:220px; object-fit:cover; display:block; }
.ec-popup-body { padding: 22px; }
.ec-popup-title { font-size:1.3rem; font-weight:700; margin:0 0 12px; }
.ec-popup-date, .ec-popup-time, .ec-popup-speaker, .ec-popup-location {
    margin: 6px 0; font-size: 0.9rem;
}
.ec-popup-desc { margin-top:12px; line-height:1.6; font-size:0.9rem; }
.ec-popup-close {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 30px; height: 30px;
    font-size: 18px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: background 0.2s;
}
.ec-popup-close:hover { background: rgba(0,0,0,0.8); }

/* ══════════════════════════════════════════════════
   Filter Bar
══════════════════════════════════════════════════ */
.ec-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 0 auto 40px;
    padding: 14px 20px;
    background: #ffffff;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    max-width: fit-content;
}

.ec-filter-btn {
    padding: 9px 22px;
    background: transparent;
    border: none;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.22s ease;
    outline: none;
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: nowrap;
}
.ec-filter-btn:hover {
    background: #f3f0ff;
    color: #7c3aed;
}
.ec-filter-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
}

/* Center the filter bar wrapper */
.ec-filter-bar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}
.ec-filter-bar-wrap .ec-filter-bar {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .ec-filter-bar {
        border-radius: 14px;
        padding: 12px;
        max-width: 100%;
        gap: 6px;
    }
    .ec-filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* ══════════════════════════════════════════════════
   Sub-Programs in Modal
══════════════════════════════════════════════════ */
.ec-modal-sub-programs {
    margin-top: 24px;
    border-top: 2px solid #f3f4f6;
    padding-top: 20px;
}
.ec-modal-sub-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    margin: 0 0 16px;
}
.ec-sub-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ec-sub-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    border-left: 4px solid #7c3aed;
    transition: background 0.2s;
}
.ec-sub-item:hover { background: #f3f4f6; }
.ec-sub-item-time {
    min-width: 120px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2563eb;
    background: #dbeafe;
    padding: 4px 10px;
    border-radius: 20px;
    text-align: center;
    white-space: nowrap;
    align-self: center;
}
.ec-sub-item-info {
    flex: 1;
}
.ec-sub-item-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}
.ec-sub-item-meta {
    display: inline-block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-right: 12px;
}
