/**
 * MPM Muhammadiyah Theme Custom Stylesheet
 * Sesuai Mockup Desain Majelis Pemberdayaan Masyarakat PP Muhammadiyah
 * Kompatibel dengan Frontend & WordPress Gutenberg Block Editor
 */

:root {
    --mpm-teal-dark: #094738;
    --mpm-teal: #0d6b56;
    --mpm-teal-light: #128a6f;
    --mpm-navy: #103554;
    --mpm-blue: #1b4b72;
    --mpm-text-dark: #1e293b;
    --mpm-text-muted: #64748b;
    --mpm-bg-light: #f8fafc;
    --mpm-radius-sm: 8px;
    --mpm-radius-md: 16px;
    --mpm-radius-lg: 24px;
    --mpm-radius-full: 9999px;
}

/* ==========================================================================
   1. GLOBAL CONTAINER & UTILITIES
   ========================================================================== */
.mpm-container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.mpm-section {
    margin-top: 48px;
    margin-bottom: 48px;
}

.mpm-btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--mpm-teal-dark);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: var(--mpm-radius-full);
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.15s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(9, 71, 56, 0.2);
}

.mpm-btn-pill:hover,
.mpm-btn-pill:focus {
    background-color: var(--mpm-teal-light);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.mpm-btn-pill svg,
.mpm-btn-pill i {
    font-size: 13px;
    transition: transform 0.2s ease;
}

.mpm-btn-pill:hover svg,
.mpm-btn-pill:hover i {
    transform: translateX(4px);
}

/* ==========================================================================
   2. HEADER / NAVBAR STYLING
   ========================================================================== */
.site-header {
    background: var(--mpm-teal) !important;
}

.site-header .main-nav > ul > li > a,
.site-header .main-nav > div > ul > li > a {
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 500;
    text-transform: none !important;
    padding: 8px 14px;
    border-radius: var(--mpm-radius-full);
    transition: all 0.2s ease;
}

/* Active menu item with white pill border outline */
.site-header .main-nav li.current-menu-item > a,
.site-header .main-nav li.current_page_item > a,
.site-header .main-nav li.active > a {
    border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.12);
    padding: 7px 18px !important;
}

.site-header .main-nav > ul > li > a:hover,
.site-header .main-nav > div > ul > li > a:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* Top bar hidden on MPM clean style if desired, or matching teal */
.top-bar {
    background: var(--mpm-teal-dark) !important;
}

/* ==========================================================================
   3. HERO BANNER SECTION
   ========================================================================== */
.mpm-hero {
    position: relative;
    width: 100%;
    border-radius: var(--mpm-radius-lg);
    overflow: hidden;
    margin-top: 15px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.mpm-hero-img-wrap {
    width: 100%;
    height: clamp(320px, 48vw, 520px);
    position: relative;
    background-color: #1a382e;
}

.mpm-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.mpm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.85) 100%),
                linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(20px, 4vw, 44px);
    color: #ffffff;
    box-sizing: border-box;
}

.mpm-hero-title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 12px;
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mpm-hero-desc {
    font-size: clamp(13px, 1.8vw, 15px);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.mpm-hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    border-left: 2px solid rgba(255, 255, 255, 0.7);
    padding-left: 10px;
}

/* ==========================================================================
   4. ABOUT SECTION (2 COLUMNS)
   ========================================================================== */
.mpm-about-grid {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
    margin: 48px 0;
}

.mpm-about-left h2,
.mpm-about-title {
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 800;
    color: var(--mpm-navy);
    line-height: 1.25;
    margin: 0 0 6px;
}

.mpm-about-subtitle {
    font-size: clamp(14px, 1.6vw, 16px);
    color: #4b5563;
    font-weight: 500;
    margin: 0 0 24px;
}

.mpm-about-right p {
    font-size: clamp(14px, 1.5vw, 15.5px);
    line-height: 1.8;
    color: #374151;
    margin-bottom: 16px;
}

.mpm-about-right p strong {
    color: #111827;
    font-weight: 700;
}

/* ==========================================================================
   5. HIGHLIGHT / PROGRAM CARDS (3 CARDS)
   ========================================================================== */
.mpm-programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2.5vw, 24px);
    margin: 40px 0 56px;
}

