/* =================================================================
   Knudrisgade 36 — Main Stylesheet
   Scandinavian Minimal Design System
   ================================================================= */

/* -----------------------------------------------------------------
   CSS Custom Properties
   --------------------------------------------------------------- */
:root {
    /* Colors */
    --color-bg:        #FAFAF8;
    --color-surface:   #F0EEEB;
    --color-white:     #FFFFFF;
    --color-charcoal:  #2C2C2C;
    --color-accent:    #8B7355;
    --color-accent-hover: #7A6348;
    --color-text:      #2C2C2C;
    --color-text-light:#6B6560;
    --color-border:    #E5E2DE;
    --color-success:   #4A7C59;
    --color-error:     #A04040;

    /* Typography */
    --font-serif:   'Playfair Display', Georgia, serif;
    --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --max-width:    1200px;
    --narrow-width: 720px;
    --gutter:       24px;

    /* Spacing */
    --section-py:   100px;
    --section-py-sm: 60px;

    /* Transitions */
    --transition:   0.3s ease;
}

/* -----------------------------------------------------------------
   Reset & Base
   --------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem; /* 17px */
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

ul, ol {
    list-style: none;
}

/* -----------------------------------------------------------------
   Typography
   --------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-charcoal);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p + p { margin-top: 1em; }

/* -----------------------------------------------------------------
   Layout
   --------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.container-narrow {
    max-width: var(--narrow-width);
}

.section {
    padding-top: var(--section-py);
    padding-bottom: var(--section-py);
}

.section-heading {
    text-align: center;
    margin-bottom: 48px;
}

.section-heading-sm {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    margin-bottom: 20px;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text-light);
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* -----------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 14px 36px;
    border: 2px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-white);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-outline:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

/* -----------------------------------------------------------------
   Header
   --------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(250, 250, 248, 0.97);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--color-charcoal);
    letter-spacing: -0.01em;
}

.site-logo:hover {
    color: var(--color-accent);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item a {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
    transition: color var(--transition);
}

.nav-item a:hover,
.nav-item.active a {
    color: var(--color-charcoal);
}

.nav-item.active a {
    font-weight: 500;
}

/* Language Toggle */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--color-border);
}

.lang-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text-light);
    padding: 4px 6px;
    letter-spacing: 0.05em;
}

.lang-link.active {
    color: var(--color-charcoal);
}

.lang-link:hover {
    color: var(--color-accent);
}

.lang-sep {
    font-size: 0.75rem;
    color: var(--color-border);
}

/* Hamburger Menu (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 1.5px;
    background-color: var(--color-charcoal);
    transition: all var(--transition);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after  { top: 7px;  }

/* Hamburger open state */
.menu-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* -----------------------------------------------------------------
   Hero Section
   --------------------------------------------------------------- */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20vh !important;
    background-color: var(--color-surface);
    margin-top: 72px;
    overflow: hidden;
}

.hero-small {
    min-height: 10vh !important;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(44, 44, 44, 0.15) 0%,
        rgba(44, 44, 44, 0.05) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px var(--gutter);
    max-width: 800px;
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--color-charcoal);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-light);
    margin-bottom: 36px;
    line-height: 1.6;
}

.btn-hero {
    padding: 16px 48px;
    font-size: 1rem;
}

/* -----------------------------------------------------------------
   Home — Intro Section
   --------------------------------------------------------------- */
.section-intro {
    background-color: var(--color-white);
}

/* -----------------------------------------------------------------
   Home — Intro Split (tekst + facadebillede)
   --------------------------------------------------------------- */
.section-intro-split {
    background-color: var(--color-white);
}

.intro-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-split-text {
    min-width: 0;
    overflow-wrap: break-word;
}

.intro-split-text h2 {
    margin-bottom: 20px;
}

.intro-split-text p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 32px;
}

.intro-split-image {
    min-width: 0;
}

.intro-split-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* -----------------------------------------------------------------
   Home — Fuld-bredde bannerbillede
   --------------------------------------------------------------- */
.section-banner {
    background-color: var(--color-surface);
}

.section-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* -----------------------------------------------------------------
   Home — Gårdhave grid
   --------------------------------------------------------------- */
.section-courtyard {
    background-color: var(--color-bg);
}

.courtyard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.courtyard-item img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}

