/*
 * Storefront shell. Static asset, no build step — this project ships no Vite
 * or npm pipeline for the client side.
 */

:root {
    --client-ink: #172033;
    --client-muted: #526078;
    --client-line: #e6eaf0;
    --client-accent: #2563eb;
    --client-shell: 1120px;
}

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

body {
    margin: 0;
    color: var(--client-ink);
    font: 16px/1.65 Arial, Helvetica, sans-serif;
    background: #fff;
}

img { max-width: 100%; height: auto; }

a { color: var(--client-accent); }

/* Persisted semantic heading overrides. These classes intentionally beat an
 * imported theme's utility size so changing H1/H2/etc. is visible as well as
 * correct in the DOM. "Default" removes them and returns to the theme. */
.client-content-heading-h1 { font-size: 2.5rem !important; line-height: 1.15 !important; font-weight: 800 !important; }
.client-content-heading-h2 { font-size: 2rem !important; line-height: 1.2 !important; font-weight: 750 !important; }
.client-content-heading-h3 { font-size: 1.625rem !important; line-height: 1.25 !important; font-weight: 700 !important; }
.client-content-heading-h4 { font-size: 1.375rem !important; line-height: 1.3 !important; font-weight: 700 !important; }
.client-content-heading-h5 { font-size: 1.125rem !important; line-height: 1.4 !important; font-weight: 650 !important; }
.client-content-heading-h6 { font-size: 1rem !important; line-height: 1.45 !important; font-weight: 650 !important; }
.client-content-format-p { font-size: 1rem !important; line-height: 1.65 !important; font-weight: 400 !important; }
.client-content-list-ul,
.client-content-list-ol { display: block !important; margin: .75rem 0 !important; padding-inline-start: 1.75rem !important; }
.client-content-list-ul { list-style: disc outside !important; }
.client-content-list-ol { list-style: decimal outside !important; }
.client-content-list-ul > li,
.client-content-list-ol > li { display: list-item !important; }

.client-shell {
    max-width: var(--client-shell);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header ------------------------------------------------------------------ */

.client-header {
    border-bottom: 1px solid var(--client-line);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 40;
}

.client-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
}

.client-brand {
    font-weight: 800;
    font-size: 19px;
    text-decoration: none;
    color: var(--client-ink);
    white-space: nowrap;
}

/* Navigation -------------------------------------------------------------- */

.client-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}

.client-nav-level-0 {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.client-nav-level-0 > .client-nav-item {
    position: relative;
    flex-shrink: 0 !important;
}

.client-nav-level-0 > .client-nav-item > a.nav-link,
.client-nav-level-0 > .client-nav-item > a {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 18px 6px !important;
    letter-spacing: -0.01em;
    white-space: nowrap !important;
    color: #333333 !important;
    background: transparent !important;
    border-radius: 0 !important;
    transition: color 0.2s ease;
}

.client-nav-level-0 > .client-nav-item > a.nav-link:hover,
.client-nav-level-0 > .client-nav-item > a.nav-link.active,
.client-nav-level-0 > .client-nav-item > a:hover {
    color: #DA1109 !important;
    background: transparent !important;
}

@media (min-width: 1280px) {
    .client-nav-level-0 > .client-nav-item > a.nav-link,
    .client-nav-level-0 > .client-nav-item > a {
        font-size: 13.5px !important;
        padding: 18px 8px !important;
    }
}

@media (min-width: 1400px) {
    .client-nav-level-0 > .client-nav-item > a.nav-link,
    .client-nav-level-0 > .client-nav-item > a {
        font-size: 14px !important;
        padding: 18px 10px !important;
    }
}

.client-nav-item { position: relative; }

/* Level 1 items in dropdown menu */
.client-nav-level-1 > .client-nav-item > a,
.client-nav-level-1 > .client-nav-item > span,
.dropdown-menu > .client-nav-item > a,
.dropdown-menu > .dropdown-submenu > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 18px !important;
    color: #374151 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    border-bottom: 1px solid #f3f4f6 !important;
    transition: all 0.15s ease !important;
}

.client-nav-level-1 > .client-nav-item:last-child > a,
.dropdown-menu > .client-nav-item:last-child > a,
.dropdown-menu > .dropdown-submenu:last-child > a {
    border-bottom: none !important;
}

.client-nav-level-1 > .client-nav-item > a:hover,
.dropdown-menu > .client-nav-item > a:hover,
.dropdown-menu > .dropdown-submenu > a:hover,
.dropdown-submenu:hover > a {
    background: #fef2f2 !important;
    color: #DA1109 !important;
    padding-left: 22px !important;
}

/* An item with no resolvable target is text, not a link. */
.client-nav-item > span { color: var(--client-muted); cursor: default; }

/* Submenus: Level 1 Dropdown */
.client-nav-list .client-nav-level-1,
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    background: #fff;
    border-top: 2px solid #DA1109;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 60;
    list-style: none;
    margin: 0;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.client-nav-item:hover > .client-nav-level-1,
