/*
Theme Name: Rizing
Text Domain: cdt-templates
Version: 1.0.0
Requires PHP: 7.4
Description: Dynamic business directory theme.
*/

/* Fonts, Font Awesome and assets/css/style.css are enqueued in inc/enqueue-styles-and-scripts.php. */

/* ---------- WordPress additions ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.brand img { max-height: 48px; width: auto; }
.site-header .brand .brand-text { font-family: var(--font-head); font-weight: 900; font-size: 1.35rem; color: var(--ink); }

/* Pagination from paginate_links() */
.pagination { flex-wrap: wrap; }
.pagination .page-numbers { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.pagination a.page-numbers:hover, .pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-numbers.dots { border: 0; background: transparent; }

/* Sidebars hug their content */
.sidebar-card{align-self:start}
.sidebar .panel .input, .sidebar .panel .select { margin-bottom: 12px; }
.sidebar .panel label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.sidebar .panel .btn { width: 100%; justify-content: center; }
.sidebar .panel .cat-links { list-style: none; padding: 0; margin: 0 0 14px; }
.sidebar .panel .cat-links li a { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); font-size: .92rem; }
.sidebar .panel .cat-links li a.active, .sidebar .panel .cat-links li a:hover { color: var(--primary); }
.toolbar form { margin: 0; }

/* Listing visuals: own image, else business-name initials */
.listing-card .thumb img.cover, .post-card .thumb img, .cat-card .ico img.cover { width: 100%; height: 100%; object-fit: cover; }
.listing-card .thumb img.cover { position: absolute; inset: 0; }
.listing-card .thumb .ph-initials, .detail-banner .ph-initials { display: none; }
.listing-card .thumb.is-empty .ph-initials, .detail-banner.is-empty .ph-initials { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: #fff; color: var(--primary); font-family: var(--font-head); font-weight: 900; font-size: 1.8rem; box-shadow: var(--shadow); }
.detail-banner.is-empty { background: linear-gradient(135deg, #ffe9e1, #fff3d9); display: grid; place-items: center; }
.detail-banner.is-empty .ph-initials { width: 120px; height: 120px; font-size: 2.6rem; position: relative; z-index: 1; }
.post-card .thumb { overflow: hidden; }
.cat-card .ico i { font-size: 32px; color: var(--primary); }
.cat-card.has-img { padding-top: 0; overflow: hidden; }
.cat-card .cat-img { margin: 0 -22px; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.cat-card .cat-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.cat-card:hover .cat-img img { transform: scale(1.06); }
.cat-card.has-img .ico { position: relative; margin-top: -37px; border: 4px solid var(--card); }

/* Feature chips on the listing page */
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 14px; }
.feat-grid .feat { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: .9rem; }
.feat-grid .feat svg { width: 22px; height: 22px; flex: none; color: var(--primary); }
.detail-main section > .eyebrow { margin-bottom: 10px; }
.detail-main section > h2 { padding-bottom: 14px; border-bottom: 1px dashed var(--line); margin-bottom: 18px; }
.detail-main section > h2 + .svc-mini-grid, .detail-main section > h2 + .feat-grid { margin-top: 0; }
.rev-summary { display: grid; gap: 24px; align-items: center; margin-bottom: 10px; }
.rev-summary.has-bars { grid-template-columns: 200px 1fr; }
.rev-big { text-align: center; padding: 20px; border-radius: 18px; background: var(--soft); }
.rev-big b { display: block; font-family: var(--font-head); font-size: 3rem; line-height: 1; color: var(--ink); }
.rev-big .stars { display: block; margin: 8px 0 6px; font-size: 1.1rem; }
.rev-big small { font-size: .85rem; }
.rev-bar { display: grid; grid-template-columns: 56px 1fr 42px; gap: 10px; align-items: center; font-size: .88rem; color: var(--ink-2); margin-bottom: 8px; }
.rev-bar i { height: 8px; border-radius: 999px; background: var(--line); position: relative; overflow: hidden; }
.rev-bar i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); background: var(--primary); border-radius: inherit; }
@media (max-width: 600px) { .rev-summary.has-bars { grid-template-columns: 1fr; } }
.ico-mask { width: 22px; height: 22px; flex: none; display: inline-block; background-color: var(--primary); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.detail-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.detail-gallery a { display: block; border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; }
.detail-gallery img { width: 100%; height: 100%; object-fit: cover; }
.map-box iframe { width: 100%; height: 100%; border: 0; border-radius: 18px; }
.map-box.has-map { background: none; border: 0; padding: 0; }
.review-item { padding: 16px 0; border-bottom: 1px dashed var(--line); }
.review-item:last-child { border-bottom: 0; }
.review-item .who { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; color: var(--ink); }
.review-item p { margin: 6px 0 0; color: var(--ink-2); }
.detail-main .about-copy a { color: var(--primary); font-weight: 600; }
.db-card h1 a { color: inherit; }
.db-card h1 a:hover { color: var(--primary); }
.db-thumbs a { display: block; }

/* Footer newsletter (renamed so main.js does not fake the submit) */
.rz-newsletter { display: flex; gap: 8px; margin-top: 12px; }
.rz-newsletter input[type="email"] { flex: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); color: #fff; outline: 0; font: 500 .92rem var(--font-body); min-width: 0; }
.rz-newsletter input::placeholder { color: #9aa0b0; }
.rz-newsletter button { border-radius: 999px; border: 0; background: var(--primary); color: #fff; padding: 0 18px; cursor: pointer; font-weight: 600; }
.site-footer .form-msg { margin-top: 10px; font-size: .88rem; }

/* Back to top is a link to #top */
.to-top { display: grid; place-items: center; text-decoration: none; }
.to-top:hover { color: #fff; }

/* Legal / long copy */
.article--wide { max-width: none; }
.article img { max-width: 100%; height: auto; border-radius: 16px; }
.article .wp-block-image, .article figure { margin: 24px 0; }
.alignleft { float: left; margin: 0 20px 14px 0; }
.alignright { float: right; margin: 0 0 14px 20px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text, .gallery-caption { font-size: .85rem; color: var(--muted); }
.sticky, .bypostauthor { position: relative; }

/* Blog extras */
.share-row { display: flex; align-items: center; gap: 10px; margin-top: 30px; flex-wrap: wrap; }
.share-row a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--primary); }
.share-row a:hover { background: var(--primary); color: #fff; }
.blog-faq { margin-top: 36px; }
.blog-faq details { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; background: #fff; }
.blog-faq summary { font-weight: 700; cursor: pointer; color: var(--ink); }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 36px; flex-wrap: wrap; }

/* Sitemap lists */
.sitemap-grid .panel ul { list-style: none; padding: 0; margin: 0; }
.sitemap-grid .panel li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sitemap-grid .panel li:last-child { border-bottom: 0; }
