/* Al Rawad Real Estate – property showcase sections */

/* intro: text + search on one side, photo on the other */
.intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); min-height: calc(100vh - 78px); }
.intro__text { padding: 4rem 3rem 3rem; padding-inline-start: max(1.25rem, calc((100vw - 1240px) / 2)); display: flex; flex-direction: column; justify-content: center; background: var(--sand); }
.intro h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); }
.intro__text > p { color: var(--muted); max-width: 32em; }
.search { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.5rem; background: #fff; padding: 1.2rem; border-radius: 6px; }
.search label { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: .25rem; }
.search select { font: inherit; font-size: .95rem; color: var(--char); border: 1px solid var(--line); border-radius: 4px; padding: .55rem .6rem; min-height: 46px; background: #fff; }
.search button { font: inherit; font-weight: 400; background: var(--char); color: #fff; border: 0; border-radius: 4px; cursor: pointer; min-height: 46px; align-self: end; }
.search button:hover { background: var(--bronze-dark); }
.intro__photo { margin: 0; position: relative; }
.intro__photo img { width: 100%; height: 100%; object-fit: cover; }
.intro__photo figcaption { position: absolute; bottom: 1.5rem; inset-inline-start: 1.5rem; background: rgba(255,255,255,.94); padding: .8rem 1.1rem; border-radius: 4px; display: flex; flex-direction: column; max-width: 20rem; }
.intro__photo figcaption b { font-family: var(--display); font-size: 1.25rem; }
.intro__photo figcaption span { font-size: .85rem; color: var(--muted); }

/* units */
.units { padding: 5rem 0; }
.units__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 2rem; }
.units__head h2 { margin: 0; }
.units__count { margin: 0; color: var(--bronze-dark); font-weight: 400; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 1.5rem; }
.unit { display: flex; flex-direction: column; }
.unit[hidden] { display: none; }
.unit > img, .unit__plan { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }
.unit__plan { background: var(--sage); display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 6px; padding: 14px; }
.unit__plan span { border: 2px solid rgba(42,36,32,.35); }
.unit__plan span:first-child { grid-column: span 2; }
.unit__plan--open { grid-template-columns: 1fr 1fr; background: #E9E4DA; }
.unit__plan--open span:first-child { grid-column: span 2; grid-row: span 1; }
.unit__body { padding-top: 1rem; display: flex; flex-direction: column; flex: 1; }
.unit__place { font-size: .8rem; color: var(--muted); margin: 0 0 .2rem; }
.unit h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.unit__facts { list-style: none; padding: 0; margin: 0 0 .8rem; display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .85rem; }
.unit__facts li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--bronze); vertical-align: middle; margin-inline-end: .9rem; }
.unit__price { font-family: var(--display); font-size: 1.45rem; font-weight: 600; margin: auto 0 .6rem; }
.unit__more { font: inherit; font-size: .88rem; font-weight: 400; background: none; border: 0; border-top: 1px solid var(--line); padding: .7rem 0 0; text-align: right; color: var(--bronze-dark); cursor: pointer; }
.unit__more:hover { text-decoration: underline; }
.units__empty { color: var(--muted); }

/* unit sheet dialog */
.sheet { border: 0; border-radius: 8px; padding: 2rem; width: min(560px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); overflow: auto; color: var(--char); }
.sheet::backdrop { background: rgba(42,36,32,.6); }
.sheet__close-form { position: absolute; top: .6rem; inset-inline-end: .6rem; margin: 0; }
.sheet__close, .viewer__close { font-size: 1.6rem; width: 44px; height: 44px; border: 0; background: var(--sand); border-radius: 50%; cursor: pointer; line-height: 1; }
.sheet__plan { background: var(--sage); border-radius: 4px; padding: 1rem; margin-bottom: 1.2rem; }
.sheet__plan svg { width: 100%; height: auto; fill: none; stroke: var(--char); stroke-width: 2; }
.sheet__plan .door { stroke: var(--bronze); }
.sheet h2 { font-size: 1.6rem; margin-bottom: .2rem; }
.sheet__place { color: var(--muted); font-size: .88rem; }
.sheet__specs { margin: 0 0 1rem; }
.sheet__specs div { display: grid; grid-template-columns: 6rem 1fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: .45rem 0; }
.sheet__specs dt { color: var(--muted); font-size: .85rem; }
.sheet__specs dd { margin: 0; font-weight: 400; }
.sheet__plan-note { font-size: .78rem; color: var(--muted); }

/* projects */
.projects { background: var(--sage); padding: 5rem 0; }
.projects__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; margin-top: 2rem; }
.proj h3 { font-size: 1.6rem; }
.proj > p { color: #4F4A44; }
.proj dl { margin: 0 0 1rem; }
.proj dl div { display: grid; grid-template-columns: 5rem 1fr; padding: .4rem 0; border-top: 1px solid rgba(42,36,32,.15); font-size: .9rem; }
.proj dt { color: var(--muted); }
.proj dd { margin: 0; }
.proj__bar { height: 6px; background: rgba(42,36,32,.12); border-radius: 3px; overflow: hidden; }
.proj__bar span { display: block; height: 100%; background: var(--bronze); }

/* gallery */
.gallery { padding: 5rem 0; }
.gallery__grid { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 240px 240px; gap: .8rem; }
.gallery__grid li { min-height: 0; }
.g1 { grid-row: span 2; }
.g2 { grid-row: span 2; }
.g4 { grid-column: 3; }
.gallery__grid button { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: none; border-radius: 4px; overflow: hidden; }
.gallery__grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery__grid button:hover img { transform: scale(1.03); }
.viewer { border: 0; padding: 0; background: transparent; max-width: min(1100px, calc(100% - 2rem)); overflow: visible; }
.viewer::backdrop { background: rgba(20,17,15,.88); }
.viewer img { max-height: 80vh; width: auto; margin: 0 auto; border-radius: 4px; }
.viewer p { color: #fff; text-align: center; margin: .8rem 0 0; }
.viewer form { position: absolute; top: -3.2rem; inset-inline-end: 0; margin: 0; }

/* investment */
.invest { background: var(--char); color: #E8E2DA; padding: 5rem 0; }
.invest h2 { color: #fff; }
.invest__grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 4rem; align-items: start; }
.invest__grid > * { min-width: 0; }
.invest p { color: #C9C0B5; }
.yield { margin: 1.5rem 0 1rem; }
.yield div { display: flex; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-top: 1px solid #4A413A; }
.yield dd { margin: 0; font-family: var(--display); font-size: 1.4rem; color: #D8B98E; white-space: nowrap; }
.invest__fine { font-size: .8rem; }
.plans { overflow-x: auto; background: #342D28; border-radius: 6px; padding: 1.5rem; }
.plans table { width: 100%; border-collapse: collapse; min-width: 440px; }
.plans th, .plans td { text-align: right; padding: .8rem .4rem; border-bottom: 1px solid #4A413A; font-weight: 300; }
.plans thead th { color: #A99F93; font-size: .82rem; }
.plans tbody th { font-family: var(--display); font-size: 1.1rem; font-weight: 600; color: #fff; }
.plans__eg { font-size: .88rem; margin: 1rem 0 0; }

/* inquiry */
.inquiry { padding: 5rem 0; background: var(--sand); }
.inquiry__grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3.5rem; }
.inquiry__grid > div > p { color: var(--muted); }
.inquiry address { font-style: normal; line-height: 2; margin-top: 1.5rem; }
.inq { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; background: #fff; padding: 2rem; border-radius: 6px; }
.inq label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 400; }
.inq__wide { grid-column: 1 / -1; }
.inq input, .inq select { font: inherit; font-size: .95rem; border: 1px solid var(--line); border-radius: 4px; padding: .6rem .7rem; min-height: 48px; background: #fff; color: var(--char); }
.inq [aria-invalid="true"] { border-color: #B42318; background: #FFF6F5; }
.inq button { grid-column: 1 / -1; justify-self: start; font: inherit; font-weight: 400; background: var(--bronze); color: #fff; border: 0; border-radius: 4px; padding: .85rem 2rem; cursor: pointer; }
.inq button:hover { background: var(--bronze-dark); }
.inq__msg { grid-column: 1 / -1; margin: 0; }
.inq__msg.is-error { color: #B42318; }
.inq__msg.is-ok { color: #3E6B3A; }

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; min-height: 0; }
  .intro__photo { order: -1; height: 46vh; min-height: 280px; }
  .intro__text { padding: 2.5rem 1.25rem; }
  .grid { grid-template-columns: 1fr 1fr; }
  .projects__list, .invest__grid, .inquiry__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .gallery__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 180px 180px; }
  .g1 { grid-column: 1 / -1; grid-row: auto; }
  .g2 { grid-row: span 2; }
  .g4 { grid-column: auto; }
}
@media (max-width: 560px) {
  .search { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .units, .projects, .gallery, .invest, .inquiry { padding: 3.5rem 0; }
  .sheet { padding: 1.3rem; }
  .inq { grid-template-columns: 1fr; padding: 1.3rem; }
  .inq button { justify-self: stretch; }
  .intro__photo figcaption { inset-inline: 1rem; bottom: 1rem; }
}
