@font-face {
    font-family: "bootstrap-icons";
    font-style: normal;
    font-weight: normal;
    font-display: swap;
    src: url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff2") format("woff2"), url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/fonts/bootstrap-icons.woff") format("woff");
}

:root {
    --bs-primary: #2f6f4e;
    --bs-secondary: #6b7280;
    --bs-success: #2f6f4e;
    --bs-info: #3b82f6;
    --bs-warning: #d99a2b;
    --bs-danger: #dc2626;
    --bs-light: #f7f3ea;
    --bs-dark: #14251c;
    --lm-bg: #f4efe6;
    --lm-bg-2: #ebe3d4;
    --lm-surface: #fffaf1;
    --lm-surface-soft: #f8f1e5;
    --lm-surface-warm: #fff3d8;
    --lm-green: #1f4d36;
    --lm-green-soft: #2f6f4e;
    --lm-gold: #d99a2b;
    --lm-gold-soft: #f3d49b;
    --lm-brown: #6f4e37;
    --lm-heading: #10231a;
    --lm-text: #2d3a32;
    --lm-muted: #6f7a72;
    --lm-border: rgba(67, 84, 73, 0.16);
    --lm-radius-sm: 0.85rem;
    --lm-radius: 1.25rem;
    --lm-radius-lg: 1.75rem;
    --lm-shadow-xs: 0 2px 8px rgba(20, 37, 28, 0.05);
    --lm-shadow-sm: 0 10px 28px rgba(20, 37, 28, 0.08);
    --lm-shadow: 0 18px 48px rgba(20, 37, 28, 0.12);
    --lm-shadow-lg: 0 28px 70px rgba(20, 37, 28, 0.18);
    --lm-transition: 0.2s ease;
}

/* Base */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 60px;
    background: radial-gradient(circle at top left, rgba(217, 154, 43, 0.16), transparent 30rem), radial-gradient(circle at top right, rgba(47, 111, 78, 0.12), transparent 34rem), linear-gradient(180deg, #fbf7ef 0%, var(--lm-bg) 48%, #efe7d8 100%);
    color: var(--lm-text);
    font-family: "Segoe UI", Inter, Roboto, Arial, sans-serif;
    line-height: 1.65;
}

main {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--lm-green-soft);
    text-decoration: none;
    transition: color var(--lm-transition), opacity var(--lm-transition);
}

    a:hover {
        color: var(--lm-green);
    }

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3,
.display-4, .display-5, .display-6 {
    color: var(--lm-heading);
    font-weight: 850;
    letter-spacing: -0.04em;
    line-height: 1.12;
}

p {
    color: var(--lm-text);
}

.text-muted,
.text-secondary {
    color: var(--lm-muted) !important;
}

/* Navbar */

.navbar {
    background: linear-gradient(135deg, #10231a 0%, #193d2b 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 36px rgba(16, 35, 26, 0.18);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    z-index: 1055 !important;
    position: relative;
    margin-bottom: 1.5rem;
}

.navbar-brand {
    color: #fffaf1 !important;
    font-weight: 850;
    letter-spacing: -0.035em;
}

    .navbar-brand:hover {
        color: #ffffff !important;
    }

.navbar-nav {
    gap: 0.25rem;
}

    .navbar-nav .nav-link {
        color: rgba(255, 250, 241, 0.86) !important;
        font-weight: 700;
        padding: 0.85rem 0.95rem !important;
        border-radius: 999px;
        transition: background-color var(--lm-transition), color var(--lm-transition), transform var(--lm-transition);
    }

        .navbar-nav .nav-link:hover,
        .navbar-nav .nav-link:focus {
            color: #ffffff !important;
            background-color: rgba(255, 255, 255, 0.12);
            transform: translateY(-1px);
        }

        .navbar-nav .nav-link.active {
            color: #ffffff !important;
            background-color: rgba(217, 154, 43, 0.28);
        }

.navbar-toggler {
    border-radius: 1rem;
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0.55rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(217, 154, 43, 0.28);
}

@media (max-width: 1199.98px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .navbar-nav .nav-link {
        border-radius: 0.9rem;
    }
}

/* Cards */

.card {
    background: linear-gradient(180deg, rgba(255, 250, 241, 0.98) 0%, rgba(255, 250, 241, 0.94) 100%);
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius);
    box-shadow: var(--lm-shadow-sm);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(180deg, #fff8ec 0%, #f7eddd 100%);
    border-bottom: 1px solid var(--lm-border);
    color: var(--lm-heading);
    font-weight: 850;
    padding: 1rem 1.4rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: #fbf4e8;
    border-top: 1px solid var(--lm-border);
    padding: 1rem 1.4rem;
}

@media (min-width: 768px) {
    .card-body {
        padding: 2rem;
    }
}

/* Premium listing cards */

.listing-card,
.landing-card {
    transition: transform var(--lm-transition), box-shadow var(--lm-transition), border-color var(--lm-transition);
}

    .listing-card:hover,
    .landing-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--lm-shadow-lg) !important;
        border-color: rgba(217, 154, 43, 0.45);
    }

