/* KSA Daleel – Frontend Styles */

.kd-archive-wrap,
.kd-single-wrap {
    direction: rtl;
    font-family: Arial, Tahoma, sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 10px;
}

/* ---- Archive header / search ---- */
.kd-archive-header { margin-bottom: 15px; }
.kd-archive-title { font-size: 1.4em; color: #333; border-bottom: 2px solid #c00; padding-bottom: 6px; }

.kd-search-wrap { margin: 10px 0; }
.kd-search-form { display: flex; gap: 6px; flex-wrap: wrap; position: relative; }
.kd-search-input {
    flex: 1; padding: 8px 12px; border: 1px solid #ccc; border-radius: 4px;
    font-size: 14px; min-width: 200px; direction: rtl;
}
.kd-search-btn {
    padding: 8px 18px; background: #c00; color: #fff;
    border: none; border-radius: 4px; cursor: pointer; font-size: 14px;
}
.kd-search-btn:hover { background: #900; }
.kd-search-suggestions {
    position: absolute; top: 100%; right: 0; left: 0;
    background: #fff; border: 1px solid #ddd; z-index: 100;
    max-height: 260px; overflow-y: auto; border-radius: 0 0 4px 4px;
}
.kd-search-suggestions a {
    display: block; padding: 8px 12px; color: #333;
    border-bottom: 1px solid #eee; text-decoration: none;
}
.kd-search-suggestions a:hover { background: #f5f5f5; }

/* ---- Listing card ---- */
.kd-card {
    border: 1px solid #ddd; margin-bottom: 16px;
    border-radius: 4px; overflow: hidden; background: #fff;
}
.kd-card.kd-featured { border-color: #e8a000; }

.kd-card-header {
    background: #f0f0f0; padding: 8px 12px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    border-bottom: 1px solid #ddd;
}
.kd-star { width: 18px; height: 18px; }
.kd-card-title { font-weight: bold; color: #c00; text-decoration: none; flex: 1; }
.kd-card-title:hover { text-decoration: underline; }
.kd-reveal-phones {
    background: #2a7d2e; color: #fff; border: none;
    padding: 4px 10px; border-radius: 3px; cursor: pointer; font-size: 12px;
}
.kd-reveal-phones:hover { background: #1a5c1e; }

.kd-card-body { display: flex; gap: 12px; padding: 10px 12px; }
.kd-card-thumb img { width: 100px; height: 100px; object-fit: cover; border-radius: 4px; }

.kd-card-details { flex: 1; }
.kd-content-icons { margin-bottom: 6px; font-size: 12px; color: #666; display: flex; align-items: center; gap: 4px; }
.kd-content-icons img { width: 22px; height: 22px; }

.kd-details-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kd-details-table tr { border-bottom: 1px solid #f0f0f0; }
.kd-lbl { color: #666; width: 110px; padding: 4px 6px; white-space: nowrap; }
.kd-val { padding: 4px 6px; }
.kd-val img { width: 22px; }

.kd-phones.hidden-phone { filter: blur(4px); user-select: none; }

.kd-social-icons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.kd-social-icons img { width: 26px; height: 26px; }

.kd-card-genres {
    background: #f9f9f9; padding: 6px 12px; font-size: 12px;
    border-top: 1px solid #eee; color: #555;
}
.kd-card-genres a { color: #c00; text-decoration: none; margin: 0 4px; }
.kd-card-genres a:hover { text-decoration: underline; }

/* ---- Pagination ---- */
.kd-pagination { text-align: center; margin: 20px 0; }
.kd-pagination a,
.kd-pagination span {
    display: inline-block; padding: 6px 12px; margin: 2px;
    border: 1px solid #ddd; border-radius: 3px;
    color: #333; text-decoration: none; font-size: 13px;
}
.kd-pagination .current { background: #c00; color: #fff; border-color: #c00; }
.kd-pagination a:hover { background: #f0f0f0; }

/* ---- Single page ---- */
.kd-single-genres { margin-bottom: 8px; font-size: 13px; }
.kd-single-genres a { color: #c00; text-decoration: none; }
.kd-single-title { font-size: 1.5em; color: #333; margin-bottom: 10px; }

.kd-qr { float: left; margin: 0 0 10px 10px; }
.kd-qr img { width: 80px; height: 80px; }

.kd-single-card { border: 1px solid #ddd; border-radius: 4px; margin-bottom: 16px; overflow: hidden; }
.kd-single-card-header {
    background: #f0f0f0; padding: 8px 12px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid #ddd; font-weight: bold;
}
.kd-single-card-body { display: flex; gap: 12px; padding: 12px; flex-wrap: wrap; }
.kd-single-thumb img { width: 120px; height: 120px; object-fit: cover; border-radius: 4px; }

.kd-hours { padding: 10px 12px; border-top: 1px solid #eee; background: #fafafa; }
.kd-hours-table { border-collapse: collapse; font-size: 13px; width: 100%; }
.kd-hours-table td { padding: 4px 8px; border-bottom: 1px solid #eee; }

.kd-contact-form { padding: 12px; border-top: 1px solid #eee; }
.kd-form-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.kd-form-table td { padding: 5px 8px; vertical-align: middle; }
.kd-form-table input[type="text"],
.kd-form-table input[type="email"],
.kd-form-table input[type="number"],
.kd-form-table textarea {
    width: 100%; padding: 6px 8px; border: 1px solid #ccc;
    border-radius: 3px; font-size: 13px; direction: rtl;
    box-sizing: border-box;
}
.kd-form-table textarea { height: 80px; resize: vertical; }
.kd-send-msg {
    background: #2a7d2e; color: #fff; border: none;
    padding: 8px 20px; border-radius: 3px; cursor: pointer; font-size: 13px;
}
.kd-send-msg:hover { background: #1a5c1e; }
.kd-form-response { padding: 6px 0; font-size: 13px; color: #2a7d2e; }
.kd-form-response.error { color: #c00; }
.kd-captcha-label { font-weight: bold; }

.kd-single-content { margin: 14px 0; font-size: 14px; line-height: 1.8; }
.kd-font-controls { margin-bottom: 8px; }
.kd-font-controls button {
    background: #eee; border: 1px solid #ccc; padding: 3px 8px;
    cursor: pointer; border-radius: 3px; margin-left: 4px;
}

.kd-map, .kd-video { margin: 14px 0; }
.kd-map iframe, .kd-video iframe { width: 100%; border-radius: 4px; }

.kd-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.kd-gallery img { width: 120px; height: 90px; object-fit: cover; border-radius: 4px; }

.kd-banner { margin: 14px 0; text-align: center; }

.kd-print { font-size: 12px; color: #666; margin: 10px 0; }
.kd-print a { color: #c00; text-decoration: none; }

.kd-post-nav { display: flex; gap: 12px; margin-top: 16px; }
.kd-prev-post, .kd-next-post { flex: 1; }
.kd-prev-post a, .kd-next-post a {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: #333; font-size: 13px;
    border: 1px solid #eee; padding: 6px; border-radius: 4px;
}
.kd-prev-post img, .kd-next-post img {
    width: 50px; height: 50px; object-fit: cover; border-radius: 3px;
}

/* Featured widget */
.kd-featured-widget-list { list-style: none; padding: 0; margin: 0; }
.kd-featured-widget-item { padding: 6px 0; border-bottom: 1px solid #eee; }
.kd-featured-widget-item a {
    display: flex; gap: 8px; align-items: center;
    text-decoration: none; color: #333; font-size: 13px;
}
.kd-featured-widget-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 3px; }

/* No results */
.kd-no-results { color: #666; padding: 20px 0; }

/* Responsive */
@media (max-width: 600px) {
    .kd-card-body, .kd-single-card-body { flex-direction: column; }
    .kd-card-thumb img, .kd-single-thumb img { width: 100%; height: auto; }
    .kd-post-nav { flex-direction: column; }
    .kd-qr { float: none; }
}
