/* ==========================================================================
   RUSTIC (RusticBD) - Dedicated Strategic Programs Stylesheet
   Harmonized with ongoing-projects-modern.css, about-modern.css & shushilan-theme.css
   ========================================================================== */

:root {
    --brand-dark-forest: #092015;
    --brand-forest: #12402a;
    --brand-emerald: #15803d;
    --brand-emerald-light: #22c55e;
    --brand-emerald-subtle: #ecfdf5;

    --brand-navy-dark: #071e33;
    --brand-navy: #0f2e48;
    --brand-navy-accent: #1e4f7c;
    --brand-sky: #e0f2fe;

    --brand-gold: #c8933f;
    --brand-amber: #d97706;
    --brand-amber-light: #fef3c7;

    --surface-bg: #f8fafc;
    --surface-card: #ffffff;
    --surface-muted: #f1f5f9;
    --surface-border: #e2e8f0;
    --surface-border-subtle: #cbd5e1;

    --text-heading: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 36px -6px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 24px 50px -10px rgba(15, 23, 42, 0.18);
}

/* --------------------------------------------------------------------------
   0. Global Reset & Baseline Typography
   -------------------------------------------------------------------------- */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-body);
    background-color: var(--surface-bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--text-heading);
    letter-spacing: -0.02em;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   1. Modern Continuous Announcement Ticker
   -------------------------------------------------------------------------- */
.rustic-modern-ticker {
    background: linear-gradient(90deg, #092015 0%, #12402a 50%, #0f2e48 100%);
    color: #ffffff;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.rustic-ticker-track {
    display: flex;
    width: max-content;
    animation: marqueeLinear 42s linear infinite;
}

.rustic-ticker-track:hover {
    animation-play-state: paused;
}

.rustic-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding-right: 48px;
    white-space: nowrap;
}

.rustic-ticker-item .ticker-chip {
    background: rgba(200, 147, 63, 0.25);
    color: #fef08a;
    border: 1px solid rgba(200, 147, 63, 0.6);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes marqueeLinear {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   2. High-Contrast Typewriter Slogan & Live Date-Time Bar
   -------------------------------------------------------------------------- */
.slogan-time-strip {
    background: #ffffff;
    border-bottom: 1px solid var(--surface-border);
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.slogan-heading {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--brand-forest);
    min-height: 28px;
    display: inline-flex;
    align-items: center;
}

.time-display-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    padding: 4px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-heading);
}

/* --------------------------------------------------------------------------
   3. Programs Hero Header Banner
   -------------------------------------------------------------------------- */
.programs-hero {
    position: relative;
    background: linear-gradient(135deg, #092015 0%, #12402a 50%, #0f2e48 100%);
    color: #ffffff;
    padding: 72px 0 76px 0;
    overflow: hidden;
}

.programs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(34, 197, 94, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 85% 70%, rgba(56, 189, 248, 0.18) 0%, transparent 50%);
    pointer-events: none;
}

.programs-hero .hero-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.programs-hero .hero-breadcrumb a {
    color: #86efac;
    text-decoration: none;
    transition: color 0.2s ease;
}

.programs-hero .hero-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.hero-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fef08a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 9999px;
    margin-bottom: 16px;
}

.programs-hero-title {
    font-size: 2.85rem;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.programs-hero-title span.hero-accent {
    background: linear-gradient(120deg, #4ade80 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.programs-hero-subtitle {
    font-size: 1.12rem;
    line-height: 1.75;
    color: #cbd5e1;
    max-width: 840px;
    margin-bottom: 32px;
}

/* Hero Stats Ribbon */
.hero-stats-ribbon {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-top: 25px;
}

.hero-stat-pill {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    transition: transform 0.22s ease, background 0.22s ease;
}

.hero-stat-pill:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.stat-pill-num {
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin-bottom: 4px;
}

.stat-pill-num .accent-gold {
    color: #fef08a;
    font-size: 0.95rem;
    font-weight: 700;
}

.stat-pill-num .accent-green {
    color: #86efac;
    font-size: 0.95rem;
    font-weight: 700;
}

.stat-pill-label {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 500;
    line-height: 1.35;
}

/* --------------------------------------------------------------------------
   4. Sticky Category Filter & Search Strip
   -------------------------------------------------------------------------- */
.program-filter-wrapper {
    position: sticky;
    top: 68px;
    z-index: 1020;
    margin-top: -30px;
    margin-bottom: 42px;
}

.program-filter-card {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-and-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.program-search-box {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.program-search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.05rem;
}

.program-search-input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-pill);
    font-size: 0.90rem;
    font-family: inherit;
    background: #ffffff;
    color: var(--text-heading);
    outline: none;
    transition: all 0.2s ease;
}

.program-search-input:focus {
    border-color: var(--brand-emerald);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

.program-search-input::placeholder {
    color: #94a3b8;
}

.category-pills-row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.category-pills-row::-webkit-scrollbar {
    display: none;
}

.filter-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-body);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
}

.filter-pill-btn:hover {
    color: var(--brand-forest);
    background: var(--surface-muted);
    border-color: var(--surface-border);
}

