/* =========================================================
   HERO SEARCH
========================================================= */

.ego-hansen-hero-search {
    background: rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: 24px 30px;
    max-width: 1300px;
    margin: 0 auto 40px auto;
    backdrop-filter: blur(6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

.ego-hansen-hero-inner.hero-v2 {
    display: grid;
    grid-template-columns: 1.4fr 1.1fr 1.1fr auto;
    gap: 18px;
    align-items: center;
}

.ego-hansen-hero-field {
    position: relative;
}

.ego-hansen-hero-select,
.ego-hansen-hero-input {
    width: 100%;
    background: #ffffff !important;
    color: #000 !important;
    border: 1px solid #d4d4d4 !important;
    padding: 14px 18px;
    border-radius: 12px !important;
    font-size: 16px;
    height: 52px;
    appearance: none;
    line-height: 1.2;
}

.ego-hansen-hero-select::-ms-expand {
    display: none;
}

.ego-hansen-hero-select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.ego-hansen-hero-select option {
    color: #000 !important;
    background: #fff;
}

.ego-hansen-hero-button {
    background: #d52b2b;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 17px;
    cursor: pointer;
    height: 52px;
    transition: 0.2s ease;
    white-space: nowrap;
}

.ego-hansen-hero-button:hover {
    background: #b11f1f;
    transform: translateY(-1px);
}

.ego-hansen-hero-360 {
    grid-column: 1 / -1;
    margin-top: 6px;
}

.ego-hansen-hero-360 label {
    font-size: 14px;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ego-hansen-hero-360 input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

@media (max-width: 900px) {
    .ego-hansen-hero-inner.hero-v2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .ego-hansen-hero-button {
        width: 100%;
    }
}

/* =========================================================
   ARCHIVE LAYOUT (FILTER + RESULTATER)
========================================================= */

.ego-hansen-archive-layout {
    display: grid;
    grid-template-columns: 310px minmax(0,1fr);
    gap: 32px;
    align-items: flex-start;
}

@media (max-width: 980px) {
    .ego-hansen-archive-layout {
        grid-template-columns: 1fr;
    }
}

/* FILTER-SIDEBAR ------------------------------------------------ */

.ego-hansen-filter {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 18px 20px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
    position: sticky;
    top: 90px;
}

@media (max-width: 980px) {
    .ego-hansen-filter {
        position: static;
        box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    }
}

.ego-hansen-filter-form {
    display: block;
}

.ego-hansen-filter-group {
    margin-bottom: 14px;
}

.ego-hansen-filter-group:last-of-type {
    margin-bottom: 8px;
}

.ego-hansen-filter-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    color: #777;
}

.ego-hansen-filter-group input,
.ego-hansen-filter-group select {
    width: 100%;
    padding: 9px 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 13px;
    background: #fafafa;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ego-hansen-filter-group input:focus,
.ego-hansen-filter-group select:focus {
    outline: none;
    background: #fff;
    border-color: #d52b2b;
    box-shadow: 0 0 0 1px rgba(213,43,43,0.25);
}

.ego-hansen-filter-row {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.ego-hansen-filter-group input[type="checkbox"] {
    width: auto;
    height: auto;
    margin-right: 6px;
}

.ego-hansen-filter-group label input[type="checkbox"] {
    margin-right: 6px;
    vertical-align: middle;
}

.ego-hansen-filter-submit {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    border: none;
    background: #d52b2b;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s ease, transform 0.1s ease;
}

.ego-hansen-filter-submit:hover {
    background: #b11f1f;
    transform: translateY(-1px);
}

/* =========================================================
   RESULTATER + TOPBAR (MATCHING, VIEW, SORT)
========================================================= */

.ego-hansen-results {
    min-width: 0;
}

.ego-hansen-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #555;
}

.ego-hansen-results-header > span {
    font-weight: 600;
}

/* Controls-wrapper (view + sort) */

.ego-hansen-results-controls {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

/* VIEW-SWITCH (grid / list / map, ikoner til højre) */

.ego-hansen-view-switch {
    display: inline-flex;
    gap: 6px;
}

.ego-hansen-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #dddddd;
    background: #ffffff;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.ego-hansen-view-btn svg {
    width: 16px;
    height: 16px;
    stroke: #555;
    fill: none;
    stroke-width: 2;
}

.ego-hansen-view-btn.is-active {
    background: #d52b2b;
    border-color: #d52b2b;
    transform: translateY(-1px);
}

.ego-hansen-view-btn.is-active svg {
    stroke: #ffffff;
}

/* SORT-DROPDOWN */

.ego-hansen-sort-form {
    display: inline-flex;
    align-items: center;
}

.ego-hansen-sort-form select {
    padding: 7px 26px 7px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #dddddd;
    background: #ffffff;
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
}

.ego-hansen-sort-form select:focus {
    outline: none;
    border-color: #d52b2b;
}

/* =========================================================
   GRID / LIST / MAP – WRAPPER
========================================================= */

.ego-hansen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

/* grid-archive bruges til selve listing-siden */
.ego-hansen-grid-archive {
    margin-top: 4px;
}

/* LIST VIEW: én per række */
.ego-hansen-view-list .ego-hansen-grid-archive {
    grid-template-columns: 1fr;
}

/* MAP VIEW: du kan senere tilføje speciel styling */
.ego-hansen-map-wrapper {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    background: #f2f2f2;
    min-height: 320px; /* plads til kort */
}

/* Wrapper rundt om hver property, så vi kan differantiere pr. view */
.ego-hansen-property {
    height: 100%;
}

/* =========================================================
   PROPERTY CARDS (SAMME MARKUP TIL GRID og LIST)
========================================================= */

.ego-hansen-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ego-hansen-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.14);
}

.ego-hansen-card-thumb img {
    width: 100%;
    display: block;
}

/* LIST VIEW – gør kortet horisontalt */
.ego-hansen-property-list .ego-hansen-card {
    display: grid;
    grid-template-columns: 230px minmax(0,1fr);
    height: 100%;
}

@media (max-width: 700px) {
    .ego-hansen-property-list .ego-hansen-card {
        grid-template-columns: 1fr;
    }
}

.ego-hansen-property-list .ego-hansen-card-thumb img {
    height: 100%;
    object-fit: cover;
}

/* Card body */

.ego-hansen-card-body {
    padding: 12px 14px 14px;
}

.ego-hansen-card-ref {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #999;
    margin-bottom: 3px;
}

.ego-hansen-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #333;
}

