/* ===================================================
   DesaDigital Modul v1.1.0 — Frontend & Admin Styles
   =================================================== */

/* ---------- WRAPPER ---------- */
.ddmc-wrap,
.ddmc-admin-wrap .ddmc-admin-layout {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ---------- HEADER ---------- */
.ddmc-header {
    text-align: center;
    padding: 48px 20px 32px;
}
.ddmc-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
}
.ddmc-header p {
    color: #64748b;
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto 24px;
}

/* ---------- SEARCH BAR ---------- */
.ddmc-search-form { margin-top: 16px; }
.ddmc-search-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}
.ddmc-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    opacity: .6;
}
.ddmc-search-input {
    width: 100%;
    padding: 12px 44px 12px 42px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    outline: none;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.ddmc-search-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.ddmc-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
}
.ddmc-search-clear:hover { color: #64748b; }
.ddmc-search-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

/* ---------- LAYOUT ---------- */
.ddmc-layout,
.ddmc-admin-layout {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 24px;
}
@media (max-width: 640px) {
    .ddmc-layout, .ddmc-admin-layout { grid-template-columns: 1fr; }
}

/* ---------- SIDEBAR ---------- */
.ddmc-sidebar h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #64748b;
    margin: 0 0 12px;
}
.ddmc-sidebar ul { list-style: none; margin: 0; padding: 0; }
.ddmc-sidebar ul li { margin-bottom: 4px; }
.ddmc-sidebar ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    color: #374151;
    transition: background .15s, color .15s;
}
.ddmc-sidebar ul li a:hover { background: #f1f5f9; color: #0f172a; }
.ddmc-sidebar ul li a.active {
    background: #10b981;
    color: #fff;
    font-weight: 600;
}
.ddmc-count {
    background: rgba(0,0,0,.08);
    border-radius: 20px;
    padding: 1px 7px;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
}
.ddmc-sidebar ul li a.active .ddmc-count { background: rgba(255,255,255,.25); }
.ddmc-sidebar--admin {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    position: sticky;
    top: 32px;
}

/* ---------- GRID ---------- */
.ddmc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ---------- CARD ---------- */
.ddmc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow .2s, transform .2s;
}
.ddmc-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.ddmc-card__thumb img {
    width: 100%;
    border-radius: 8px;
    display: block;
    max-height: 140px;
    object-fit: cover;
}
.ddmc-card__body h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #0f172a;
    line-height: 1.4;
}
.ddmc-card__body p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.6; }
.ddmc-card__footer { margin-top: auto; padding-top: 8px; }

/* ---------- BADGE ---------- */
.ddmc-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.ddmc-badge--dasar    { background: #dcfce7; color: #15803d; }
.ddmc-badge--konten   { background: #dbeafe; color: #1d4ed8; }
.ddmc-badge--data     { background: #fef3c7; color: #92400e; }
.ddmc-badge--lanjutan { background: #f3e8ff; color: #7e22ce; }

/* ---------- BUTTON ---------- */
.ddmc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    text-decoration: none;
}
.ddmc-btn:hover { color: #059669; }

/* ---------- PAGINATION ---------- */
.ddmc-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
    flex-wrap: wrap;
}
.ddmc-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    font-size: 14px;
    color: #374151;
    background: #fff;
    transition: background .15s;
}
.ddmc-pagination a:hover,
.ddmc-pagination a.current { background: #10b981; color: #fff; border-color: #10b981; }

/* ---------- EMPTY / ERROR / NOTICE ---------- */
.ddmc-empty, .ddmc-error {
    text-align: center;
    padding: 48px 24px;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #e2e8f0;
}
.ddmc-error { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.ddmc-notice {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.ddmc-notice--success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.ddmc-notice--error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ========================================
   SECTION KONTAK & KIRIM DATA
   ======================================== */
.ddmc-kontak-section {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 2px solid #f1f5f9;
}
.ddmc-kontak-section > h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
}
.ddmc-kontak-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
@media (max-width: 700px) {
    .ddmc-kontak-wrap { grid-template-columns: 1fr; }
}

/* -- Kontak box kiri -- */
.ddmc-kontak-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}
.ddmc-kontak-box > p { color: #64748b; font-size: 14px; margin: 0 0 16px; }
.ddmc-kontak-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    transition: background .15s, border-color .15s;
}
.ddmc-kontak-item:last-child { margin-bottom: 0; }
.ddmc-kontak-item:hover { background: #f8fafc; border-color: #10b981; }
.ddmc-kontak-item--email { border-left: 4px solid #6366f1; }
.ddmc-kontak-item--wa    { border-left: 4px solid #10b981; }
.ddmc-kontak-icon { font-size: 20px; flex-shrink: 0; }

/* -- Form kirim data kanan -- */
.ddmc-kirim-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}
.ddmc-kirim-box h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
}
.ddmc-kirim-box > p { font-size: 13px; color: #64748b; margin: 0 0 16px; }
.ddmc-form { display: flex; flex-direction: column; gap: 0; }
.ddmc-form-row { margin-bottom: 10px; }
.ddmc-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #f8fafc;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
.ddmc-input:focus { border-color: #10b981; background: #fff; }
.ddmc-textarea { resize: vertical; min-height: 72px; }
.ddmc-btn-submit {
    width: 100%;
    padding: 12px;
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    margin-top: 4px;
}
.ddmc-btn-submit:hover { background: #059669; }

/* ---------- ADMIN OVERRIDES ---------- */
.ddmc-admin-wrap .ddmc-card { box-shadow: none; }
