/* Public site — uses aqar-tokens.css */

*, *::before, *::after { box-sizing: border-box; }

body.public-site {
    margin: 0;
    font-family: var(--aqar-font);
    background: var(--aqar-bg);
    color: var(--aqar-text);
    direction: rtl;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--aqar-navy);
    box-shadow: var(--aqar-shadow-md);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}

.site-brand-logo {
    height: 36px;
    width: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.site-brand-name {
    display: none;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    align-items: center;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    padding: 6px 0;
    transition: color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
}

.site-nav-cta {
    background: var(--aqar-gold) !important;
    color: var(--aqar-on-gold) !important;
    border-radius: var(--aqar-radius-md);
    padding: 6px 14px !important;
    font-weight: 700;
}

.site-nav-cta:hover {
    background: var(--aqar-gold-hover) !important;
    color: #fff !important;
}

/* Flash */
.site-flash {
    max-width: 1200px;
    margin: 12px auto 0;
    padding: 0 20px;
    width: 100%;
}

.flash {
    padding: 12px 16px;
    border-radius: var(--aqar-radius-md);
    font-size: 14px;
    font-weight: 600;
    border: none;
}

.flash-success {
    background: var(--aqar-success-bg);
    color: var(--aqar-success-text);
}

.flash-error {
    background: var(--aqar-danger-bg);
    color: var(--aqar-danger-text);
}

/* Main */
.site-main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

.site-main--wide {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--aqar-navy);
    margin: 0 0 8px;
}

.page-lead {
    color: var(--aqar-text-muted);
    font-size: 15px;
    margin: 0 0 28px;
    line-height: 1.6;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--aqar-navy);
    margin: 32px 0 16px;
}

.section-title:first-child {
    margin-top: 0;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--aqar-navy) 0%, var(--aqar-navy-deep) 100%);
    color: #fff;
    border-radius: var(--aqar-radius-lg);
    padding: 40px 32px;
    margin-bottom: 32px;
    box-shadow: var(--aqar-shadow-lg);
}

.hero h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin: 0 0 12px;
}

.hero p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
    max-width: 560px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

/* Cards — borderless elevation */
.surface-card,
.entity-card,
.listing-card,
.filter-card,
.detail-card {
    background: var(--aqar-surface);
    border-radius: var(--aqar-radius-lg);
    box-shadow: var(--aqar-shadow-md);
    border: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.listing-card:hover,
.entity-card:hover {
    box-shadow: var(--aqar-shadow-hover);
    transform: translateY(-2px);
}

/* Listing grid */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.listing-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
}

.listing-card-image {
    aspect-ratio: 16 / 10;
    background: var(--aqar-bg-subtle);
    overflow: hidden;
}

.listing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.listing-card-image--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aqar-text-hint);
    font-size: 13px;
}

.listing-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.listing-card-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--aqar-gold);
}

.listing-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--aqar-radius-full);
    background: var(--aqar-bg-subtle);
    color: var(--aqar-text-muted);
    border: none;
}

.chip--blue {
    background: var(--aqar-info-bg);
    color: var(--aqar-info-text);
}

/* Entity cards (offices, brokers, requests) */
.entity-grid {
    display: grid;
    gap: 16px;
}

.entity-card {
    padding: 20px;
}

.entity-card h2,
.entity-card strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--aqar-navy);
}

.entity-card p {
    margin: 8px 0 0;
    color: var(--aqar-text-muted);
    font-size: 14px;
    line-height: 1.6;
}

.entity-card small {
    color: var(--aqar-text-hint);
    font-size: 13px;
}

.entity-card a.entity-link {
    color: var(--aqar-gold);
    font-weight: 700;
}

/* Filters / search form */
.filter-bar {
    margin-bottom: 24px;
}

.filter-card {
    padding: 20px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.filter-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--aqar-text-muted);
}

.filter-form select,
.filter-form input {
    padding: 10px 14px;
    border: none;
    border-radius: var(--aqar-radius-sm);
    background: var(--aqar-bg-subtle);
    font-family: var(--aqar-font);
    font-size: 14px;
    color: var(--aqar-text);
    min-width: 160px;
    outline: none;
}

.filter-form select:focus,
.filter-form input:focus {
    background: var(--aqar-surface);
    box-shadow: var(--aqar-focus-ring);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--aqar-radius-md);
    font-family: var(--aqar-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
    background: var(--aqar-navy);
    color: #fff;
}

