/* YAFA directory components (inc/yafa.php). Loaded after main.css; uses the existing brand red
   #e81f1f, page background #FAF7F4 and white cards so the look stays the same. */
:root {
    --yf-red: #e81f1f;
    --yf-red-dark: #8b1212;
    --yf-ink: #1f1f1f;
    --yf-muted: #5f6368;
    --yf-line: #e8e2dc;
    --yf-card: #fff;
    --yf-green: #1f7a43;
    --yf-wa: #25a35a;
}

.yf-h { font-size: 26px; line-height: 1.15; margin: 26px 0 12px; }
.yf-muted { color: var(--yf-muted); font-size: 15px; }
.yf-lead { font-size: 19px; max-width: 900px; margin: 4px 0 8px; }
.yf-list-title { margin-top: 18px; }
.yf-button { display: inline-block; padding: 8px 16px; border-radius: 6px; background: var(--yf-red); color: #fff; font-weight: 700; }
.yf-button:hover, .yf-button:focus { background: var(--yf-red-dark); color: #fff; }

/* Quick links under the H1 */
.yf-quick { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 6px 0 12px; padding: 0; }
.yf-quick a { display: inline-block; padding: 5px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--yf-line); color: var(--yf-ink); font-size: 16px; }
.yf-quick a:hover { border-color: var(--yf-red); color: var(--yf-red); }

/* Finder (home hero + service roots) */
.yf-finder { display: grid; grid-template-columns: 1fr; gap: 10px; max-width: 760px; margin: 14px 0 18px; padding: 12px 14px; background: #fff; border-radius: 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, .12); text-align: right; }
.yf-finder label { display: block; font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.yf-finder select { width: 100%; font: inherit; font-size: 18px; padding: 8px 10px; border: 2px solid var(--yf-ink); border-radius: 6px; background: #fff; }
.yf-finder-go { font: inherit; font-size: 19px; font-weight: 700; padding: 9px 18px; border: 0; border-radius: 6px; background: var(--yf-red); color: #fff; cursor: pointer; align-self: end; }
.yf-finder-go:hover { background: var(--yf-red-dark); }
@media (min-width: 768px) { .yf-finder { grid-template-columns: 1fr 1fr auto; } }

/* Chips (cities / services) */
.yf-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 10px; }
.yf-chips a { display: inline-block; padding: 6px 12px; border-radius: 6px; background: #fff; border: 1px solid var(--yf-line); color: var(--yf-ink); font-size: 16px; }
.yf-chips a small { color: var(--yf-muted); }
.yf-chips a:hover { background: var(--yf-red); border-color: var(--yf-red); color: #fff; }
.yf-chips a:hover small { color: #fff; }
.yf-area-links { margin: 16px 0; }
.yf-regions { display: grid; gap: 14px; margin-bottom: 10px; }
@media (min-width: 900px) { .yf-regions { grid-template-columns: repeat(2, 1fr); } }
.yf-region { background: var(--yf-card); padding: 12px 14px; border-radius: 8px; box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.yf-region h3 { font-size: 21px; margin: 0 0 8px; }
.yf-region h3 a { color: var(--yf-ink); }

/* Card badges (inside the existing .local-business card) */
.yf-badge { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 4px; padding: 1px 7px; margin: 0 0 4px 4px; }
.yf-badge-verified { background: #e6f6ea; color: var(--yf-green); }
.yf-badge-promo { background: #fdecec; color: var(--yf-red-dark); }
.yf-tile-count { font-size: .6em; font-weight: 400; opacity: .85; }

/* Long-form content (term info, guides, single listing text) */
.yf-content { background: var(--yf-card); padding: 16px 20px; border-radius: 8px; margin: 22px 0; line-height: 1.6; box-shadow: 0 3px 8px rgba(0, 0, 0, .06); }
.yf-content h2 { font-size: 26px; margin-top: 12px; }
.yf-content h3 { font-size: 21px; margin-top: 16px; }
.yf-content ul, .yf-content ol { padding-right: 22px; margin: 6px 0 10px; }
.yf-content li { margin: 4px 0; }
.yf-content table { width: 100%; border-collapse: collapse; margin: 10px 0 16px; font-size: 16px; }
.yf-content th, .yf-content td { border: 1px solid var(--yf-line); padding: 6px 8px; text-align: right; vertical-align: top; }
.yf-content th { background: #fdecec; }
.yf-content .yf-table-wrap { overflow-x: auto; }
.yf-content .yf-sources { font-size: 14px; color: var(--yf-muted); border-top: 1px solid var(--yf-line); margin-top: 18px; padding-top: 8px; }
.yf-content .yf-sources a { word-break: break-all; }
.yf-content .yf-note { background: #fff6f0; border-right: 4px solid var(--yf-red); padding: 8px 12px; margin: 10px 0; }
.yf-article { max-width: 920px; }
.yf-article h1 { margin-top: 4px; }
.yf-faq { list-style: none; padding: 0 !important; }
.yf-faq h4 { font-size: 18px; margin: 12px 0 4px; }
.yf-faq p { margin: 0 0 6px; }

/* Guides grid */
.yf-guides ul { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0 0 20px; }
@media (min-width: 700px) { .yf-guides ul { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .yf-guides ul { grid-template-columns: repeat(3, 1fr); } }
.yf-guides a { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; height: 100%; background: var(--yf-card); padding: 12px 14px; border-radius: 8px; color: var(--yf-ink); box-shadow: 0 3px 8px rgba(0, 0, 0, .08); }
.yf-guides a:hover { box-shadow: 0 3px 12px rgba(0, 0, 0, .18); }
.yf-guide-icon { grid-row: 1 / span 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #fdecec; font-size: 22px; }
.yf-guides strong { font-size: 18px; }
.yf-guides small { color: var(--yf-muted); font-size: 14px; }

/* Single listing. The header logo copies main.css's img[itemprop=image] rule (the microdata
   attribute was removed with the per-page HealthAndBeautyBusiness microdata). */
.business-header .yf-header-logo { margin: -180px 25px 0 10px; border: 10px solid #FAF7F4; z-index: 1; width: 20%; position: relative; } /* above the cover, below the fixed nav (4) / breadcrumbs (3) */
@media (max-width: 768px) { .business-header .yf-header-logo { margin: -100px 5px 0 10px; width: 30%; } }
.business-header .yf-header-photo { float: right; height: auto; aspect-ratio: 1; object-fit: cover; background: #FAF7F4; }
/* Header call + WhatsApp: the cards' buttons, side by side at the column's end (left in RTL). */
.yf-head-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; gap: 6px; }
.yf-head-actions .yf-card-call, .yf-head-actions .yf-card-wa { flex: 0 1 auto; font-size: 28px; min-height: 46px; padding: 4px 14px; }
@media (max-width: 767px) { .yf-head-actions .yf-card-call, .yf-head-actions .yf-card-wa { flex: 1 1 auto; font-size: 22px; min-height: 40px; padding: 4px 8px; } }
.yf-single-sub { font-size: 17px; font-weight: 700; color: var(--yf-red-dark); margin: -4px 0 8px; }
.yf-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0 0; }
.yf-facts dt { font-weight: 700; }
.yf-facts dd { margin: 0; }
.yf-social { font-weight: 700; }
.yf-box { background: var(--yf-card); border-radius: 8px; padding: 14px 18px; box-shadow: 0 3px 8px rgba(0, 0, 0, .08); border-top: 4px solid var(--yf-red); margin: 18px 0; }
.yf-box .yf-h { font-size: 22px; margin-top: 4px; }
.yf-verified { border-top-color: var(--yf-green); }
.yf-verified h3 { font-size: 18px; margin: 10px 0 4px; }
.yf-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 0; }
.yf-tags li { font-size: 15px; background: #f4efea; border-radius: 4px; padding: 2px 8px; }
.yf-price-list { list-style: none; padding: 0; margin: 0; }
.yf-price-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--yf-line); padding: 4px 0; }
.yf-report { margin: 18px 0; }
.yf-sticky-cta { display: none; }
@media (max-width: 767px) {
    .yf-sticky-cta { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50; gap: 1px; background: #000; box-shadow: 0 -2px 10px rgba(0, 0, 0, .25); }
    .yf-sticky-cta a, .yf-sticky-cta .yf-sticky-wa { flex: 1; padding: 12px 6px; font-size: 21px; font-weight: 700; text-align: center; color: #fff; cursor: pointer; }
    .yf-sticky-cta a { background: var(--yf-red); }
    .yf-sticky-cta .yf-sticky-wa { background: var(--yf-wa); }
    .yf-single ~ .footer, body.single .footer { padding-bottom: 70px; }
    body.single #to-top { bottom: 80px; }
}

/* Own business image (from the business's website) */
.yf-own-image img { display: block; max-width: 100%; height: auto; max-height: 420px; margin: 0 auto 6px; object-fit: contain; }
.yf-own-image figcaption { text-align: center; }

/* Phone numbers keep LTR order inside RTL text. */
a[href^="tel:"] { unicode-bidi: isolate; direction: ltr; }
.yf-facts a[href^="tel:"] { display: inline-block; }

/* Footer link hub */
.yf-hub { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); padding: 10px 15px 0; text-align: right; }
.yf-hub ul { list-style: none; padding: 0; margin: 0; }
/* Hub and the legacy footer_menu widgets (.foter-menu) share one look: pink headings, white links, smaller text */
.footer .yf-hub h4, .footer .foter-menu h4 { font-size: 16px; font-weight: 700; line-height: 1.3; margin: 6px 0 10px; color: #f8bbbb; }
.footer .yf-hub h4 a { color: inherit; }
.footer .yf-hub li a, .footer .foter-menu ul li a { display: block; margin-bottom: 9px; font-size: 14px; line-height: 1.3; color: #fff; }
.footer .yf-hub a:hover, .footer .yf-hub a:focus, .footer .foter-menu a:hover, .footer .foter-menu a:focus { color: #f8bbbb; }

/* Listing photo gallery (owner photos from the business page): compact grid instead of WP's stacked default */
.local-business-gallery .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.local-business-gallery .gallery br { display: none; }
.local-business-gallery .gallery-item { margin: 0 !important; width: auto !important; max-width: none !important; }
.local-business-gallery .gallery-item img { width: 100%; height: 200px; object-fit: cover; border: 0 !important; border-radius: 6px; }
@media (max-width: 600px) { .local-business-gallery .gallery { grid-template-columns: repeat(2, 1fr); } .local-business-gallery .gallery-item img { height: 150px; } }

/* Listing cards (parts/ad_loop.php) in a `.yf-cards` grid. Every card in a row is the same height,
   the photo is a fixed 4:3 frame (object-fit: cover) whatever its original size, and the call /
   WhatsApp buttons sit at the bottom of the card. Phones: a compact row (photo at the start side). */
.yf-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 18px; }
.yf-card { position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "img body"; min-width: 0; background: var(--yf-card); border-radius: 8px; overflow: hidden; box-shadow: 0 3px 8px rgba(0, 0, 0, .1); transition: box-shadow .2s; }
.yf-card:hover, .yf-card:focus-within { box-shadow: 0 6px 16px rgba(0, 0, 0, .16); }
.yf-card-promo { box-shadow: 0 0 0 2px var(--yf-red), 0 3px 8px rgba(0, 0, 0, .1); }
.yf-card-img { grid-area: img; position: relative; background: #f1ece7; }
.yf-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.yf-card-body { grid-area: body; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 10px 12px; text-align: start; }
.yf-card-title { font-size: 19px; line-height: 1.2; margin: 0; padding: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.yf-card-link { color: var(--yf-ink); }
.yf-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card opens the listing */
.yf-card:hover .yf-card-link { color: var(--yf-red); }
.yf-card-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.yf-card-badges .yf-badge { margin: 0; }
.yf-card-meta { list-style: none; margin: 0; padding: 0; display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 2px 12px; font-size: 14px; font-weight: 600; color: var(--yf-muted); }
.yf-card-meta li::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 4px; vertical-align: -2px; background: no-repeat center / 14px; }
.yf-card-place::before { background-image: url(../img/pin.png); }
.yf-card-hours::before { background-image: url(../img/clock.png); }
.yf-card-hours { direction: ltr; unicode-bidi: isolate; }
.yf-card-excerpt { margin: 0; padding: 0; font-size: 14px; line-height: 1.4; color: #444; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.yf-card-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.yf-card-call, .yf-card-wa { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 4px 10px; border: 0; border-radius: 6px; font-family: 'almoni-tzar', sans-serif; font-size: 22px; font-weight: 600; line-height: 1; color: #fff; cursor: pointer; white-space: nowrap; }
.yf-card-call { background: var(--yf-red); letter-spacing: .5px; direction: ltr; }
.yf-card-call:hover, .yf-card-call:focus { background: var(--yf-red-dark); color: #fff; }
.yf-card-wa { flex: 0 1 auto; background: var(--yf-wa); }
.yf-card-wa:hover, .yf-card-wa:focus { background: var(--yf-green); }
@media (max-width: 599px) {
    .yf-card-excerpt { -webkit-line-clamp: 2; }
    .yf-card-call, .yf-card-wa { font-size: 20px; min-height: 38px; padding: 4px 8px; }
    .yf-card-wa { flex-grow: 1; }
}
@media (min-width: 600px) {
    .yf-cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
    .yf-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; grid-template-areas: "img" "body"; }
    .yf-card-img { aspect-ratio: 4 / 3; }
    .yf-card-body { padding: 12px 14px 14px; }
    .yf-card-title { font-size: 21px; }
}

/* Engagement: views · likes · comments (inc/yafa-engagement.php, assets/js/engagement.js).
   On cards the row sits just above .yf-card-actions, which keeps margin-top:auto. It is display-only,
   so it stays under the card's full-size link. */
.yf-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; margin: 0; font-size: 13px; line-height: 1.4; color: var(--yf-muted); }
.yf-content .yf-stats { font-size: 15px; margin: 0 0 10px; }
.yf-stat { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.yf-ico { flex: none; display: block; }
.yf-stat .yf-ico { color: var(--yf-red); }
.yf-stats .screen-reader-text, .yf-like .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.yf-like { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--yf-line); }
.yf-like-q { margin: 0; font-weight: 700; font-size: 18px; }
.yf-like-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px; border: 2px solid var(--yf-red); border-radius: 999px; background: #fff; color: var(--yf-red); font: inherit; font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; transition: background-color .2s, color .2s; }
.yf-like-btn:hover { background: #fdecec; }
.yf-like-btn[aria-pressed="true"] { background: var(--yf-red); color: #fff; }
.yf-like-btn[aria-pressed="true"] .yf-ico { fill: currentColor; }
.yf-like-btn[aria-busy="true"] { cursor: progress; }
.yf-like-btn .yf-ico { width: 20px; height: 20px; }
.yf-like-count { font-variant-numeric: tabular-nums; padding-inline-start: 8px; border-inline-start: 1px solid currentColor; }
.yf-like-btn.is-pop .yf-ico { animation: yf-pop .4s ease; }
@keyframes yf-pop { 50% { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .yf-like-btn.is-pop .yf-ico { animation: none; } }
