/* ==========================================================================
   3K Immobilien – Stylesheet
   Design: Seriös, frisch, warm – Immobilien-Qualität
   ========================================================================== */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Outfit:wght@300;400;500;600;700&display=swap');

/* --- Custom Properties --- */
:root {
    --gold:        #c8a846;
    --gold-light:  #e8d48a;
    --gold-dark:   #a08030;
    --ink:         #1a1a1a;
    --ink-soft:    #4a4a4a;
    --ink-muted:   #7a7a7a;
    --sand:        #f8f5ef;
    --sand-dark:   #ede8de;
    --white:       #ffffff;
    --green:       #2d6a4f;
    --green-light: #d8f3dc;
    --red:         #c0392b;
    --red-light:   #fdecea;
    --blue:        #2563eb;
    --blue-light:  #dbeafe;
    --orange:      #e67e22;
    --orange-light:#fef3c7;
    --radius-sm:   6px;
    --radius:      10px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
    --shadow:      0 4px 16px rgba(0,0,0,.08);
    --shadow-lg:   0 12px 40px rgba(0,0,0,.12);
    --transition:  .25s cubic-bezier(.4,0,.2,1);
    --font-display:'DM Serif Display', Georgia, serif;
    --font-body:   'Outfit', -apple-system, sans-serif;
    --container:   1140px;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); color: var(--ink); background: var(--white); line-height: 1.65; font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }
ul, ol { list-style: none; }

/* --- Utilities --- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.section { padding: 5rem 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--ink); color: var(--white); }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

.section-title { margin-bottom: .5rem; }
.section-subtitle { color: var(--ink-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto 3rem; font-weight: 300; }
.section-subtitle.left { margin-left: 0; }
.gold-line { display: block; width: 50px; height: 3px; background: var(--gold); margin: 1rem auto 0; border-radius: 2px; }
.gold-line.left { margin-left: 0; }

/* --- Flash Messages --- */
.flash { padding: 1rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: .9rem; font-weight: 500; }
.flash--success { background: var(--green-light); color: var(--green); }
.flash--error { background: var(--red-light); color: var(--red); }
.flash--warning { background: var(--orange-light); color: var(--orange); }
.flash--info { background: var(--blue-light); color: var(--blue); }

/* === NAVIGATION === */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,.06); transition: box-shadow var(--transition); }
.nav.scrolled { box-shadow: var(--shadow); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }
.nav__logo { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); letter-spacing: -.02em; }
.nav__logo span { color: var(--gold); }
.nav__links { display: flex; gap: 2rem; align-items: center; }
.nav__links a { font-size: .88rem; font-weight: 500; color: var(--ink-soft); letter-spacing: .02em; position: relative; }
.nav__links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: var(--gold); transition: width var(--transition); }
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__cta { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1.2rem; background: var(--gold); color: var(--white) !important; border-radius: var(--radius-sm); font-weight: 600; font-size: .85rem; }
.nav__cta:hover { background: var(--gold-dark); color: var(--white) !important; }
.nav__cta::after { display: none !important; }

/* Hamburger */
.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: .5rem; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* === HERO === */
.hero { position: relative; min-height: 85vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--ink) 0%, #2c2c2c 100%); overflow: hidden; margin-top: 70px; }
.hero__bg { position: absolute; inset: 0; background: url('/assets/img/hero.jpg') center/cover no-repeat; opacity: .3; }
.hero__content { position: relative; z-index: 2; max-width: 640px; padding: 4rem 0; }
.hero__badge { display: inline-block; padding: .4rem 1rem; background: rgba(200,168,70,.15); border: 1px solid rgba(200,168,70,.3); color: var(--gold-light); border-radius: 999px; font-size: .8rem; font-weight: 500; letter-spacing: .05em; margin-bottom: 1.5rem; }
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero h1 span { color: var(--gold-light); }
.hero__text { color: rgba(255,255,255,.7); font-size: 1.1rem; font-weight: 300; margin-bottom: 2.5rem; max-width: 520px; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.8rem; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: .9rem; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); text-align: center; justify-content: center; }
.btn--primary { background: var(--gold); color: var(--white); }
.btn--primary:hover { background: var(--gold-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(200,168,70,.3); }
.btn--outline { background: transparent; border: 1.5px solid rgba(255,255,255,.35); color: var(--white); }
.btn--outline:hover { border-color: var(--white); color: var(--white); }
.btn--outline-dark { background: transparent; border: 1.5px solid var(--gold); color: var(--gold-dark); }
.btn--outline-dark:hover { background: var(--gold); color: var(--white); }
.btn--secondary { background: var(--sand); color: var(--ink); }
.btn--secondary:hover { background: var(--sand-dark); }
.btn--sm { padding: .5rem 1rem; font-size: .82rem; }
.btn--block { width: 100%; }
.btn--danger { background: var(--red); color: var(--white); }
.btn--danger:hover { background: #a93226; color: var(--white); }

/* === STATS BAR === */
.stats { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2rem 3rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; max-width: 900px; margin: -3rem auto 0; position: relative; z-index: 10; }
.stat { text-align: center; }
.stat__number { font-family: var(--font-display); font-size: 1.8rem; color: var(--gold-dark); display: block; }
.stat__label { font-size: .8rem; color: var(--ink-muted); font-weight: 500; letter-spacing: .03em; }

/* === PROPERTY INFO CARDS === */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.info-card { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,.04); transition: all var(--transition); }
.info-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.info-card__icon { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--sand); display: flex; align-items: center; justify-content: center; margin-bottom: 1.2rem; color: var(--gold-dark); font-size: 1.3rem; }
.info-card h3 { margin-bottom: .6rem; font-size: 1.1rem; }
.info-card p { color: var(--ink-muted); font-size: .9rem; }

