@font-face {
    font-family: 'AlethiaPro';
    src: url('https://estatenetconsulting.com/wp-content/uploads/2025/03/AlethiaPro-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: AlethiaPro, sans-seri !important;
    background: #fff !important;
    margin: 0;
    padding: 0;
    color: #222;
}
h1.page-title {
    text-align: center;
    font-size: 50px;
    font-weight: 400;
    margin-bottom: 40px;
    margin-top: 200px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #111;
}
.fastighet-lista {
    display: flex;
    flex-wrap: wrap;
    width: 100%}
.fastighet-box {
    position: relative;
    width: 50%;
    height: 50vh;
    overflow: hidden;
    cursor: pointer;
    transition: transform .2s ease-in-out;
}
.fastighet-box:hover {
    transform: scale(1);
}
.fastighet-box a {
    display: block;
    text-decoration: none;
}
.fastighet-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s ease-in-out, filter .2s ease-in-out;
}
.fastighet-box:hover img {
    transform: scale(1.03);
    filter: brightness(.9);
}
.fastighet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background .3s ease-in-out;
}
.fastighet-box:hover .fastighet-overlay {
    background: rgba(0, 0, 0, .5);
}
.fastighet-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: 200;
    letter-spacing: 3px;
    z-index: 2;
    transition: transform 0.3s ease-in-out; /* Moves up fast */
}

.fastighet-info h3 {
 font-size: 20px; 
 letter-spacing: 3px;
 font-weight: 300;
} 

.fastighet-detaljer .fastighet-pris {
  font-size: 10px; /* Anpassa efter behov */
  font-family: 'AlethiaPro', sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
  margin-bottom: -3px;
}

.fastighet-detaljer .fastighet-yta {
  font-size: 10px; /* Anpassa efter behov */
  font-family: 'AlethiaPro', sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0;
}

.fastighet-header-info h1 {
font-size: 18px !important;
}
/* Move the title up quickly on hover */
.fastighet-box:hover .fastighet-info {
    transform: translateY(-7px);
    transition: transform 0.55s ease-in-out;
}

/* Smooth, slower return when unhovering */
.fastighet-box:not(:hover) .fastighet-info {
    transform: translateY(0);
    transition: transform 0.55s ease-in-out; /* No delay, but slow return */
}

/* Move the title up quickly on hover */
.fastighet-box:hover .fastighet-detaljer {
    animation: fadeIn 0.3s ease-in; 
}




.fastighet-detaljer {
    position: absolute;
    bottom: 5px;
    left: 20px;
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease-in-out, visibility .3s ease-in-out;
}

/* Show on hover */
.fastighet-box:hover .fastighet-detaljer {
    opacity: 1;
    visibility: visible;
}

.sortering-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    gap: 30px;
    flex-wrap: nowrap;
}
.slider-group {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 320px;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
}


.sortering-container label {
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 3px;
    color: #101813;
    min-width: 100px;
    text-align: right;
    flex-shrink: 0;
}
.slider-container {
    align-items: center;
    flex: 1;
    gap: 10px;
    width: 100%}
    
.sortering-container input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    height: 1px;
    border: none;
    outline: 0;
}


.sortering-container input[type=range]::-webkit-slider-runnable-track {
    height: 1px;
    border-radius: 2px;
}

.sortering-container input[type=range]::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
    background-color: #101813;
    
}
.slider-value {
    font-size: 16px;
    font-weight: 300;
    color: #101813;
    min-width: 80px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
}



.sortering-container input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 1px; /* Höjden på slidern */
}


#pris-varde,
#yta-varde {
    color: #101813 !important;
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 10px;
}   

.sortering-container .unit {
    font-size: 16px;
    font-weight: 500;
    color: #101813;
    white-space: nowrap;
    margin-left: 5px;
    
}
.sortering-container .price-unit {
    margin-left: 2px;
}
.sortering-container .area-unit {
    margin-left: 0px;
}
#reset-filter {
    background: #8b0000;
    color: white;
    padding: 12px 28px;
    border: none;
    text-transform: uppercase;
    font-family: AlethiaPro, sans-serif;
    letter-spacing: 2px;
    font-size: 10px;
    cursor: pointer;
    transition: background .3s ease-in-out;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 120px;
}
#reset-filter:hover {
    background: white;
    color: #8b0000;
}


