/* Shared responsive layout; keep the theme's black, gold and Cairo identity. */
:where(.container, article, section, figure, .entry-content, .pricing-card, .post-card, .service-section-body) { min-width: 0; }
body { overflow-wrap: break-word; }
img { aspect-ratio: auto; }
a:focus-visible, button:focus-visible { outline: 3px solid #b58100; outline-offset: 4px; }
.btn { max-width: 100%; white-space: normal; text-align: center; }
.site-logo img { width: auto; max-width: 180px; max-height: 64px; object-fit: contain; }
.topbar-contact, .site-topbar .container { flex-wrap: wrap; }
.float-btn-tooltip { right: auto; left: calc(100% + 10px); }
#contact, section[id] { scroll-margin-top: 100px; }
.accent { color: #9a6b00; }
.page-intro { padding-block: clamp(2.5rem, 6vw, 5rem); text-align: center; }
.page-intro h1, .article-header h1 { color: #111; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.6; font-weight: 900; }
.page-intro > p, .archive-description { max-width: 690px; margin: 1rem auto 0; color: var(--color-gray-600); line-height: 2; }
.contact-actions, .service-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-block: 2rem; }
.text-link { color: #775300; font-weight: 800; text-decoration: underline; text-underline-offset: .35em; }
.post-grid, .portfolio-categories { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.listing-content, .standard-page, .portfolio-index, .portfolio-collection, .related-posts { padding-bottom: 4rem; }
.post-card, .portfolio-category { background: #fff; border: 1px solid var(--color-gray-200); border-radius: 16px; overflow: hidden; }
.post-card { display: flex; flex-direction: column; }
.post-card-image { display: block; aspect-ratio: 3 / 2; background: #eee; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.post-card-body { display: flex; flex-direction: column; flex: 1; gap: .85rem; padding: 1.5rem; }
.post-card h2 { font-size: 1.25rem; line-height: 1.8; }
.post-card p { color: var(--color-gray-600); line-height: 1.9; }
.post-card .text-link { margin-top: auto; }
.article-shell { max-width: 900px; padding-block: 3rem; }
.article-header { margin-bottom: 2rem; }
.article-categories { color: #775300; font-weight: 700; margin-bottom: .75rem; }
.article-meta { color: var(--color-gray-600); font-size: .9rem; }
.article-featured { margin: 0 auto 2.5rem; }
.article-featured img { width: auto; max-width: 100%; height: auto; margin-inline: auto; border-radius: 16px; }
.entry-content { font-size: 1.0625rem; line-height: 2; overflow-wrap: anywhere; }
.entry-content > * { max-width: 100%; }
.entry-content p, .entry-content ul, .entry-content ol { margin-block: 1.25rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.7; margin-block: 2rem 1rem; color: #111; }
.entry-content h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
.entry-content ul { list-style: disc; padding-inline-start: 1.5rem; }
.entry-content ol { padding-inline-start: 1.5rem; }
.entry-content a { color: #775300; text-decoration: underline; }
.entry-content figure, .entry-content .wp-caption, .entry-content .wp-block-image, .entry-content .alignfull, .entry-content .alignwide { max-width: 100% !important; margin-inline: auto !important; }
.entry-content figure, .entry-content .wp-caption { height: auto !important; margin-block: 1.75rem; }
.entry-content img { max-width: 100% !important; width: auto !important; height: auto !important; max-height: none !important; min-height: 0 !important; aspect-ratio: auto !important; object-fit: contain !important; margin-inline: auto; border-radius: 10px; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image { flex-grow: 0; align-self: start; }
.entry-content figcaption, .entry-content .wp-caption-text { color: var(--color-gray-600); font-size: .875rem; text-align: center; }
.entry-content blockquote { border-inline-start: 4px solid var(--color-yellow); background: #fff9e6; padding: 1.25rem; margin-block: 1.5rem; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-content pre, .entry-content .wp-block-table { max-width: 100%; overflow-x: auto; }
.entry-content table { max-width: 100%; border-collapse: collapse; }
.entry-content td, .entry-content th { padding: .6rem; border: 1px solid #ddd; overflow-wrap: anywhere; }
.article-tags, .article-share { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 1.5rem; }
.article-tags a { padding: .4rem .75rem; border: 1px solid #ddd; border-radius: 5px; }
.article-share a { text-decoration: underline; }
.author-bio { padding: 1.5rem; background: #fff9e6; border-radius: 12px; }
.post-navigation .nav-links { display: flex; height: auto; flex-wrap: wrap; justify-content: space-between; padding-block: 2rem; gap: 1.5rem; }
.post-navigation .nav-links > div { flex: 1 1 240px; min-width: 0; }
.pagination { margin-top: 2.5rem; text-align: center; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: .5rem; border-radius: 6px; border: 1px solid #ddd; }
.page-numbers.current { background: var(--color-yellow); color: #111; }
.related-posts > h2 { margin-bottom: 2rem; }
.empty-state { background: #fff; border: 1px solid #ddd; padding: 2rem; text-align: center; border-radius: 12px; line-height: 2; }
.comment-form textarea, .comment-form input, .search-form input { max-width: 100%; padding: .75rem; border: 1px solid #aaa; font: inherit; }
.comments-area { margin-top: 2rem; }
.comments-area .comment-list, .comments-area .children { list-style: none; padding-inline-start: 1rem; }
.comments-area .comment-body { padding: 1rem; margin-block: 1rem; background: #fff; border: 1px solid #eee; border-radius: 8px; }
.comments-area .avatar { width: 48px; height: 48px; }
.comment-form p { margin-block: 1rem; }
.comment-form label { display: block; }
.comment-form-cookies-consent label { display: inline; }
.pricing-page { padding-top: 3rem; }
.pricing-page .pricing-grid { align-items: stretch; }
.pricing-page .pricing-body { display: flex; flex-direction: column; flex: 1; }
.pricing-page .pricing-header { position: relative; padding-block: 2.5rem 2rem; }
.package-number { display: block; color: #777; font-size: .8rem; margin-bottom: .75rem; }
.pricing-page .pricing-name { margin-bottom: 1.5rem; }
.pricing-page .pricing-price { font-size: clamp(2.3rem, 4vw, 3rem); color: #775300; }
.pricing-page .pricing-unit { color: #595959; margin-top: .75rem; }
.pricing-page .pricing-feature { align-items: start; text-align: start; justify-content: start; }
.pricing-page .pricing-feature::before { content: '✓'; color: #775300; font-weight: 900; }
.pricing-page .pricing-cta { margin-top: auto; }
.package-call { text-align: center; text-decoration: underline; padding: .8rem; margin-top: .5rem; }
.pricing-card--basic { border: 2px solid var(--color-yellow); }
.pricing-card--basic .pricing-header { background: #151515; }
.pricing-card--basic .pricing-name { color: #fff; }
.pricing-card--basic .pricing-price { color: var(--color-yellow); }
.pricing-card--basic .package-number, .pricing-card--basic .pricing-unit, .pricing-card--basic small { color: #ddd; }
.services-page { padding-bottom: 4rem; }
.service-section { display: grid; grid-template-columns: minmax(0, 1fr); margin-bottom: 2rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 16px; overflow: hidden; }
.service-section-image { margin: 0; display: flex; align-items: center; justify-content: center; background: #f0efea; }
.service-section-image img { width: auto; max-width: 100%; height: auto; max-height: 540px; object-fit: contain; }
.service-section-body { padding: clamp(1.5rem, 4vw, 3rem); align-self: center; }
.service-section-body h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); color: #111; }
.service-section-body p { margin-block: 1rem 1.5rem; line-height: 2; color: #4b5563; }
.service-section--text { border-inline-start: 4px solid var(--color-yellow); }
.portfolio-category { display: block; transition: box-shadow .2s; }
.portfolio-category:hover { box-shadow: var(--shadow-lg); }
.portfolio-category-cover { aspect-ratio: 8 / 5; background: #efeee9; }
.portfolio-category-cover img { width: 100%; height: 100%; object-fit: contain; }
.portfolio-category-cover--illustration img { object-fit: contain; }
.portfolio-category-label { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; }
.portfolio-category-label h2 { font-size: 1.4rem; }
.portfolio-category-label > span { font-size: 1.5rem; color: #775300; }
.legacy-portfolio { margin-top: 4rem; }
.legacy-portfolio .section-header { margin-bottom: 2rem; }
.portfolio-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.portfolio-photo { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; }
.portfolio-photo a { display: block; position: relative; }
.portfolio-photo img { width: 100%; height: auto; object-fit: contain; }
.portfolio-photo figcaption { padding: .8rem 1rem; line-height: 1.8; }
.photo-open { position: absolute; bottom: .7rem; inset-inline-end: .7rem; background: #111d; color: #fff; border-radius: 5px; padding: .35rem .7rem; font-size: .8rem; }
.legacy-portfolio-content { margin-top: 2rem; }
.gallery-item { height: auto; }
.gallery-item img { height: auto; object-fit: contain; }
.gallery-item:hover img { transform: none; }
.about-img-wrap img, .warranty-img { height: auto; aspect-ratio: auto; object-fit: contain; }
.warranty-img { border-radius: 16px; max-width: 100%; }
.gallery-is-open { overflow: hidden; }
.gallery-viewer { position: fixed; inset: 0; margin: auto; padding: 0; width: min(1100px, calc(100% - 24px)); max-width: calc(100% - 24px); max-height: calc(100dvh - 24px); background: #141414; color: #fff; border: 1px solid #555; border-radius: 12px; }
.gallery-viewer::backdrop { background: #000e; }
.gallery-viewer [hidden] { display: none !important; }
.gallery-viewer-count { direction: ltr; unicode-bidi: isolate; }
.gallery-viewer-inner { padding: 1rem; }
.gallery-viewer-toolbar, .gallery-viewer-nav { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.gallery-viewer button, .gallery-original { color: #fff; min-height: 44px; padding: .55rem .75rem; border: 1px solid #666; border-radius: 6px; font: inherit; font-size: .875rem; }
.gallery-viewer button:disabled { opacity: .4; cursor: default; }
.gallery-viewer button:hover { background: #333; }
.gallery-viewer-stage { height: min(64dvh, 720px); display: flex; align-items: center; justify-content: center; margin-top: .8rem; }
.gallery-viewer-stage img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.gallery-viewer figcaption { text-align: center; margin-block: .75rem; line-height: 1.7; overflow-wrap: anywhere; max-height: 12dvh; overflow-y: auto; }
.gallery-viewer-error { padding: 1rem; text-align: center; }
.gallery-viewer-error a { text-decoration: underline; }
@media (min-width: 640px) {
  .post-grid, .portfolio-categories, .portfolio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .service-section:not(.service-section--text) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-section:nth-child(even) .service-section-image { order: 2; }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .post-grid, .portfolio-gallery, .pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1101px) {
  .site-header .mobile-menu { display: none; }
}
@media (min-width: 768px) and (max-width: 1100px) {
  .site-header .nav-links, .site-header .nav-cta { display: none; }
  .site-header .nav-toggle { display: flex; }
}
@media (max-width: 767px) {
  .page-intro, .article-header, .service-section-body { text-align: center; }
  .entry-content .alignleft, .entry-content .alignright { float: none; margin-inline: auto; }
  .pricing-header, .pricing-body { padding: 1.5rem; }
  .about-img-border { inset-inline: 0; }
  .about-badge-exp { inset-inline-start: 0; }
  .warranty-badge { left: 0; transform: none; }
  .gallery-viewer-inner { padding: .65rem; }
  .gallery-viewer-nav { flex-wrap: wrap; justify-content: center; }
  .gallery-original { order: 3; width: 100%; text-align: center; }
  .gallery-viewer-stage { height: 50dvh; }
  .gallery-viewer-nav button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
