:root {
    --green: #169b55;
    --green-dark: #0f7f44;
    --dark: #0f172a;
    --muted: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    background: #fff;
}

a {
    text-decoration: none;
}

.navbar {
    padding: 16px 0;
}

.navbar-brand {
    font-size: 1.35rem;
    color: var(--dark);
}

.nav-link {
    font-weight: 500;
    color: var(--dark);
    margin: 0 8px;
}

.nav-link:hover {
    color: var(--green);
}

.btn-main,
.btn-search {
    border-radius: 14px;
    font-weight: 700;
    padding: 12px 22px;
    background: var(--green);
    border: none;
}

.btn-main:hover,
.btn-search:hover {
    background: var(--green-dark);
}

.hero-section {
    position: relative;
    min-height: 720px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(
            90deg,
            rgba(255,255,255,0.96) 0%,
            rgba(255,255,255,0.84) 44%,
            rgba(255,255,255,0.28) 100%
        ),
        url('../images/header-lokalannonser.png') center right / cover no-repeat;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.hero-title {
    font-size: clamp(2.7rem, 6vw, 5rem);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.06em;
    margin-bottom: 24px;
}

.hero-text {
    font-size: 1.25rem;
    color: #334155;
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 34px;
}

.hero-badge {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}

.search-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(15,23,42,0.14);
}

.form-control,
.form-select {
    border-radius: 14px;
    border-color: var(--border);
    font-size: 0.98rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 0.2rem rgba(22,155,85,0.15);
}

.form-label {
    color: var(--dark);
}

.section-spacing {
    padding: 82px 0;
}

.bg-light {
    background: var(--light) !important;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 42px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--muted);
    font-size: 1.08rem;
}

.category-card,
.info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 34px 24px;
    height: 100%;
    box-shadow: 0 16px 40px rgba(15,23,42,0.06);
    transition: all 0.2s ease;
}

.category-card:hover,
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 55px rgba(15,23,42,0.11);
}

.category-icon {
    font-size: 2.4rem;
    margin-bottom: 18px;
}

.category-card h3,
.info-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.info-card p {
    color: var(--muted);
    margin-bottom: 0;
    line-height: 1.6;
}

.info-number {
    width: 44px;
    height: 44px;
    background: rgba(22,155,85,0.12);
    color: var(--green);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 18px;
}

.listing-card {
    display: block;
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--border);
    border-radius: 26px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 16px 45px rgba(15,23,42,0.07);
    transition: all 0.2s ease;
}

.listing-card:hover {
    color: var(--dark);
    transform: translateY(-5px);
    box-shadow: 0 28px 70px rgba(15,23,42,0.14);
}

.listing-image-wrapper {
    position: relative;
    height: 230px;
    background: #e2e8f0;
    overflow: hidden;
}

.listing-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.listing-card:hover .listing-image {
    transform: scale(1.04);
}

.listing-badge,
.listing-type-badge {
    display: inline-flex;
    align-items: center;
    background: #fff;
    color: var(--green);
    border: 1px solid rgba(22,155,85,0.18);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(15,23,42,0.08);
}

.listing-badge {
    position: absolute;
    top: 16px;
    left: 16px;
}

.muted-badge {
    color: #475569;
    border-color: var(--border);
    background: #f8fafc;
}

.listing-content {
    padding: 24px;
}

.listing-content h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.listing-meta {
    color: var(--muted);
    margin-bottom: 16px;
}

.listing-details {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    font-weight: 800;
}