.client-nav-item:focus-within > .client-nav-level-1,
.has-dropdown:hover > .dropdown-menu {
    display: block !important;
}

/* Level 2 Submenu Flyout (to the right) */
.dropdown-submenu {
    position: relative !important;
}

.client-nav-list .client-nav-level-2,
.dropdown-submenu-menu {
    display: none !important;
    position: absolute !important;
    top: -8px !important;
    left: 100% !important;
    min-width: 440px !important;
    width: max-content !important;
    max-width: 480px !important;
    background: #ffffff !important;
    border-left: 2px solid #DA1109 !important;
    border-top: 1px solid #f3f4f6 !important;
    border-radius: 0 8px 8px 8px !important;
    padding: 12px 14px !important;
    grid-template-columns: repeat(3, minmax(130px, 1fr)) !important;
    gap: 4px 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
    z-index: 99 !important;
    list-style: none !important;
    margin: 0 !important;
}

/* Invisible bridge so mouse hover never drops between parent and flyout */
.dropdown-submenu-menu::before {
    content: '' !important;
    position: absolute !important;
    top: -10px !important;
    left: -20px !important;
    width: 20px !important;
    height: calc(100% + 20px) !important;
}

.dropdown-submenu:hover > .dropdown-submenu-menu,
.dropdown-submenu:hover > .client-nav-level-2 {
    display: grid !important;
}

.client-nav-level-2.grid-2col,
.dropdown-submenu-menu.grid-2col {
    min-width: 380px !important;
    max-width: 400px !important;
    grid-template-columns: repeat(2, minmax(170px, 1fr)) !important;
}

.client-nav-level-2 > li,
.dropdown-submenu-menu > li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
}

.dropdown-subitem,
.client-nav-level-2 .dropdown-subitem,
.client-nav-level-2 .client-nav-item > a {
    display: block !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border-bottom: none !important;
}

.dropdown-subitem:hover,
.client-nav-level-2 .dropdown-subitem:hover,
.client-nav-level-2 .client-nav-item > a:hover {
    background-color: #fef2f2 !important;
    color: #DA1109 !important;
    padding-left: 12px !important;
}

/* Fallback for narrow viewport on the old inner container only */
@media (max-width: 860px) {
    .client-header__inner { flex-direction: column; align-items: stretch; padding: 12px 0; }
    .client-header__inner .client-nav-list { flex-direction: column; }
    .client-header__inner .client-nav-list .client-nav-list {
        display: flex;
        position: static;
        border: 0;
        box-shadow: none;
        padding: 0 0 0 16px;
    }
}

/* Listing pages ----------------------------------------------------------- */

.client-page-head { padding: 48px 0 8px; }
.client-page-head h1 { font-size: 38px; line-height: 1.15; margin: 0 0 10px; }
.client-page-head p { color: var(--client-muted); margin: 0; max-width: 720px; }

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    padding: 32px 0 56px;
}

.client-card {
    border: 1px solid var(--client-line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .18s ease, transform .18s ease;
}

.client-card:hover { box-shadow: 0 14px 34px rgba(15, 23, 42, .1); transform: translateY(-2px); }

.client-card__media {
    aspect-ratio: 4 / 3;
    background: #f4f6f9;
    display: block;
    object-fit: cover;
    width: 100%;
}

.client-card__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.client-card__title { font-size: 16px; font-weight: 700; margin: 0; }
.client-card__meta { color: var(--client-muted); font-size: 14px; margin: 0; }
.client-card__price { font-weight: 800; color: var(--client-accent); }

.client-empty {
    padding: 64px 0;
    text-align: center;
    color: var(--client-muted);
}

.client-pagination { padding: 0 0 56px; }
.client-pagination nav { display: flex; gap: 6px; flex-wrap: wrap; }

/* Laravel's Tailwind paginator: keep the "Hiển thị từ … kết quả" line on one row and let the
   page buttons drop below it instead of squeezing the text into a one-word column. */
nav[aria-label="Pagination Navigation"] > div:last-child { flex-wrap: wrap; gap: 12px; }
nav[aria-label="Pagination Navigation"] p { white-space: nowrap; margin: 0; }

/* Footer ------------------------------------------------------------------ */

.client-footer {
    border-top: 1px solid var(--client-line);
    background: #f8fafc;
    padding: 40px 0 32px;
    margin-top: 24px;
}

.client-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: space-between;
    align-items: flex-start;
}

.client-footer .client-nav-list { flex-direction: column; gap: 0; }
.client-footer .client-nav-list .client-nav-list { position: static; display: flex; border: 0; box-shadow: none; padding-left: 14px; }
.client-footer__note { color: var(--client-muted); font-size: 14px; margin: 0; max-width: 420px; }

/* Editable regions -------------------------------------------------------- */

/* Rendered only for an admin: a region emptied on purpose still needs a
   handle, or it can never be restored. */
.client-block-empty {
    min-height: 20px;
    min-width: 60px;
    display: inline-block;
}