.mpm-card-image-wrap {
    position: relative;
    border-radius: var(--mpm-radius-md);
    overflow: hidden;
    height: 320px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #f1f5f9;
}

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

.mpm-card-image-wrap:hover .mpm-card-img {
    transform: scale(1.03);
}

.mpm-card-pill-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #1f2937;
    padding: 6px 20px;
    border-radius: var(--mpm-radius-full);
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 2;
    white-space: nowrap;
}

/* Info Card (Rightmost Card) */
.mpm-card-info-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--mpm-radius-md);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 320px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.mpm-card-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.mpm-card-info-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--mpm-navy);
    line-height: 1.3;
    margin: 0;
}

.mpm-circle-arrow-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--mpm-navy);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.mpm-circle-arrow-btn:hover {
    background-color: var(--mpm-teal);
    transform: scale(1.08);
}

.mpm-card-info-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
    margin: 16px 0;
}

.mpm-card-info-tag {
    font-size: 13px;
    font-weight: 700;
    color: var(--mpm-navy);
    text-decoration: none;
}

/* ==========================================================================
   6. PERSEBARAN MPM (STATISTICS COUNTER)
   ========================================================================== */
.mpm-persebaran-section {
    text-align: center;
    margin: 56px 0 48px;
}

.mpm-persebaran-title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    color: var(--mpm-navy);
    margin: 0 0 36px;
}

.mpm-counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: center;
}

.mpm-counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mpm-counter-num {
    font-size: clamp(38px, 5.5vw, 60px);
    font-weight: 900;
    color: var(--mpm-navy);
    line-height: 1.05;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.mpm-counter-label {
    font-size: clamp(14px, 1.6vw, 16px);
    font-weight: 500;
    color: #374151;
}

/* ==========================================================================
   7. QUOTE BANNER (HAEDAR NASHIR)
   ========================================================================== */
.mpm-quote-banner {
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: var(--mpm-radius-full);
    padding: 16px 30px;
    margin: 48px auto !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    width: 100% !important;
    box-sizing: border-box;
}

.mpm-quote-banner,
.mpm-quote-banner > .wp-block-group__inner-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 22px !important;
    width: 100% !important;
    box-sizing: border-box;
}

.mpm-quote-banner > .wp-block-group__inner-container {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    max-width: 100% !important;
}

.mpm-quote-banner > .wp-block-group__inner-container > *,
.mpm-quote-banner > * {
    margin-block-start: 0 !important;
    margin-block-end: 0 !important;
}

.nm-entry-content .mpm-quote-avatar,
.entry-content .mpm-quote-avatar,
.mpm-quote-avatar {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
    display: block !important;
    margin: 0 !important;
}

.mpm-quote-body {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: left !important;
    padding: 0 10px;
}

.mpm-quote-text {
    font-size: clamp(12.5px, 1.4vw, 14px);
    line-height: 1.55;
    color: #334151;
    margin: 0 0 4px;
    font-style: italic;
}

.mpm-quote-author {
    font-size: clamp(11.5px, 1.2vw, 12.5px);
    color: #64748b;
    margin: 0;
    font-style: normal;
}

.mpm-quote-author strong {
    color: var(--mpm-navy);
    font-weight: 700;
}

