/* ===========================
   GLOBAL BAS
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: #f7f8fa;
    color: #222;
    line-height: 1.6;
}

/* ===========================
   HERO / HEADER
=========================== */

.hero {
    background: linear-gradient(135deg, #003366, #005599);
    padding: 70px 20px;
    text-align: center;
    color: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.hero-inner h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-sub {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 8px;
}

.hero-announce {
    margin-top: 14px;
    font-size: 1.1rem;
    opacity: 1;
}

/* RESPONSIV HERO */
@media (max-width: 600px) {
    .hero-inner h1 {
        font-size: 2.2rem;
    }
    .hero-sub {
        font-size: 1rem;
    }
}

.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #003366, #005599);
    color: white;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.logo-wrapper {
    margin-bottom: 20px;
}

.site-logo {
    width: 160px;
    height: auto;
    max-width: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.header-text h1 {
    font-size: 2.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.header-text p {
    font-size: 1.1rem;
    opacity: 0.95;
}

.announce {
    margin-top: 10px;
    font-size: 1rem;
}

.property-single {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.gallery {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 20px;
}

.gallery img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.back-link {
    display: inline-block;
    margin: 20px 0;
    font-size: 1.1rem;
    color: #005bbb;
    text-decoration: none;
    font-weight: 600;
}

.back-link:hover {
    text-decoration: underline;
}


/* ===========================
   MAIN CONTENT
=========================== */

.main {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 6px;
}

/* ===========================
   PROPERTY GRID
=========================== */

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
}

.property-card {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}

.property-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.property-info {
    padding: 16px;
}

.property-info h3 {
    font-size: 1.25rem;
    margin-bottom: 6px;
}

.street {
    color: #666;
    font-size: 0.95rem;
}

.no-properties {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.7;
}

.property-image-wrapper {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}
.property-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* ===========================
   POPUP (NY PREMIUM DESIGN)
=========================== */

/* ============================
   MODERN POPUP DESIGN
   ============================ */

.popup-container {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
    animation: fadeIn 0.25s ease-out;
}

.popup {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 35px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease-out;
}

.popup h2 {
    margin-top: 0;
    font-size: 1.8rem;
}

.popup-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: #fff;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.popup-close:hover {
    background: #f2f2f2;
    transform: scale(1.1);
}

/* Image slideshow */
.image-slideshow img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
    object-fit: cover;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================
   MOBILANPASSNING
   ============================ */

@media (max-width: 600px) {
    .popup {
        padding: 18px;
        border-radius: 14px;
    }

    .popup h2 {
        font-size: 1.4rem;
    }

    .popup-close {
        top: 12px;
        right: 14px;
        width: 34px;
        height: 34px;
        font-size: 1.5rem;
    }
}

/* Bildgalleri */
.image-slideshow {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.image-slideshow img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: 0.25s ease;
}

.image-slideshow img:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* ===========================
   RESPONSIVE POPUP
=========================== */

@media (max-width: 600px) {

    .popup {
        padding: 22px 20px;
        border-radius: 14px;
        max-height: 92vh;
    }

    .popup h2 {
        font-size: 1.6rem;
        text-align: center;
    }

    .popup p {
        font-size: 0.95rem;
    }

    .popup-close {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .image-slideshow {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }

    .image-slideshow img {
        height: 130px;
    }
}

@media (max-width: 400px) {

    .popup {
        padding: 18px 16px;
    }

    .popup h2 {
        font-size: 1.4rem;
    }

    .image-slideshow {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .image-slideshow img {
        height: 110px;
    }
}

/* ============================
   MOBILANPASSNING
   ============================ */

@media (max-width: 768px) {

    .property-single {
        padding: 15px;
    }

    .property-single h1 {
        font-size: 1.6rem;
        line-height: 1.2;
    }

    .street {
        font-size: 1rem;
        margin-bottom: 15px;
    }

    .gallery picture img {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .property-details p {
        font-size: 1rem;
        margin: 6px 0;
    }

    .description {
        font-size: 1rem;
        line-height: 1.5;
        margin-top: 20px;
    }

    .back-link {
        font-size: 1rem;
        margin-top: 10px;
    }
}

/* Extra liten mobil */
@media (max-width: 480px) {
    .property-single h1 {
        font-size: 1.4rem;
    }

    .property-details p {
        font-size: 0.95rem;
    }

    .description {
        font-size: 0.95rem;
    }
}


/* ===========================
   FOOTER
=========================== */

.footer {
    background: #eee;
    padding: 20px;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 40px;
    color: #444;
}