.filter-pill-btn.active {
    background: linear-gradient(135deg, #12402a 0%, #15803d 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(18, 64, 42, 0.28);
    border-color: transparent;
}

.filter-count {
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
}

.filter-pill-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* --------------------------------------------------------------------------
   5. Programs Grid & Compact Card Architecture
   -------------------------------------------------------------------------- */
.programs-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.program-card-modern {
    background: #ffffff;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.program-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

/* Card Header Strip */
.card-header-modern {
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--surface-border);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    width: fit-content;
}

/* Category Tag Colors */
.tag-org, .tag-waste {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.tag-edu, .tag-youth {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.tag-food, .tag-agri {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.tag-climate, .tag-wash {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tag-rights {
    background: #fdf2f8;
    color: #9d174d;
    border: 1px solid #fbcfe8;
}

.tag-forestry {
    background: #f0fdfa;
    color: #0f766e;
    border: 1px solid #99f6e4;
}

.card-title-modern {
    font-size: 1.20rem;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.35;
    margin: 0;
}

/* Card Image Box */
.card-image-box {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #f1f5f9;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.program-card-modern:hover .card-image-box img {
    transform: scale(1.05);
}

.card-image-caption {
    background: #f8fafc;
    border-bottom: 1px solid var(--surface-border);
    padding: 8px 18px;
    font-size: 0.82rem;
    color: #475569;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

.card-image-caption i {
    color: #166534;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Multi-Image Slider for Cards */
.card-slider-box {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background: #0f172a;
}

.card-slider-box .slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
}

.card-slider-box .slider-slide {
    min-width: 100%;
    height: 100%;
}

.card-slider-box .slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-btn-prev, .slider-btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    z-index: 5;
    transition: background 0.2s;
}

.slider-btn-prev:hover, .slider-btn-next:hover {
    background: rgba(18, 64, 42, 0.9);
}

.slider-btn-prev { left: 8px; }
.slider-btn-next { right: 8px; }

.slider-dots-box {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
    background: rgba(0, 0, 0, 0.45);
    padding: 3px 8px;
    border-radius: 9999px;
}

.slider-dot-item {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.2s;
}

.slider-dot-item.active {
    background: #86efac;
    width: 14px;
    border-radius: 4px;
}

.slider-counter-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    font-size: 0.70rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    z-index: 5;
}

/* Quick Fact Chips */
.card-quick-facts {
    background: #f8fafc;
    border-bottom: 1px solid var(--surface-border);
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
}

.fact-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid var(--surface-border);
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-weight: 600;
}

.fact-chip i {
    color: var(--brand-emerald);
    font-size: 0.95rem;
}

/* Card Body */
.card-body-modern {
    padding: 22px 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-excerpt-text {
    font-size: 0.92rem;
    line-height: 1.68;
    color: var(--text-body);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-action-bar {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--surface-border);
}

.btn-view-program {
    width: 100%;
    background: linear-gradient(135deg, #12402a 0%, #15803d 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.90rem;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(18, 64, 42, 0.18);
    text-decoration: none;
}

.btn-view-program:hover {
    background: linear-gradient(135deg, #092015 0%, #12402a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(18, 64, 42, 0.32);
    color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   6. Custom Modal Popup Styles
   -------------------------------------------------------------------------- */
.program-modal .modal-content {
    border-radius: var(--radius-xl);
    border: 1px solid var(--surface-border);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.program-modal .modal-header {
    background: linear-gradient(135deg, #092015 0%, #12402a 50%, #0f2e48 100%);
    color: #ffffff;
    padding: 22px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.program-modal .modal-title {
    color: #ffffff !important;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.program-modal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.program-modal .btn-close:hover {
    opacity: 1;
}

.program-modal .modal-body {
    padding: 30px 32px;
    font-size: 0.98rem;
    line-height: 1.8;
    color: var(--text-body);
}

.modal-media-wrap {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    background: #0f172a;
}

.modal-media-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-info-strip {
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.modal-info-item {
    font-size: 0.86rem;
    color: var(--text-muted);
}

.modal-info-item strong {
    display: block;
    color: var(--text-heading);
    font-size: 0.92rem;
}

.modal-section-heading {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-forest);
    margin-top: 26px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #ecfdf5;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section-heading:first-of-type {
    margin-top: 0;
}

.program-modal .modal-footer {
    background: #f8fafc;
    border-top: 1px solid var(--surface-border);
    padding: 16px 28px;
}

/* --------------------------------------------------------------------------
   7. Responsive Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 1199px) {
    .programs-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 767px) {
    .programs-grid-modern {
        grid-template-columns: 1fr;
    }
    .programs-hero {
        padding: 50px 0 54px 0;
    }
    .programs-hero-title {
        font-size: 1.85rem;
    }
    .programs-hero-subtitle {
        font-size: 1rem;
    }
    .hero-stats-ribbon {
        grid-template-columns: repeat(2, 1fr);
    }
    .program-filter-card {
        padding: 12px 14px;
    }
    .category-pills-row {
        justify-content: flex-start;
    }
    .program-modal .modal-body {
        padding: 20px;
    }
}