.ego-hansen-card-location {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.ego-hansen-card-price {
    font-size: 16px;
    font-weight: 700;
    color: #d52b2b;
    margin-bottom: 8px;
}

/* Meta-linje (beds, baths, m2, pool etc.) */

.ego-hansen-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 13px;
    color: #444;
}

.ego-hansen-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ego-hansen-meta-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    flex-shrink: 0;
}

/* Optionel favorit-ikon oppe i højre hjørne */
.ego-hansen-card-fav {
    position: absolute;
    top: 10px;
    right: 12px;
}

/* =========================================================
   PAGINATION
========================================================= */

.ego-hansen-pagination {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ego-hansen-page-link {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 13px;
    text-decoration: none;
    color: #444;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ego-hansen-page-link:hover {
    border-color: #d52b2b;
}

.ego-hansen-page-link.is-active {
    background: #d52b2b;
    border-color: #d52b2b;
    color: #fff;
}

/* =========================================================
   GENERELT
========================================================= */

.ego-hansen-no-results {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
}

.ego-hansen-card { 
    position: relative; 
}

.ego-hansen-card-fav {
    position: absolute;
    top: 10px;
    right: 12px;
    cursor: pointer;
    z-index: 20;
}

.ego-hansen-card-fav svg {
    width: 24px;
    height: 24px;
    fill: rgba(0,0,0,0.12);
    transition: 0.2s ease;
}

.ego-hansen-card-fav:hover svg {
    fill: rgba(0,0,0,0.35);
}

.ego-hansen-card-fav.is-fav svg {
    fill: #d52b2b; /* rød favorit */
}

/* SINGLE SUMMARY LINE – under galleriet */
.ego-hansen-single-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 14px 18px;
    margin: 20px 0 26px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.ego-hansen-single-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #444;
}

.ego-hansen-single-summary-icon {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
}

.ego-hansen-single-slider .swiper-slide img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    max-height: 500px; /* Juster højden efter behov */
}

/* === Developments archive layout === */

.ego-hansen-archive-developments .ego-hansen-archive-inner {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

/* Venstre kolonne: filter */
.ego-hansen-archive-developments .ego-hansen-archive-filters {
    flex: 0 0 320px;      /* fast kolonnebredde som på live */
    max-width: 100%;
}

.ego-hansen-search-form-developments {
    display: block;
}

.ego-hansen-search-form-developments .ego-hansen-filter-group {
    margin-bottom: 20px;
}

.ego-hansen-search-form-developments label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.ego-hansen-search-form-developments input[type="text"],
.ego-hansen-search-form-developments select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    background: #fff;
    font-size: 14px;
}

.ego-hansen-search-form-developments .ego-hansen-filter-submit {
    width: 100%;
    display: block;
    padding: 14px 18px;
    border: none;
    background: #d22d3b;         /* Hansen rød */
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .05em;
    cursor: pointer;
}

.ego-hansen-search-form-developments .ego-hansen-filter-submit:hover {
    opacity: .9;
}

/* Højre kolonne: resultater */
.ego-hansen-archive-developments .ego-hansen-archive-results {
    flex: 1 1 auto;
}

.ego-hansen-archive-developments .ego-hansen-archive-header {
    margin-bottom: 20px;
    font-size: 16px;
}

/* Grid med udviklingskort – 2 pr. række på desktop, 1 på mobil */
.ego-hansen-grid-developments {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

/* Pagination */
.ego-hansen-pagination {
    margin-top: 30px;
    text-align: center;
}

.ego-hansen-pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    gap: 8px;
}

/* Responsive: stack på small screens */
@media (max-width: 900px) {
    .ego-hansen-archive-developments .ego-hansen-archive-inner {
        flex-direction: column;
    }

    .ego-hansen-archive-developments .ego-hansen-archive-filters {
        flex-basis: 100%;
    }
}
