/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    color: #0066cc;
}

h2 {
    font-size: 2rem;
    color: #0066cc;
}

h3 {
    font-size: 1.5rem;
    color: #333;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
}

.btn-primary:hover {
    background-color: #004499;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.btn-outline:hover {
    background-color: #0066cc;
    color: white;
}

/* Navigation */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0066cc;
}

.nav-brand img.logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
}

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

.nav-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0066cc;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 100px 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image svg {
    width: 100%;
    height: auto;
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.services h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: #0066cc;
    margin-bottom: 1rem;
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.stat p {
    color: #666;
    margin: 0;
}

/* Reviews Section */
.reviews {
    padding: 100px 0;
    background-color: #f8f9fa;
}

.reviews h2 {
    text-align: center;
    margin-bottom: 4rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.reviewer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.reviewer strong {
    color: #0066cc;
}

.reviewer span {
    color: #666;
    font-size: 0.9rem;
}

/* Newsletter Section */
.newsletter {
    padding: 80px 0;
    background-color: #0066cc;
    color: white;
}

.newsletter-content {
    text-align: center;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    gap: 1rem;
}

.form-group input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.form-note {
    margin-top: 1rem;
}

.form-note small {
    color: rgba(255, 255, 255, 0.8);
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.contact-icon {
    margin-right: 1rem;
    color: #0066cc;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    color: #ccc;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #555;
    border-radius: 50%;
    color: white;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #0066cc;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 2rem;
    text-align: center;
    color: #ccc;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #333;
    color: white;
    padding: 1.5rem;
    z-index: 10000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content h3 {
    color: white;
    margin-bottom: 1rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Blog Styles */
.page-header {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-content {
    padding: 80px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.blog-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-image svg {
    width: 100%;
    height: 200px;
}

.blog-content-text {
    padding: 2rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.blog-date {
    color: #666;
}

.blog-category {
    background-color: #0066cc;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.blog-card h2 a {
    color: #333;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: #0066cc;
}

.read-more {
    font-weight: 600;
    color: #0066cc;
}

.blog-newsletter {
    background-color: #f8f9fa;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
}

/* Article Styles */
.article-header {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.breadcrumb {
    margin-bottom: 1rem;
    color: #666;
}

.breadcrumb a {
    color: #0066cc;
}

.article-meta {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
    flex-wrap: wrap;
}

.article-content {
    padding: 80px 0;
}

.article-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.article-main {
    max-width: none;
}

.article-image {
    margin-bottom: 2rem;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-text h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.article-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-text ul,
.article-text ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-text li {
    margin-bottom: 0.5rem;
}

.article-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.article-text th,
.article-text td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.article-text th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.highlight-box {
    background-color: #f8f9fa;
    border-left: 4px solid #0066cc;
    padding: 1.5rem;
    margin: 2rem 0;
}

.highlight-box h3 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.cta-section {
    background-color: #f8f9fa;
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    margin: 3rem 0;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Sidebar */
.article-sidebar {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: #0066cc;
}

.related-articles {
    list-style: none;
}

.related-articles li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #ddd;
}

.related-articles li:last-child {
    border-bottom: none;
}

.contact-widget p {
    margin-bottom: 0.5rem;
}

.calculator-widget {
    display: grid;
    gap: 1rem;
}

.calculator-widget label {
    font-weight: 600;
}

.calculator-widget input,
.calculator-widget select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.result {
    background-color: white;
    padding: 1rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.checklist {
    list-style: none;
}

.checklist li {
    margin-bottom: 0.5rem;
    color: #28a745;
}

.important-links {
    list-style: none;
}

.important-links li {
    margin-bottom: 0.5rem;
}

.sidebar-newsletter {
    display: grid;
    gap: 0.5rem;
}

.sidebar-newsletter input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Thank You Page */
.thank-you {
    padding: 100px 0;
    text-align: center;
}

.thank-you-content {
    max-width: 800px;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 2rem;
}

.thank-you-message {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #666;
}

.next-steps {
    margin: 4rem 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    text-align: center;
    padding: 2rem;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #0066cc;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.contact-emergency {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 2rem;
    border-radius: 10px;
    margin: 3rem 0;
}

.useful-links {
    margin: 3rem 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.link-card {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s ease;
}

.link-card:hover {
    background-color: #e9ecef;
    color: #333;
}

.link-card h4 {
    color: #0066cc;
    margin-bottom: 0.5rem;
}

.return-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* Legal Pages */
.legal-content {
    padding: 80px 0;
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.last-updated {
    color: #666;
    font-style: italic;
    margin-bottom: 3rem;
}

.legal-content h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content ul,
.legal-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content address {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    font-style: normal;
    margin: 1rem 0;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
}

/* Cookie Policy Specific */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.cookie-table th,
.cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cookie-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.cookie-settings-panel {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.cookie-category {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.cookie-category label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.required {
    color: #666;
    font-size: 0.9rem;
}

/* Duration and Wohngeld Tables */
.duration-table,
.wohngeld-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.duration-table th,
.duration-table td,
.wohngeld-table th,
.wohngeld-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.duration-table th,
.wohngeld-table th {
    background-color: #0066cc;
    color: white;
    font-weight: 600;
}

.duration-table tbody tr:hover,
.wohngeld-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .hero-buttons {
        justify-content: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        order: -1;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }

    .return-buttons {
        flex-direction: column;
        align-items: center;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-group {
        flex-direction: column;
    }

    .duration-table,
    .wohngeld-table,
    .cookie-table {
        font-size: 0.9rem;
    }

    .duration-table th,
    .duration-table td,
    .wohngeld-table th,
    .wohngeld-table td,
    .cookie-table th,
    .cookie-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .service-card,
    .review-card {
        padding: 1.5rem;
    }

    .blog-card {
        margin-bottom: 2rem;
    }

    .legal-content {
        padding: 60px 0;
    }

    .duration-table,
    .wohngeld-table,
    .cookie-table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cookie-banner,
    .hero-buttons,
    .cta-buttons,
    .return-buttons {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }
}
