/* =====================================================================
   هُدى — blocks.css : أنماط المكوّنات (تُحمَّل في الواجهة والمحرّر)
   ===================================================================== */

/* أزرار */
.wp-block-button__link {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: 0 1.8rem; border-radius: 999px;
  font-family: var(--font-body); font-weight: 500; font-size: 1rem; line-height: 1;
  background: var(--khoos); color: var(--pearl); border: 1px solid transparent; text-decoration: none;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.wp-block-button__link:hover { background: var(--palm); color: var(--pearl); }
.is-style-outline .wp-block-button__link, .wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; border-color: var(--sand); color: var(--palm); }
.is-style-outline .wp-block-button__link:hover { border-color: var(--khoos); color: var(--khoos); background: transparent; }
.wp-block-buttons { gap: 14px 20px; }

/* صور */
.wp-block-image img { height: auto; }
.wp-block-image.is-style-huda-rounded img { border-radius: var(--radius-lg); }
.wp-block-image.is-style-huda-arch img, .wp-block-image.is-style-huda-arch-square img {
  aspect-ratio: 4 / 5; object-fit: cover; width: 100%;
  border-radius: 50% 50% var(--radius) var(--radius) / 40% 40% var(--radius) var(--radius);
  filter: saturate(.86) sepia(.07) contrast(1.02);
}
.wp-block-image.is-style-huda-arch-square img { aspect-ratio: 1; border-radius: 50% 50% var(--radius) var(--radius) / 50% 50% var(--radius) var(--radius); }
.wp-block-image.is-style-huda-arch figcaption, .wp-block-image.is-style-huda-arch-square figcaption { text-align: center; }

/* فواصل */
.wp-block-separator { border: 0; height: 1px; background: var(--line); max-width: 160px; margin-inline: auto; opacity: 1; }
.wp-block-separator.is-style-wide { max-width: none; }
.wp-block-separator.is-style-huda-ornament {
  height: 12px; width: 10em; max-width: 10em; background: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M0 6h84M116 6h84' stroke='%23B89878' stroke-opacity='.75'/%3E%3Crect x='96' y='2' width='8' height='8' transform='rotate(45 100 6)' fill='%23B89878'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: contain;
}
.wp-block-separator.is-style-huda-braid {
  height: 14px; max-width: none; opacity: .6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='14' viewBox='0 0 12 14'%3E%3Cpath d='M0 0h4.6L12 7H7.4z' fill='%23B89878'/%3E%3Cpath d='M0 14h4.6L12 7H7.4z' fill='%23D9C4AA'/%3E%3C/svg%3E") repeat-x center / auto 100%;
}

/* مجموعات */
.wp-block-group.is-style-huda-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); }
.wp-block-group.is-style-huda-linen { background: var(--linen); border-radius: var(--radius-lg); padding: clamp(28px, 4.5vw, 56px); }
.wp-block-group.is-style-huda-dark { position: relative; overflow: hidden; background: var(--palm); color: var(--on-dark); border-radius: var(--radius-lg); padding: clamp(32px, 5vw, 64px); }
.wp-block-group.is-style-huda-dark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.wp-block-group.is-style-huda-dark > * { position: relative; z-index: 1; }
.wp-block-group.is-style-huda-dark :is(h1, h2, h3, h4, h5, h6) { color: var(--pearl); }
.wp-block-group.is-style-huda-dark .eyebrow, .wp-block-group.is-style-huda-dark .is-style-huda-eyebrow { color: var(--khoos-pale); }
.wp-block-group.is-style-huda-dark .wp-block-button__link { background: var(--pearl); color: var(--palm); }
.wp-block-group.is-style-huda-dark .wp-block-button__link:hover { background: var(--khoos-pale); }
.wp-block-group.is-style-huda-dark .is-style-outline .wp-block-button__link { background: transparent; border-color: var(--line-dark); color: var(--pearl); }
.wp-block-group.is-style-huda-dark a { color: var(--khoos-pale); }
.wp-block-group.alignfull.is-style-huda-dark, .wp-block-group.alignfull.is-style-huda-linen { border-radius: 0; }

