/*
Theme Name: RE-SOFT
Theme URI: https://re-soft.de
Description: Schlankes, Elementor-kompatibles Theme für RE-SOFT – Real Estate Software & Systeme. Eigene Farben (Navy/Cyan) und Schriften (Sora/Inter), gebrandeter Header & Footer, volle Breite für Elementor-Inhalte.
Author: RE-SOFT
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: resoft
*/

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
    --navy:   #16213e;
    --navy2:  #1f2f52;
    --blue:   #446084;
    --accent: #2f9bd4;
    --cyan:   #17b3c4;
    --green:  #3bb273;
    --grey:   #64748b;
    --border: #e2e8f0;
    --bg:     #f1f4f8;
    --white:  #ffffff;
    --text:   #1a2437;
    --fh: "Sora", system-ui, sans-serif;
    --fb: "Inter", system-ui, sans-serif;
    --max: 1180px;
    --r: 12px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--fb); color: var(--text); background: var(--white); line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #2688bd; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--fh); color: var(--navy); line-height: 1.15; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1em; }
.rs-wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.rs-btn { display: inline-flex; align-items: center; gap: .55rem; padding: .8rem 1.5rem; border-radius: 10px; font-family: var(--fb); font-weight: 600; font-size: .93rem; border: 2px solid transparent; cursor: pointer; transition: all .18s; }
.rs-btn--primary { background: var(--accent); color: #fff; }
.rs-btn--primary:hover { background: #2688bd; color: #fff; transform: translateY(-1px); }
.rs-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.rs-btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); color: #fff; }

/* ── Topbar ──────────────────────────────────────────────────── */
.rs-topbar { background: #0f1830; color: rgba(255,255,255,.72); font-size: .8125rem; }
.rs-topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 40px; gap: 1rem; }
.rs-topbar__left { display: flex; align-items: center; gap: 1.5rem; }
.rs-topbar a { color: rgba(255,255,255,.72); display: inline-flex; align-items: center; gap: .45rem; }
.rs-topbar a:hover { color: #fff; }
.rs-topbar i { color: var(--cyan); }
@media (max-width: 820px) { .rs-topbar__left .rs-hide { display: none; } }

/* ── Header ──────────────────────────────────────────────────── */
.rs-header { background: var(--navy); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.rs-header__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 1.5rem; }
.rs-logo { display: flex; align-items: center; gap: .75rem; }
.rs-logo img { max-height: 44px; width: auto; }
.rs-logo__icon { width: 42px; height: 42px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--cyan)); display: flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff; }
.rs-logo__txt { display: flex; flex-direction: column; gap: .2rem; line-height: 1; }
.rs-logo__name { font-family: var(--fh); font-size: 1.15rem; font-weight: 700; letter-spacing: .1em; color: #fff; }
.rs-logo__sub { font-size: .68rem; color: rgba(255,255,255,.55); letter-spacing: .02em; }
.rs-nav { margin-left: auto; }
.rs-nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.rs-nav a { color: rgba(255,255,255,.8); font-size: .9rem; font-weight: 500; }
.rs-nav a:hover, .rs-nav .current-menu-item > a { color: var(--cyan); }
.rs-header__cta { display: inline-flex; align-items: center; gap: .5rem; background: var(--accent); color: #fff; padding: .6rem 1.15rem; border-radius: 9px; font-weight: 600; font-size: .9rem; }
.rs-header__cta:hover { background: #2688bd; color: #fff; }
.rs-burger { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }
@media (max-width: 940px) {
    .rs-nav { position: absolute; top: 74px; left: 0; right: 0; background: var(--navy2); display: none; margin: 0; }
    .rs-nav.is-open { display: block; }
    .rs-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.5rem 1rem; }
    .rs-nav li { border-top: 1px solid rgba(255,255,255,.08); }
    .rs-nav a { display: block; padding: .85rem 0; }
    .rs-burger { display: block; }
}
@media (max-width: 520px) { .rs-logo__sub { display: none; } .rs-header__cta span { display: none; } }

/* ── Inhalt / Elementor ──────────────────────────────────────── */
.site-main { min-height: 40vh; }
.site-main .rs-content { padding: 3rem 0; }
.rs-pagetitle { background: linear-gradient(135deg, var(--navy) 0%, var(--navy2) 60%, #12405a 100%); color: #fff; padding: 3rem 0; }
.rs-pagetitle h1 { color: #fff; margin: 0; }
/* Elementor volle Breite: Theme-Container nicht einschränken, wenn Elementor rendert */
.elementor-page .site-main .rs-content { padding: 0; max-width: none; }
.elementor-page .site-main .rs-content > .rs-wrap { max-width: none; padding: 0; }

/* ── Footer ──────────────────────────────────────────────────── */
.rs-footer { background: var(--navy); color: rgba(255,255,255,.6); padding: 3.5rem 0 0; }
.rs-footer__cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.rs-footer__brand p { font-size: .85rem; color: rgba(255,255,255,.55); line-height: 1.65; max-width: 300px; }
.rs-footer__brand .rs-logo { margin-bottom: 1rem; }
.rs-footer__col h4 { font-family: var(--fh); font-weight: 600; font-size: .9rem; color: #fff; margin-bottom: 1rem; letter-spacing: .04em; }
.rs-footer__col ul { list-style: none; margin: 0; padding: 0; }
.rs-footer__col li { padding: .35rem 0; }
.rs-footer__col a, .rs-footer__col span { font-size: .85rem; color: rgba(255,255,255,.6); display: inline-flex; align-items: center; gap: .5rem; }
.rs-footer__col a:hover { color: var(--cyan); }
.rs-footer__col i { color: var(--cyan); width: 16px; }
.rs-footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: 1.4rem 0; font-size: .8rem; color: rgba(255,255,255,.45); }
.rs-footer__bottom nav { display: flex; gap: 1.5rem; }
.rs-footer__bottom nav a { color: rgba(255,255,255,.45); }
.rs-footer__bottom nav a:hover { color: #fff; }
@media (max-width: 860px) { .rs-footer__cols { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 520px) { .rs-footer__cols { grid-template-columns: 1fr; } }

/* ── Formulare (Contact Form 7 & allgemein) ──────────────────── */
.site-main input[type="text"], .site-main input[type="email"], .site-main input[type="tel"],
.site-main input[type="url"], .site-main input[type="number"], .site-main input[type="date"],
.site-main input[type="password"], .site-main input[type="search"], .site-main textarea, .site-main select,
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="url"],
.wpcf7 input[type="number"], .wpcf7 input[type="date"], .wpcf7 textarea, .wpcf7 select {
    width: 100%;
    font-family: var(--fb);
    font-size: .95rem;
    color: var(--text);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: .75rem 1rem;
    line-height: 1.4;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none; appearance: none;
}
.site-main textarea, .wpcf7 textarea { min-height: 130px; resize: vertical; }
.site-main select, .wpcf7 select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.4rem;
}
.site-main input:focus, .site-main textarea:focus, .site-main select:focus,
.wpcf7 input:focus, .wpcf7 textarea:focus, .wpcf7 select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47,155,212,.15);
}
.site-main ::placeholder, .wpcf7 ::placeholder { color: #94a3b8; }

/* CF7-Layout */
.wpcf7-form p { margin: 0 0 1rem; }
.wpcf7-form label { display: block; font-weight: 500; font-size: .9rem; color: var(--navy); }
.wpcf7-form label input, .wpcf7-form label textarea, .wpcf7-form label select { margin-top: .35rem; }

/* Submit-Button */
.wpcf7 input[type="submit"], .wpcf7 button[type="submit"], .site-main button[type="submit"] {
    width: auto; display: inline-flex; align-items: center; gap: .5rem;
    background: var(--accent); color: #fff; border: none; border-radius: 10px;
    padding: .8rem 1.9rem; font-family: var(--fb); font-weight: 600; font-size: .95rem;
    cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 10px 22px -12px rgba(47,155,212,.7);
}
.wpcf7 input[type="submit"]:hover, .wpcf7 button[type="submit"]:hover,
.site-main button[type="submit"]:hover { background: #2688bd; transform: translateY(-1px); }

/* Checkbox / Radio */
.wpcf7-list-item { display: inline-flex; align-items: center; gap: .4rem; margin: 0 1.1rem .3rem 0; }
.wpcf7-list-item label { display: inline-flex !important; font-weight: 400; }
.wpcf7 input[type="checkbox"], .wpcf7 input[type="radio"] { width: auto; accent-color: var(--accent); margin: 0; }

/* Rückmeldungen / Validierung */
.wpcf7-response-output {
    margin: 1rem 0 0 !important; padding: .8rem 1rem; border-radius: 8px;
    font-size: .9rem; border: 1px solid transparent; line-height: 1.5;
}
.wpcf7-form.sent .wpcf7-response-output { background: rgba(59,178,115,.12); border-color: rgba(59,178,115,.4); color: #2f8f5b; }
.wpcf7-form.invalid .wpcf7-response-output, .wpcf7-form.unaccepted .wpcf7-response-output,
.wpcf7-form.failed .wpcf7-response-output, .wpcf7-form.spam .wpcf7-response-output {
    background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); color: #dc2626;
}
.wpcf7-not-valid-tip { color: #dc2626; font-size: .8rem; margin-top: .25rem; }
.wpcf7 .wpcf7-not-valid { border-color: #dc2626 !important; }
.wpcf7-spinner { margin: .5rem 0 0; }

/* ── Formular-Layout (Kontaktseite + Modal) ───────────────────── */
.rs-f__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.rs-f__field { margin-bottom: 1rem; }
.rs-f__field > label { display: block; font-weight: 500; }
.rs-f__lbl { display: block; font-family: var(--fh); font-size: .84rem; font-weight: 600; color: var(--navy2); margin-bottom: .4rem; }
.rs-f__lbl em { font-style: normal; font-weight: 400; font-size: .78rem; color: #94a3b8; margin-left: .25rem; }
.rs-f__accept { margin: .25rem 0 1.2rem; }
.rs-f__accept .wpcf7-list-item { margin: 0; }
.rs-f__accept label { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; font-size: .85rem; color: #64748b; line-height: 1.5; cursor: pointer; }
.rs-f__accept input[type="checkbox"] { margin: .2rem 0 0; width: 17px; height: 17px; accent-color: var(--accent); flex-shrink: 0; }
.rs-f__accept a { color: var(--accent); text-decoration: underline; }
.rs-f__submit { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.rs-f__btn { background: var(--accent); color: #fff; border: none; border-radius: 10px; padding: .85rem 1.7rem; font-family: var(--fb); font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .18s, transform .18s, box-shadow .18s; }
.rs-f__btn:hover { background: #2688bd; transform: translateY(-1px); box-shadow: 0 12px 24px -12px rgba(47,155,212,.9); }
.rs-f__btn:disabled { opacity: .6; cursor: default; transform: none; }
@media (max-width: 640px) { .rs-f__grid { grid-template-columns: 1fr; } }

/* ── Anfrage-Modal ────────────────────────────────────────────── */
body.rs-modal-open { overflow: hidden; }
.rs-modal { position: fixed; inset: 0; z-index: 9999; display: none; }
.rs-modal.is-open { display: block; }
.rs-modal__backdrop { position: absolute; inset: 0; background: rgba(9,15,30,.7); backdrop-filter: blur(4px); animation: rsModalFade .2s ease; }
.rs-modal__scroll { position: relative; height: 100%; overflow-y: auto; padding: 1.25rem; -webkit-overflow-scrolling: touch; }
.rs-modal__dialog { position: relative; max-width: 660px; margin: 0 auto; background: #fff; border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.65); overflow: hidden; animation: rsModalPop .26s cubic-bezier(.2,.9,.3,1); }
@keyframes rsModalFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes rsModalPop { from { opacity: 0; transform: translateY(22px) scale(.98) } to { opacity: 1; transform: none } }
.rs-modal__hd { position: relative; padding: 1.8rem 3.4rem 1.6rem 1.9rem; background: radial-gradient(120% 140% at 90% -20%, #1d4a63 0%, transparent 50%), linear-gradient(150deg, var(--navy) 0%, var(--navy2) 75%); color: #fff; }
.rs-modal__hd h2 { font-family: var(--fh); font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0 0 .35rem; line-height: 1.2; }
.rs-modal__hd p { margin: 0; font-size: .9rem; color: rgba(255,255,255,.7); }
.rs-modal__quick { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.1rem; font-size: .82rem; }
.rs-modal__quick a, .rs-modal__quick span { color: rgba(255,255,255,.75); display: inline-flex; align-items: center; gap: .45rem; }
.rs-modal__quick a:hover { color: #fff; }
.rs-modal__quick i { color: var(--cyan); }
.rs-modal__close { position: absolute; top: 1rem; right: 1rem; width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .18s, border-color .18s; }
.rs-modal__close:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.45); }
.rs-modal__body { padding: 1.8rem 1.9rem 1.9rem; }
.rs-f p { margin: 0; }
.rs-modal .wpcf7 .rs-f__lbl { color: var(--navy2); }
@media (max-width: 640px) {
    .rs-modal__scroll { padding: .75rem; }
    .rs-modal__hd { padding: 1.5rem 3.2rem 1.4rem 1.3rem; }
    .rs-modal__body { padding: 1.4rem 1.3rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .rs-modal__backdrop, .rs-modal__dialog { animation: none; }
}

/* ── Nav-Dropdown (Produkte) ─────────────────────────────────── */
.rs-nav li { position: relative; }
.rs-nav .sub-menu { display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); padding: .5rem; margin: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--navy2); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; min-width: 14rem; box-shadow: 0 24px 44px -20px rgba(0,0,0,.6); z-index: 50; }
.rs-nav li:hover > .sub-menu, .rs-nav li:focus-within > .sub-menu { display: flex; }
.rs-nav .sub-menu li { border: 0; }
.rs-nav .sub-menu a { display: block; padding: .55rem .8rem; border-radius: 8px; white-space: nowrap; }
.rs-nav .sub-menu a:hover { background: rgba(255,255,255,.07); color: var(--cyan); }
.rs-nav .menu-item-has-children > a::after { content: "\f078"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .55rem; margin-left: .4rem; vertical-align: 2px; opacity: .7; }
@media (max-width: 940px) {
    .rs-nav .sub-menu, .rs-nav li:hover > .sub-menu { display: block; position: static; transform: none; background: transparent; border: 0; box-shadow: none; padding: 0 0 .4rem .9rem; min-width: 0; }
    .rs-nav .sub-menu li { border-top: 0; }
    .rs-nav .sub-menu a { padding: .45rem 0; font-size: .86rem; color: rgba(255,255,255,.65); }
}