.fastighet-status {
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    background: #101813; /* Mörkgrön */
    color: white;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 2px;
    font-family: 'AlethiaPro', sans-serif;
    text-transform: uppercase;
    padding: 8px 12px;
    text-align: center;
    z-index: 10;
    letter-spacing: 3px;
}


/* ======= Filterknappar ======= */
.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.filter-btn {
    padding: 10px 20px;
    font-size: 10px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    font-family: 'AlethiaPro', sans-serif !important;
    border: 2px solid #101813 !important; /* Mörkgrön ram */
    background: #101813 !important; /* Mörkgrön bakgrund */
    color: white !important;
    cursor: pointer !important;
    border-radius: 0px !important;
    transition: all 0.3s ease-in-out !important;
    letter-spacing: 3px !important;
}

.filter-btn:hover,
.filter-btn.active {
    background: white !important;
    color: #101813 !important;
}



@media (max-width: 1400px) {
    .sortering-container {
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }
    .slider-group {
        flex-direction: column;
        align-items: center;
        min-width: 100%;
    }
    .sortering-container label {
        text-align: center;
    }
    .slider-value {
        text-align: center;
    }
    .sortering-container .unit {
        display: block;
        margin-left: 0;
        margin-top: 5px;
        text-align: center;
    }

    /* ✅ Fixar fastighetsboxarna */
    .fastighet-lista {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    .fastighet-box {
        width: 50%; /* Två kolumner */
        height: 40vh; /* Håller proportionerna */
        position: relative;
        overflow: hidden;
    }
    .fastighet-box a {
        display: block;
        width: 100%;
        height: 100%;
    }
    .fastighet-box img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 🚀 Tvingar bilden att fylla ut */
        display: block;
        position: absolute;
        top: 0;
        left: 0;
    }
}

@media (max-width: 768px) {
    .sortering-container {
        gap: 10px;
        width: 90%;
    }
    .slider-group {
        min-width: 100%;
    }
    .sortering-container label {
        min-width: auto;
        width: 100%;
        text-align: center;
    }
    .slider-value {
        width: 100%;
        text-align: center;
        color: #101813;
    }
    #reset-filter {
        width: 100%;
        text-align: center;
    }

    /* ✅ Anpassar fastighetsboxarna för mindre skärmar */
    .fastighet-box {
        width: 100%; /* En kolumn */
        height: 50vh;
        position: relative;
        overflow: hidden;
    }
    .fastighet-box a {
        width: 100%;
        height: 100%;
        display: block;
    }
    .fastighet-box img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 🛠 Nu fyller bilden alltid hela boxen */
        position: absolute;
        top: 0;
        left: 0;
    }
    
    
    
}

@media (max-width: 768px) { 
    h1.page-title {
        font-size: 28px;
        letter-spacing: 1px;
        margin-top: 150px;
    }
    
    .container {
    padding: 0;
    max-width: 100% !important;
    width: 100% !important;
  }
    
    .filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* 🟢 Centrerar raderna horisontellt */
  gap: 10px;
  padding: 10px 0px;     /* 🔸 Lite sidopadding */
  max-width: 100%;  
  width: 100%;
  margin: 0 auto;
}

.filter-btn {
  width: 180px; /* 🟢 Alla knappar lika breda */
  text-align: center;
  padding: 12px 10px;
  font-size: 14px;
  font-family: 'AlethiaPro', sans-serif;
  border: 1px solid #101813;
  background: #101813;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.filter-btn:hover,
.filter-btn.active {
  background: white;
  color: #101813;
}


    
}



@media (max-width: 480px) {
    .fastighet-box {
        width: 100%;
        height: 40vh;
    }
    .fastighet-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}



.logo-container {
    position: absolute;
    top: 10px;
    left: -10px;
    z-index: 1000;
}

.logo-container img {
    height: auto;
    width: 180px;
    margin-left: 30px;
}