.btn-primary:hover {
    background: var(--aqar-navy-deep);
}

.btn-gold {
    background: var(--aqar-gold);
    color: #fff;
}

.btn-gold:hover {
    background: var(--aqar-gold-hover);
}

.btn-primary:active {
    background: var(--aqar-navy);
    box-shadow: inset 0 0 0 2px var(--aqar-gold-muted);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: none;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Listing detail */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

.detail-gallery {
    border-radius: var(--aqar-radius-lg);
    overflow: hidden;
    background: var(--aqar-bg-subtle);
    aspect-ratio: 16 / 10;
    box-shadow: var(--aqar-shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--aqar-text-hint);
    margin-bottom: 20px;
}

.detail-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-card {
    padding: 24px;
    margin-bottom: 16px;
}

.detail-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--aqar-gold);
    margin: 0 0 8px;
}

.detail-meta {
    color: var(--aqar-text-muted);
    font-size: 15px;
    margin: 0 0 16px;
}

.detail-description {
    margin: 0;
    line-height: 1.8;
    color: var(--aqar-text-muted);
}

.detail-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-spec {
    background: var(--aqar-surface-alt);
    border-radius: var(--aqar-radius-sm);
    padding: 12px;
    text-align: center;
    box-shadow: var(--aqar-shadow-sm);
    border: none;
}

.detail-spec-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--aqar-text-hint);
    letter-spacing: 0.04em;
}

.detail-spec-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--aqar-navy);
    margin-top: 4px;
}

/* Office profile */
.profile-header {
    padding: 28px;
    margin-bottom: 24px;
}

.profile-header h1 {
    margin: 0 0 8px;
    font-size: 26px;
    color: var(--aqar-navy);
}

.profile-header p {
    margin: 0;
    color: var(--aqar-text-muted);
    line-height: 1.7;
}

/* Map */
.map-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 64px);
}

.map-container {
    flex: 1;
    min-height: calc(100vh - 64px);
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 64px);
}

.map-filter-float {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    padding: 16px;
    max-width: 320px;
}

/* Pagination (Laravel default) */
.pagination-wrap {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.pagination-wrap nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination-wrap a,
.pagination-wrap span {
    padding: 8px 14px;
    border-radius: var(--aqar-radius-sm);
    background: var(--aqar-surface);
    box-shadow: var(--aqar-shadow-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--aqar-text);
    border: none;
}

.pagination-wrap span[aria-current="page"] {
    background: var(--aqar-navy);
    color: #fff;
}

/* Footer */
.site-footer {
    background: var(--aqar-surface);
    box-shadow: 0 -1px 0 rgba(13, 27, 62, 0.04);
    margin-top: auto;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--aqar-text-muted);
}

.site-footer a {
    color: var(--aqar-gold);
    font-weight: 600;
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.site-footer-legal {
    flex: 1 1 280px;
    min-width: 0;
}

.site-footer-legal-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--aqar-navy);
    margin: 0 0 4px;
    line-height: 1.5;
}

.site-footer-legal-meta {
    margin: 0 0 4px;
    line-height: 1.5;
}

.site-footer-legal-brand {
    margin: 0;
    font-size: 12px;
}

.landing-business-info {
    margin-top: 24px;
    background: var(--aqar-surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(13, 27, 62, 0.06);
}

.landing-business-info--standalone {
    margin-top: 20px;
}

.business-legal-dl {
    margin: 0;
    display: grid;
    gap: 0;
}

.business-legal-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) 1fr;
    gap: 12px 20px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(13, 27, 62, 0.06);
}

.business-legal-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.business-legal-row dt {
    margin: 0;
    font-weight: 600;
    color: var(--aqar-navy);
    font-size: 14px;
}

.business-legal-row dd {
    margin: 0;
    color: var(--aqar-text);
    font-size: 14px;
    line-height: 1.6;
}

.business-legal-row dd a {
    color: var(--aqar-gold);
    font-weight: 600;
}

.business-info-page h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--aqar-navy);
    margin: 0 0 8px;
}

