/* ==========================================================================
   VD Ausbau - Custom Design System & CSS Stylesheet
   ========================================================================== */

/* --- Custom Properties (CSS Variables) --- */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Color Palette */
    --color-primary: #0a192f;        /* Deep Navy Blue */
    --color-primary-light: #172a45;  /* Lighter Navy */
    --color-primary-dark: #020c1b;   /* Almost Black Navy */
    --color-accent: #f57c00;         /* Vibrant Amber Orange */
    --color-accent-hover: #e65100;   /* Deep Orange */
    --color-accent-light: #fff3e0;   /* Light Orange tint */
    --color-text-dark: #1e293b;      /* Slate 800 */
    --color-text-muted: #64748b;     /* Slate 500 */
    --color-bg-light: #f8fafc;       /* Slate 50 */
    --color-bg-card: #ffffff;        /* Pure White */
    --color-border: #e2e8f0;         /* Slate 200 */
    
    /* Layout Tokens */
    --container-max: 1200px;
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --box-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --box-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Base & Reset Rules --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* --- Layout Utility Classes --- */
.container {
    width: 100%;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
    margin-right: auto;
    margin-left: auto;
    max-width: var(--container-max);
}

.section-padding {
    padding: 6rem 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
}

/* --- Buttons System --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.75rem 1.75rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline:hover {
    background-color: #ffffff;
    color: var(--color-primary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.25rem;
    font-size: 1.1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.text-accent {
    color: var(--color-accent);
}

/* --- Site Header & Sticky Nav --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-normal);
    padding: 1.5rem 0;
}

/* Add blurred background and shadow when scrolled */
.site-header.scrolled {
    padding: 0.75rem 0;
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--box-shadow-md);
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.75rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--color-accent);
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-nav {
    padding: 0.5rem 1.25rem;
    font-size: 0.95rem;
}

/* Hamburger Toggle Button */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1100;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    position: relative;
    transition: var(--transition-fast);
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    transition: var(--transition-fast);
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

/* Mobile Nav Menu Show State */
@media (max-width: 991px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-primary-light);
        padding: 6rem 2rem 2rem 2rem;
        box-shadow: var(--box-shadow-lg);
        transition: var(--transition-normal);
        display: flex;
        flex-direction: column;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 1.25rem;
        color: #ffffff;
    }

    .btn-nav {
        width: 100%;
        margin-top: 1rem;
    }

    /* Active Hamburger Menu Animation */
    .nav-toggle.active .hamburger {
        background-color: transparent;
    }

    .nav-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .nav-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        bottom: 0;
    }
}

/* --- Hero Section --- */
.hero-section {
    position: relative;
    background-color: var(--color-primary);
    background-image: radial-gradient(circle at 10% 20%, rgba(23, 42, 69, 0.4) 0%, transparent 90%);
    min-height: 90vh;
    display: flex;
    align-items: center;
    color: #ffffff;
    padding-top: 8rem;
    padding-bottom: 6rem;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 25, 47, 0.9) 0%, rgba(2, 12, 27, 0.95) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    background-color: rgba(245, 124, 0, 0.15);
    color: var(--color-accent);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(245, 124, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
}

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

/* Curved Hero Wave Separator */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 3;
}

.hero-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.hero-wave .shape-fill {
    fill: var(--color-bg-light);
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-top: 7rem;
        padding-bottom: 5rem;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
    margin-bottom: 4rem;
}

.section-tag {
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 2px;
    display: block;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-description {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .section-header {
        margin-bottom: 2.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

/* --- Services Section (Leistungen) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.service-card {
    background-color: var(--color-bg-card);
    padding: 3rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-lg);
    border-color: rgba(245, 124, 0, 0.15);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 64px;
    height: 64px;
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    transition: var(--transition-fast);
}

.service-card:hover .service-icon {
    background-color: var(--color-accent);
    color: #ffffff;
    transform: scale(1.05);
}

.service-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

@media (max-width: 991px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-card {
        padding: 2rem;
    }
}

/* --- Portfolio Section (Galerie) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--box-shadow-sm);
    background-color: var(--color-primary);
    aspect-ratio: 4 / 3;
}

.portfolio-img-wrapper {
    width: 100%;
    height: 100%;
    transition: var(--transition-normal);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(10, 25, 47, 0.95) 0%, rgba(10, 25, 47, 0.4) 70%, transparent 100%);
    color: #ffffff;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.portfolio-info h4 {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.portfolio-info p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Portfolio Hover Effects */
.portfolio-item:hover .portfolio-img-wrapper {
    transform: scale(1.08);
    opacity: 0.35;
}

.portfolio-item:hover .portfolio-info {
    opacity: 1;
    transform: translateY(0);
}

/* --- Contact Section (Kontakt) --- */
.contact-grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-block {
    display: flex;
    flex-direction: column;
}

.contact-info-block h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
}

.contact-intro {
    color: var(--color-text-muted);
    margin-bottom: 2.5rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-text span {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

.info-text a, .info-text p {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

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

/* Contact Form Styling */
.contact-form-block {
    background-color: var(--color-bg-card);
    padding: 3rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-md);
    border: 1px solid var(--color-border);
}

.contact-form-block h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    outline: none;
    transition: var(--transition-fast);
    background-color: var(--color-bg-light);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(245, 124, 0, 0.1);
    background-color: #ffffff;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.form-checkbox label a {
    color: var(--color-accent);
    font-weight: 600;
}

.form-checkbox label a:hover {
    text-decoration: underline;
}

.form-status {
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    display: block;
    color: #2e7d32;
}

.form-status.error {
    display: block;
    color: #c62828;
}

@media (max-width: 991px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-form-block {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 4rem 0 2rem 0;
    border-top: 1px solid var(--color-primary-light);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-left {
    max-width: 400px;
}

.footer-logo {
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-left p {
    font-size: 0.95rem;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-links a {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

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

.copyright {
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .footer-right {
        align-items: flex-start;
        text-align: left;
    }

    .footer-links {
        flex-wrap: wrap;
    }
}

/* --- WhatsApp Sticky Button --- */
.whatsapp-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 0px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: var(--transition-fast);
    animation: pulse-ring 2s infinite;
}

.whatsapp-widget:hover {
    transform: scale(1.1);
    background-color: #128c7e;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--box-shadow-md);
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition-fast);
    pointer-events: none;
}

.whatsapp-widget:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 576px) {
    .whatsapp-widget {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.65rem;
    }
    
    .whatsapp-tooltip {
        display: none; /* Hide tooltip on tiny mobile screens */
    }
}

/* --- Dialog Modals --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    width: 90%;
    max-width: 750px;
    max-height: 85vh;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-lg);
    z-index: 2100;
    overflow: hidden;
    transform: scale(0.9);
    transition: var(--transition-fast);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
    z-index: 2200;
}

.modal-close:hover {
    color: var(--color-accent);
}

.modal-body {
    padding: 3rem;
    overflow-y: auto;
    max-height: 85vh;
}

.modal-body h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.75rem;
}

.modal-body h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .modal-body {
        padding: 2rem;
    }
}

/* --- Custom Animations --- */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 0px rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 0 0 0px rgba(37, 211, 102, 0);
    }
}