@media (max-width: 768px) {
    .fastighet-info {
        transform: none !important;
        position: absolute !important;
        bottom: 50px !important; /* 🔥 Flyttar ner titeln precis över detaljerna */
        left: 20px !important;
        display: block;
        z-index: 10;
        background: none !important; /* Ta bort eventuell bakgrund */
        padding: 0 !important;
        max-width: 80%;
    }
    
    .fastighet-info h3 {
  font-size: 18px; /* Ändra storlek efter behov */
  font-family: 'AlethiaPro', sans-serif;
  font-weight: 300;
  letter-spacing: 3px;
  margin: 0;
}

.fastighet-detaljer .fastighet-pris {
  font-size: 10px; /* Anpassa efter behov */
  font-family: 'AlethiaPro', sans-serif;
  font-weight: 300;
  letter-spacing: 2px;
  margin: 0;
}

#pris-varde,
#yta-varde {
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 10px;
}   

#fastighet-sok {
    padding: 12px 20px;
    width: 80%;
    max-width: 900px;
    border: 1px solid #101813;
    font-family: 'AlethiaPro', sans-serif;
    letter-spacing: 2px;
    font-size: 10px;
    margin-bottom: 0px;
    margin-top: -20px;
    
}

.logo-container img {
    height: auto;
    width: 130px;
    margin-left: 30px;
}

    
    .sortering-container {
    margin: 0 !important;
    padding: 10px !important;
    width: 100% !important;
    }
    .fastighet-box img {
    filter: brightness(.5);
}
    .fastighet-box:hover img {
    filter: brightness(.5);
}

.sortering-container label {
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 12px;
}   

.filter-btn {
padding: 5px 10px;
font-size: 10px;
letter-spacing: 3px;
font-weight: 300;
    
}
}


.sok-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 30px auto;
    flex-wrap: nowrap;
    max-width: 900px;
    width: 100%;
    padding: 0 20px;
}

#fastighet-sok {
    flex: 1;
    padding: 11px 20px;
    border: 1px solid #101813;
    font-family: 'AlethiaPro', sans-serif;
    letter-spacing: 2px;
    font-size: 12px;
    border-radius: 0;
    outline: none;
    box-shadow: none;
}

#fastighet-sok:focus,
#fastighet-sok:hover {
    border: 1px solid #101813;
    outline: none;
    box-shadow: none;
}

#fastighet-sok-btn {
    background-color: #101813;
    color: white;
    padding: 12px 26px;
    font-family: 'AlethiaPro', sans-serif;
    letter-spacing: 2px;
    font-size: 10px;
    text-transform: uppercase;
    border: 1px solid #101813;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

#fastighet-sok-btn:hover,
#fastighet-sok-btn:focus,
#fastighet-sok-btn:active {
    background-color: #101813;
    color: white;
    outline: none;
    border: 1px solid #101813;
}

@media (max-width: 768px) {
  .sok-container {
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    gap: 10px;
  }

  #fastighet-sok,
  #fastighet-sok-btn {
    width: 100%;
    max-width: 500px;
    font-size: 12px;
  }

  #fastighet-sok-btn {
    margin-top: 0;
    text-align: center;
    margin-bottom: -20px;
  }
  
}

#fastighet-sok-btn:hover {
  background-color: #fff;
  color: #101813;
  border: 1px solid #101813;
  cursor: pointer;
}

#fastighet-sok-btn {
  transition: all 0.3s ease-in-out;
}


#loading-bar {
  position: relative;
  width: 100%;
  height: 1px;
  background: white;
  overflow: hidden;
  margin: 10px auto 30px;
}

#loading-bar .bar {
  content: "";
  position: absolute;
  height: 100%;
  width: 30%;
  background-color: #101813;
  animation: loadingBarSlide 2s ease-in-out infinite;
}

@keyframes loadingBarSlide {
  0% {
    left: -30%;
    width: 30%;
  }
  30% {
    left: 40%;
    width: 50%;
  }
  60% {
    left: 80%;
    width: 20%;
  }
  100% {
    left: 100%;
    width: 30%;
  }
}

