/*
Theme Name: Kuwait Dyers Minimal
Description: Child theme built on Divi — Architectural Minimal direction
Author: —
Template: Divi
Version: 1.1.0
Text Domain: kuwaitdyers-minimal
*/

/* Some original pages (about-us, faq, ads) open with a Divi "hero banner"
   section that just repeats the page title as its own H1/H2 — a duplicate
   of the H1 our own kd-article-head already prints, with its own fixed
   padding/background that stays visible even once the heading text inside
   is hidden. Text is unchanged in the DB; this only hides that first
   banner section when its column truly has no other content next to the
   heading, leaving real subheadings elsewhere (e.g. about-us's second
   section) untouched. */
.kd-content .et_pb_section:first-child:has(.df_adh_heading:only-child){
  display:none;
}

/* ---------- Ad placement card ---------- */
.kd-adcard{ display:flex; gap:16px; align-items:flex-start; background:var(--kd-card); border:1px solid var(--kd-line); border-radius:var(--kd-radius); padding:20px 22px; margin:2em 0; }
.kd-adcard--active{ border-inline-start:4px solid var(--kd-accent2); }
.kd-adcard--empty{ border-style:dashed; }
.kd-adcard__avatar{ flex:0 0 auto; width:46px; height:46px; border-radius:50%; background:var(--kd-accent); color:#fff; display:flex; align-items:center; justify-content:center; font-family:'ElMessiriKD',sans-serif; font-size:19px; font-weight:600; }
.kd-adcard__body{ flex:1; min-width:0; }
.kd-adcard__tag{ display:inline-block; font-size:11px; font-weight:700; color:var(--kd-accent2); background:color-mix(in srgb, var(--kd-accent2) 14%, transparent); padding:2px 9px; border-radius:10px; margin-bottom:6px; }
.kd-adcard__name{ font-size:16px; font-weight:700; color:var(--kd-ink); }
.kd-adcard__phone{ font-size:14px; color:var(--kd-sub); margin-top:2px; font-variant-numeric:tabular-nums; }
.kd-adcard__actions{ display:flex; gap:10px; margin-top:12px; flex-wrap:wrap; }
.kd-adcard__btn{ display:inline-flex; align-items:center; padding:9px 18px; border-radius:var(--kd-radius); font-size:13.5px; font-weight:700; color:#fff !important; text-decoration:none; }
.kd-adcard__btn--call{ background:var(--kd-ink); }
.kd-adcard__btn--wa{ background:var(--kd-accent); }
.kd-adcard__btn--cta{ background:var(--kd-accent2); }
.kd-adcard__empty-title{ font-size:16px; font-weight:700; color:var(--kd-ink); }
.kd-adcard__empty-sub{ font-size:13.5px; color:var(--kd-sub); margin:4px 0 12px; }

/* ---------- About page (native, no Divi Library dependency) ---------- */
.kd-about-intro{ display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center; margin-bottom:56px; }
.kd-about-intro h2{ font-size:26px; margin-bottom:14px; }
.kd-about-intro-image img{ width:100%; height:auto; border-radius:var(--kd-radius); }
.kd-about-founder{ display:flex; gap:14px; align-items:flex-start; margin-top:24px; padding-top:20px; border-top:1px solid var(--kd-line); }
.kd-about-founder-img{ width:52px; height:52px; border-radius:50%; object-fit:cover; }
.kd-about-founder-name{ font-weight:700; color:var(--kd-ink); }
.kd-about-founder-role{ font-size:12.5px; color:var(--kd-accent); margin-bottom:6px; }
.kd-about-founder p{ font-size:14px; color:var(--kd-sub); margin:0; }

.kd-about-stats{ text-align:center; background:var(--kd-ink); color:#fff; padding:44px 24px; border-radius:var(--kd-radius); margin-bottom:56px; }
.kd-about-stats h2{ color:#fff; }
.kd-about-stats > p{ color:#c7d1cd; margin-bottom:28px; }
.kd-stats-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:20px; max-width:700px; margin:0 auto; }
.kd-stat-num{ font-family:'ElMessiriKD',sans-serif; font-size:30px; font-weight:700; font-variant-numeric:tabular-nums; }
.kd-stat-label{ font-size:13px; color:#c7d1cd; margin-top:4px; }

.kd-about-services h2{ text-align:center; }
.kd-about-services > p{ text-align:center; color:var(--kd-sub); margin-bottom:32px; }
.kd-service-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:26px; }
.kd-service-card{ background:var(--kd-card); border:1px solid var(--kd-line); border-radius:var(--kd-radius); overflow:hidden; display:flex; flex-direction:column; border-top:3px solid transparent; transition:border-color .18s, box-shadow .18s, transform .18s; }
.kd-service-card:hover{ border-top-color:var(--kd-accent2); box-shadow:0 20px 44px -26px rgba(21,42,52,.28); transform:translateY(-3px); }
.kd-service-card-media{ position:relative; }
.kd-service-card-media img{ width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.kd-service-card-media::after{ content:""; position:absolute; inset:0; background:linear-gradient(to top, rgba(21,42,52,.45), transparent 55%); }
.kd-service-card-icon{ position:absolute; bottom:-22px; inset-inline-start:22px; width:46px; height:46px; border-radius:50%; background:var(--kd-accent); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:0 8px 18px -6px rgba(0,0,0,.35); border:3px solid var(--kd-card); }
.kd-service-card-icon svg{ width:20px; height:20px; }
.kd-service-card-body{ padding:32px 22px 22px; display:flex; flex-direction:column; flex:1; }
.kd-service-card h3{ font-size:18.5px; margin:0 0 4px; }
.kd-service-sub{ font-size:13.5px; color:var(--kd-accent); margin:0 0 16px; line-height:1.5; }
.kd-service-intro{ margin:0 0 10px; font-size:14px; font-weight:700; color:var(--kd-ink); padding-top:14px; border-top:1px dashed var(--kd-line); }
.kd-service-card ul{ margin:0 0 18px; padding:0; list-style:none; display:flex; flex-direction:column; gap:9px; }
.kd-service-card li{ position:relative; padding-inline-start:24px; font-size:13.5px; color:var(--kd-sub); line-height:1.55; }
.kd-service-card li::before{ content:"✓"; position:absolute; inset-inline-start:0; top:0; width:16px; height:16px; border-radius:50%; background:color-mix(in srgb, var(--kd-accent) 14%, transparent); color:var(--kd-accent); font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.kd-service-cta{ margin-top:auto; align-self:flex-start; font-size:13.5px; font-weight:700; color:var(--kd-accent2); padding-top:14px; }
.kd-service-cta:hover{ text-decoration:underline; }

@media (max-width:900px){
  .kd-about-intro{ grid-template-columns:1fr; }
  .kd-about-intro-image{ order:-1; }
  .kd-stats-grid{ grid-template-columns:repeat(2,1fr); }
  .kd-service-cards{ grid-template-columns:1fr; }
}

@media (max-width:480px){
  .kd-about-intro-image img{ max-height:300px; object-fit:cover; object-position:top; }
  .kd-about-founder{ flex-direction:column; }
  .kd-about-stats{ padding:32px 18px; }
  .kd-stat-num{ font-size:24px; }
}

/* ---------- FAQ (native <details>, no Divi Library dependency) ---------- */
.kd-faq-list{ display:flex; flex-direction:column; gap:10px; margin-top:24px; }
.kd-faq-item{ background:var(--kd-card); border:1px solid var(--kd-line); border-radius:var(--kd-radius); padding:4px 20px; }
.kd-faq-item summary{ cursor:pointer; list-style:none; padding:16px 0; font-weight:700; color:var(--kd-ink); display:flex; justify-content:space-between; align-items:center; gap:12px; }
.kd-faq-item summary::-webkit-details-marker{ display:none; }
.kd-faq-item summary::after{ content:"+"; font-size:22px; font-weight:400; color:var(--kd-accent); flex:0 0 auto; transition:transform .15s; }
.kd-faq-item[open] summary::after{ content:"−"; }
.kd-faq-answer{ padding:0 0 18px; color:var(--kd-sub); font-size:14.5px; }
.kd-faq-answer p{ margin:0 0 .8em; }
.kd-faq-answer ul{ margin:0 0 .8em; padding-inline-start:1.3em; }
.kd-faq-answer li{ margin-bottom:.3em; }

/* ---------- Category index grid (ads page) ---------- */
.kd-catgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.kd-catgrid-card{ background:var(--kd-card); border:1px solid var(--kd-line); border-radius:var(--kd-radius); padding:26px 22px; text-align:center; transition:box-shadow .15s, transform .15s; }
.kd-catgrid-card:hover{ box-shadow:0 16px 40px -22px rgba(21,42,52,.25); transform:translateY(-2px); }
.kd-catgrid-icon{ width:56px; height:56px; border-radius:50%; background:var(--kd-bg-alt); color:var(--kd-accent); display:flex; align-items:center; justify-content:center; margin:0 auto 14px; }
.kd-catgrid-icon svg{ width:26px; height:26px; }
.kd-catgrid-card h3{ font-size:16.5px; margin:0 0 4px; }
.kd-catgrid-count{ font-size:12.5px; color:var(--kd-sub); }
@media (max-width:900px){ .kd-catgrid{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:560px){ .kd-catgrid{ grid-template-columns:1fr; } }

:root{
  --kd-bg:#f2efe7;
  --kd-bg-alt:#e9e4d7;
  --kd-card:#ffffff;
  --kd-ink:#152a34;
  --kd-sub:#5c6b6a;
  --kd-accent:#2c7a70;
  --kd-accent-ink:#ffffff;
  --kd-accent2:#b6934f;
  --kd-line:#d9d3c4;
  --kd-radius:4px;
  --kd-maxw:1180px;
}

*, *::before, *::after{ box-sizing:border-box; }

body.kd-site{
  background:var(--kd-bg);
  color:var(--kd-ink);
  font-family:'PlexArabicKD','Tahoma',sans-serif;
  direction:rtl;
  text-align:right;
  line-height:1.7;
}

body.kd-site h1, body.kd-site h2, body.kd-site h3, body.kd-site h4{
  font-family:'ElMessiriKD','Tahoma',sans-serif;
  font-weight:600;
  line-height:1.35;
  margin:0 0 .5em;
}

body.kd-site a{ color:inherit; text-decoration:none; }
body.kd-site img{ max-width:100%; height:auto; display:block; }

.kd-wrap{ max-width:var(--kd-maxw); margin:0 auto; padding:0 24px; }

/* ---------- Header ---------- */
.kd-header{ background:var(--kd-bg); border-bottom:1px solid var(--kd-line); position:sticky; top:0; z-index:200; }
.kd-header-in{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 0; }
.kd-logo{ font-family:'ElMessiriKD',sans-serif; font-weight:600; font-size:22px; color:var(--kd-ink); flex:0 1 auto; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kd-logo span{ color:var(--kd-accent); }
.kd-nav{ display:flex; gap:30px; align-items:center; }
.kd-nav a{ font-size:14.5px; color:var(--kd-sub); transition:color .15s; }
.kd-nav a:hover, .kd-nav a.kd-active{ color:var(--kd-ink); }
.kd-nav-cta{ background:var(--kd-ink); color:var(--kd-bg) !important; padding:11px 20px; border-radius:var(--kd-radius); font-weight:600; font-size:14px; }
.kd-menu-toggle{ display:none; background:none; border:1px solid var(--kd-line); border-radius:var(--kd-radius); width:42px; height:42px; align-items:center; justify-content:center; cursor:pointer; }
.kd-menu-toggle span, .kd-menu-toggle span::before, .kd-menu-toggle span::after{ content:""; display:block; width:18px; height:2px; background:var(--kd-ink); position:relative; }
.kd-menu-toggle span::before{ position:absolute; top:-6px; }
.kd-menu-toggle span::after{ position:absolute; top:6px; }
.kd-mobile-menu{ display:none; flex-direction:column; gap:2px; padding:8px 0 20px; border-top:1px solid var(--kd-line); }
.kd-mobile-menu a{ padding:12px 4px; font-size:15px; color:var(--kd-ink); border-bottom:1px solid var(--kd-line); }
.kd-mobile-menu.kd-open{ display:flex; }

@media (max-width:900px){
  .kd-nav{ display:none; }
  .kd-menu-toggle{ display:flex; }
}

@media (max-width:480px){
  .kd-wrap{ padding:0 16px; }
  .kd-header-in{ padding:14px 0; }
  .kd-logo{ font-size:18px; }
  .kd-menu-toggle{ width:38px; height:38px; flex-shrink:0; }
}

/* ---------- Hero (home) ---------- */
.kd-hero{ position:relative; padding:56px 0 60px; overflow:hidden; }
.kd-hero-arch{ position:absolute; inset-inline-end:-6%; top:-30%; width:48%; height:170%; opacity:.55; pointer-events:none;
  background-image:repeating-radial-gradient(circle at 100% 120%, transparent 0 38px, var(--kd-line) 39px 40px);
  mask-image:linear-gradient(to left, black, transparent 82%);
  -webkit-mask-image:linear-gradient(to left, black, transparent 82%);
}
.kd-hero-in{ position:relative; max-width:60ch; }
.kd-rule{ width:46px; height:2px; background:var(--kd-accent2); margin-bottom:22px; }
.kd-hero h1{ font-size:clamp(26px,4vw,42px); text-wrap:balance; }
.kd-hero p{ color:var(--kd-sub); font-size:16px; max-width:56ch; margin:0 0 28px; }
.kd-cta-row{ display:flex; gap:14px; flex-wrap:wrap; }
.kd-cta-row .kd-btn{ justify-content:center; }

@media (max-width:480px){
  .kd-hero{ padding:36px 0 44px; }
  .kd-cta-row{ flex-direction:column; align-items:stretch; }
}

/* ---------- Buttons ---------- */
.kd-btn{ display:inline-flex; align-items:center; gap:8px; padding:13px 26px; border-radius:var(--kd-radius); font-weight:600; font-size:14.5px; border:1px solid transparent; }
.kd-btn-primary{ background:var(--kd-ink); color:var(--kd-bg); }
.kd-btn-accent{ background:var(--kd-accent); color:var(--kd-accent-ink); }
.kd-btn-ghost{ background:transparent; border-color:var(--kd-sub); color:var(--kd-ink); }
.kd-btn:hover{ opacity:.88; }

/* ---------- Services grid ---------- */
.kd-section{ padding:52px 0; }
.kd-section-head{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:28px; gap:16px; flex-wrap:wrap; }
.kd-section-head h2{ font-size:24px; }
.kd-section-head .kd-more{ font-size:13.5px; color:var(--kd-accent); font-weight:600; }
.kd-services{ display:grid; grid-template-columns:repeat(4,1fr); border:1px solid var(--kd-line); border-radius:var(--kd-radius); overflow:hidden; }
.kd-svc{ background:var(--kd-card); padding:26px 22px; border-inline-start:1px solid var(--kd-line); transition:background .15s; }
.kd-svc:first-child{ border-inline-start:none; }
.kd-svc:hover{ background:var(--kd-bg-alt); }
.kd-svc .kd-num{ font-variant-numeric:tabular-nums; font-size:12px; color:var(--kd-accent); font-weight:700; }
.kd-svc .kd-t{ font-size:16.5px; font-weight:600; margin-top:8px; font-family:'ElMessiriKD',sans-serif; }
.kd-svc .kd-c{ font-size:12.5px; color:var(--kd-sub); margin-top:8px; }

/* ---------- Post/Archive cards ---------- */
.kd-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.kd-card{ background:var(--kd-card); border:1px solid var(--kd-line); border-radius:var(--kd-radius); overflow:hidden; display:flex; flex-direction:column; transition:box-shadow .15s, transform .15s; }
.kd-card:hover{ box-shadow:0 16px 40px -22px rgba(21,42,52,.25); transform:translateY(-2px); }
.kd-card-img{ aspect-ratio:4/3; background:var(--kd-bg-alt); overflow:hidden; }
.kd-card-img img{ width:100%; height:100%; object-fit:cover; }
.kd-card-body{ padding:18px 20px 22px; display:flex; flex-direction:column; gap:10px; flex:1; }
.kd-card-cat{ font-size:11.5px; color:var(--kd-accent); font-weight:700; letter-spacing:.02em; }
.kd-card h3{ font-size:16.5px; margin:0; }
.kd-card p{ color:var(--kd-sub); font-size:13.5px; margin:0; flex:1; }
.kd-card-date{ font-size:12px; color:var(--kd-sub); font-variant-numeric:tabular-nums; }

/* ---------- Breadcrumb ---------- */
.kd-breadcrumb{ font-size:13px; color:var(--kd-sub); padding:18px 0; display:flex; gap:8px; flex-wrap:wrap; }
.kd-breadcrumb a{ color:var(--kd-sub); }
.kd-breadcrumb a:hover{ color:var(--kd-accent); }
.kd-breadcrumb span.kd-sep{ opacity:.5; }

/* ---------- Article ---------- */
.kd-article-head{ max-width:var(--kd-maxw); margin:0 auto 28px; }
.kd-article-cat{ font-size:12.5px; color:var(--kd-accent); font-weight:700; }
.kd-article-head h1{ font-size:clamp(24px,3.4vw,36px); margin:10px 0 14px; max-width:42ch; }
.kd-article-meta{ font-size:13px; color:var(--kd-sub); display:flex; gap:14px; }
.kd-featured{ max-width:var(--kd-maxw); margin:0 auto 34px; border-radius:var(--kd-radius); overflow:hidden; background:var(--kd-bg-alt); }
.kd-featured img{ width:100%; height:auto; display:block; }
.kd-content{ max-width:var(--kd-maxw); margin:0 auto; font-size:16px; color:var(--kd-ink); }
.kd-content p{ margin:0 0 1.3em; }
.kd-content h2{ font-size:22px; margin:1.6em 0 .6em; }
.kd-content h3{ font-size:18px; margin:1.4em 0 .5em; }
.kd-content ul, .kd-content ol{ margin:0 0 1.3em; padding-inline-start:1.4em; }
.kd-content li{ margin-bottom:.4em; }
.kd-content a{ color:var(--kd-accent); text-decoration:underline; text-underline-offset:3px; }
.kd-content img{ border-radius:var(--kd-radius); margin:1.2em 0; }

.kd-content ol.kd-steps{ counter-reset:kd-step; list-style:none; padding-inline-start:0; display:grid; gap:12px; }
.kd-content ol.kd-steps li{ counter-increment:kd-step; position:relative; padding:14px 52px 14px 16px; border:1px solid var(--kd-line); border-radius:var(--kd-radius); margin-bottom:0; }
.kd-content ol.kd-steps li::before{ content:counter(kd-step); position:absolute; inset-inline-end:14px; top:50%; transform:translateY(-50%); width:28px; height:28px; border-radius:50%; background:var(--kd-accent); color:#fff; font-size:14px; font-weight:700; display:flex; align-items:center; justify-content:center; }

.kd-postnav{ max-width:var(--kd-maxw); margin:44px auto 0; display:grid; grid-template-columns:1fr 1fr; gap:16px; border-top:1px solid var(--kd-line); padding-top:24px; }
.kd-postnav a{ display:block; padding:16px 18px; border:1px solid var(--kd-line); border-radius:var(--kd-radius); font-size:13.5px; }
.kd-postnav .kd-nav-label{ font-size:11.5px; color:var(--kd-sub); margin-bottom:6px; }
.kd-postnav .kd-nav-title{ font-size:14.5px; font-weight:600; }
.kd-postnav-next{ text-align:left; }

.kd-related{ max-width:var(--kd-maxw); margin:60px auto 0; }

/* ---------- Pagination ---------- */
.kd-pagination{ display:flex; gap:8px; justify-content:center; margin:40px 0 0; }
.kd-pagination a, .kd-pagination span{ min-width:38px; height:38px; display:flex; align-items:center; justify-content:center; border:1px solid var(--kd-line); border-radius:var(--kd-radius); font-size:13.5px; font-variant-numeric:tabular-nums; }
.kd-pagination .kd-current{ background:var(--kd-ink); color:var(--kd-bg); border-color:var(--kd-ink); }

/* ---------- Contact page ---------- */
.kd-contact-grid{ display:grid; grid-template-columns:1fr 1fr; gap:40px; align-items:start; }
.kd-contact-card{ background:var(--kd-card); border:1px solid var(--kd-line); border-radius:var(--kd-radius); padding:28px; }
.kd-contact-card h3{ font-size:17px; margin-bottom:14px; }
.kd-field{ margin-bottom:16px; }
.kd-field label{ display:block; font-size:13px; color:var(--kd-sub); margin-bottom:6px; }
.kd-field input, .kd-field textarea{ width:100%; border:1px solid var(--kd-line); border-radius:var(--kd-radius); padding:12px 14px; font-family:inherit; font-size:14.5px; background:var(--kd-bg); color:var(--kd-ink); }
.kd-field textarea{ min-height:110px; resize:vertical; }
.kd-contact-info{ display:flex; flex-direction:column; gap:16px; }
.kd-contact-info .kd-btn{ justify-content:center; }
.kd-notice{ padding:14px 18px; border-radius:var(--kd-radius); font-size:14px; margin-bottom:18px; }
.kd-notice-success{ background:#e4f1ee; color:#1c5049; }

/* ---------- Footer ---------- */
.kd-footer{ background:var(--kd-ink); color:#dfe6e2; margin-top:72px; padding:52px 0 28px; }
.kd-footer a{ color:#c7d1cd; }
.kd-footer a:hover{ color:#fff; }
.kd-footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:32px; margin-bottom:36px; }
.kd-footer-logo{ font-family:'ElMessiriKD',sans-serif; font-size:20px; font-weight:600; color:#fff; margin-bottom:10px; }
.kd-footer-col h4{ color:#fff; font-size:14px; margin-bottom:14px; }
.kd-footer-col ul{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; font-size:13.5px; }
.kd-footer-bottom{ border-top:1px solid rgba(255,255,255,.12); padding-top:20px; font-size:12.5px; color:#9fada7; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; }

@media (max-width:900px){
  .kd-services{ grid-template-columns:repeat(2,1fr); }
  .kd-grid{ grid-template-columns:repeat(2,1fr); }
  .kd-contact-grid{ grid-template-columns:1fr; }
  .kd-footer-grid{ grid-template-columns:1fr; }
  .kd-postnav{ grid-template-columns:1fr; }
}
@media (max-width:560px){
  .kd-services{ grid-template-columns:1fr; }
  .kd-grid{ grid-template-columns:1fr; }
}