/* === APARTMENT TABLES === */
.tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.tab { padding: .6rem 1.5rem; border: 1.5px solid var(--gold); border-radius: var(--radius-sm); background: transparent; color: var(--gold-dark); font-family: var(--font-body); font-size: .88rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.tab.active, .tab:hover { background: var(--gold); color: var(--white); }

.data-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table thead { background: var(--ink); color: var(--white); }
.data-table th { padding: .85rem 1.2rem; font-weight: 500; font-size: .82rem; letter-spacing: .04em; text-align: left; }
.data-table td { padding: .85rem 1.2rem; font-size: .9rem; border-bottom: 1px solid rgba(0,0,0,.05); }
.data-table tbody tr:hover { background: var(--sand); }
.data-table tfoot { background: var(--sand-dark); font-weight: 600; }
.data-table tfoot td { border: none; }

/* === LOCATION SECTION === */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.location-features { display: grid; gap: 1rem; margin-top: 1.5rem; }
.location-feature { display: flex; gap: 1rem; align-items: start; }
.location-feature__icon { width: 36px; height: 36px; border-radius: 50%; background: var(--sand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold-dark); font-size: .9rem; }
.location-feature h4 { font-family: var(--font-body); font-size: .92rem; font-weight: 600; margin-bottom: .15rem; }
.location-feature p { color: var(--ink-muted); font-size: .85rem; }

/* === CONTACT & FORMS === */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 500; font-size: .85rem; margin-bottom: .35rem; color: var(--ink-soft); }
.form-group label .required { color: var(--red); }
.form-input, .form-textarea, .form-select {
    width: 100%; padding: .75rem 1rem; border: 1.5px solid #e0ddd6; border-radius: var(--radius-sm);
    font-family: var(--font-body); font-size: .92rem; background: var(--white); color: var(--ink);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus, .form-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,168,70,.12); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-select { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--ink-muted); margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.contact-info { padding: 2.5rem; background: var(--ink); color: var(--white); border-radius: var(--radius-lg); }
.contact-info h3 { color: var(--white); margin-bottom: 1.5rem; }
.contact-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.contact-item__icon { width: 40px; height: 40px; border-radius: 50%; background: rgba(200,168,70,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold-light); }
.contact-item__label { font-size: .78rem; color: rgba(255,255,255,.5); font-weight: 500; letter-spacing: .04em; }
.contact-item__value { font-size: .95rem; color: rgba(255,255,255,.85); margin-top: .15rem; }
.contact-item__value a { color: var(--gold-light); }

/* === WAITLIST === */
.waitlist-wrapper { max-width: 680px; margin: 0 auto; }
.waitlist-wrapper .info-box { background: rgba(200,168,70,.08); border: 1px solid rgba(200,168,70,.2); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.waitlist-wrapper .info-box p { color: var(--ink-soft); font-size: .9rem; }

/* === TENANT PORTAL === */
.portal { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 70px); margin-top: 70px; }
.sidebar { background: var(--ink); padding: 2rem 0; position: sticky; top: 70px; height: calc(100vh - 70px); overflow-y: auto; }
.sidebar__header { padding: 0 1.5rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 1rem; }
.sidebar__name { color: var(--white); font-weight: 600; font-size: .95rem; }
.sidebar__apt { color: var(--gold-light); font-size: .8rem; margin-top: .2rem; }
.sidebar__nav a { display: flex; align-items: center; gap: .8rem; padding: .75rem 1.5rem; color: rgba(255,255,255,.6); font-size: .88rem; font-weight: 500; transition: all var(--transition); }
.sidebar__nav a:hover, .sidebar__nav a.active { color: var(--white); background: rgba(255,255,255,.06); }
.sidebar__nav a.active { border-left: 3px solid var(--gold); }
.sidebar__nav a svg { width: 18px; height: 18px; opacity: .7; }

.portal__main { padding: 2.5rem; background: var(--sand); overflow-y: auto; }
.portal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.portal__header h1 { font-size: 1.6rem; }

/* Dashboard Cards */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dash-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.dash-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.dash-card__header h3 { font-size: 1rem; }
.dash-card__list { display: grid; gap: .6rem; }
.dash-card__item { display: flex; align-items: center; gap: .8rem; padding: .6rem; background: var(--sand); border-radius: var(--radius-sm); font-size: .85rem; }

