/* --- Heritage & Trust Design System --- */

/* 1. VARIABLES & SETUP */
:root {
    /* Color Palette */
    --primary: #1e3a5f;      /* Marine-Blau */
    --secondary: #b45309;   /* Amber-Gold */
    --accent: #059669;      /* Emerald */
    --background: #fafaf9;  /* Warmes Stone-Weiß */
    --surface: #ffffff;
    --card: #f5f5f4;        /* Helles Warm-Grau */
    --text: #1c1917;        /* Stone-Schwarz */
    --muted: #78716c;
    --success: #16a34a;
    --danger: #dc2626;
    --gradient-hero: linear-gradient(150deg, #1e3a5f 0%, #374151 50%, #1e3a5f 100%);

    /* Typography */
    --font-headings: 'Playfair Display', serif;
    --font-body: 'Crimson Pro', serif;
    
    /* UI Elements */
    --box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
    --border-radius: 6px;
}

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Crimson+Pro:wght@400;500;600&display=swap');

/* 2. GLOBAL STYLES & RESETS */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
    font-family: var(--font-body);
    font-size: 1.125rem; /* 18px */
    line-height: 1.8;
    color: var(--text);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
}

/* 3. TYPOGRAPHY */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    color: var(--primary);
    font-weight: 600;
}

h1 { font-size: 2.75rem; line-height: 1.2; }
h2 { font-size: 2.25rem; line-height: 1.25; margin-bottom: 2rem; position: relative; }
h3 { font-size: 1.5rem; line-height: 1.3; margin-bottom: 1rem; }

/* Goldene Akzent-Linie unter H2 */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
    margin-top: 0.75rem;
}

p { margin-bottom: 1.5rem; }
a { color: var(--secondary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #813b06; }
ul, ol { margin-left: 1.5rem; margin-bottom: 1.5rem; }
li { margin-bottom: 0.5rem; }
strong { font-weight: 600; color: var(--primary); }

/* 4. LAYOUT & HELPERS */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
section {
    padding: 5rem 0;
}
.bg-section {
    background-color: var(--surface);
    border-top: 1px solid #e7e5e4;
    border-bottom: 1px solid #e7e5e4;
}
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}
.full-width-img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

/* 5. COMPONENTS */

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent;
}
.cta-button.primary {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}
.cta-button.primary:hover {
    background-color: #813b06;
    border-color: #813b06;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(180, 83, 9, 0.2);
}
.cta-button.secondary {
    background-color: transparent;
    color: white;
    border-color: var(--secondary);
}
#hero .cta-button.secondary {
    color: white;
    border-color: white;
}
#hero .cta-button.secondary:hover {
    background-color: white;
    color: var(--primary);
}
.cta-button.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Kanzlei-Stil Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}
.card-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.kanzlei-card {
    background-color: var(--card);
    border: 1px solid #e7e5e4;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid var(--secondary);
}
.kanzlei-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.12);
}
.kanzlei-card h3 { color: var(--primary); }
.kanzlei-card p { font-size: 1.05rem; }
.kanzlei-card.small-card { padding: 1.5rem; }
.card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: -2rem -2rem 1.5rem -2rem;
}

/* Info-Box (Gesetzes-Zitat-Stil) */
.info-box {
    background-color: #f5f5f4;
    border-left: 4px solid var(--secondary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}
.info-box p {
    font-style: italic;
    color: var(--muted);
    margin-bottom: 0;
    font-size: 1.05rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    font-size: 1rem;
}
th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e7e5e4;
}
thead {
    background-color: var(--secondary);
    color: white;
}
thead th {
    font-family: var(--font-headings);
    font-weight: 500;
}
tbody tr:nth-child(even) {
    background-color: var(--card);
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.2);
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}
.form-group-checkbox input { width: auto; margin-right: 0.75rem; }
.form-group-checkbox label { margin-bottom: 0; font-size: 0.9rem; }


/* 6. HEADER & NAVIGATION */
.main-header {
    background-color: var(--surface);
    border-bottom: 2px solid var(--secondary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}
.logo:hover { color: var(--primary); }
.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--secondary);
    margin-right: 0.5rem;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-menu a {
    color: var(--primary);
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}
.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}
.nav-menu a:hover::after { width: 100%; }
#mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; }
#mobile-menu-toggle svg { width: 30px; height: 30px; color: var(--primary); }


/* 7. SECTION STYLES */

/* Hero */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}
.hero-bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -2;
}
#hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--gradient-hero);
    opacity: 0.9;
    z-index: -1;
}
.hero-content { max-width: 800px; }
.hero-content h1 { color: white; margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.25rem; opacity: 0.9; margin-bottom: 2rem; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; margin-bottom: 2rem; }
.trust-bar { display: flex; justify-content: center; gap: 1.5rem; opacity: 0.8; font-size: 0.9rem; }

