:root{
    --green:#007a68;
    --green2:#0f4d43;
    --ink:#102421;
    --muted:#6c7774;
    --line:#e8ded2;
    --paper:#fffaf2;
    --soft:#f6f1e8;
    --danger:#c62828;
    --gold:#d89b17;
    --radius:22px;
    --shadow:0 18px 55px rgba(21,48,42,.12);
}
*{box-sizing:border-box}
body{
    margin:0;
    font-family:Tahoma, Arial, sans-serif;
    background:#fff;
    color:var(--ink);
}
a{color:inherit;text-decoration:none}
.wrap{width:min(1180px,92%);margin:auto}
.site-header{
    background:rgba(255,255,255,.94);
    border-bottom:1px solid var(--line);
    position:sticky;
    top:0;
    z-index:50;
    backdrop-filter: blur(14px);
}
.nav{height:76px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;align-items:center;gap:12px;font-size:18px;color:var(--green)}
.brand small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.brand-mark{
    width:42px;height:42px;border-radius:14px;
    display:grid;place-items:center;
    color:white;background:linear-gradient(135deg,#335CFF,#7b61ff);
    font-weight:900;box-shadow:0 12px 30px rgba(69,77,255,.2)
}
.nav nav{display:flex;gap:22px;font-weight:700;font-size:14px}
.nav nav a:hover{color:var(--green)}
.hero{
    background:
      radial-gradient(circle at 20% 20%, rgba(0,122,104,.10), transparent 28%),
      linear-gradient(115deg,#f4fbf8,#fff6e8 70%);
    border-bottom:1px solid var(--line);
    padding:62px 0 56px;
}
.hero-inner{display:grid;grid-template-columns:1.2fr .8fr;gap:30px;align-items:center}
.hero h1{font-size:46px;line-height:1.25;margin:0 0 16px}
.hero p{color:#53615e;line-height:1.9;margin:0 0 26px}
.cta-row{display:flex;gap:12px;flex-wrap:wrap}
.btn{
    display:inline-flex;align-items:center;justify-content:center;gap:8px;
    background:var(--green);color:white;border:0;border-radius:14px;
    min-height:46px;padding:0 20px;font-weight:800;cursor:pointer;
}
.btn:hover{filter:brightness(.95)}
.btn.outline{background:white;color:var(--green);border:1px solid var(--green)}
.btn.soft{background:#eaf9f5;color:var(--green)}
.btn.danger{background:#b42121}
.btn.dark{background:#102421}
.btn.gold{background:#fff3cf;color:#9a6a00;border:1px solid #f2d37a}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.stat-card{
    background:white;border:1px solid var(--line);border-radius:20px;padding:26px 16px;text-align:center;
    box-shadow:var(--shadow)
}
.stat-card strong{font-size:30px;display:block}
.stat-card span{color:var(--muted);font-weight:700}
.section{padding:44px 0}
.section-head{display:flex;align-items:end;justify-content:space-between;margin-bottom:22px}
.section-head h2{font-size:30px;margin:0}
.grid-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.list-cards{display:grid;gap:18px}
.property-card{
    display:grid;
    grid-template-columns: 360px 1fr;
    background:white;
    border:1px solid var(--line);
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 15px 45px rgba(0,0,0,.07);
}
.property-card.vertical{display:block}
.card-media{
    position:relative;
    min-height:260px;
    background:#eef3f1;
    overflow:hidden;
}
.card-media img{width:100%;height:100%;object-fit:cover;display:block}
.badge-row{position:absolute;top:14px;right:14px;display:flex;gap:8px;flex-wrap:wrap}
.badge{
    display:inline-flex;align-items:center;gap:5px;
    padding:7px 11px;border-radius:999px;font-size:12px;font-weight:900;
    background:rgba(13,29,27,.78);color:white;
}
.badge.gold{background:#fff2c7;color:#936800}
.badge.ok{background:#dcfff4;color:#007a68}
.badge.warn{background:#fff4d8;color:#8a5a00}
.badge.danger{background:#ffe5e5;color:#b42121}
.badge.dark{background:#23302e;color:white}
.photo-count{position:absolute;bottom:12px;right:12px;background:rgba(0,0,0,.65);color:white;border-radius:12px;padding:6px 10px;font-weight:900}
.card-body{padding:24px;display:flex;flex-direction:column;gap:14px}
.card-title{font-size:22px;font-weight:900;margin:0}
.price{font-size:25px;font-weight:900;color:var(--green)}
.muted{color:var(--muted)}
.features{display:flex;gap:14px;flex-wrap:wrap;color:#4c5b58}
.features span{background:#f6faf9;border:1px solid #e5eeeb;border-radius:12px;padding:7px 10px}
.card-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:auto}
.filter-box{
    margin-top:-35px;background:white;border:1px solid var(--line);border-radius:22px;padding:20px;box-shadow:var(--shadow);
    display:grid;grid-template-columns:repeat(5,1fr) auto;gap:12px;align-items:end
}
.field label{font-size:13px;font-weight:900;display:block;margin-bottom:8px}
input,select,textarea{
    width:100%;border:1px solid #dcd7cf;border-radius:13px;min-height:44px;padding:10px 12px;
    font-family:inherit;background:white;color:var(--ink)
}
textarea{min-height:120px;resize:vertical}
.form-card{
    background:white;border:1px solid var(--line);border-radius:24px;padding:24px;box-shadow:var(--shadow)
}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.full{grid-column:1/-1}
.alert{border-radius:16px;padding:14px 16px;margin:12px 0;font-weight:800}
.alert.success{background:#e8fff7;color:#007a68;border:1px solid #c5f3e6}
.alert.error{background:#fff0f0;color:#b42121;border:1px solid #ffc9c9}
.detail-layout{display:grid;grid-template-columns:1fr 340px;gap:24px;align-items:start}
.gallery{
    display:grid;grid-template-columns:2fr 1fr;gap:12px;margin-bottom:22px
}
.gallery-main,.gallery-side img{
    border-radius:22px;overflow:hidden;border:1px solid var(--line);background:#eef3f1
}
.gallery-main img{height:520px;width:100%;object-fit:cover;display:block}
.gallery-side{display:grid;gap:12px}
.gallery-side img{height:254px;width:100%;object-fit:cover}
.detail-panel,.owner-panel,.comment-box,.map-box{
    background:white;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow);margin-bottom:18px
}
.detail-title{font-size:34px;margin:0 0 12px}
.share-row{display:flex;gap:10px;flex-wrap:wrap}
.stars{display:flex;gap:4px;direction:ltr;justify-content:flex-end}
.star-input{display:none}
.star-label{font-size:28px;color:#ddd;cursor:pointer}
.star-input:checked ~ .star-label,
.star-label:hover,
.star-label:hover ~ .star-label{color:#f2b01e}
.rating-stars{color:#f2b01e;letter-spacing:2px;font-size:18px}
.admin-shell{display:grid;grid-template-columns:260px 1fr;gap:24px;align-items:start}
.admin-menu{
    background:#102421;color:white;border-radius:24px;padding:20px;position:sticky;top:96px
}
.admin-menu a{display:block;padding:13px 14px;border-radius:12px;font-weight:800}
.admin-menu a:hover{background:rgba(255,255,255,.1)}
.admin-card{background:white;border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:var(--shadow)}
.table{width:100%;border-collapse:collapse;background:white;border-radius:18px;overflow:hidden}
.table th,.table td{border-bottom:1px solid var(--line);padding:13px;text-align:right;vertical-align:middle}
.table th{background:#f8f4ed;font-weight:900}
.login-box{width:min(440px,92%);margin:70px auto}
.admin-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}
.mini-img{width:90px;height:65px;object-fit:cover;border-radius:12px;border:1px solid var(--line)}
.service-card{background:white;border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:var(--shadow)}
.service-icon{width:58px;height:58px;border-radius:18px;background:#eaf9f5;display:grid;place-items:center;font-size:25px;margin-bottom:14px}
.map-box iframe{width:100%;height:340px;border:0;border-radius:18px}
.owner-private{background:#fff8e8;border:1px dashed #d8ad43;padding:14px;border-radius:14px;color:#765100}
@media(max-width:900px){
    .hero-inner,.detail-layout,.admin-shell,.property-card{grid-template-columns:1fr}
    .filter-box{grid-template-columns:1fr}
    .grid-cards{grid-template-columns:1fr}
    .form-grid{grid-template-columns:1fr}
    .stats,.admin-stats{grid-template-columns:1fr}
    .gallery{grid-template-columns:1fr}
    .gallery-main img,.gallery-side img{height:280px}
    .nav{height:auto;padding:14px 0;align-items:flex-start}
    .nav,.nav nav{flex-direction:column}
}

/* =========================
   V5 UI Polish
========================= */
.hero.v5-hero{
    min-height:420px;
    display:flex;
    align-items:center;
    overflow:hidden;
}
.v5-hero .hero-inner{grid-template-columns:1fr 440px;}
.hero-visual{
    position:relative;
    min-height:330px;
    border-radius:32px;
    background:radial-gradient(circle at 28% 24%, rgba(255,255,255,.85), transparent 18%),linear-gradient(135deg,#dff3ee,#fff7e8);
    border:1px solid var(--line);
    box-shadow:var(--shadow);
    overflow:hidden;
}
.hero-visual:before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(to top, rgba(255,255,255,.65), transparent 45%),url('hero-real-estate.svg') center/cover no-repeat;
}
.hero-chip{
    position:absolute;
    right:24px;
    bottom:24px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:14px 16px;
    box-shadow:0 14px 34px rgba(0,0,0,.1);
    font-weight:900;
    color:var(--green);
}
.hero-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:9px 13px;
    border-radius:999px;
    background:#eaf9f5;
    color:var(--green);
    font-weight:900;
    margin-bottom:16px;
}
.property-card{transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;}
.property-card:hover{transform:translateY(-5px);box-shadow:0 24px 70px rgba(0,0,0,.12);border-color:#b8dcd4;}
.card-media{min-height:285px;}
.card-media img{transition:transform .35s ease;}
.property-card:hover .card-media img{transform:scale(1.045);}
.card-badges{position:static;display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px;}
.card-badges .badge{background:#eff8f5;color:var(--green);}
.card-badges .badge.gold{background:#fff2c7;color:#936800;}
.card-badges .badge.dark{background:#23302e;color:white;}
.card-badges .badge.warn{background:#fff4d8;color:#8a5a00;}
.card-badges .badge.danger{background:#ffe5e5;color:#b42121;}
.card-title{line-height:1.55;margin-top:4px;}
.advertiser-pill{
    display:inline-flex;align-items:center;gap:6px;background:#f7f4ee;border:1px solid var(--line);
    border-radius:999px;padding:7px 10px;font-size:12px;font-weight:900;color:#485653;
}
.site-footer{
    margin-top:50px;background:linear-gradient(135deg,#0f2d28,#0c1f1c);color:white;padding:42px 0;
}
.site-footer p,.site-footer a{color:rgba(255,255,255,.78);}
.footer-grid{display:grid;grid-template-columns:1.2fr .8fr .8fr;gap:24px;align-items:start;}
.footer-brand{display:flex;gap:12px;align-items:center;margin-bottom:10px;}
.footer-actions{display:grid;gap:10px;}
.footer-actions a{background:rgba(255,255,255,.08);padding:11px 13px;border-radius:13px;}
.footer-actions a:hover{background:rgba(255,255,255,.14);}
.footer-bottom{border-top:1px solid rgba(255,255,255,.12);margin-top:28px;padding-top:18px;color:rgba(255,255,255,.55);font-size:13px;}
.detail-panel:hover,.owner-panel:hover,.service-card:hover,.admin-card:hover{border-color:#b8dcd4;}
@media(max-width:900px){
    .v5-hero .hero-inner{grid-template-columns:1fr}
    .hero-visual{min-height:260px}
    .footer-grid{grid-template-columns:1fr}
}


/* =========================
   V6 Video + Services Polish
========================= */
.video-pill{
    position:absolute;
    left:12px;
    bottom:12px;
    z-index:5;
    background:rgba(0,0,0,.72);
    color:white;
    padding:7px 11px;
    border-radius:999px;
    font-weight:900;
    font-size:12px;
}
.card-media video{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transition:transform .35s ease;
}
.property-card:hover .card-media video{
    transform:scale(1.045);
}
.video-preview-muted{
    filter:saturate(.95) contrast(.98);
}
.video-upload-box{
    border:1px dashed #cfc2b3;
    border-radius:18px;
    padding:16px;
    background:#fffaf2;
}
.service-detail-hero{
    background:linear-gradient(135deg,#f1fbf8,#fff7e8);
    border:1px solid var(--line);
    border-radius:28px;
    padding:32px;
    box-shadow:var(--shadow);
}
.service-detail-grid{
    display:grid;
    grid-template-columns:1fr 340px;
    gap:24px;
    align-items:start;
}
.service-rich{
    background:white;
    border:1px solid var(--line);
    border-radius:22px;
    padding:24px;
    box-shadow:var(--shadow);
    line-height:2;
}
.service-rich h2{
    margin-top:0;
}
.benefits-list{
    display:grid;
    gap:10px;
}
.benefit-item{
    background:#f7fbfa;
    border:1px solid #e2eeeb;
    border-radius:14px;
    padding:12px 14px;
    font-weight:700;
}
.admin-help{
    background:#f7fbfa;
    border:1px solid #dcece7;
    border-radius:16px;
    padding:12px 14px;
    color:#52615e;
    line-height:1.8;
}
textarea.tall{
    min-height:170px;
}
.editor-hint{
    font-size:12px;
    color:var(--muted);
    margin-top:6px;
}
@media(max-width:900px){
    .service-detail-grid{grid-template-columns:1fr}
}


/* =========================
   V7 Stable cards + upload feedback
========================= */
.property-card{
    grid-template-columns: 340px 1fr;
    min-height: 330px;
    max-height: 330px;
}
.property-card .card-media{
    height:330px;
    min-height:330px;
}
.property-card .card-body{
    height:330px;
    overflow:hidden;
    justify-content:flex-start;
}
.property-card .card-title{
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.property-card .features{
    max-height:78px;
    overflow:hidden;
}
.property-card .card-actions{
    margin-top:auto;
}
.upload-status-box{
    background:#f7fbfa;
    border:1px solid #dcece7;
    border-radius:16px;
    padding:14px 16px;
    line-height:1.8;
}
.current-video-row{
    display:flex;
    gap:14px;
    align-items:center;
    flex-wrap:wrap;
}
.current-video-row code{
    direction:ltr;
    background:#f6f1e8;
    padding:8px 10px;
    border-radius:10px;
    font-size:12px;
}
@media(max-width:900px){
    .property-card{
        max-height:none;
        min-height:auto;
    }
    .property-card .card-media,
    .property-card .card-body{
        height:auto;
        min-height:auto;
    }
    .property-card .card-media{
        height:260px;
    }
}


/* =========================
   V8 Premium Layout
   Inspired by modern real-estate card grids, strong visual hero, and fixed listing rhythm.
========================= */
body{
    background:
      radial-gradient(circle at 90% 8%, rgba(0,122,104,.05), transparent 30%),
      linear-gradient(180deg,#fff,#fffaf3 40%,#fff);
}
.wrap{width:min(1320px,94%);}
.site-header{
    box-shadow:0 12px 35px rgba(0,0,0,.035);
}
.nav{height:82px}
.brand strong{font-size:20px}
.brand-mark{
    background:linear-gradient(135deg,#007a68,#6557ff);
    box-shadow:0 16px 35px rgba(0,122,104,.22);
}
.nav nav a{
    padding:10px 12px;
    border-radius:999px;
    transition:.18s ease;
}
.nav nav a:hover{
    background:#eaf9f5;
    color:var(--green);
}
.hero.v5-hero{
    min-height:520px;
    position:relative;
    background:
      linear-gradient(90deg, rgba(255,250,242,.92), rgba(255,250,242,.78)),
      url('hero-cityline.svg') center/cover no-repeat;
}
.hero.v5-hero:after{
    content:"";
    position:absolute;
    inset:auto 0 0 0;
    height:110px;
    background:linear-gradient(to bottom, transparent, #fff);
    pointer-events:none;
}
.v5-hero .hero-inner{
    position:relative;
    z-index:2;
    grid-template-columns:1.05fr .95fr;
}
.hero h1{
    font-size:56px;
    line-height:1.18;
    letter-spacing:-1px;
}
.hero p{
    max-width:720px;
    font-size:17px;
}
.hero-visual{
    min-height:390px;
    background:
      radial-gradient(circle at 20% 12%, rgba(255,255,255,.95), transparent 18%),
      linear-gradient(135deg,rgba(0,122,104,.12),rgba(255,243,216,.82));
    transform:rotate(-1.5deg);
}
.hero-visual:before{
    background:url('hero-real-estate-v8.svg') center/cover no-repeat;
}
.hero-visual:hover{
    transform:rotate(0deg) translateY(-4px);
    transition:.25s ease;
}
.hero-chip{
    left:24px;
    right:auto;
}
.section-head h2{
    position:relative;
}
.section-head h2:after{
    content:"";
    display:block;
    width:64px;
    height:4px;
    background:var(--green);
    border-radius:10px;
    margin-top:10px;
}

/* Two-column listing */
.list-cards{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:22px;
}
.property-card{
    display:block;
    min-height:auto;
    max-height:none;
    border-radius:28px;
    overflow:hidden;
    background:#fff;
}
.property-card .card-media{
    height:245px;
    min-height:245px;
    width:100%;
}
.property-card .card-body{
    height:auto;
    min-height:300px;
    padding:20px;
}
.property-card .card-title{
    font-size:20px;
    min-height:62px;
}
.property-card .features{
    max-height:none;
    gap:8px;
}
.features span{
    font-size:12px;
    padding:7px 9px;
}

/* prettier badges */
.card-badges{
    gap:7px;
}
.card-badges .badge,
.advertiser-pill{
    border:1px solid rgba(0,122,104,.12);
    box-shadow:0 6px 16px rgba(0,0,0,.035);
    transition:.18s ease;
}
.card-badges .badge:hover,
.advertiser-pill:hover{
    transform:translateY(-2px);
}
.badge.gold{
    background:linear-gradient(135deg,#fff5cc,#ffe08a)!important;
    color:#8a5a00!important;
    border-color:#f4d477!important;
}
.badge.ok{
    background:#dffaf2!important;
    color:#007a68!important;
}
.badge.dark{
    background:#152d28!important;
    color:#fff!important;
}
.badge.warn{
    background:#fff4dd!important;
    color:#8a5a00!important;
}
.badge.danger{
    background:#ffe7e7!important;
    color:#b42121!important;
}
.price{
    font-size:24px;
}
.card-actions .btn{
    min-height:42px;
    padding:0 15px;
}
.photo-count,.video-pill{
    backdrop-filter:blur(8px);
    box-shadow:0 10px 20px rgba(0,0,0,.16);
}

/* Admin redesign */
.admin-shell{
    grid-template-columns:280px 1fr;
    gap:28px;
}
.admin-menu{
    border-radius:30px;
    background:
      radial-gradient(circle at 20% 0%, rgba(255,255,255,.12), transparent 30%),
      linear-gradient(180deg,#0e302a,#071916);
    box-shadow:0 24px 60px rgba(5,28,24,.22);
    padding:24px;
}
.admin-menu h3{
    margin-top:0;
    font-size:22px;
}
.admin-menu a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:5px;
    color:rgba(255,255,255,.88);
    transition:.18s ease;
}
.admin-menu a:after{
    content:"›";
    opacity:.45;
}
.admin-menu a:hover{
    background:rgba(255,255,255,.13);
    transform:translateX(-4px);
}
.admin-stats{
    grid-template-columns:repeat(4, minmax(0,1fr));
}
.admin-stats .stat-card{
    border-radius:26px;
    background:
      linear-gradient(145deg,#fff,#f7fbfa);
}
.table{
    box-shadow:var(--shadow);
    border:1px solid var(--line);
}
.table th{
    background:linear-gradient(135deg,#f7fbfa,#fff8eb);
}
.table tr:hover td{
    background:#fbfffd;
}

/* footer */
.site-footer{
    border-top:5px solid rgba(255,255,255,.08);
}

/* homepage property section spacing */
.section{
    padding:56px 0;
}

@media(max-width:1100px){
    .list-cards{grid-template-columns:1fr}
}
@media(max-width:900px){
    .hero h1{font-size:38px}
    .hero.v5-hero{min-height:auto}
    .admin-shell{grid-template-columns:1fr}
}


/* =========================
   V9 Mobile First Fixes
========================= */

/* Prevent horizontal overflow */
html, body{
    max-width:100%;
    overflow-x:hidden;
}
img, video, iframe{
    max-width:100%;
}

/* Tablet */
@media(max-width:1100px){
    .wrap{
        width:min(96%, 980px);
    }

    .list-cards{
        grid-template-columns:1fr;
    }

    .property-card{
        max-width:760px;
        margin-inline:auto;
    }

    .admin-stats{
        grid-template-columns:repeat(2, minmax(0,1fr));
    }
}

/* Mobile */
@media(max-width:760px){

    body{
        font-size:14px;
    }

    .wrap{
        width:94%;
    }

    /* Header */
    .site-header{
        position:relative;
    }

    .nav{
        height:auto;
        min-height:unset;
        padding:14px 0;
        display:flex;
        flex-direction:column;
        align-items:center;
        gap:12px;
    }

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

    .brand-mark{
        width:38px;
        height:38px;
        border-radius:13px;
    }

    .nav nav{
        width:100%;
        display:flex;
        flex-wrap:wrap;
        justify-content:center;
        gap:7px;
        font-size:12px;
    }

    .nav nav a{
        padding:8px 10px;
        background:#f7fbfa;
        border:1px solid #e2eeeb;
    }

    /* Hero */
    .hero.v5-hero{
        min-height:auto;
        padding:28px 0 34px;
    }

    .v5-hero .hero-inner{
        grid-template-columns:1fr;
        gap:22px;
        text-align:center;
    }

    .hero h1{
        font-size:30px;
        line-height:1.35;
        letter-spacing:0;
        margin-bottom:12px;
    }

    .hero p{
        font-size:14px;
        line-height:1.9;
        margin-inline:auto;
    }

    .hero-kicker{
        font-size:12px;
        margin-inline:auto;
    }

    .cta-row{
        justify-content:center;
        gap:8px;
    }

    .btn{
        min-height:42px;
        padding:0 14px;
        font-size:13px;
        border-radius:12px;
    }

    .hero-visual{
        min-height:220px;
        border-radius:24px;
        transform:none;
    }

    .hero-chip{
        right:14px;
        left:14px;
        bottom:14px;
        text-align:center;
        padding:11px;
        font-size:13px;
    }

    /* Sections */
    .section{
        padding:30px 0;
    }

    .section-head{
        display:flex;
        flex-direction:column;
        align-items:center;
        text-align:center;
        gap:12px;
    }

    .section-head h2{
        font-size:24px;
    }

    /* Filters */
    .filter-box{
        margin-top:18px;
        grid-template-columns:1fr;
        padding:16px;
        border-radius:18px;
    }

    /* Property cards */
    .list-cards{
        grid-template-columns:1fr;
        gap:16px;
    }

    .property-card{
        width:100%;
        border-radius:20px;
        display:block;
    }

    .property-card .card-media{
        height:220px;
        min-height:220px;
    }

    .property-card .card-body{
        height:auto;
        min-height:auto;
        padding:16px;
        gap:10px;
    }

    .property-card .card-title{
        font-size:18px;
        min-height:auto;
        -webkit-line-clamp:3;
    }

    .price{
        font-size:21px;
    }

    .card-badges{
        gap:6px;
    }

    .card-badges .badge,
    .advertiser-pill{
        font-size:11px;
        padding:6px 8px;
    }

    .features{
        gap:6px;
    }

    .features span{
        font-size:11px;
        padding:6px 8px;
    }

    .card-actions{
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:8px;
        width:100%;
    }

    .card-actions .btn{
        width:100%;
        padding:0 10px;
        font-size:12px;
    }

    .photo-count,
    .video-pill{
        font-size:11px;
        padding:6px 9px;
    }

    /* Forms */
    .form-card{
        padding:16px;
        border-radius:18px;
    }

    .form-grid{
        grid-template-columns:1fr;
        gap:12px;
    }

    input, select, textarea{
        min-height:42px;
        font-size:14px;
    }

    /* Details page */
    .gallery{
        grid-template-columns:1fr;
        gap:10px;
    }

    .gallery-main img,
    .gallery-main video{
        height:260px !important;
    }

    .gallery-side{
        grid-template-columns:1fr 1fr;
        display:grid;
    }

    .gallery-side img{
        height:120px;
    }

    .detail-layout{
        grid-template-columns:1fr;
        gap:14px;
    }

    .detail-title{
        font-size:24px;
    }

    .detail-panel,
    .owner-panel,
    .comment-box,
    .map-box,
    .service-rich{
        padding:16px;
        border-radius:18px;
    }

    .share-row{
        display:grid;
        grid-template-columns:1fr;
    }

    .map-box iframe{
        height:250px;
    }

    /* Services */
    .grid-cards{
        grid-template-columns:1fr;
    }

    .service-detail-grid{
        grid-template-columns:1fr;
    }

    .service-detail-hero{
        padding:20px;
        border-radius:20px;
        text-align:center;
    }

    /* Admin */
    .admin-shell{
        grid-template-columns:1fr;
        gap:16px;
    }

    .admin-menu{
        position:relative;
        top:auto;
        border-radius:20px;
        padding:14px;
        display:grid;
        grid-template-columns:1fr 1fr;
        gap:6px;
    }

    .admin-menu h3{
        grid-column:1/-1;
        text-align:center;
        font-size:18px;
        margin-bottom:8px;
    }

    .admin-menu a{
        margin:0;
        padding:10px;
        font-size:12px;
        justify-content:center;
        text-align:center;
    }

    .admin-menu a:after{
        display:none;
    }

    .admin-stats{
        grid-template-columns:1fr;
        gap:10px;
    }

    .stat-card{
        padding:18px 12px;
        border-radius:18px;
    }

    .stat-card strong{
        font-size:24px;
    }

    /* Tables become scrollable instead of breaking page */
    .table{
        display:block;
        width:100%;
        overflow-x:auto;
        white-space:nowrap;
        border-radius:16px;
    }

    .table th,
    .table td{
        padding:10px;
        font-size:12px;
    }

    .mini-img{
        width:70px;
        height:52px;
    }

    /* Footer */
    .site-footer{
        padding:28px 0;
        text-align:center;
    }

    .footer-grid{
        grid-template-columns:1fr;
        gap:18px;
    }

    .footer-brand{
        justify-content:center;
    }

    .footer-actions a{
        text-align:center;
    }
}

/* Very small phones */
@media(max-width:420px){
    .hero h1{
        font-size:26px;
    }

    .card-actions{
        grid-template-columns:1fr;
    }

    .admin-menu{
        grid-template-columns:1fr;
    }

    .gallery-side{
        grid-template-columns:1fr;
    }

    .gallery-side img{
        height:150px;
    }
}


/* =========================
   V10 definitive mobile card fix
   Fixes: broken demo paths + details hidden under large media blocks.
========================= */

.hg-card{
    overflow:hidden;
}

/* Desktop/tablet: clear vertical card inside 2-column grid */
@media(min-width:761px){
    .hg-card.property-card{
        display:flex !important;
        flex-direction:column !important;
        height:auto !important;
        min-height:560px !important;
        max-height:none !important;
    }

    .hg-card .hg-card-media{
        width:100% !important;
        height:255px !important;
        min-height:255px !important;
        flex:0 0 255px !important;
        display:block !important;
    }

    .hg-card .hg-card-body{
        height:auto !important;
        min-height:300px !important;
        flex:1 1 auto !important;
        display:flex !important;
        flex-direction:column !important;
        overflow:visible !important;
    }
}

/* Mobile: always image first, details immediately below */
@media(max-width:760px){

    .hg-card.property-card{
        display:flex !important;
        flex-direction:column !important;
        width:100% !important;
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
        margin:0 auto 16px !important;
        border-radius:20px !important;
        overflow:hidden !important;
    }

    .hg-card .hg-card-media{
        position:relative !important;
        display:block !important;
        width:100% !important;
        height:205px !important;
        min-height:205px !important;
        max-height:205px !important;
        flex:0 0 205px !important;
        overflow:hidden !important;
        background:#eef3f1 !important;
    }

    .hg-card .hg-card-media img,
    .hg-card .hg-card-media video{
        display:block !important;
        width:100% !important;
        height:100% !important;
        max-height:205px !important;
        object-fit:cover !important;
    }

    .hg-card .hg-card-body{
        display:flex !important;
        flex-direction:column !important;
        width:100% !important;
        height:auto !important;
        min-height:0 !important;
        max-height:none !important;
        overflow:visible !important;
        padding:14px !important;
        gap:9px !important;
        background:#fff !important;
    }

    .hg-card .card-badges{
        order:1;
        display:flex !important;
        flex-wrap:wrap !important;
        gap:5px !important;
        margin-bottom:2px !important;
    }

    .hg-card .hg-meta{
        order:2;
        font-size:12px !important;
        margin:0 !important;
    }

    .hg-card .hg-title{
        order:3;
        display:block !important;
        min-height:0 !important;
        max-height:none !important;
        overflow:visible !important;
        font-size:17px !important;
        line-height:1.55 !important;
        margin:0 !important;
        -webkit-line-clamp:unset !important;
        -webkit-box-orient:unset !important;
    }

    .hg-card .hg-price{
        order:4;
        font-size:20px !important;
        margin:0 !important;
    }

    .hg-card .hg-features{
        order:5;
        display:flex !important;
        flex-wrap:wrap !important;
        gap:6px !important;
        max-height:none !important;
        overflow:visible !important;
    }

    .hg-card .hg-rating{
        order:6;
        font-size:12px !important;
    }

    .hg-card .hg-actions{
        order:7;
        display:grid !important;
        grid-template-columns:1fr 1fr !important;
        gap:7px !important;
        margin-top:4px !important;
        width:100% !important;
    }

    .hg-card .hg-actions .btn{
        width:100% !important;
        min-height:40px !important;
        font-size:12px !important;
        padding:0 8px !important;
    }

    .hg-card .hg-actions .btn:first-child{
        grid-column:1 / -1;
    }
}

@media(max-width:420px){
    .hg-card .hg-card-media{
        height:185px !important;
        min-height:185px !important;
        max-height:185px !important;
        flex-basis:185px !important;
    }

    .hg-card .hg-card-media img,
    .hg-card .hg-card-media video{
        max-height:185px !important;
    }

    .hg-card .hg-actions{
        grid-template-columns:1fr !important;
    }
}


/* =========================
   V11 City / Neighborhood dependent filters
========================= */
@media(min-width:901px){
    .filter-box{
        grid-template-columns:repeat(6, minmax(0,1fr)) auto;
    }
}


/* =========================
   V12 Sold/Rented trust stamps + V13 Service packages
========================= */
.card-media,.gallery-main{position:relative;}
.sold-stamp{position:absolute;inset:auto auto 18px 18px;z-index:8;min-width:122px;text-align:center;transform:rotate(-8deg);border:3px solid rgba(180,32,32,.9);color:#b42121;background:rgba(255,255,255,.86);border-radius:14px;padding:10px 14px;font-weight:900;font-size:18px;box-shadow:0 14px 35px rgba(0,0,0,.18);backdrop-filter:blur(8px);}
.detail-status-stamp{position:absolute;top:24px;right:24px;z-index:9;transform:rotate(-8deg);border:4px solid rgba(180,32,32,.9);color:#b42121;background:rgba(255,255,255,.88);border-radius:18px;padding:14px 22px;font-weight:900;font-size:28px;box-shadow:0 18px 45px rgba(0,0,0,.2);backdrop-filter:blur(8px);}
.package-card{position:relative;overflow:hidden;}
.package-card:before{content:"";position:absolute;inset:0 0 auto 0;height:5px;background:linear-gradient(90deg,var(--green),#6557ff);}
.package-card .price{margin:10px 0;}
.package-card .btn{width:100%;}
@media(max-width:760px){.sold-stamp{min-width:96px;font-size:14px;padding:8px 10px;left:14px;bottom:14px}.detail-status-stamp{top:14px;right:14px;font-size:20px;padding:10px 16px}}