@media (max-width: 640px) {
    .business-legal-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .site-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Legal / static pages */
.legal-doc {
    max-width: 820px;
    margin: 0 auto;
}

.legal-doc section + section {
    margin-top: 28px;
}

.legal-doc h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--aqar-navy);
    margin: 0 0 12px;
}

.legal-doc h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--aqar-navy);
    margin: 20px 0 8px;
}

.legal-doc p,
.legal-doc li {
    color: var(--aqar-text);
    font-size: 15px;
    line-height: 1.75;
}

.legal-doc ul {
    margin: 0;
    padding-right: 20px;
}

.legal-doc li + li {
    margin-top: 6px;
}

.legal-doc .legal-meta {
    color: var(--aqar-text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.legal-doc .legal-divider {
    border: 0;
    border-top: 1px solid rgba(13, 27, 62, 0.1);
    margin: 40px 0;
}

.legal-doc .legal-lang-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--aqar-text-muted);
    margin-bottom: 8px;
}

.legal-doc[dir="ltr"] {
    text-align: left;
}

.legal-doc[dir="ltr"] ul {
    padding-right: 0;
    padding-left: 20px;
}

/* Product docs / about page */
.docs-main {
    padding-top: 32px;
    padding-bottom: 48px;
}

.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 32px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.docs-toc {
    position: sticky;
    top: 24px;
    align-self: start;
    background: var(--aqar-surface);
    border-radius: var(--aqar-radius-md);
    padding: 16px;
    box-shadow: var(--aqar-shadow-sm);
}

.docs-toc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--aqar-navy);
    margin: 0 0 12px;
}

.docs-toc a {
    display: block;
    font-size: 13px;
    color: var(--aqar-text-muted);
    text-decoration: none;
    padding: 4px 0;
    line-height: 1.4;
}

.docs-toc a:hover {
    color: var(--aqar-gold);
}

.docs-toc .toc-vol {
    font-weight: 700;
    color: var(--aqar-navy);
    margin-top: 12px;
    font-size: 13px;
}

.docs-toc .toc-vol:first-child {
    margin-top: 0;
}

.legal-doc-wide {
    max-width: none;
}

.docs-section {
    scroll-margin-top: 80px;
}

.docs-section:target {
    background: rgba(37, 99, 235, 0.04);
    border-radius: var(--aqar-radius-md);
    padding: 16px;
    margin-right: -16px;
    margin-left: -16px;
}

.docs-vol-header {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid rgba(13, 27, 62, 0.12);
}

.docs-vol-header:first-of-type {
    margin-top: 24px;
    padding-top: 0;
    border-top: none;
}

.docs-vol-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--aqar-gold);
    margin-bottom: 8px;
}

.report-severity {
    list-style: none;
    padding-right: 0;
}

.report-severity li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(13, 27, 62, 0.06);
}

@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-toc {
        position: static;
    }
}

/* Auth / login */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--aqar-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--aqar-surface);
    border-radius: var(--aqar-radius-lg);
    padding: 32px;
    box-shadow: var(--aqar-shadow-lg);
    border: none;
    text-align: center;
}

.auth-logo {
    max-height: 96px;
    width: auto;
    max-width: min(160px, 65%);
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
}

.auth-card h1 {
    color: var(--aqar-navy);
    font-size: 24px;
    margin: 0 0 8px;
}

.auth-sub {
    color: var(--aqar-text-muted);
    font-size: 14px;
    margin: 0 0 24px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--aqar-text);
    margin-bottom: 6px;
}

.auth-form input {
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-radius: var(--aqar-radius-sm);
    font-family: var(--aqar-font);
    margin-bottom: 16px;
    background: var(--aqar-bg-subtle);
    outline: none;
}

.auth-form input:focus {
    background: var(--aqar-surface);
    box-shadow: var(--aqar-focus-ring);
}

.auth-form .btn {
    width: 100%;
    margin-top: 4px;
}

.auth-error {
    background: var(--aqar-danger-bg);
    color: var(--aqar-danger-text);
    padding: 12px;
    border-radius: var(--aqar-radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    border: none;
}

@media (max-width: 768px) {
    .site-header-inner {
        height: auto;
        min-height: 64px;
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        gap: 8px 12px;
    }

    .site-nav a {
        font-size: 13px;
    }

    .hero {
        padding: 28px 20px;
    }

    .listing-grid {
        grid-template-columns: 1fr;
    }
}
