/*
Theme Name: Ruth Dita Homecare
Theme URI: https://ruthcare.id/
Author: Ruth Dita Khasanti
Author URI: https://example.com/
Description: Tema personal branding perawat dan layanan home care. Clean, modern, profesional, ringan, SEO friendly, dan mobile responsive.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ruth-dita-homecare
Tags: custom-background, custom-logo, custom-menu, featured-images, blog, one-column, two-columns, sticky-post
*/

/*
  NOTE:
  WordPress requires style.css to be in the THEME ROOT.
  Keep this file at: /ruth-dita-homecare/style.css
*/

.section-single { padding: 28px 0 56px; }

.container-single {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
}

.single {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.eyebrow {
  display: inline-flex;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 10px;
  margin: 0 0 10px;
}

.single-title {
  margin: 10px 0 8px;
  line-height: 1.15;
  font-size: clamp(26px, 4vw, 42px);
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 16px;
}

.single-meta .dot { opacity: .7; }

.single-meta a.cat {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-featured {
  margin: 14px 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
}

.single-featured-img {
  width: 100%;
  height: auto;
  display: block;
}

.single-featured-cap {
  padding: 10px 12px;
  font-size: 13px;
  color: #6b7280;
  background: #fafafa;
  border-top: 1px solid rgba(0,0,0,.06);
}

.single-content {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.85;
}

.single-content > * { margin: 0 0 14px; }

.single-content h2, .single-content h3 {
  margin-top: 22px;
  line-height: 1.25;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.single-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-footer {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,.06);
}

.single-tags { margin-bottom: 12px; }

.single-tags .tag {
  display: inline-block;
  margin: 0 6px 8px 0;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
}

.single-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
}

.share-label { color: #6b7280; font-size: 14px; }

.single-share a.share {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  text-decoration: none;
  font-size: 14px;
}

.single-share a.share:hover {
  background: #f3f4f6;
}

.single-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.single-nav .next { text-align: right; }

.single-nav a {
  text-decoration: none;
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
  background: #fafafa;
}

.single-nav a:hover { background: #f3f4f6; }

@media (max-width: 640px) {
  .single { padding: 16px; }
  .single-nav { grid-template-columns: 1fr; }
  .single-nav .next { text-align: left; }
}



.single-related { margin-top: 26px; }
.related-title { margin: 0 0 12px; font-size: 18px; }

/* Grid responsif: otomatis menyesuaikan 1-3 kolom tergantung lebar layar */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

/* Card responsif: aman untuk desktop/tablet/mobile */
.related-card {
  display: grid;
  grid-template-columns: clamp(76px, 18vw, 104px) 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  text-decoration: none;
  align-items: center;
}

.related-card:hover { background: #fafafa; }

.related-thumb {
  width: 100%;
  height: clamp(64px, 16vw, 84px);
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.related-body { min-width: 0; }
.related-meta { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.related-name {
  font-size: 14px;
  color: #111827;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Tablet kecil / HP besar: 2 kolom tetap oke */
@media (max-width: 768px) {
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* HP: 1 kolom + thumbnail di kiri tetap rapi */
@media (max-width: 520px) {
  .related-grid { grid-template-columns: 1fr; }
  .related-card {
    grid-template-columns: 88px 1fr;
    gap: 10px;
  }
  .related-thumb { height: 70px; }
}

/* HP kecil banget: thumbnail jadi atas (biar lega) */
@media (max-width: 360px) {
  .related-card {
    grid-template-columns: 1fr;
  }
  .related-thumb {
    height: 160px;
  }
}


/* Share buttons (Facebook / X / WhatsApp / Copy) */
.single-share { margin: 10px 0 14px; }

.share-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.share-label{
  font-size: 14px;
  color: #6b7280;
  margin-right: 2px;
}

.share-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  color: #111827;
  text-decoration:none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.share-btn:hover{ background:#f3f4f6; }
.share-btn:active{ transform: translateY(1px); }

.share-ic{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:grid;
  place-items:center;
  background: #f3f4f6;
  flex: 0 0 34px;
}

/* Warna brand halus */
.share-btn.is-facebook .share-ic{ background: rgba(24,119,242,.12); color:#1877f2; }
.share-btn.is-x .share-ic{ background: rgba(17,24,39,.10); color:#111827; }
.share-btn.is-wa .share-ic{ background: rgba(37,211,102,.14); color:#16a34a; }
.share-btn.is-copy .share-ic{ background: rgba(99,102,241,.12); color:#4f46e5; }

/* Copy feedback */
.share-btn.is-copy.is-copied{
  border-color: rgba(22,163,74,.35);
  background: rgba(22,163,74,.08);
}

/* Tablet: rapatkan */
@media (max-width: 900px){
  .share-btn{ padding: 9px 11px; }
  .share-ic{ width:32px; height:32px; flex-basis:32px; }
}

/* Mobile: jadi ikon-only biar gak berantakan */
@media (max-width: 520px){
  .share-label{ width:100%; margin-bottom:2px; }
  .share-btn{ padding: 10px; }
  .share-btn .share-text{ display:none; }
  .share-ic{ width:40px; height:40px; flex-basis:40px; }
}


/* Related posts grid (terpisah dari style .grid theme) */
.single-related { margin-top: 28px; }

.single-related-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.related-title{ margin:0; font-size:18px; }
.related-more{ font-size:14px; text-decoration:none; }
.related-more:hover{ text-decoration:underline; }

.related-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Card mengikuti .card theme, ini hanya perapihan isi */
.related-card{ overflow:hidden; }
.related-thumbWrap{ display:block; margin: -6px -6px 12px; }
.related-thumb{ width:100%; height:auto; display:block; border-radius:16px; }

.related-name{ margin:0 0 6px; font-size:16px; line-height:1.3; }
.related-name a{ text-decoration:none; }
.related-name a:hover{ text-decoration:underline; }

.related-date{ margin:0 0 10px; color:#6b7280; }
.related-excerpt{ margin:0; }

/* Tablet */
@media (max-width: 900px){
  .related-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Mobile */
@media (max-width: 640px){
  .related-grid{ grid-template-columns: 1fr; }
}