/* Damage Report Form */
.report-form { max-width: 700px; }
.file-upload { border: 2px dashed #d0cdc4; border-radius: var(--radius); padding: 2rem; text-align: center; cursor: pointer; transition: all var(--transition); }
.file-upload:hover { border-color: var(--gold); background: rgba(200,168,70,.03); }
.file-upload input { display: none; }
.file-upload__label { color: var(--ink-muted); font-size: .9rem; }
.file-upload__label strong { color: var(--gold-dark); }

/* Badges */
.badge { display: inline-block; padding: .2rem .7rem; border-radius: 999px; font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.badge--new { background: var(--blue-light); color: var(--blue); }
.badge--progress { background: var(--orange-light); color: var(--orange); }
.badge--ordered { background: rgba(200,168,70,.15); color: var(--gold-dark); }
.badge--done { background: var(--green-light); color: var(--green); }

/* Bulletin Board */
.bulletin { display: grid; gap: 1rem; }
.bulletin__item { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); border-left: 3px solid var(--gold); }
.bulletin__item.pinned { border-left-color: var(--red); }
.bulletin__meta { font-size: .78rem; color: var(--ink-muted); margin-top: .6rem; }

/* Documents */
.doc-list { display: grid; gap: .75rem; }
.doc-item { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); transition: all var(--transition); }
.doc-item:hover { box-shadow: var(--shadow); }
.doc-item__info { display: flex; align-items: center; gap: 1rem; }
.doc-item__icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--red-light); display: flex; align-items: center; justify-content: center; color: var(--red); font-size: .85rem; font-weight: 700; }
.doc-item__name { font-weight: 500; font-size: .9rem; }
.doc-item__meta { font-size: .78rem; color: var(--ink-muted); }

/* === LOGIN PAGE === */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sand); padding: 2rem; }
.login-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 3rem; width: 100%; max-width: 420px; }
.login-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: .3rem; }
.login-card .sub { text-align: center; color: var(--ink-muted); font-size: .9rem; margin-bottom: 2rem; }

/* === FOOTER === */
.footer { background: var(--ink); color: rgba(255,255,255,.6); padding: 3rem 0 2rem; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer__brand { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); margin-bottom: .5rem; }
.footer__brand span { color: var(--gold); }
.footer__desc { font-size: .85rem; max-width: 300px; line-height: 1.7; }
.footer h4 { color: var(--white); font-family: var(--font-body); font-size: .85rem; font-weight: 600; letter-spacing: .06em; margin-bottom: 1rem; text-transform: uppercase; }
.footer__links a { display: block; color: rgba(255,255,255,.5); font-size: .88rem; padding: .3rem 0; }
.footer__links a:hover { color: var(--gold-light); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; }

/* === LEGAL PAGES === */
.legal-page { max-width: 780px; margin: 0 auto; padding: 6rem 1.5rem 4rem; }
.legal-page h1 { margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.2rem; margin: 2rem 0 .8rem; }
.legal-page h3 { font-size: 1rem; margin: 1.5rem 0 .5rem; font-family: var(--font-body); font-weight: 600; }
.legal-page p { color: var(--ink-soft); margin-bottom: .8rem; font-size: .92rem; }
.legal-page ul { margin-left: 1.2rem; margin-bottom: .8rem; list-style: disc; }
.legal-page ul li { color: var(--ink-soft); font-size: .92rem; margin-bottom: .3rem; }
.legal-page a { color: var(--gold-dark); text-decoration: underline; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .nav__links { display: none; position: fixed; top: 70px; left: 0; right: 0; bottom: 0; background: var(--white); flex-direction: column; padding: 2rem; gap: 1.5rem; z-index: 999; }
    .nav__links.open { display: flex; }
    .nav__toggle { display: block; }
    .stats { grid-template-columns: repeat(2, 1fr); padding: 1.5rem; margin: -2rem 1rem 0; }
    .form-grid { grid-template-columns: 1fr; }
    .location-grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer__bottom { flex-direction: column; gap: .5rem; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .portal { grid-template-columns: 1fr; }
    .sidebar { position: relative; top: 0; height: auto; padding: 1rem 0; }
    .sidebar__nav { display: flex; overflow-x: auto; padding: 0 1rem; gap: 0; }
    .sidebar__nav a { white-space: nowrap; border-left: none !important; border-bottom: 3px solid transparent; padding: .6rem 1rem; }
    .sidebar__nav a.active { border-bottom-color: var(--gold); border-left: none; }
}
@media (max-width: 600px) {
    .hero { min-height: 70vh; }
    .hero__content { padding: 2rem 0; }
    .stats { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
}

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeInUp .6s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* Checkbox styling */
.form-check { display: flex; align-items: start; gap: .6rem; margin-bottom: 1rem; }
.form-check input[type="checkbox"] { margin-top: .25rem; accent-color: var(--gold); }
.form-check label { font-size: .85rem; color: var(--ink-soft); }

/* Print */
@media print {
    .nav, .footer, .sidebar, .btn { display: none !important; }
    .portal { grid-template-columns: 1fr !important; }
    .portal__main { padding: 0 !important; }
}