.courtyard-desc {
    margin-top: 32px;
    max-width: 720px;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* -----------------------------------------------------------------
   Home — Highlights Grid
   --------------------------------------------------------------- */
.section-highlights {
    background-color: var(--color-bg);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.highlight-card {
    text-align: center;
    padding: 40px 24px;
}

.highlight-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 24px;
    color: var(--color-accent);
}

.highlight-icon svg {
    width: 100%;
    height: 100%;
}

.highlights-cta {
    text-align: center;
    margin-top: 48px;
}

.highlight-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.highlight-text {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* -----------------------------------------------------------------
   Home — CTA Section
   --------------------------------------------------------------- */
.section-cta {
    background-color: var(--color-surface);
    text-align: center;
}

.cta-text {
    font-size: 1.0625rem;
    color: var(--color-text-light);
    margin-bottom: 36px;
}

/* -----------------------------------------------------------------
   Apartments Grid
   --------------------------------------------------------------- */
.section-apartments {
    background-color: var(--color-white);
}

.apartments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

/* Apartment Card */
.apartment-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.apartment-card:hover {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.apartment-image {
    position: relative;
    overflow: hidden;
    background-color: var(--color-white);
}

.apartment-floorplan {
    width: 100%;
    height: auto;
    display: block;
    padding: 20px;
}

.availability-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 6px 14px;
}

.badge-available {
    background-color: var(--color-success);
    color: var(--color-white);
}

.badge-occupied {
    background-color: var(--color-error);
    color: var(--color-white);
}

.apartment-body {
    padding: 32px;
}

.apartment-name {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.apartment-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.meta-value {
    display: block;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-charcoal);
}

.meta-note {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    margin-top: 8px;
}

.apartment-features h4 {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.apartment-features p {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 28px;
}

.apartment-card .btn-outline {
    width: 100%;
}

/* Occupied state: muted */
.apartment-card.is-occupied {
    opacity: 0.7;
}

.apartment-card.is-occupied:hover {
    box-shadow: none;
    transform: none;
}

/* -----------------------------------------------------------------
   Apartments — Details (Floor Plans & Gallery)
   --------------------------------------------------------------- */
.section-apartment-details {
    background-color: var(--color-white);
}

.apartment-detail-block {
    margin-bottom: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--color-border);
}

.apartment-detail-block:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.detail-title {
    font-size: 1.5rem;
    margin-bottom: 40px;
    color: var(--color-charcoal);
}

.apartment-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.detail-floorplan,
.detail-gallery {
    background-color: var(--color-bg);
    padding: 32px;
    border: 1px solid var(--color-border);
}

.detail-floorplan h4,
.detail-gallery h4 {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 20px;
}

.floorplan-img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--color-border);
}

.gallery-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background-color: var(--color-white);
    border: 2px dashed var(--color-border);
    border-radius: 0;
    text-align: center;
}

.gallery-placeholder p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

/* Gallery Slider */
.gallery-slider {
    position: relative;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--color-surface);
}

.slider-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(139, 115, 85, 0.8);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background-color var(--transition);
    border-radius: 2px;
}

.slider-btn:hover {
    background-color: var(--color-accent);
}

.slider-prev {
    left: 12px;
}

.slider-next {
    right: 12px;
}

.slider-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    font-size: 0.8125rem;
    border-radius: 2px;
    z-index: 10;
}

@media (max-width: 768px) {
    .slider-container {
        height: 280px;
    }

    .slider-image {
        height: 280px;
    }

    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 90vh;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color var(--transition);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(139, 115, 85, 0.8);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color var(--transition);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--color-accent);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: 2px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .lightbox-content {
        width: 100%;
        height: 100%;
        max-width: none;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* -----------------------------------------------------------------
   Apartments — Conditions
   --------------------------------------------------------------- */
.section-conditions {
    background-color: var(--color-bg);
}

.conditions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.conditions-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    font-size: 0.9375rem;
    color: var(--color-text-light);
}

.conditions-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent);
}

/* -----------------------------------------------------------------
   Property — Feature Rows
   --------------------------------------------------------------- */
