/* ==========================================
   Accessibility Utility
   ========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #333366;
    --secondary-color: #99cc33;
    --secondary-dark: #7fad29;
    --accent-color: #99cc33;
    --text-dark: #333366;
    --text-light: #5f6b85;
    --bg-light: #f2f6e9;
    --bg-white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 0;
}

.logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo i {
    color: var(--secondary-color);
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a.active {
    color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    background-image: url('bilder/kvsbuero.png');
    background-size: cover;
    background-position: center top;
    color: white;
    height: 100svh; /* Small Viewport Height – ignoriert Browser-Chrome auf Mobile */
    min-height: 500px; /* Landscape-Mobile: verhindert zu kompakten Hero */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(20, 20, 60, 0.35) 0%,
        rgba(20, 20, 60, 0.65) 60%,
        rgba(20, 20, 60, 0.80) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7), 0 1px 4px rgba(0, 0, 0, 0.9);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 1;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: white;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-small {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
}

/* ==========================================
   Section Styles
   ========================================== */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: 1.5rem;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.feature i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    min-width: 50px;
}

.feature h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.feature p {
    color: var(--text-light);
    margin: 0;
}

.about-image {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* ==========================================
   Properties Section
   ========================================== */
.properties {
    background: var(--bg-light);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.property-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.property-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.property-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.property-location {
    color: var(--text-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.property-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid var(--bg-light);
    border-bottom: 1px solid var(--bg-light);
}

.property-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    min-width: 0;
}

.property-details i {
    color: var(--secondary-color);
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: auto;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

/* ==========================================
   Services Section
   ========================================== */
.services {
    background: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.service-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact {
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    min-width: 30px;
}

.contact-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.contact-visual {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-visual img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center 70%;
}

.contact-visual p {
    padding: 1rem 1.25rem 1.25rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--bg-light);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button {
    width: 100%;
}

/* ==========================================
   Partners Section
   ========================================== */
.partners {
    background: var(--bg-white);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.partner-item {
    background: white;
    border: 1px solid #e8ecd9;
    border-radius: 14px;
    min-height: 110px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.partner-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.partner-item img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.8;
    transition: var(--transition);
}

.partner-item img.partner-logo-large {
    max-height: 120px;
    width: 100%;
    max-width: 220px;
}

.partner-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.partner-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a,
.footer-section ul li {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: white;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ==========================================
   Responsive Design
   ========================================== */

/* Tablet (769px – 1024px) */
@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll; /* iOS-Touch-Geräte: kein fixed background */
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .about-content,
    .contact-content {
        gap: 2.5rem;
    }

    .section-header h2 {
        font-size: 2.2rem;
    }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    .hero {
        background-attachment: scroll; /* iOS Safari: fixed background nicht unterstützt */
        background-position: 60% 0%;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .properties-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    section {
        padding: 60px 0;
    }

    .property-price {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .property-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .partners-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.1rem;
    }

    section {
        padding: 40px 0;
    }

    .property-price {
        font-size: 1rem;
    }

    .modal-content {
        margin: 0 0.75rem;
        padding: 1.5rem;
        max-height: 90vh;
        max-height: 90dvh;
    }

    .modal-content h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================
   Modal Styles (Impressum)
   ========================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 40px;
    border-radius: 8px;
    max-width: 700px;
    position: relative;
    box-shadow: var(--shadow-hover);
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    padding-right: 2.5rem; /* Platz für Close-Button */
}

.modal-content h3 {
    color: var(--secondary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.modal-content h4 {
    color: var(--primary-color);
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.modal-content ul {
    margin: 0.5rem 0 1rem 1.5rem;
    line-height: 1.8;
}

.modal-content ul li {
    margin-bottom: 0.5rem;
}

.modal-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: var(--text-light);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover,
.close:focus {
    color: var(--accent-color);
}

.footer-bottom a {
    color: inherit;
    text-decoration: underline;
    transition: var(--transition);
}

.footer-bottom a:hover {
    color: var(--secondary-color);
}

/* ==========================================
   Cookie Banner
   ========================================== */
.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 10001;
    background: rgba(51, 51, 102, 0.98);
    color: white;
    border-radius: 14px;
    box-shadow: var(--shadow-hover);
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner-content {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.cookie-banner-content p {
    margin: 0;
    max-width: 720px;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-banner .btn {
    padding: 0.75rem 1.25rem;
}

.cookie-btn-decline {
    border-color: rgba(255, 255, 255, 0.9);
}

.cookie-btn-decline:hover {
    color: var(--primary-color);
}

.cookie-policy-link {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-banner-actions .btn {
        width: 100%;
        text-align: center;
    }
}
