/* ГЛОБАЛЬНІ СТИЛІ */
:root {
    --gold: #b89552;
    --dark: #1a1a1a;
    --white: #ffffff;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    line-height: 1.6;
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* HEADER */
header {
    background: rgba(0, 0, 0, 0.95);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 60px; }
nav a { color: white; text-decoration: none; margin-left: 20px; text-transform: uppercase; font-size: 12px; font-weight: 600; letter-spacing: 1px; }

/* HERO */
.hero {
    height: 70vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?q=80&w=1600');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero h1 { font-family: 'Playfair Display'; font-size: clamp(40px, 6vw, 70px); margin: 0; }
.hero p { text-transform: uppercase; letter-spacing: 4px; margin-top: 10px; }

/* ПРО НАС (ОРИГІНАЛЬНИЙ ДИЗАЙН) */
.about { padding: 100px 0; text-align: center; }
.about h2 { font-family: 'Playfair Display', serif; font-size: 42px; margin: 0; }
.line { width: 50px; height: 2px; background: var(--gold); margin: 25px auto; }
.about p { max-width: 750px; margin: 0 auto; font-size: 18px; color: #555; font-weight: 300; }

/* КАРТКИ ТА СІТКА */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: white; cursor: pointer; transition: 0.3s; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #eee; }
.card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.card-img { height: 250px; background-size: cover; background-position: center; }
.card-content { padding: 25px; }
.card-content h3 { font-family: 'Playfair Display'; margin: 0 0 10px; font-size: 22px; }
.price { color: var(--gold); font-weight: bold; font-size: 24px; }
.location { color: #888; font-size: 14px; margin-bottom: 10px; }

/* КНОПКИ */
.btn-gold { display: inline-block; padding: 18px 35px; background: var(--gold); color: white; text-decoration: none; font-weight: bold; text-transform: uppercase; border: none; cursor: pointer; transition: 0.3s; }
.btn-gold:hover { background: #a38446; }
.btn-outline { display: inline-block; padding: 14px 35px; border: 2px solid var(--gold); color: var(--dark); text-decoration: none; font-weight: bold; text-transform: uppercase; transition: 0.3s; }
.btn-outline:hover { background: var(--gold); color: white; }

/* ФІЛЬТР */
.search-area { background: #f4f4f4; padding: 60px 0; }
.filter-box { background: white; padding: 30px; display: flex; flex-wrap: wrap; gap: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
select, .btn-search { flex: 1; min-width: 180px; height: 55px; padding: 0 15px; border: 1px solid #ddd; font-family: 'Montserrat'; outline: none; }
.btn-search { background: var(--gold); color: white; border: none; font-weight: bold; cursor: pointer; }

/* КРАСИВЕ МОДАЛЬНЕ ВІКНО */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); backdrop-filter: blur(5px); }
.modal-content { background: white; margin: 3% auto; width: 95%; max-width: 1100px; position: relative; overflow: hidden; animation: slideIn 0.4s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.close { position: absolute; right: 20px; top: 15px; font-size: 35px; cursor: pointer; z-index: 10; color: #333; }
.modal-flex { display: flex; flex-wrap: wrap; }
.modal-left { flex: 1.2; min-width: 400px; }
.modal-left img { width: 100%; height: 100%; min-height: 550px; object-fit: cover; }
.modal-right { flex: 0.8; padding: 50px; display: flex; flex-direction: column; background: #fff; }
.modal-right h2 { font-family: 'Playfair Display'; font-size: 38px; margin: 0; }
.modal-price-tag { font-size: 34px; color: var(--gold); font-weight: 700; margin: 20px 0; display: block; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.house-specs { display: flex; gap: 15px; margin: 20px 0; padding: 0; list-style: none; }
.house-specs li { background: #f9f9f9; padding: 10px 12px; border: 1px solid #eee; font-size: 13px; font-weight: 600; color: #666; }
.modal-description { color: #666; font-size: 15px; line-height: 1.8; margin-bottom: 30px; }

/* ФУТЕР */
footer { background: var(--dark); color: #666; padding: 40px 0; text-align: center; }

@media (max-width: 768px) {
    .modal-left, .modal-right { flex: 100%; min-width: 100%; }
    .modal-left img { min-height: 300px; }
}


/* ===== Floating Contacts (FAB) ===== */
.fab-wrap{
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.fab-actions{
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.fab-wrap:hover .fab-actions,
.fab-wrap:focus-within .fab-actions{
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fab-main,
.fab-action{
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.15);
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.fab-main{
    background: var(--gold); /* головна кнопка */
}

.fab-action{
    background: var(--gold); /* іконки зверху */
}

.fab-main svg{
    width: 26px;
    height: 26px;
    fill: #ffffff;
}

.fab-action svg{
    width: 26px;
    height: 26px;
    fill: #ffffff;
}

.fab-main:hover,
.fab-action:hover{
    transform: translateY(-2px);
}

@media (max-width: 520px){
    .fab-wrap{ right: 14px; bottom: 14px; }
    .fab-main, .fab-action{ width: 54px; height: 54px; }
}

/* ===== Catalog: Tabs + Advanced Filter (Buy/Rent) ===== */
.search-area{ background: #f4f4f4; }
.search-title{ text-align:center; font-family:'Playfair Display', serif; margin: 0 0 18px; }

.filter-tabs{
  display:flex;
  gap: 8px;
  margin: 0 0 14px;
}
.filter-tab{
  padding: 10px 16px;
  border-radius: 6px 6px 0 0;
  border: 1px solid rgba(0,0,0,.08);
  background: #ffffff;
  color: #222;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.filter-tab.active{
  background: rgba(0,0,0,.92);
  color: #fff;
  border-color: rgba(0,0,0,.15);
}

.filter-box.advanced{
  border-top-left-radius: 0;
  border-top-right-radius: 8px;
  border-radius: 8px;
  /* FIX: рівна сітка як на макеті */
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

/* Елементи фільтра */
.filter-box.advanced input[type="number"],
.filter-box.advanced select{
  width: 100%;
  height: 55px;
  padding: 0 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  box-sizing: border-box;
}

/* Групи "від / до" займають 2 колонки */
.filter-box.advanced .range-group{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Допоміжні класи для ширини */
.filter-box.advanced .span-2{ grid-column: span 2; }

.filter-box.advanced .btn-search{
  width: 100%;
  height: 55px;
  border-radius: 6px;
  background: var(--gold);
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

/* Адаптив */
@media (max-width: 980px){
  .filter-box.advanced{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-box.advanced .span-2{ grid-column: span 2; }
}
@media (max-width: 520px){
  .filter-box.advanced{ grid-template-columns: 1fr; }
  .filter-box.advanced .span-2{ grid-column: span 1; }
  .filter-box.advanced .range-group{ grid-template-columns: 1fr 1fr; }
}
.filter-actions{
  display:flex;
  justify-content: flex-start;
  gap: 16px;
  margin-top: 10px;
}
.filter-clear{
  background: transparent;
  border: none;
  color: #d24b3b;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}
.filter-hint{
  color: #666;
  font-size: 13px;
}

/* ===== Rent badges / Pet badge ===== */
.card{ position: relative; overflow: hidden; }
.card-img{ position: relative; }
.badge-rent{
  position:absolute;
  left: 12px;
  bottom: 12px;
  background: var(--gold);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.pet-badge{
  position:absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--gold);
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

/* hide blocks by JS */
.hidden{ display:none !important; }

@media (max-width: 900px){
  .filter-box.advanced .range-group{ min-width: 100%; }
}
/* ===== /Catalog: Tabs + Advanced Filter ===== */

/* ===== /Floating Contacts (FAB) ===== */


/* ===== Контакти ===== */
.contacts-section{
  background:#f3f3f3;
  padding:70px 0 0;
}

.contacts-title{
  text-align:center;
  font-size:44px;
  letter-spacing:1px;
  margin:0 0 28px;
  color:#111;
}

.contacts-card{
  background:#fff;
  border-radius:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.08);
  overflow:hidden;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:0;
}

.contacts-map img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.contacts-info{
  padding:28px 28px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:18px;
}

.contact-row{
  display:flex;
  align-items:flex-start;
  gap:12px;
  font-size:20px;
  color:#222;
}

.contact-icon{
  font-size:22px;
  line-height:1;
  margin-top:2px;
}

.contact-link{
  color:#111;
  text-decoration:none;
  font-weight:600;
}
.contact-link:hover{ text-decoration:underline; }

.muted{ color:#666; font-size:18px; }

.contact-socials{
  display:flex;
  gap:10px;
  margin-top:6px;
}

.social-btn{
  width:38px;
  height:38px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#111;
  color:#fff;
  font-weight:700;
  text-decoration:none;
  transition:.2s ease;
}
.social-btn:hover{ transform: translateY(-2px); }

.contact-brand-bar{
  margin-top:38px;
  background: var(--gold, #c9a24a);
  color:#111;
  text-align:center;
  padding:18px 12px;
  font-weight:800;
  letter-spacing:3px;
  font-size:26px;
}

/* Адаптив */
@media (max-width: 900px){
  .contacts-card{ grid-template-columns: 1fr; }
  .contacts-title{ font-size:34px; }
}


/* Active menu link */
nav a.active{
  color: #c9a24a;
}

/* ===== Firestore cards addons ===== */
.badge-sale{
  position:absolute;
  left: 12px;
  bottom: 12px;
  background: #111;
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  opacity: .92;
}

.card-mini-spec{
  margin: 10px 0 0;
  color: #777;
  font-size: 13px;
  font-weight: 600;
}

.filter-status{
  margin-top: 10px;
  font-size: 13px;
  color: #666;
}
/* ===== /Firestore cards addons ===== */
