/* General Styles */
/*:root {
    --darkmode-background: rgba(0,0,0, 1);
}
*/

html {
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    background-color: #ffffff;
}

body.body-no-scroll {
    overflow: hidden;
    touch-action: none;
}
.h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.p {
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.white {
    color: #ffffff;
}

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

/* Navigation */
.header {
    position: relative;
    height: 5rem;
    width: 100%;
    backdrop-filter: blur(10px);
}

.header-container {
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    padding: 0.5rem;
    height: 2rem;
    display: block;
}

.header-title {
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    color: #9ca3af;
}

/* Footer DSGVO (Datenschutz-Seite) */
.footer-DSGVO {
    position: relative;
    height: 3rem;
    width: 100%;
    backdrop-filter: blur(10px);
}

.footer-container {
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: bold;
    text-align: center;
    color: #6b6b6b;
}

/* Opener Showcase - Grid Layout */
.opener-section {
    position: relative;
    width: 100%;
    min-height: 140vh;
    padding-top: 64px;
    background: linear-gradient(
        to bottom,
        white 0%,
        white 60%,
        black 100%
    );
}

.opener-grid {
    display: grid;
    grid-template-rows: 1.9fr auto 1fr;
    min-height: calc(100vh - 64px);
    align-items: stretch;
}

.opener-grid .spacer-top {
    height: 100%; /* Wird durch Grid automatisch berechnet */
}

.opener-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.opener-content h1 {
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1);
    margin: 0;
}

.opener-grid .spacer-bottom {
    height: 100%;
}

/* Display Section - Grid Layout */
.display-section {
    position: relative;
    min-height: 100vh;
    background-color: #000000;
    overflow: hidden;
}

.display-section .background-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url("../images/Smoke4.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scaleX(-1) scale(1.2);
    transform-origin: center;
    z-index: 0;
}

.display-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: 0.5fr auto 1fr;
    min-height: 100vh;
    align-items: stretch;
}

.display-grid .spacer-top {
    height: 100%;
}

.display-content {
    padding: 2rem;
}

.display-columns {
    display: flex;
    width: 100%;
    gap: 2rem;
}

.display-left-column {
    flex: 0 0 40%;
    /* Platzhalter - linke Spalte bis zur Mitte */
}

.display-right-column {
    flex: 1;
    text-align: left;
}

.display-right-column h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.7rem;
}

.display-right-column p {
    font-size: 1.0rem;
    margin-bottom: 2rem;
}

.display-grid .spacer-bottom {
    height: 100%;
}

/* Explanation Section - Grid Layout */
.explanation-section {
    position: relative;
    min-height: 100vh;
    background-image: url("../images/Seitenansicht4.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.explanation-grid {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    min-height: 60vh;
    align-items: stretch;
}

.explanation-grid .spacer-top {
    height: 10%;
}

.explanation-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Text Block - Gemeinsame Styles */
.text-block {
    padding: 1.5rem;
}

.text-block h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.text-block p {
    font-size: 1rem;
    line-height: 1.6;
}

.explanation-content .text-block {
    padding-bottom: 5rem;
    padding-top: 5rem;
}

.explanation-content .spacer-mid {
    height: 25rem; /* Abstand zwischen den text-blocks */
}

.explanation-grid .spacer-bottom {
    height: 100%;
}

.explanation-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.explanation-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.explanation-content p {
    font-size: 1rem;
    line-height: 1.6;
}

/* History Section - Grid Layout */
.history-section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.video-background-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: #dddddd;
    z-index: 0;
}

.video-background-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: #eaeaea;
    z-index: 0;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 120vh;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

.video-trigger {
    position: absolute;
    width: 100%;
    height: 64vh;
    z-index: 9999;
    transform: translate(-50%, -50%);
}

.history-grid {
    position: relative;
    display: grid;
    grid-template-rows: 0fr auto 0fr;
    min-height: 100vh;
    align-items: stretch;
    z-index: 0;
}

.history-grid .spacer-top {
    height: 100%;
}

.history-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    z-index: 3;
}

.history-content .spacer-mid {
    height: 32rem; /* Abstand zwischen den text-blocks */
}

.history-grid .spacer-bottom {
    height: 100%;
}

.contact-text {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    text-align: center;
    text-shadow: none;
}

#hoverVideo {
    object-fit: cover;
    object-position: center;
    z-index: 2;
}

/* ========================================
   POPUP FORMULAR (innerhalb History Section)
   ======================================== */

/* Pop-up Overlay */
.popup-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height für Mobile Browser */
    background: rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem 1rem 6rem 1rem;
    overflow-y: auto;
    box-sizing: border-box;
}