.no-image {
    width: 100%;
    height: 100%;
    min-height: 210px;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.large-no-image {
    min-height: 430px;
    border-radius: 28px;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
    font-size: 1.08rem;
    line-height: 1.8;
    color: #334155;
}

.seo-content h2 {
    color: var(--dark);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

.seo-content h3 {
    color: var(--dark);
    font-size: 1.45rem;
    font-weight: 800;
    margin-top: 32px;
    margin-bottom: 12px;
}

/* Listing page */

.listing-hero {
    padding: 42px 0 46px;
}

.breadcrumb-wrap {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    font-size: 0.95rem;
    margin-bottom: 28px;
    color: var(--muted);
}

.breadcrumb-wrap a {
    color: var(--muted);
    font-weight: 600;
}

.breadcrumb-wrap a:hover {
    color: var(--green);
}

.listing-title {
    font-size: clamp(2.1rem, 4.5vw, 4rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 14px;
}

.listing-location {
    font-size: 1.1rem;
    color: var(--muted);
}

.listing-price-box {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 20px 24px;
    box-shadow: 0 18px 50px rgba(15,23,42,0.08);
}

.listing-price-large {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.listing-price-large span {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 700;
}

.listing-gallery {
    border-radius: 28px;
    overflow: hidden;
    background: #e2e8f0;
    box-shadow: 0 20px 55px rgba(15,23,42,0.08);
}

.main-gallery-image {
    width: 100%;
    height: 460px;
    object-fit: cover;
    display: block;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.gallery-thumb {
    width: 100%;
    height: 95px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.listing-page-card,
.contact-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 28px;
    box-shadow: 0 16px 45px rgba(15,23,42,0.07);
}

.listing-page-card h2,
.contact-card h3 {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 22px;
}

.listing-description {
    color: #334155;
    line-height: 1.85;
    font-size: 1.05rem;
}

.details-list {
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
}

.details-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.details-row:last-child {
    border-bottom: 0;
}

.details-row:nth-child(even) {
    background: #f8fafc;
}

.details-row span {
    color: var(--muted);
    font-weight: 600;
}

.details-row strong {
    text-align: right;
    font-weight: 800;
    color: var(--dark);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.feature-pill {
    border: 1px solid var(--border);
    background: #f8fafc;
    color: #64748b;
    border-radius: 999px;
    padding: 12px 15px;
    font-weight: 700;
}

.feature-pill.active {
    border-color: rgba(22,155,85,0.22);
    background: rgba(22,155,85,0.09);
    color: var(--green-dark);
}

.contact-card {
    top: 105px;
}

.contact-card hr {
    margin: 26px 0;
    color: var(--border);
    opacity: 1;
}

/* Create listing */

.feature-check {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px 14px 14px 42px;
    background: #f8fafc;
    height: 100%;
}

.feature-check .form-check-input {
    margin-left: -28px;
}

/* Footer */

.footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 64px 0;
}

.footer h3,
.footer h4 {
    color: #fff;
    font-weight: 800;
}

.footer h4 {
    font-size: 1rem;
    margin-bottom: 16px;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer li {
    margin-bottom: 8px;
}

.footer a {
    color: #cbd5e1;
}

.footer a:hover {
    color: #fff;
}

/* Pagination */

.pagination .page-link {
    color: var(--green);
    border-color: var(--border);
    font-weight: 700;
}

.pagination .page-item.active .page-link {
    background: var(--green);
    border-color: var(--green);
}

/* Responsive */

@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        background:
            linear-gradient(
                180deg,
                rgba(255,255,255,0.97) 0%,
                rgba(255,255,255,0.9) 58%,
                rgba(255,255,255,0.68) 100%
            ),
            url('../images/header-lokalannonser.png') center / cover no-repeat;
    }

    .hero-content {
        padding: 70px 0;
    }

    .search-box {
        border-radius: 20px;
    }

    .btn-search {
        padding: 15px 20px;
    }

    .section-spacing {
        padding: 62px 0;
    }

    .main-gallery-image {
        height: 340px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-card {
        position: static !important;
    }

    .listing-price-box {
        width: 100%;
        text-align: left;
    }
}

@media (max-width: 575px) {
    .navbar {
        padding: 12px 0;
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .hero-text {
        font-size: 1.08rem;
    }

    .hero-badge {
        width: 100%;
        text-align: center;
    }

    .search-box {
        padding: 18px;
    }

    .listing-image-wrapper {
        height: 210px;
    }

    .listing-details {
        flex-direction: column;
        gap: 6px;
    }

    .listing-page-card,
    .contact-card {
        padding: 22px;
        border-radius: 22px;
    }

    .main-gallery-image {
        height: 260px;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .details-row {
        flex-direction: column;
        gap: 4px;
    }

    .details-row strong {
        text-align: left;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .listing-title {
        font-size: 2.2rem;
    }
}