.nm-entry-content .mpm-quote-speaker-thumb,
.entry-content .mpm-quote-speaker-thumb,
.mpm-quote-speaker-thumb {
    height: 70px !important;
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    border-radius: var(--mpm-radius-sm) !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    display: block !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   8. BERITA PILIHAN SECTION
   ========================================================================== */
.mpm-news-section {
    margin: 56px 0;
}

.mpm-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.mpm-news-title {
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 800;
    color: var(--mpm-navy);
    margin: 0;
}

.mpm-news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mpm-news-item {
    display: flex;
    gap: 20px;
    align-items: center;
    text-decoration: none !important;
    padding: 10px;
    border-radius: var(--mpm-radius-md);
    transition: background-color 0.2s ease;
}

.mpm-news-item:hover {
    background-color: #f8fafc;
}

.mpm-news-thumb {
    width: 180px;
    height: 100px;
    border-radius: var(--mpm-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.mpm-news-info {
    flex: 1;
    min-width: 0;
}

.mpm-news-headline {
    font-size: clamp(15px, 1.8vw, 17px);
    font-weight: 700;
    color: var(--mpm-navy);
    line-height: 1.4;
    margin: 0 0 8px;
    transition: color 0.2s ease;
}

.mpm-news-item:hover .mpm-news-headline {
    color: var(--mpm-teal);
}

.mpm-news-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #10b981;
    font-weight: 600;
}

.mpm-news-date svg,
.mpm-news-date i {
    font-size: 13px;
}

/* ==========================================================================
   9. MITRA KAMI (PARTNERS LOGO GRID)
   ========================================================================== */
.mpm-partners-section {
    margin: 64px 0 80px;
    text-align: center;
}

.mpm-partners-badge {
    display: inline-block;
    border: 1.5px solid #94a3b8;
    border-radius: var(--mpm-radius-full);
    padding: 6px 28px;
    font-size: 13.5px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 36px;
    background: #ffffff;
}

.mpm-partners-grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 28px 44px !important;
    max-width: 1080px !important;
    margin: 0 auto !important;
}

/* Proteksi spesifisitas tinggi agar tidak tertimpa .nm-entry-content img */
.nm-entry-content .mpm-partners-grid img,
.entry-content .mpm-partners-grid img,
.mpm-partners-grid img,
.mpm-partners-grid .mpm-partner-logo,
.mpm-partner-logo {
    display: inline-block !important;
    height: 42px !important;
    width: auto !important;
    max-height: 48px !important;
    max-width: 140px !important;
    min-width: 60px !important;
    object-fit: contain !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.nm-entry-content .mpm-partners-grid img:hover,
.entry-content .mpm-partners-grid img:hover,
.mpm-partners-grid img:hover,
.mpm-partner-logo:hover {
    transform: scale(1.06);
}

/* ==========================================================================
   10. FOOTER STYLING
   ========================================================================== */
.site-footer {
    background: linear-gradient(135deg, #094738 0%, #0d3b66 100%) !important;
    color: #f1f5f9 !important;
    padding-top: 50px !important;
    padding-bottom: 40px !important;
}

.mpm-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 60px;
    align-items: start;
}

.mpm-footer-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mpm-footer-logo {
    max-width: 320px;
    height: auto;
}

.mpm-footer-address {
    font-size: 13.5px;
    color: #e2e8f0;
    line-height: 1.6;
}

.mpm-footer-map {
    margin-top: 6px;
}

.mpm-footer-map-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--mpm-radius-full);
    padding: 10px 22px;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    max-width: 380px;
    box-sizing: border-box;
}

.mpm-footer-map-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: #34d399;
    color: #34d399 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mpm-footer-map-btn i.fa-map-marked-alt,
.mpm-footer-map-btn i.fa-map-marker-alt {
    font-size: 18px;
    color: #34d399;
}

.mpm-footer-right {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 40px;
}

.mpm-footer-contact-title {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 20px;
}

.mpm-footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mpm-footer-contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
    color: #f1f5f9;
}

.mpm-footer-contact-item a {
    color: #f1f5f9 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mpm-footer-contact-item a:hover {
    color: #34d399 !important;
}

.mpm-contact-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    color: #ffffff;
}

/* ==========================================================================
   11. GUTENBERG EDITOR COMPATIBILITY (WP ADMIN)
   ========================================================================== */
.editor-styles-wrapper .mpm-container {
    max-width: 1100px;
    margin: 0 auto;
}

.editor-styles-wrapper .mpm-hero {
    margin-top: 10px;
}

/* ==========================================================================
   12. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 900px) {
    .mpm-about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mpm-programs-grid {
        grid-template-columns: 1fr;
    }
    
    .mpm-card-image-wrap {
        height: 260px;
    }
    
    .mpm-card-info-box {
        height: auto;
    }
    
    .mpm-quote-banner {
        border-radius: var(--mpm-radius-md);
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    
    .mpm-footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    
    .mpm-footer-right {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        padding-left: 0;
        padding-top: 24px;
    }
}

@media (max-width: 600px) {
    .mpm-counter-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mpm-news-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mpm-news-thumb {
        width: 100%;
        height: 180px;
    }
    
    .mpm-partners-grid {
        gap: 20px 24px;
    }
    
    .mpm-partner-logo {
        height: 32px;
    }
}