/* Erbfolge & Stammbaum */
.stammbaum-visual { text-align: center; }
.stammbaum-visual img { max-width: 100%; height: auto; }
.stammbaum-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}
.ordnung {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    min-width: 200px;
}
.ordnung.pfeil { background: none; color: var(--primary); font-size: 1.5rem; padding: 0; }
.ordnung span { display: block; font-size: 0.9rem; opacity: 0.8; }
#erbfolge p { font-size: 1.2rem; }
#erbfolge p:first-of-type::before {
    content: '§1 ';
    font-weight: bold;
    color: var(--secondary);
}
#erbfolge p:nth-of-type(2)::before {
    content: '§2 ';
    font-weight: bold;
    color: var(--secondary);
}

/* Testament */
.checklist {
    margin-top: 3rem;
    background: var(--card);
    padding: 2rem;
    border-left: 4px solid var(--accent);
    border-radius: var(--border-radius);
}
.checklist h3 { margin-bottom: 1rem; color: var(--accent); }
.checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist li { font-weight: 500; }

/* Erbschaftsteuer-Rechner */
.rechner-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--surface);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}
.ergebnis-box {
    background: var(--primary);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
}
.ergebnis-box h3 { color: white; }
.ergebnis-box p { margin-bottom: 0.5rem; }
.steuer-final {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.3);
}
.steuer-final span { color: var(--secondary); }
.ergebnis-box small { display: block; margin-top: 1.5rem; opacity: 0.7; }

/* Pflichtteil */
#pflichtteil p:first-of-type::before {
    content: '§3 ';
    font-weight: bold;
    color: var(--secondary);
}

/* Unternehmensnachfolge */
.prozess-schritte {
    display: flex;
    justify-content: space-around;
    margin: 3rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}
.schritt {
    text-align: center;
    color: var(--primary);
    font-weight: 600;
}
.schritt span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary);
    color: white;
    font-size: 1.5rem;
    font-family: var(--font-headings);
    margin: 0 auto 0.5rem;
    border: 2px solid white;
    box-shadow: 0 0 0 3px var(--secondary);
}

/* FAQ Accordion */
.accordion-item {
    border-bottom: 1px solid #ddd;
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.5rem 1rem;
    font-size: 1.25rem;
    font-family: var(--font-headings);
    font-weight: 500;
    cursor: pointer;
    color: var(--primary);
    position: relative;
    padding-right: 3rem;
}
.accordion-header::after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--secondary);
    transition: transform 0.2s ease;
}
.accordion-header.active::after {
    content: '−';
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: var(--card);
}
.accordion-content p {
    padding: 1.5rem;
    margin: 0;
}

/* Kontakt */
.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 1.5rem;
    border: 1px solid #ccc;
}
.contact-form {
    background: var(--card);
    padding: 2rem;
    border-radius: var(--border-radius);
}

/* 8. FOOTER */
.main-footer {
    background-color: var(--primary);
    color: white;
    padding: 4rem 0 2rem 0;
    border-top: 4px solid var(--secondary);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.footer-col h4 {
    color: var(--secondary);
    font-family: var(--font-headings);
    margin-bottom: 1rem;
}
.footer-col p { opacity: 0.8; font-size: 1rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul a { color: white; opacity: 0.8; font-size: 1rem; }
.footer-col ul a:hover { opacity: 1; text-decoration: underline; }
.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.7;
}
.footer-bottom p { margin-bottom: 0.5rem; }


/* 9. COOKIE BANNER */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary);
    color: white;
    padding: 1.5rem 0;
    z-index: 2000;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}
#cookie-banner.show {
    transform: translateY(0);
}
.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.cookie-content p { margin: 0; }
.cookie-content a { color: var(--secondary); text-decoration: underline; }
.cookie-buttons { display: flex; gap: 1rem; flex-shrink: 0; }
#cookie-decline {
    background-color: transparent;
    border: 2px solid var(--muted);
    color: var(--muted);
}
#cookie-decline:hover {
    background-color: var(--muted);
    color: white;
}


/* 10. RESPONSIVE DESIGN */
@media (min-width: 768px) {
    .two-column-layout { grid-template-columns: 1fr 1fr; }
    #erbfolge .two-column-layout { grid-template-columns: 40% 1fr; }
}

@media (max-width: 992px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--surface);
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .nav-menu.active { display: flex; }
    .nav-menu li { margin: 1rem 0; }
    #mobile-menu-toggle { display: block; }
    .main-header .cta-button { display: none; }
}

@media (max-width: 768px) {
    section { padding: 3rem 0; }
    .hero-content p { font-size: 1.1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .rechner-wrapper { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cookie-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    body { font-size: 1rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col ul { margin-top: 1rem; }
}