/* Shared usability rules; page layouts keep their own visual hierarchy. */
:root { --brand-primary: #0369a1; --brand-dark: #0c4a6e; --header-offset: 100px; }
html { scroll-padding-top: var(--header-offset); }
body { font-family: 'Cairo', system-ui, sans-serif; line-height: 1.7; }
*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }
input, select, textarea { font-size: 1rem; }
button, a, input, select, textarea { touch-action: manipulation; }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid #0284c7 !important; outline-offset: 4px; }
[hidden] { display: none !important; }
[inert] { pointer-events: none; }
main { min-height: 45vh; }
img { max-width: 100%; }
button:disabled { cursor: wait; opacity: .65; }
.skip-link { position: fixed; top: -100px; right: 16px; z-index: 10000; padding: 12px 20px; border-radius: 10px; background: #fff; color: #0c4a6e; box-shadow: 0 4px 24px #0f172a33; }
.skip-link:focus { top: 12px; }
.premium-header { --primary: var(--brand-primary); --primary-dark: var(--brand-dark); }
.header-inner { gap: 12px; }
.brand-text-col { min-width: 0; }
.logo-box { flex-shrink: 0; }
.desktop-nav { gap: clamp(12px, 1.8vw, 25px); }
.user-menu-wrap.is-open .dropdown-box { opacity: 1; visibility: visible; transform: none; }
.user-menu-wrap:hover .dropdown-box { opacity: 0; visibility: hidden; }
.user-menu-wrap.is-open:hover .dropdown-box { opacity: 1; visibility: visible; }
.mobile-drawer { visibility: hidden; transition: none; }
.mobile-drawer.active { visibility: visible; }
.mobile-burger, #closeDrawer, .btn-action, .notification-item .notif-dismiss { min-width: 44px; min-height: 44px; }
.drawer-links a, .nav-link { min-height: 44px; display: inline-flex; align-items: center; }
.drawer-links a { display: flex; }
.hero-title, .hero-heading { font-family: 'Cairo', sans-serif; text-wrap: balance; }
.hero-bg-img { object-fit: cover; }
.property-card .price-period { color: #475569; }
body[data-page-type='home'] .modern-hero { height: auto; min-height: 520px; padding: 64px 24px; }
body[data-page-type='home'] .hero-content { margin-top: 0; }
body[data-page-type='home'] .hero-title, body[data-page-type='home'] .hero-desc, body[data-page-type='home'] .hero-btns, body[data-page-type='home'] .hero-bg-img { animation: none; }
.home-search { display: grid; grid-template-columns: minmax(180px, 1fr) 140px auto; gap: 12px; margin: 28px auto 0; padding: 16px; max-width: 820px; text-align: right; color: #0f172a; background: #fff; border-radius: 18px; box-shadow: 0 16px 48px #0f172a33; }
.home-search label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.home-search input, .home-search select { width: 100%; min-height: 48px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 8px 12px; color: #0f172a; background: #f8fafc; }
.home-search button { align-self: end; min-height: 48px; padding: 8px 24px; color: #fff; background: #0369a1; border: 0; border-radius: 10px; font-weight: 700; cursor: pointer; }
body[data-page-type='properties'] .hero { height: auto; min-height: 0; max-height: none; margin-bottom: 0; padding: 38px 24px; }
body[data-page-type='properties'] .hero-content { transform: none; padding: 0; margin-top: 0; }
body[data-page-type='properties'] .hero-title { font-size: clamp(1.6rem, 3vw, 2.5rem); margin: 16px 0 12px; line-height: 1.6; }
body[data-page-type='properties'] .hero-subtitle { font-size: 1rem; margin: 0 auto 16px; }
body[data-page-type='properties'] .hero-badge { padding: 8px 14px; font-size: .85rem; }
body[data-page-type='properties'] .hero-quick-actions { margin-top: 16px; }
body[data-page-type='properties'] .scroll-indicator { display: none; }
body[data-page-type='properties'] .filters-section { margin-top: 24px; padding: 24px; }
.listing-grid { align-items: stretch; }
.property-card { min-width: 0; }
.card-content { flex: 1; min-width: 0; }
.card-title { min-height: 2.8em; }
.card-title a { overflow-wrap: anywhere; }
.card-media-wrapper { aspect-ratio: 4 / 3; height: auto; }
.main-property-img { width: 100%; height: 100%; object-fit: cover; }
.card-footer { margin-top: auto; }
.prop-specs-grid { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
.prop-spec-item { min-width: 0; }
.prop-spec-item strong { overflow-wrap: anywhere; }
button.thumb-item { padding: 0; border: 2px solid transparent; cursor: pointer; min-width: 44px; min-height: 44px; background: #fff; }
button.thumb-item.active { border-color: #0369a1; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.btn-view, .btn-search { background: #0369a1; }
.btn-reset { display: inline-flex; justify-content: center; align-items: center; min-width: 48px; min-height: 48px; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 12px; color: #334155; cursor: pointer; }
.listing-view-options { gap: 16px; flex-wrap: wrap; }
.input-wrapper select + select { margin-top: 8px; }
.results-count { scroll-margin-top: var(--header-offset); }
.advanced-filters { padding: 16px 24px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; }
.advanced-filters summary { cursor: pointer; font-weight: 700; min-height: 44px; display: list-item; padding: 8px 0; }
.filter-hint { color: #475569; font-size: .875rem; padding: 8px 16px; }
.load-more { display: block; margin: 24px auto 40px; min-height: 48px; padding: 12px 28px; border: 1px solid #0369a1; border-radius: 12px; background: #fff; color: #0369a1; font-weight: 700; cursor: pointer; }
.results-status { text-align: center; color: #475569; margin: 12px 0; }
.empty-featured { text-align: center; padding: 32px; border: 1px dashed #cbd5e1; border-radius: 16px; color: #475569; }
.ux-toast { position: fixed; bottom: calc(24px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px); z-index: 6000; padding: 14px 20px; color: #fff; background: #0c4a6e; border-radius: 12px; box-shadow: 0 12px 36px #0f172a33; }
.ux-toast[data-type='error'] { background: #991b1b; }
.finder-modal, .reco-modal { z-index: 4000; }
.finder-body, .reco-body { overscroll-behavior: contain; }
.footer-visible .finder-fab, .footer-visible .contact-fab, .footer-visible .contact-menu, .footer-visible .reco-fab { visibility: hidden; pointer-events: none; }
.search-visible .finder-fab, .search-visible .contact-fab, .search-visible .contact-menu, .search-visible .reco-fab { visibility: hidden; pointer-events: none; }
button.thumb { padding: 0; cursor: pointer; background: transparent; }
.finder-fab, .contact-fab { bottom: calc(24px + env(safe-area-inset-bottom)); }
.contact-fab { bottom: calc(94px + env(safe-area-inset-bottom)); }
.site-footer a { overflow-wrap: anywhere; }
@media (max-width: 1100px) and (min-width: 993px) { .brand-title { font-size: .9rem; } .nav-link { font-size: 1rem; } .btn-glass { padding: 8px 12px; } }
@media (max-width: 992px) { :root { --header-offset: 90px; } .header-inner { padding: 0 16px; gap: 8px; } .brand-wrapper { flex: 1; gap: 8px; } .brand-title { font-size: clamp(.8rem, 3.5vw, 1.05rem); line-height: 1.5; } .brand-subtitle { font-size: .75rem; } .logo-box { width: 44px; height: 44px; } .notification-bell-wrap { margin: 0; } }
@media (max-width: 640px) {
    body[data-page-type='home'] .modern-hero { min-height: 0; padding: 40px 16px; border-radius: 0 0 24px 24px; }
    body[data-page-type='home'] .hero-content { padding: 0; }
    body[data-page-type='home'] .hero-btns .marketing-btn { padding: 12px 16px; font-size: .95rem; white-space: nowrap; }
    body[data-page-type='home'] .hero-title, .hero-heading { font-size: 1.8rem; line-height: 1.6; }
    .hero-desc { font-size: 1rem; line-height: 1.8; }
    .home-search { grid-template-columns: 1fr 1fr; padding: 12px; gap: 10px; }
    .home-search .home-search-keyword { grid-column: 1 / -1; }
    .home-search button { padding-inline: 12px; }
    body[data-page-type='properties'] .hero { padding: 24px 16px; }
    body[data-page-type='properties'] .hero-badge { display: none; }
    body[data-page-type='properties'] .hero-title { margin-top: 0; }
    body[data-page-type='properties'] .hero-subtitle { margin-bottom: 8px; }
    body[data-page-type='properties'] .hero-quick-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
    body[data-page-type='properties'] .quick-chip { padding: 8px 12px; min-height: 44px; }
    body[data-page-type='properties'] .filters-section { padding: 16px; }
    .listing-filters { grid-template-columns: 1fr; gap: 16px; }
    .listing-view-options { padding: 0 !important; margin-bottom: 20px !important; }
    .sort-options { flex: 1; } .sort-options select { width: 100%; min-width: 140px !important; }
    .property-card .card-content { padding: 16px; }
    .no-results { padding: 32px 16px !important; }
    .finder-fab { max-width: calc(100vw - 32px); }
    .drawer-header span { font-size: 1.1rem !important; }
    .contact-menu { bottom: calc(158px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
    html, * { scroll-behavior: auto !important; }
    *, *::before, *::after { animation-delay: 0ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-delay: 0ms !important; transition-duration: .01ms !important; }
}