/* اقتباس */
.wp-block-quote.is-style-huda-quote {
  border: 0; padding: 0; margin: clamp(40px, 5vw, 64px) auto; text-align: center; max-width: 24em;
  font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.5rem); line-height: 1.6; color: var(--palm);
}
.wp-block-quote.is-style-huda-quote::before {
  content: ""; display: block; width: 10em; height: 12px; margin: 0 auto 1.2rem; font-size: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'%3E%3Cpath d='M0 6h84M116 6h84' stroke='%23B89878' stroke-opacity='.75'/%3E%3Crect x='96' y='2' width='8' height='8' transform='rotate(45 100 6)' fill='%23B89878'/%3E%3C/svg%3E") no-repeat center / contain;
}
.wp-block-quote.is-style-huda-quote p { font-size: inherit; line-height: inherit; font-weight: inherit; margin: 0; }
.wp-block-quote.is-style-huda-quote em { font-style: normal; color: var(--jujube); }
.wp-block-quote.is-style-huda-quote cite { display: block; margin-top: 1rem; font-family: var(--font-sign); font-size: 2.4rem; font-style: normal; color: var(--jujube); line-height: 1.2; }

/* قوائم */
.wp-block-list.is-style-huda-diamonds, .wp-block-list.is-style-huda-checks { list-style: none; padding-inline-start: 0; }
.wp-block-list.is-style-huda-diamonds li, .wp-block-list.is-style-huda-checks li { position: relative; padding-inline-start: 1.6em; }
.wp-block-list.is-style-huda-diamonds li::before { content: ""; position: absolute; inset-inline-start: .2em; top: .85em; width: 7px; height: 7px; background: var(--khoos-soft); transform: rotate(45deg); }
.wp-block-list.is-style-huda-checks li { padding-inline-start: 1.9em; }
.wp-block-list.is-style-huda-checks li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .45em; width: 20px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E8264' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.2 4.2L19 7'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* فقرات */
.is-style-huda-lead { font-size: var(--fs-lead) !important; font-weight: 300; line-height: 2.05; }
.is-style-huda-eyebrow {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: var(--fs-sm) !important; font-weight: 500; color: var(--khoos); margin-bottom: .6rem; line-height: 1.6;
}
.is-style-huda-eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .7; }
.is-style-huda-sign { font-family: var(--font-sign); font-size: 2.75rem !important; color: var(--jujube); line-height: 1.2; }
.is-style-huda-display { font-size: clamp(2.4rem, 1.5rem + 3vw, 4.2rem) !important; line-height: 1.2; }

/* سؤال وجواب */
.wp-block-details.is-style-huda-faq { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 0; }
.wp-block-details.is-style-huda-faq + .wp-block-details.is-style-huda-faq { margin-top: 10px; }
.wp-block-details.is-style-huda-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; list-style: none; cursor: pointer; font-family: var(--font-display); font-size: 1.4rem; color: var(--palm); line-height: 1.35; }
.wp-block-details.is-style-huda-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-huda-faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--linen); color: var(--khoos); font-family: var(--font-latin); font-size: 1.3rem; transition: transform .35s var(--ease), background-color .3s; }
.wp-block-details.is-style-huda-faq[open] summary::after { content: "–"; background: var(--khoos); color: var(--pearl); }
.wp-block-details.is-style-huda-faq > :not(summary) { padding: 0 22px 20px; margin: 0; font-size: var(--fs-sm); line-height: 1.95; }
.wp-block-details.is-style-huda-faq > :not(summary) + :not(summary) { padding-top: 0; }

/* خطوات */
.wp-block-columns.is-style-huda-steps { counter-reset: huda-step; gap: 20px; }
.wp-block-columns.is-style-huda-steps > .wp-block-column { position: relative; padding: 26px 26px 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.wp-block-columns.is-style-huda-steps > .wp-block-column::before {
  counter-increment: huda-step; content: "0" counter(huda-step);
  display: block; margin-bottom: 10px; font-family: var(--font-latin); font-weight: 600; font-size: 15px; letter-spacing: .14em; color: var(--khoos); direction: ltr; text-align: right;
}
.wp-block-columns.is-style-huda-steps h3, .wp-block-columns.is-style-huda-steps h4 { font-size: 1.5rem; margin: 0 0 .5rem; }
.wp-block-columns.is-style-huda-steps p { font-size: var(--fs-sm); margin: 0; }

/* أعمدة ومجموعات عامة */
.wp-block-columns { gap: clamp(20px, 3vw, 40px); }
.wp-block-media-text .wp-block-media-text__media img { border-radius: var(--radius-lg); }
.wp-block-cover { border-radius: var(--radius-lg); }
.wp-block-table td, .wp-block-table th { border-color: var(--line); }

/* الأيقونات داخل المحتوى */
.entry-content .icon { width: 22px; height: 22px; }

/* الشورتكودات (Amelia / LearnDash) داخل المحتوى */
.entry-content .wp-block-shortcode { max-width: none; }
