
:root{--navy:#092b45;--green:#28b463;--gold:#f7c14b;--bg:#f5f8fb;--border:#dce7ee;--text:#102033;--muted:#607386;--shadow:0 16px 42px rgba(9,43,69,.10)}
*{box-sizing:border-box;margin:0;padding:0}body{font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text);line-height:1.5}a{text-decoration:none;color:inherit}.container{width:min(1240px,calc(100% - 48px));margin:auto}
header{background:var(--navy);color:white;position:sticky;top:0;z-index:50;box-shadow:0 8px 25px rgba(0,0,0,.15)}.topbar{min-height:90px;display:flex;align-items:center;justify-content:space-between;gap:18px}.brand img{height:90px !important;width:auto;display:block}
.nav{display:flex;align-items:center;gap:12px;font-weight:700}.nav-item{position:relative;padding:30px 0;cursor:pointer}.nav-link{color:white;font-size:14px}.dropdown{position:absolute;top:76px;left:0;min-width:240px;background:white;color:var(--navy);border-radius:16px;box-shadow:0 20px 50px rgba(0,0,0,.18);border:1px solid var(--border);padding:10px;display:none}.nav-item:hover .dropdown{display:block}.dropdown a{display:block;padding:12px 14px;border-radius:10px;font-size:14px}.dropdown a:hover{background:#eef4f8}.actions{display:flex;align-items:center;gap:12px}
.btn{border:0;border-radius:14px;padding:13px 22px;font-weight:800;cursor:pointer;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:8px}.btn-green{background:linear-gradient(135deg,var(--green),#149a4f);color:white}.btn-outline{background:transparent;color:white;border:1px solid rgba(255,255,255,.45)}.btn-gold-outline{background:transparent;color:white;border:1px solid var(--gold)}
.hero{background:linear-gradient(90deg,rgba(9,43,69,.98),rgba(9,43,69,.82),rgba(9,43,69,.36)),linear-gradient(135deg,#103b5f,#dce7ee);color:white;padding:70px 0 44px}.hero-grid{display:grid;grid-template-columns:1fr 620px;gap:48px;align-items:center}.hero h1{font-size:54px;line-height:1.06;letter-spacing:-1px;margin-bottom:18px}.hero h2 span{color:#2ee071}.hero p{font-size:20px;color:#e8f3fa;max-width:650px;margin-bottom:28px}.hero-features{display:flex;gap:28px;flex-wrap:wrap}.feature{display:flex;gap:12px;align-items:center;font-weight:700}.feature .ico{width:44px;height:44px;border-radius:14px;border:1px solid rgba(255,255,255,.32);display:grid;place-items:center;font-size:22px}
.search-panel{background:white;color:var(--text);border-radius:20px;overflow:hidden;box-shadow:0 24px 60px rgba(0,0,0,.22)}.search-tabs{display:grid;grid-template-columns:repeat(3,1fr);border-bottom:1px solid var(--border)}.search-tab{padding:18px;text-align:center;font-weight:900;color:var(--navy);border-right:1px solid var(--border);cursor:pointer}.search-tab.active{background:var(--navy);color:white}.search-body{padding:24px}.search-body input,.search-body select{width:100%;padding:15px 16px;border:1px solid var(--border);border-radius:12px;font-size:15px;background:white}.search-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin:14px 0}
.quick-wrap{margin-top:-24px;position:relative;z-index:2}.quick-grid{background:white;border-radius:18px;border:1px solid var(--border);box-shadow:var(--shadow);display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden}.quick-card{padding:20px 18px;display:flex;gap:12px;align-items:center;border-right:1px solid var(--border)}.quick-card:last-child{border-right:0}.quick-card span{font-size:28px}.quick-card strong{display:block;color:var(--navy);font-size:14px}
.section{padding:24px 0}.main-grid{display:grid;grid-template-columns:1fr 360px;gap:26px;align-items:start}.section-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.section-head h2{font-size:30px;color:var(--navy)}.section-head a{font-weight:800;color:var(--navy)}
.property-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.property-card{background:white;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 12px 28px rgba(9,43,69,.07);position:relative}.property-card img{width:100%;height:185px;object-fit:cover;display:block}.tag{position:absolute;top:12px;left:12px;background:var(--green);color:white;padding:7px 10px;border-radius:10px;font-size:12px;font-weight:800}.fav{position:absolute;top:12px;right:12px;width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.88);display:grid;place-items:center;font-size:23px}.p-body{padding:17px}.price{font-size:24px;font-weight:900;color:var(--navy);margin-bottom:4px}.title{font-weight:800;color:var(--navy);margin-bottom:6px}.meta{color:var(--muted);font-weight:700;font-size:14px;margin-bottom:12px}.details{display:flex;gap:13px;flex-wrap:wrap;color:#607386;font-size:13px;font-weight:700}.call{margin-top:15px;width:100%;padding:10px;border-radius:12px;border:1px solid #b8f0cf;background:#ecfff5;color:#12824a;font-weight:900}
.side-card{background:white;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:var(--shadow);margin-bottom:18px}.side-title{background:var(--navy);color:white;padding:16px 20px;display:flex;justify-content:space-between;align-items:center;font-weight:900}.side-body{padding:20px}.car-head{display:flex;gap:16px;align-items:center;margin-bottom:12px}.car-head img{width:130px;height:70px;object-fit:contain}.status{display:flex;justify-content:space-between;border-bottom:1px solid var(--border);padding:10px 0;font-size:14px;font-weight:800}.ok{color:#149a4f;font-weight:900}.doc-card{background:linear-gradient(135deg,var(--navy),#0c4167);color:white}.doc-card p{color:#dceaf3;margin-bottom:14px}.doc-card select{width:100%;padding:14px;border-radius:12px;border:0;margin-bottom:12px}
.trust{background:white;border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden}.trust-item{padding:10px;display:flex;gap:13px;border-right:1px solid var(--border)}.trust-item:last-child{border-right:0}.trust-item span{font-size:30px}.trust-item strong{display:block;color:var(--navy);margin-bottom:3px}.trust-item p{font-size:14px;color:var(--muted);font-weight:600}
.services-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.service-card{background:white;border:1px solid var(--border);border-radius:12px;padding:8px 10px;box-shadow:none}.service-card span{font-size:18px;display:block;margin-bottom:2px}.service-card h3{color:var(--navy);margin-bottom:1px;font-size:15px;line-height:1.15}.service-card p{color:var(--muted);font-size:11px;line-height:1.2;font-weight:500}
footer{background:#071f34;color:white;padding:46px 0;margin-top:30px}.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1.4fr;gap:30px}.footer-logo{width:170px;margin-bottom:14px}footer h4{margin-bottom:12px}footer a,footer p{display:block;color:#cbd9e3;margin:7px 0;font-size:14px}.mobile-bottom{display:none!important}
@media(max-width:1100px){.hero-grid,.main-grid{grid-template-columns:1fr}.property-grid{grid-template-columns:repeat(2,1fr)}.quick-grid{grid-template-columns:repeat(3,1fr)}.services-grid{grid-template-columns:repeat(2,1fr)}.trust{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.container{width:min(100% - 26px,1240px)}.topbar{min-height:70px}.brand img{width:145px}.nav{display:none}.hero{padding:44px 0 34px}.hero-grid{gap:28px}.hero h1{font-size:36px}.hero p{font-size:16px}.search-tabs{grid-template-columns:1fr}.search-row,.property-grid,.quick-grid,.services-grid,.trust,.footer-grid{grid-template-columns:1fr}.quick-card,.trust-item{border-right:0;border-bottom:1px solid var(--border)}}
/* Само за profile.html */
.profile-title {
  font-size: 44px !important;
  line-height: 1.1 !important;
}
.profile-title{
    font-size:44px !important;
    line-height:1.1 !important;
    color:white;
}

.profile-title span{
    color:#28b463;
}

/* MK stable mobile header actions */
@media(max-width:760px){
  .topbar{
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:10px 0 14px;
  }

  .brand{
    width:100%;
    display:flex;
    justify-content:center;
  }

  .brand img{
    width:150px;
  }

  .actions{
    width:100%;
    display:flex !important;
    justify-content:center;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
  }

  .actions .btn{
    padding:10px 12px;
    font-size:13px;
    border-radius:12px;
  }

  .actions .btn-gold-outline{
    order:2;
  }

  #authButton{
    order:1;
  }

  #logoutButton{
    order:3;
  }

  .mobile-bottom{
    display:none !important;
  }
}


/* MK Expert quick services - 8 cards */
.expert-quick-grid{
  grid-template-columns:repeat(4,1fr);
}
.expert-quick-grid .quick-card{
  min-height:82px;
}
.expert-quick-grid .quick-card:nth-child(4n){
  border-right:0;
}
.expert-quick-grid .quick-card:nth-child(n+5){
  border-top:1px solid var(--border);
}

@media(max-width:1100px){
  .expert-quick-grid{
    grid-template-columns:repeat(2,1fr);
  }
  .expert-quick-grid .quick-card:nth-child(4n){
    border-right:1px solid var(--border);
  }
  .expert-quick-grid .quick-card:nth-child(2n){
    border-right:0;
  }
  .expert-quick-grid .quick-card:nth-child(n+3){
    border-top:1px solid var(--border);
  }
}

@media(max-width:760px){
  .expert-quick-grid{
    grid-template-columns:repeat(2,1fr) !important;
  }
  .expert-quick-grid .quick-card{
    padding:16px 12px;
    gap:8px;
    min-height:78px;
    border-bottom:0;
  }
  .expert-quick-grid .quick-card span{
    font-size:24px;
  }
  .expert-quick-grid .quick-card strong{
    font-size:13px;
    line-height:1.25;
  }
}


/* MK compact expert services */
@media(max-width:760px){
  .services-grid{gap:8px}
  .service-card{padding:8px 10px;border-radius:12px}
  .service-card span{font-size:18px;margin-bottom:2px}
  .service-card h3{font-size:15px;line-height:1.15;margin-bottom:1px}
  .service-card p{font-size:11px;line-height:1.2}
}


.mobile-only{
  display:none !important;
}

@media(max-width:760px){
  .mobile-only{
    display:inline-flex !important;
  }

  .actions .btn-gold-outline{
    display:none !important;
  }
}

/* MK FINAL MOBILE HEADER FIX
   Логото на началната страница да изглежда като във Вход/Регистрация.
   Това правило е най-долу, за да надвие старите мобилни правила. */
@media(max-width:760px){
  header .topbar{
    min-height:auto !important;
    padding:18px 0 14px !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:center !important;
    gap:10px !important;
  }

  header .brand{
    width:100% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    margin:0 !important;
  }

  header .brand img{
    height:70px !important;
    width:auto !important;
    max-width:calc(100vw - 40px) !important;
    object-fit:contain !important;
    display:block !important;
  }

  header .actions{
    width:100% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:center !important;
    gap:8px !important;
    flex-wrap:wrap !important;
  }

  header .actions .btn{
    padding:10px 12px !important;
    font-size:13px !important;
    border-radius:12px !important;
  }

  header .actions .btn-gold-outline{
    display:none !important;
  }

  .mk-mobile-shortcuts{
    display:flex !important;
    width:100% !important;
    justify-content:center !important;
    gap:10px !important;
    margin-top:0 !important;
    padding:0 14px 12px !important;
  }

  .mk-mobile-shortcuts a{
    flex:1 !important;
    max-width:180px !important;
    text-align:center !important;
  }
}



/* MK PWA update banner */
.mk-update-banner{
  position:fixed;
  left:12px;
  right:12px;
  bottom:16px;
  z-index:9999;
  background:#092b45;
  color:#fff;
  border:1px solid rgba(255,255,255,.22);
  border-radius:16px;
  padding:12px 14px;
  box-shadow:0 18px 45px rgba(0,0,0,.28);
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:14px;
  font-weight:800;
}

.mk-update-banner button{
  border:0;
  border-radius:12px;
  padding:9px 13px;
  background:#28b463;
  color:#fff;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}

@media(max-width:760px){
  .mk-update-banner{
    left:10px;
    right:10px;
    bottom:12px;
    font-size:13px;
  }
}