.listing-img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    border-radius: var(--lm-radius-sm);
    transition: transform 0.3s ease;
}

    .listing-img:hover {
        transform: scale(1.035);
    }

.akkilahto-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--lm-radius-sm);
}

@media (max-width: 991.98px) {
    .akkilahto-img {
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

.aspect-ratio-4-3 {
    aspect-ratio: 4 / 3;
    width: 100%;
    object-fit: cover;
    display: block;
}

/* Buttons */

.btn {
    border-radius: 999px;
    font-weight: 850;
    padding: 0.72rem 1.2rem;
    line-height: 1.2;
    transition: transform var(--lm-transition), box-shadow var(--lm-transition), background-color var(--lm-transition), border-color var(--lm-transition);
}

    .btn:hover {
        transform: translateY(-2px);
    }

    .btn:active {
        transform: translateY(0);
    }

        .btn:focus,
        .btn:active:focus,
        .btn-link.nav-link:focus,
        .form-control:focus,
        .form-select:focus,
        .form-check-input:focus {
            box-shadow: 0 0 0 0.22rem rgba(217, 154, 43, 0.22);
        }

.btn-primary {
    background: linear-gradient(135deg, #1f4d36 0%, #2f6f4e 100%);
    border-color: #1f4d36;
    color: #fffaf1;
    box-shadow: 0 12px 24px rgba(31, 77, 54, 0.22);
}

    .btn-primary:hover,
    .btn-primary:focus {
        background: linear-gradient(135deg, #173927 0%, #1f4d36 100%);
        border-color: #173927;
        color: #ffffff;
        box-shadow: 0 16px 34px rgba(31, 77, 54, 0.28);
    }

.btn-warning {
    background: linear-gradient(135deg, #d99a2b 0%, #f0bd56 100%);
    border-color: #d99a2b;
    color: #1b1307;
    box-shadow: 0 12px 26px rgba(217, 154, 43, 0.26);
}

    .btn-warning:hover,
    .btn-warning:focus {
        background: linear-gradient(135deg, #c88516 0%, #d99a2b 100%);
        border-color: #c88516;
        color: #1b1307;
    }

.btn-secondary {
    background-color: #e7ded0;
    border-color: #d8c8b5;
    color: #3d3025;
}

    .btn-secondary:hover,
    .btn-secondary:focus {
        background-color: #d9c8b5;
        border-color: #c8b39c;
        color: #241a12;
    }

.btn-outline-primary {
    border-color: rgba(31, 77, 54, 0.35);
    color: var(--lm-green);
    background-color: rgba(255, 250, 241, 0.85);
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus {
        background-color: rgba(31, 77, 54, 0.09);
        border-color: var(--lm-green);
        color: var(--lm-green);
    }

.btn-sm {
    padding: 0.55rem 0.95rem;
}

.btn-lg {
    padding: 0.9rem 1.45rem;
}

/* Forms */

input,
select,
textarea,
button,
.input-group {
    max-width: 800px;
}

.form-label {
    color: var(--lm-heading);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--lm-muted);
}

.form-control,
.form-select,
textarea.form-control {
    background-color: #fffaf1;
    border: 1px solid rgba(67, 84, 73, 0.24);
    border-radius: 1rem;
    color: var(--lm-text);
    padding: 0.82rem 1rem;
    min-height: 48px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: border-color var(--lm-transition), box-shadow var(--lm-transition), background-color var(--lm-transition);
}

textarea.form-control {
    min-height: 120px;
}

.form-control::placeholder {
    color: #938676;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(31, 77, 54, 0.38);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--lm-gold);
    background-color: #fffdf8;
}

.input-group-text {
    background-color: #f4eadb;
    border-color: rgba(67, 84, 73, 0.24);
    color: var(--lm-muted);
    border-radius: 1rem;
}

.form-check-input {
    border-color: #b8a996;
}

    .form-check-input:checked {
        background-color: var(--lm-green);
        border-color: var(--lm-green);
    }

    input[disabled],
    .form-check-input[disabled] + label,
    .form-check-input:disabled + label,
    .form-check-label.disabled {
        color: #212529 !important;
        opacity: 1 !important;
    }

/* Bootstrap select */

.bootstrap-select .dropdown-toggle {
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 16px !important;
    border-radius: 1rem !important;
    font-size: 1rem !important;
    font-family: inherit !important;
    font-weight: 500 !important;
    border: 1px solid rgba(67, 84, 73, 0.24) !important;
    background: #fffaf1 !important;
    color: var(--lm-text) !important;
    box-sizing: border-box;
    display: flex !important;
    align-items: center !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
}

    .bootstrap-select .dropdown-toggle .filter-option {
        display: flex;
        align-items: center;
        height: 100%;
        font-weight: 400;
        color: var(--lm-text);
    }

    .bootstrap-select .dropdown-toggle .filter-option-inner-inner {
        color: var(--lm-text) !important;
        opacity: 1 !important;
    }

.bootstrap-select .dropdown-menu {
    z-index: 1060 !important;
}

/* Dropdowns */

.dropdown-menu {
    background-color: #fffaf1;
    border: 1px solid rgba(67, 84, 73, 0.18);
    border-radius: 1rem;
    box-shadow: var(--lm-shadow);
    padding: 0.55rem;
    margin-top: 0.45rem;
    z-index: 1055 !important;
}

.dropdown-item {
    border-radius: 0.8rem;
    padding: 0.7rem 0.9rem;
    color: var(--lm-text);
    font-weight: 600;
    transition: background-color var(--lm-transition), color var(--lm-transition), transform var(--lm-transition);
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: rgba(217, 154, 43, 0.16);
        color: var(--lm-green);
        transform: translateX(2px);
    }

/* Tabs / pagination / breadcrumb */

.nav-tabs {
    margin-bottom: 1.5rem;
    border-bottom-color: var(--lm-border);
}

    .nav-tabs .nav-link {
        border-radius: 1rem 1rem 0 0;
        color: var(--lm-muted);
        font-weight: 700;
    }

        .nav-tabs .nav-link.active {
            color: var(--lm-heading);
            background-color: #fffaf1;
            font-weight: 850;
        }

.breadcrumb {
    background-color: transparent;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #a39482;
}

.pagination {
    gap: 0.25rem;
}

.page-link {
    color: var(--lm-green);
    border-color: var(--lm-border);
    background-color: #fffaf1;
    border-radius: 0.85rem !important;
    padding: 0.62rem 0.9rem;
    font-weight: 700;
}

    .page-link:hover {
        color: var(--lm-green);
        background-color: #f7ead6;
        border-color: rgba(217, 154, 43, 0.5);
    }

.page-item.active .page-link {
    background-color: var(--lm-green);
    border-color: var(--lm-green);
}

/* Tables */

.table-responsive {
    background: #fffaf1;
    border: 1px solid var(--lm-border);
    border-radius: var(--lm-radius);
    box-shadow: var(--lm-shadow-sm);
    overflow: hidden;
}

.table {
    color: var(--lm-text);
    vertical-align: middle;
    margin-bottom: 0;
}

    .table thead th {
        background: #f4eadb;
        color: var(--lm-heading);
        font-weight: 850;
        border-bottom-color: var(--lm-border);
        padding-top: 1rem;
        padding-bottom: 1rem;
        white-space: nowrap;
    }

    .table td,
    .table th {
        border-color: var(--lm-border);
        padding: 1rem 0.95rem;
    }

.table-hover tbody tr:hover {
    background-color: rgba(217, 154, 43, 0.08);
}

/* Alerts and badges */

.alert {
    position: relative;
    border-radius: var(--lm-radius);
    border-width: 1px;
    box-shadow: var(--lm-shadow);
    padding: 1.15rem 3.25rem 1.15rem 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

    .alert .bi {
        font-size: 1.35rem;
        line-height: 1;
        flex-shrink: 0;
    }

    .alert .btn-close {
        position: absolute;
        top: 50%;
        right: 1.15rem;
        transform: translateY(-50%);
        opacity: 0.65;
    }

        .alert .btn-close:hover {
            opacity: 1;
        }

.alert-info,
.alert-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.11), rgba(255, 250, 241, 0.96));
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.28);
}

.alert-success {
    background: linear-gradient(135deg, rgba(47, 111, 78, 0.14), rgba(255, 250, 241, 0.96));
    color: var(--lm-green);
    border-color: rgba(47, 111, 78, 0.35);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(217, 154, 43, 0.18), rgba(255, 250, 241, 0.96));
    color: #6b3f00;
    border-color: rgba(217, 154, 43, 0.4);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(255, 250, 241, 0.96));
    color: #7f1d1d;
    border-color: rgba(220, 38, 38, 0.35);
}

@media (max-width: 767.98px) {
    .alert {
        padding: 1rem 3rem 1rem 1rem;
        border-radius: 1rem;
    }
}

.badge {
    border-radius: 999px;
    font-weight: 850;
    padding: 0.52em 0.78em;
}

/* Modal */

.modal-content {
    background-color: #fffaf1;
    border: 1px solid var(--lm-border);
    border-radius: 1.5rem;
    box-shadow: var(--lm-shadow-lg);
    overflow: hidden;
}

.modal-header,
.modal-footer {
    border-color: var(--lm-border);
    background-color: #f8efdf;
}

.modal-body {
    padding: 1.35rem 1.25rem;
}

/* Footer */

footer,
.footer {
    background: linear-gradient(135deg, #10231a 0%, #193d2b 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 250, 241, 0.72);
    padding-top: 2rem;
    padding-bottom: 2rem;
    margin-top: 3rem;
}

    footer a,
    .footer a {
        color: rgba(255, 250, 241, 0.78);
    }

        footer a:hover,
        .footer a:hover {
            color: #ffffff;
        }

/* Utilities */

.bg-light {
    background-color: var(--lm-surface-soft) !important;
}

.bg-soft {
    background-color: var(--lm-surface-warm) !important;
}

.border {
    border-color: var(--lm-border) !important;
}

.shadow-sm {
    box-shadow: var(--lm-shadow-sm) !important;
}

.shadow {
    box-shadow: var(--lm-shadow) !important;
}

.rounded {
    border-radius: var(--lm-radius-sm) !important;
}

.multiline {
    white-space: pre-wrap;
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.site-main {
    min-height: calc(100vh - 160px);
}

/* Responsive */

@media (min-width: 992px) {
    #searchForm .btn {
        white-space: nowrap;
    }
}

@media (max-width: 991.98px) {
    main {
        padding-top: 1rem;
    }

    .card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 767.98px) {
    .display-5 {
        font-size: 2.1rem;
    }

    .card {
        border-radius: 1rem;
    }

    .btn {
        width: auto;
    }

    .card-body,
    .modal-body,
    .modal-header,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.lomamesta-ratio {
    --bs-aspect-ratio: 75%; /* 4:3 desktop */
}

@media (max-width: 767.98px) {
    .lomamesta-ratio {
        --bs-aspect-ratio: 56.25%; /* 16:9 mobiili */
    }
}

@media (min-width: 992px) {
    .contact-card-sticky {
        position: sticky;
        top: 90px;
        z-index: 2;
    }
}

.small-phone-row {
    min-height: 32px;
}

@media (max-width: 767.98px) {
    .ilmoitus-description-clamp {
        display: -webkit-box;
        -webkit-line-clamp: 8;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

        .ilmoitus-description-clamp.is-expanded {
            display: block;
            -webkit-line-clamp: unset;
            overflow: visible;
        }
}

.details-hero-img {
    width: 100%;
    height: clamp(360px, 48vw, 620px);
    object-fit: cover;
}

@media (min-width: 992px) {
    .details-sidebar-sticky {
        position: sticky;
        top: 1rem;
        z-index: 2;
    }
}

@media (max-width: 991.98px) {
    .details-hero-img {
        width: 100%;
        height: auto;
        max-height: none;
    }
}

.details-hero-img {
    transition: transform 0.35s ease;
}

.details-hero-link:hover .details-hero-img {
    transform: scale(1.025);
}

.home-owner-hero {
    background: linear-gradient(135deg, #fffaf1 0%, #f8f1e5 100%);
}

.home-hero-title {
    max-width: 920px;
    font-size: clamp(2.3rem, 4.2vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.home-hero-lead {
    max-width: 760px;
}

@media (max-width: 767.98px) {
    .home-hero-title {
        font-size: clamp(2.1rem, 10vw, 3rem);
    }
}