/**
 * Next-CMS Default Theme
 * 
 * Ein cleanes, modernes Theme mit klarer Typografie
 * und sanften Farbverläufen.
 */

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    --primary: #3b82f6;
    --secondary: #64748b;
    --accent: #f59e0b;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 8px;
    
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    color: var(--text);
    background-color: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

/* ============================================
   Layout
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   Header
   ============================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-sm) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.site-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--primary);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--text);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.site-footer p {
    opacity: 0.7;
    font-size: 0.875rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-sm);
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control.is-invalid {
    border-color: #ef4444;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: var(--spacing-sm);
    border-radius: var(--radius);
    margin-bottom: var(--spacing-md);
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ============================================
   Module: Hero
   ============================================ */
.module-hero {
    background: linear-gradient(135deg, var(--bg-alt) 0%, var(--bg) 100%);
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.module-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: linear-gradient(135deg, var(--primary) 0%, transparent 70%);
    opacity: 0.05;
    transform: rotate(-15deg);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content[style*="--hero-bg"] {
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    padding: var(--spacing-xl);
    border-radius: calc(var(--radius) * 2);
}

.hero-headline {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subheadline {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .hero-headline {
        font-size: 2.25rem;
    }
}

/* ============================================
   Module: Rich Text
   ============================================ */
.module-richtext {
    padding: var(--spacing-lg) 0;
}

.richtext-content {
    max-width: 800px;
}

.richtext-title {
    margin-bottom: var(--spacing-md);
}

.richtext-body {
    line-height: 1.8;
}

.richtext-body p {
    margin-bottom: var(--spacing-sm);
}

.richtext-body h2, .richtext-body h3 {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.richtext-body ul, .richtext-body ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-md);
}

.richtext-body li {
    margin-bottom: 0.5rem;
}

.richtext-body a {
    color: var(--primary);
}

/* ============================================
   Module: Features
   ============================================ */
.module-features {
    padding: var(--spacing-xl) 0;
    background: var(--bg-alt);
}

.features-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--bg);
    padding: var(--spacing-md);
    border-radius: calc(var(--radius) * 2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.feature-title {
    margin-bottom: 0.5rem;
}

.feature-text {
    color: var(--text-light);
    font-size: 0.9375rem;
}

/* ============================================
   Module: Image Text
   ============================================ */
.module-image_text {
    padding: var(--spacing-xl) 0;
}

.image-text-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.image-text-content.image-right {
    direction: rtl;
}

.image-text-content.image-right > * {
    direction: ltr;
}

.image-text-image img {
    border-radius: calc(var(--radius) * 2);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.image-text-title {
    margin-bottom: var(--spacing-sm);
}

.image-text-body {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .image-text-content {
        grid-template-columns: 1fr;
    }
    
    .image-text-content.image-right {
        direction: ltr;
    }
}

/* ============================================
   Module: CTA
   ============================================ */
.module-cta {
    padding: var(--spacing-xl) 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #1d4ed8 100%);
    color: white;
    padding: var(--spacing-lg);
    border-radius: calc(var(--radius) * 3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.cta-title {
    color: white;
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.cta-text {
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.cta-box .btn-primary {
    background: white;
    color: var(--primary);
}

.cta-box .btn-primary:hover {
    background: var(--bg-alt);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Module: FAQ
   ============================================ */
.module-faq {
    padding: var(--spacing-xl) 0;
    background: var(--bg-alt);
}

.faq-content {
    max-width: 800px;
}

.faq-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.faq-item {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.faq-question {
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-answer {
    padding: 0 var(--spacing-md) var(--spacing-md);
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   Module: Contact
   ============================================ */
.module-contact {
    padding: var(--spacing-xl) 0;
}

.contact-content {
    max-width: 600px;
}

.contact-title {
    margin-bottom: var(--spacing-md);
}

.contact-form {
    background: var(--bg-alt);
    padding: var(--spacing-md);
    border-radius: calc(var(--radius) * 2);
}