.section-features {
    background-color: var(--color-white);
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.feature-row:last-child {
    margin-bottom: 0;
}

.feature-row-reverse {
    direction: rtl;
}

.feature-row-reverse > * {
    direction: ltr;
}

.feature-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

.feature-image .placeholder-img {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 16px;
}

.feature-text {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* -----------------------------------------------------------------
   Location — Neighborhood
   --------------------------------------------------------------- */
.section-neighborhood {
    background-color: var(--color-white);
}

.neighborhood-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.neighborhood-content h2 {
    margin-bottom: 20px;
    text-align: left;
}

.neighborhood-content p {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.neighborhood-image {
    aspect-ratio: 3 / 2;
    overflow: hidden;
}

/* -----------------------------------------------------------------
   Location — Distances
   --------------------------------------------------------------- */
.section-distances {
    background-color: var(--color-bg);
}

.distances-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.distance-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    transition: box-shadow var(--transition);
}

.distance-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.distance-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.distance-icon svg {
    width: 100%;
    height: 100%;
}

.distance-text {
    font-size: 0.9375rem;
    color: var(--color-text);
}

/* -----------------------------------------------------------------
   Location — Map
   --------------------------------------------------------------- */
.section-map {
    background-color: var(--color-white);
    padding-bottom: var(--section-py);
}

.map-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 500px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

.map-placeholder .placeholder-img {
    width: 100%;
    height: 100%;
}

/* -----------------------------------------------------------------
   Contact — Form
   --------------------------------------------------------------- */
.section-contact {
    background-color: var(--color-white);
}

.section-contact .intro-text {
    margin-bottom: 48px;
}

/* Unavailable state */
.contact-unavailable {
    text-align: center;
    padding: 60px 0;
}

.unavailable-icon {
    color: var(--color-text-light);
    margin-bottom: 24px;
}

.contact-unavailable h2 {
    margin-bottom: 16px;
}

.contact-unavailable p {
    color: var(--color-text-light);
    margin-bottom: 32px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Form styles */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-charcoal);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    color: var(--color-text);
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0;
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6560' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--color-error);
}

.form-group .error-message {
    font-size: 0.8125rem;
    color: var(--color-error);
    margin-top: 6px;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Feedback */
.form-feedback {
    margin-bottom: 24px;
    padding: 16px;
    font-size: 0.9375rem;
    display: none;
}

.form-feedback.show {
    display: block;
}

.form-feedback.success {
    background-color: #EDF7ED;
    color: var(--color-success);
    border: 1px solid #C4E0C4;
}

.form-feedback.error {
    background-color: #FDEDED;
    color: var(--color-error);
    border: 1px solid #E0C4C4;
}

/* -----------------------------------------------------------------
   Footer
   --------------------------------------------------------------- */
.site-footer {
    background-color: var(--color-charcoal);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-heading {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-white);
    margin-bottom: 20px;
}

.footer-address,
.footer-contact-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 8px;
}

.footer-email a,
.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition);
}

.footer-email a:hover,
.site-footer a:hover {
    color: var(--color-white);
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.9375rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
}

/* -----------------------------------------------------------------
   Placeholder Images
   --------------------------------------------------------------- */
.placeholder-img {
    background-color: var(--color-surface);
}

/* -----------------------------------------------------------------
   Utility: Body offset for fixed header
   --------------------------------------------------------------- */
body {
    padding-top: 0; /* hero handles margin-top */
}

/* Pages without hero get top margin on main */
.site-main > .section:first-child {
    /* Only when there's no hero before */
}

/* -----------------------------------------------------------------
   Responsive — Tablet (768px)
   --------------------------------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --section-py: 80px;
    }

    .intro-split-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .courtyard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .courtyard-item img {
        height: 240px;
    }

    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .apartments-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin-left: auto;
        margin-right: auto;
    }

    .apartment-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .conditions-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 32px;
        margin-bottom: 60px;
    }

    .feature-row-reverse {
        direction: ltr;
    }

    .neighborhood-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .distances-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-py: 60px;
        --gutter: 20px;
    }

    /* Header: mobile nav */
    .menu-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background-color: var(--color-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 32px 32px;
        transform: translateX(100%);
        transition: transform var(--transition);
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    .main-nav.is-open {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-item a {
        padding: 12px 0;
        font-size: 1rem;
        border-bottom: 1px solid var(--color-border);
    }

    .lang-toggle {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid var(--color-border);
    }

    .lang-link {
        font-size: 0.9375rem;
    }

    /* Hero */
    .hero {
        min-height: 70vh;
    }

    .hero-small {
        min-height: 30vh;
    }

    .hero-headline {
        font-size: clamp(2rem, 8vw, 2.75rem);
    }

    /* Grids */
    .intro-split-grid,
    .courtyard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .courtyard-item img {
        height: 220px;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .highlight-card {
        padding: 32px 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .distances-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .apartment-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* -----------------------------------------------------------------
   Responsive — Small Mobile (375px)
   --------------------------------------------------------------- */
@media (max-width: 400px) {
    .header-inner {
        height: 60px;
    }

    .site-logo {
        font-size: 1.125rem;
    }

    .hero {
        margin-top: 60px;
    }

    .apartment-body {
        padding: 24px 20px;
    }
}

/* -----------------------------------------------------------------
   Accessibility
   --------------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* -----------------------------------------------------------------
   Cookie Banner
   --------------------------------------------------------------- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px var(--gutter);
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    font-size: 0.875rem;
    color: var(--color-text-light);
    line-height: 1.6;
    min-width: 200px;
}

.cookie-accept-btn {
    flex-shrink: 0;
    padding: 10px 28px;
    background-color: var(--color-accent);
    color: var(--color-white);
    border: none;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color var(--transition);
}

.cookie-accept-btn:hover {
    background-color: var(--color-accent-hover);
}

@media (max-width: 600px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .cookie-accept-btn {
        width: 100%;
        text-align: center;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