.popup-form {
    position: relative;
    background: #f5f5f5;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    max-height: 85dvh;
    padding: 2rem 2.5rem;
    border-radius: 0.5rem;
    margin: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    color: #000;
}

.popup-form h2 {
    margin-top: 0;
    text-align: center;
    color: #202a38;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group:has(input[type="checkbox"]) {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.form-group:has(input[type="checkbox"]) .button {
    grid-column: 1 / -1;
    justify-self: start;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border-radius: 0.3rem;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin-top: 0.3rem;
    margin-bottom: 0.7rem;
    box-sizing: border-box;
}

label {
    margin-left: 0.5rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

input[type="checkbox"] {
    margin-right: 0;
    vertical-align: top;
    margin-top: 0.3rem;
    flex-shrink: 0;
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

input[type="checkbox"] + label {
    display: block;
    margin-left: 0;
    margin-bottom: 0;
}

.contactForm .label {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 600;
}

#message {
    height: 150px;
    resize: vertical;
    font-family: Arial, Helvetica, sans-serif;
}

.error-message {
    color: red;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Footer */

.footer {
    background-color: #dddddd;
    padding: 2rem 1rem 0.5rem;
    position: relative;
    z-index: 10;
}

.footer-container {
    margin: 0 auto;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 800px;
}

.footer-content li {
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0.5rem 0;
}

.footer-content p {
    margin: 0;
    padding: 0;
    color: #9ca3af;
    word-wrap: break-word;
}

.footer-links-container {
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 1rem 0;
    color: #9ca3af;
}

.footer-links-container a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links-container a:hover {
    color: #000;
}

/* Tablet Warning Banner */
.tablet-warning {
    background: linear-gradient(135deg, #c4c4c4 0%, #2e2e2e 100%);
    color: #ffffff;
    padding: 1rem 2rem;
    text-align: center;
    position: relative;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tablet-warning p {
    margin: 0;
    font-size: clamp(.8rem, 1rem, 1.1rem);
    line-height: 1.5;
}

.tablet-warning strong {
    font-weight: bold;
}

/* Model Container Overlay */
#model-container {
    position: fixed;
    top: 0vh; /* Direkte Positionierung: 0vh = oben, 50vh = mitte, 100vh = unten */
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    pointer-events: none;
}

.video-trigger {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;      
    height: 64vh;     
    z-index: 2;
    background: transparent;
    transform: translate(-50%, -50%);
}

/* Kontaktbereich */
.positioncontainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 3rem;
}

.text-container {
    z-index: 11;
}

.button-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    z-index: 11; 
}

.button {
    background-color: #fff;
    border-color: #9ca3af;
    border-width: 2px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.button[type="submit"] {
    display: block;
    margin: 2rem auto 0 auto;
}

.button:hover {
    background-color: #bbbbbb;
    color: black;
}

button:not(:disabled), [type="button"]:not(:disabled), [type="reset"]:not(:disabled), [type="submit"]:not(:disabled) {
    cursor: pointer;
}

.impressum-container {
    height: auto;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 0.5rem;
    align-content: center;
    text-align: center;
    vertical-align: middle;
}

.impressum-container h1 {
    font-size: 3rem;
    color: #202a38;
    margin-bottom: 10rem;
    margin-top: 6rem;
}

.impressum-container strong {
    font-weight: bold;
    color: #202a38;
    font-size: 1.2rem;
}

.light{
    font-size: 1rem;
    color: #dbdbdb;
}

.impressum-container .button {
    background-color: #202a38;
    color: #ffffff;
    text-decoration: none;
    margin-top: 2rem;
    display: inline-block;
}

.impressum-container p {
    margin: 1rem 5rem; /* Oben/Unten: 1rem, Links/Rechts: 5rem */
}

.impressum-container li{
    text-align: justify;
    margin: 1rem 20rem; /* Oben/Unten: 1rem, Links/Rechts: 20rem */
}

.impressum-container .button:hover {
    background-color: #7a9fd3;
    color: black;
    
}

.impressum-container .spacer{
    height: 4rem;
}

/* ========================================
   RESPONSIVE DESIGN - MEDIA QUERIES
   ======================================== */

/* Mobile (bis 768px) */
@media screen and (max-width: 768px) {
    /* Header */
    .header {
        height: 5rem;
    }

    .header-container {
        height: 5rem;
        padding: 0 1rem;
    }

    .header-logo {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
    }

    /* Footer DSGVO */
    .footer-DSGVO {
        height: 5rem;
    }

    .footer-container {
        height: 5rem;
        padding: 0 1rem;
    }

    .footer-logo {
        font-size: clamp(1rem, 1.2rem, 1.5rem);
    }

    /* Opener Section */
    .opener-section {
        padding-top: 1rem;
    }

    .opener-content h1 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
        padding: 1rem;
    }

    .opener-grid {
        grid-template-rows: 3fr auto 1fr;
    }

    /* Display Section */
    .display-section .background-image {
        background-repeat: no-repeat;
        overflow: hidden;

    }

    .display-content {
        padding: clamp(1rem, 1.25rem, 1.5rem);
    }

    .display-columns {
        flex-direction: column;
    }

    .display-left-column {
        display: none;
    }

    .display-right-column h2 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
        margin-bottom: 0.5rem;
        text-align: center;
    }

    .display-right-column p {
        font-size: clamp(.8rem, 1rem, 1.1rem);
        line-height: 1.4;
        text-align: center;
    }

    .display-grid {
        grid-template-rows: 3fr auto 1fr;
    }

    /* Explanation Section */
    .explanation-section {
        background-image: url("../images/Seitenansicht-mobile2.png");
        background-size: cover;
        background-position: center center;
    }

    .explanation-content {
        padding: clamp(1rem, 1.25rem, 1.5rem);
    }

    .explanation-content .background-image {
        background-size: cover;
    }

    .explanation-content .text-block {
        padding-bottom: 2rem;
        padding-top: 2rem;
    }

    .explanation-content h3 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
    }

    .explanation-content p {
        font-size: clamp(.8rem, 1rem, 1.1rem);
        line-height: 1.5;
        text-align: justify;
    }

    .explanation-content .spacer-mid {
        height: 10rem;
    }

    .explanation-grid {
        grid-template-rows: .3fr auto 1fr;
        min-height: 80vh;
    }

    /* History Section */
    .history-section {
        background-color:#dcdcdc;
    }

    .history-content {
        padding: clamp(1rem, 1.25rem, 1.5rem);
        position: relative;
    }

    .text-block h2 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
    }

    .text-block p {
        font-size: clamp(.8rem, 1rem, 1.1rem);
        line-height: 1.5;
        text-align: justify;
    }

    .history-grid {
        grid-template-rows: 1fr auto 0fr;
    }

    #hoverVideo {
        object-fit: cover;
        object-position: 48% 10rem;
        z-index: 2; /* Video über dem grauen Hintergrund */
    }

    .history-content .positioncontainer {
        margin-top: 1rem;
        padding-bottom: 2rem;
    }

    .kontaktaufforderung {
        font-size: clamp(.8rem, 1rem, 1.1rem);
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        text-align: justify;
    }

    /* Button */
    .button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Popup Form */
    .popup-form {
        width: 80%;
        max-width: 500px;
        padding: 1.25rem 1rem;
        border-radius: 0.3rem;
        box-sizing: border-box;
    }

    .popup-close {
        font-size: 2rem;
        width: 2rem;
        height: 2rem;
        top: 0.5rem;
        right: 0.5rem;
    }

    .popup-form h2 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
        margin-bottom: 1rem;
    }

    .form-control {
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    label {
        font-size: 0.9rem;
    }

    #message {
        height: 120px;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem 0rem;
        min-height: 160px;
    }

    .footer-content li {
        padding: 0.4rem 0;
    }

    .footer-content p {
        font-size: clamp(.8rem, 1rem, 1.1rem);
        text-align: center;
    }

    .footer-content h3 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
    }

    /* Impressum */
    .impressum-container {
        padding: 1rem;
    }

    .impressum-container h1 {
        font-size: clamp(1.5rem, 1.8rem, 2rem);
        margin-bottom: clamp(3rem, 8vw, 5rem);
        margin-top: 2rem;
    }

    .impressum-container strong {
        font-size: 1rem;
    }

    .impressum-container .button {
        margin-top: 5rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Model Container - overflow entfernt um Abschneiden zu verhindern */
    #model-container canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }
}

/* Smartphones unter 410px */
@media screen and (max-width: 410px) {
    .explanation-section {
        background-image: url("../images/Seitenansicht-mobile2.png");
        background-size: cover;
        background-position: center;
    }
    
    .explanation-content {
        padding: clamp(0.75rem, 1rem, 1.25rem);
    }

    .explanation-content .text-block {
        padding-bottom: 1.5rem;
        padding-top: 1.5rem;
    }

    .explanation-content h3 {
        font-size: clamp(1.25rem, 1.5rem, 1.75rem);
    }

    .explanation-content p {
        font-size: clamp(0.75rem, 0.9rem, 1rem);
        line-height: 1.4;
    }

    .explanation-content .spacer-mid {
        height: 10rem !important;
    }

    #hoverVideo {
        object-fit: cover;
        object-position: 48% 14rem;
        z-index: 2; /* Video über dem grauen Hintergrund */
    }
}