/* --- FONT IMPORTS --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Crimson+Text:wght@400;600&display=swap');

/* --- CSS VARIABLES & RESET --- */
:root {
    --primary: #7c2d12; /* Orange 900 / Bordeaux */
    --secondary: #92400e; /* Amber 800 */
    --accent: #ca8a04; /* Yellow 600 / Gold */
    --background: #fffbeb; /* Amber 50 / Cream */
    --surface: #ffffff; /* White */
    --card: #fef3c7; /* Amber 100 */
    --text: #1c1917; /* Stone 900 */
    --muted: #78716c; /* Stone 500 */

    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Crimson Text', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary);
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; position: relative; padding-bottom: 0.5rem; }
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--accent);
}
h3 { font-size: 1.5rem; color: var(--secondary); }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

/* --- HEADER --- */
.header {
    background-color: var(--background);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo__icon {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.navigation a {
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 600;
    position: relative;
    padding: 0.5rem 0;
}

.navigation a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.navigation a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--surface);
    background-size: cover;
    background-position: center;
    padding: 0;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(124, 45, 18, 0.6); /* primary color with opacity */
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    color: var(--surface);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero .subtitle {
    font-size: 1.2rem;
    margin: 1.5rem 0 2rem;
    font-weight: 400;
}

.cta-button {
    background-color: var(--accent);
    color: var(--text);
    padding: 0.9rem 2.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid var(--accent);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--accent);
}

/* --- ZITAT SECTION --- */
.zitat-section {
    background-color: var(--surface);
}

.zitat {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 2rem 0;
}

.zitat__symbol {
    font-size: 5rem;
    color: var(--accent);
    position: absolute;
    opacity: 0.3;
    top: -1.5rem;
    left: -1rem;
}

.zitat__author {
    display: block;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--muted);
    margin-top: 1rem;
}

/* --- EINFÜHRUNG & KI SECTIONS --- */
.einfuehrung__container, .ki-dividenden__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.einfuehrung__image img, .ki-dividenden__image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 3px solid var(--card);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.ki-dividenden__image { order: -1; } /* Image on left for KI section */
@media (min-width: 768px) {
    .ki-dividenden__image { order: 0; }
}


/* --- CARD GRID & CARDS --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card);
    padding: 2rem;
    border-radius: 4px;
    border: 1px solid var(--accent);
    box-shadow: 0 4px 6px rgba(124, 45, 18, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(124, 45, 18, 0.1);
}

.card__icon {
    font-size: 2.5rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
}

.card__title {
    margin-bottom: 1rem;
}

.ressourcen-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.article-card {
    padding: 0;
    background-color: var(--surface);
    overflow: hidden;
}

.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-card .card__title, .article-card .card__text {
    padding: 0 1.5rem;
}
.article-card .card__title {
    margin-top: 1.5rem;
}
.article-card .card__text {
    padding-bottom: 1.5rem;
}

/* --- ACCORDION --- */
.accordion__item {
    border-bottom: 1px solid #e0e0e0;
}
.accordion__item:first-child {
    border-top: 1px solid #e0e0e0;
}

.accordion__header {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1.5rem 1rem;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.accordion__header:hover {
    background-color: var(--card);
}

.accordion__toggle {
    font-size: 2rem;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.accordion__header.active .accordion__toggle {
    transform: rotate(45deg);
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: var(--surface);
}
.faq-section .accordion__content p {
    padding: 1rem 1.5rem 1.5rem;
}

.accordion__body {
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.accordion__image {
    min-width: 250px;
    width: 250px;
    height: auto;
    border-radius: 4px;
}

/* --- TABLE --- */
.table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: var(--surface);
}
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

thead {
    background-color: var(--card);
}

th {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
}

tbody tr:last-child td {
    border-bottom: none;
}
tbody tr:hover {
    background-color: var(--background);
}

/* --- PORTFOLIO --- */
.portfolio-section {
    background-color: var(--surface);
}
.pie-chart {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-image: conic-gradient(
        var(--secondary) calc(var(--p1) * 1%),
        var(--primary) 0 calc(var(--p1) * 1% + var(--p2) * 1%),
        var(--accent) 0 calc(var(--p1) * 1% + var(--p2) * 1% + var(--p3) * 1%),
        var(--muted) 0 calc(var(--p1) * 1% + var(--p2) * 1% + var(--p3) * 1% + var(--p4) * 1%)
    );
    margin: 1.5rem auto;
}

/* --- STEUERN & KONTAKT --- */
.steuer-section, .kontakt-section {
    background-color: var(--surface);
}
.disclaimer {
    font-size: 0.9rem;
    color: var(--muted);
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    margin-top: 2rem;
}

.kontakt-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}
.kontakt-details p { margin-bottom: 0.5rem; }

/* --- FOOTER --- */
.footer {
    background-color: var(--primary);
    color: var(--background);
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}

.footer h4 {
    color: var(--accent);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}
.footer p, .footer a {
    color: #e0e0e0;
}
.footer a:hover {
    color: var(--surface);
}

.footer ul {
    list-style: none;
}
.footer ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid var(--secondary);
    padding: 1.5rem 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.footer-bottom .disclaimer {
    border: none;
    padding: 0;
    margin: 0;
    font-style: normal;
    font-weight: 600;
    color: var(--accent);
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    section { padding: 4rem 0; }
    .einfuehrung__image, .ki-dividenden__image {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    body { font-size: 17px; }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    
    .navigation { display: none; /* Simplification for this example. A real site would use a burger menu. */ }

    .hero { height: auto; padding: 5rem 0; }
    .hero__content { padding: 0 1rem; }
    
    .einfuehrung__container, .ki-dividenden__container, .kontakt-container {
        grid-template-columns: 1fr;
    }
    .ki-dividenden__image { order: -1; } /* Keep image on top */

    .accordion__body {
        flex-direction: column;
    }
    .accordion__image {
        width: 100%;
        max-width: 300px;
        align-self: center;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* === Contact Form Styles (Auto-Injected) === */
.contact-form-wrapper {
    background-color: var(--surface, #ffffff);
    padding: 2.5rem;
    border-radius: var(--border-radius, 8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 2rem auto;
}

.contact-form-wrapper h3 {
    margin-bottom: 1rem;
    color: var(--primary, #333);
}

.contact-form-wrapper p {
    margin-bottom: 2rem;
    color: var(--text, #666);
    opacity: 0.8;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text, #333);
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd; /* Fallback border */
    border-radius: var(--border-radius, 4px);
    background-color: var(#ffffff, #fff);
    color: var(--text, #333);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: var(--primary, #007bff);
    box-shadow: 0 0 0 3px var(--primary);
}

.contact-form .submit-button {
    display: inline-block;
    width: 100%;
    padding: 1rem 2rem;
    background-color: var(--primary, #007bff);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius, 4px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
    margin-top: 1rem;
}

.contact-form .submit-button:hover {
    filter: brightness(110%);
    transform: translateY(-1px);
}

.contact-form .submit-button:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 1.5rem;
    }
}