/*
 * Section appearance tokens.
 *
 * `App\Support\SectionRegistry` maps a stored token to one of these classes, and
 * the database only ever holds the token. Repainting a token is therefore a
 * change here and nowhere else — no UPDATE across the rows that chose it.
 *
 * Every class the registry can emit must exist below. There is no build step on
 * the client side to notice a missing one, so SectionSettingsTest asserts it.
 */
.client-section--bg-light { background: #fff; }
.client-section--bg-muted { background: #f6f8fc; }
.client-section--bg-dark {
    background: var(--client-ink);
    color: #fff;
}
/* Reads the accent through the variable so a per-section colour, when one is
   picked, repaints this without a second rule. */
.client-section--bg-primary {
    background: var(--client-accent);
    color: #fff;
}
.client-section--bg-dark a,
.client-section--bg-primary a { color: #fff; }

.client-section--align-left { text-align: left; }
.client-section--align-center { text-align: center; }
.client-section--align-right { text-align: right; }

.client-section--pad-none { padding-block: 0; }
.client-section--pad-sm { padding-block: 16px; }
.client-section--pad-md { padding-block: 32px; }
.client-section--pad-lg { padding-block: 64px; }

/*
 * A colour the editor picked, arriving as an inline custom property because no
 * stylesheet can hold a rule for a value invented at pick time. Redefining the
 * theme's own variable inside the section is what makes links and the primary
 * background follow along without a rule per component.
 */
.client-section--accent { --client-accent: var(--client-section-accent, #2563eb); }

/*
 * A section an editor hid. Only ever rendered for an editor — a visitor gets no
 * element at all — so this is editor chrome and may say so loudly.
 */
.client-section--hidden {
    opacity: .42;
    outline: 1px dashed #97a4b8;
    outline-offset: 2px;
}

/*
 * Section variants: the shapes a section itself knows how to render. Scoped by
 * section name, so `boxed` in one section cannot restyle another's.
 *
 * There is no `--intro-plain` or `--features-stack` here on purpose. "The way the
 * template already does it" is the absence of a variant, so a class for it would
 * be a rule with nothing to say.
 *
 * These target `.client-section`, which every section-list emits, rather than any
 * one theme's own class names — a variant has to keep working when the markup
 * inside the section is replaced wholesale.
 */
.client-section--intro-boxed {
    border: 1px solid var(--client-line);
    border-radius: 12px;
    padding: 20px;
}
.client-section--features-grid { display: flow-root; }
.client-section--features-grid .client-section {
    display: inline-block;
    vertical-align: top;
    width: calc(50% - 6px);
}

/* Floating call / Zalo buttons: stacked above back-to-top (right 24px, bottom 24px, 42px),
   centred on the same vertical axis. ------------------------------------------ */
.floating-contact {
  position: fixed;
  right: 19px;
  bottom: 80px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.floating-contact__btn {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background: #DA1109;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(218, 17, 9, 0.35);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.floating-contact__btn:hover { background: #B80E07; transform: scale(1.06); }
.floating-contact__btn svg { width: 26px; height: 26px; }
.floating-contact__btn--zalo svg { width: 38px; height: 38px; }
.floating-contact__btn--call { animation: floating-contact-ring 1.8s ease-in-out infinite; }
.floating-contact__btn--call::before {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  background: rgba(218, 17, 9, 0.35);
  animation: floating-contact-pulse 1.8s ease-out infinite;
  z-index: -1;
}
@keyframes floating-contact-ring {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
}
@keyframes floating-contact-pulse {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.7); opacity: 0; }
}
@media (max-width: 640px) {
  .floating-contact { right: 22px; bottom: 78px; gap: 10px; }
  .floating-contact__btn, .floating-contact__btn--call::before { width: 46px; height: 46px; }
  .floating-contact__btn svg { width: 22px; height: 22px; }
  .floating-contact__btn--zalo svg { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .floating-contact__btn--call, .floating-contact__btn--call::before { animation: none; }
}

/* Home: Chuyên trang BĐS Cityland Gò Vấp ------------------------------------- */
.focus-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 12px;
  border-radius: 12px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  text-align: center;
}
.focus-stat__value { font-size: 1.9rem; line-height: 1; font-weight: 800; color: #DA1109; }
.focus-stat__label { margin-top: 6px; font-size: 0.8rem; font-weight: 600; color: #4B5563; }

.listing-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 18px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-top: 3px solid #DA1109;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.listing-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); transform: translateY(-2px); }
.listing-card__type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #DA1109;
  background: #FEF2F2;
  padding: 3px 8px;
  border-radius: 9999px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 62%;
}
.listing-card__area { display: inline-flex; align-items: center; gap: 3px; font-size: 0.72rem; color: #6B7280; white-space: nowrap; }

.area-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  border-radius: 12px;
  background: #1C2327;
  color: #fff;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.area-tile:hover { background: #DA1109; transform: translateY(-2px); }
.area-tile__count { font-size: 1.6rem; font-weight: 800; line-height: 1; }
.area-tile__name { font-size: 0.9rem; font-weight: 700; }
.area-tile__cta { margin-top: 6px; font-size: 0.72rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.05em; }
