/**
 * Modern CSS3 Stylesheet
 * Color Palette: Orange, Green, White
 * Layout: Flow Layout with Flexbox
 */

/* CSS Variables for Color Palette */
:root {
    --color-orange: #ff9f3e;
    --color-orange-light: #ffb366;
    --color-orange-dark: #e68a2e;
    --color-green: #569b4a;
    --color-green-light: #6fb563;
    --color-green-dark: #457a3a;
    --color-white: #FFFFFF;
    --color-white-off: #F8F9FA;
    --color-text-dark: #2C3E50;
    --color-text-light: #FFFFFF;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-white);
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Page Header */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding: 1.5rem 0;
    z-index: 100;
    background: var(--color-white);
}

.page-header h1 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-green);
    margin: 0;
    letter-spacing: 0.05em;
}

/* Home Button */
.home-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding-left: 0.5rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.home-button:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.8;
}

.home-button:active {
    transform: translateY(-50%) scale(0.95);
}

.home-button svg {
    width: 24px;
    height: 24px;
}

/* Arrow Button */
.arrow-button {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.arrow-button:hover {
    transform: translateY(-50%) scale(1.1);
    opacity: 0.8;
}

.arrow-button:active {
    transform: translateY(-50%) scale(0.95);
}

.arrow-button svg {
    width: 24px;
    height: 24px;
}

/* Main Content Container */
.main-content {
    height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 0;
    margin: 0;
    margin-top: 0;
    padding-top: 0;
}

.container {
    display: flex;
    flex-flow: row nowrap;
    gap: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: stretch;
}

/* Component Styles - Flow Layout */
.component {
    width: 375px;
    height: 60vh;
    background: var(--color-white);
    border-radius: 0;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                z-index 0s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    align-self: center;
    transform: rotate(5deg);
}

.component::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--color-orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.component:hover {
    height: 100vh;
    box-shadow: var(--shadow-lg);
    z-index: 10;
}

.component:hover::before {
    transform: scaleX(1);
}

/* Component Images */
.component-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.component-image-closed {
    opacity: 1;
}

.component-image-open {
    opacity: 0;
}

.component-1:hover .component-image-closed {
    opacity: 0;
}

.component-1:hover .component-image-open {
    opacity: 1;
}

.component-2:hover .component-image-closed {
    opacity: 0;
}

.component-2:hover .component-image-open {
    opacity: 1;
}

.component-3:hover .component-image-closed {
    opacity: 0;
}

.component-3:hover .component-image-open {
    opacity: 1;
}

.component-4:hover .component-image-closed {
    opacity: 0;
}

.component-4:hover .component-image-open {
    opacity: 1;
}

/* Individual Component Color Themes */
.component-1 {
    border-top: 4px solid var(--color-orange);
}

.component-1:hover {
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(255, 159, 62, 0.05) 100%);
}

/* Component 1: Hide content in closed state, show on hover */
.component-1 .component-content {
    position: relative;
    z-index: 3;
}

.component-2 {
    border-top: 4px solid var(--color-green);
}

.component-2:hover {
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(86, 155, 74, 0.05) 100%);
}

.component-3 {
    border-top: 4px solid var(--color-orange);
}

.component-3:hover {
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(255, 159, 62, 0.05) 100%);
}

.component-4 {
    border-top: 4px solid var(--color-green);
}

.component-4:hover {
    background: linear-gradient(135deg, var(--color-white) 0%, rgba(86, 155, 74, 0.05) 100%);
}

/* Component Content Wrapper */
.component-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
    color: inherit;
    pointer-events: none;
}

.component:hover .component-content {
    pointer-events: auto;
    cursor: pointer;
}

/* Component 1: Vertikal zentriert im geschlossenen Zustand, 40% Abstand oben im geöffneten Zustand */
.component-1 .component-content {
    justify-content: center;
    position: absolute;
    top: 10%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    transition: top 0.4s ease, transform 0.4s ease;
}

.component-1:hover .component-content {
    top: 5%;
    transform: translateY(0);
}

/* Component 2: Vertikal top-align im geschlossenen Zustand, 40% Abstand oben im geöffneten Zustand */
.component-2 .component-content {
    justify-content: flex-start;
    padding-top: 2.5rem;
    position: absolute;
    top: 2.5rem;
    left: 0;
    right: 0;
    z-index: 3;
    transition: top 0.4s ease, transform 0.4s ease;
}

.component-2:hover .component-content {
    top: 50%;
    transform: translateY(0);
    padding-top: 0;
}

/* Component 3: Vertikal zentriert im geschlossenen Zustand, 40% Abstand oben im geöffneten Zustand */
.component-3 .component-content {
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    transition: top 0.4s ease, transform 0.4s ease;
    z-index: 3;
}

.component-3:hover .component-content {
    top: 5%;
    transform: translateY(0);
}

/* Component 4: Vertikal bottom-align im geschlossenen Zustand, 40% Abstand oben im geöffneten Zustand */
.component-4 .component-content {
    justify-content: flex-start;
    padding-top: 2.5rem;
    position: absolute;
    top: 2.5rem;
    left: 0;
    right: 0;
    z-index: 3;
    transition: top 0.4s ease, transform 0.4s ease;
}

.component-4:hover .component-content {
    top: 45%;
    transform: translateY(0);
}

/* Component Icon */
.component-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.2s, 
                transform 0.3s ease 0.2s;
}

.component:hover .component-icon {
    opacity: 1;
    transform: translateY(0) scale(1.1) rotate(5deg);
}

/* Component Heading */
.component h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.25s, 
                transform 0.3s ease 0.25s;
}

.component:hover h2 {
    opacity: 1;
    transform: translateY(0);
}

.component-1 h2,
.component-3 h2 {
    color: var(--color-orange-dark);
}

.component-2 h2,
.component-4 h2 {
    color: var(--color-green-dark);
}

/* Component Paragraph */
.component p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    flex: 1;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease 0.3s, 
                transform 0.3s ease 0.3s;
}

.component:hover p {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1600px) {
    .component {
        width: calc(25vw);
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .component {
        width: 100%;
        height: 25vh;
    }
}

/* Print Styles */
@media print {
    .component {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Content Page Styles */
.content-main {
    margin-top: 0px;
    padding: 0;
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow-y: auto;
    flex: 1;
}

.content-container {
    min-height: 400px;
    padding: 3rem 2rem;
    background: var(--color-white);
    border-radius: 0;
    box-shadow: var(--shadow-md);
    scroll-margin-top: 100px;
}

.content-container h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--color-text-dark);
}

.content-container p {
    font-size: 1rem;
    line-height: 1.8;
    color: #666;
}

/* Leistungen List */
.leistungen-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leistungen-list li {
    font-size: 1rem;
    line-height: 2;
    color: var(--color-text-dark);
    padding-left: 1.5rem;
    position: relative;
}

.leistungen-list li::before {
    content: "◦";
    position: absolute;
    left: 0;
    color: var(--color-orange);
    font-size: 1.2rem;
}

.angebote-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.angebote-list li {
    font-size: 1rem;
    line-height: 2;
    color: var(--color-text-dark);
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.angebote-list li::before {
    content: "◦";
    position: absolute;
    left: 0;
    color: var(--color-green);
    font-size: 1.2rem;
}

.domains-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 1.5rem;
}

.domains-list li {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #666;
    padding-left: 1rem;
    position: relative;
}

.domains-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-green);
    font-size: 0.9rem;
}

#leistungen {
    border-top: 4px solid var(--color-green);
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 3.5rem;
}

#leistungen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

#leistungen h2 {
    color: var(--color-white);
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

#leistungen h3 {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#leistungen h3:first-of-type {
    margin-top: 0;
}

#leistungen p {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Zweispaltiges Layout für Absätze nach h3 */
#leistungen h3 + p {
    margin-bottom: 1rem;
}

/* Responsive: Padding-Anpassungen */
@media (max-width: 1024px) {
    #leistungen {
        padding: 3rem 3rem;
    }
}

@media (max-width: 768px) {
    #leistungen {
        padding: 2rem 2rem;
    }
}

/* Call-to-Action Boxen für wichtige Informationen */
#leistungen .highlight-box {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

#leistungen .highlight-box p {
    column-count: 1;
    margin-bottom: 0;
    font-weight: 500;
}

#leistungen .leistungen-list {
    position: relative;
    z-index: 2;
}

#leistungen .leistungen-list li {
    color: var(--color-white);
    font-size: 1.25rem;
}

#leistungen .leistungen-list li::before {
    color: var(--color-white);
}

#angebote {
    border-top: 4px solid var(--color-orange);
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 3.5rem;
    text-align: right;
}

#angebote::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

#angebote h2 {
    color: var(--color-white);
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

#angebote h3 {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-right: 4px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: right;
}

#angebote h3:first-of-type {
    margin-top: 0;
}

#angebote p {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    line-height: 1.6;
    margin-bottom: 1rem;
}

#angebote .highlight-box {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

#angebote .highlight-box p {
    margin-bottom: 0;
    font-weight: 500;
}

#angebote strong {
    color: var(--color-white);
    font-weight: 600;
}

#angebote .angebote-list {
    position: relative;
    z-index: 2;
}

#angebote .angebote-list li {
    color: var(--color-white);
    font-size: 1.25rem;
}

#angebote .angebote-list li::before {
    color: var(--color-white);
}

#angebote .domains-list {
    text-align: right;
    list-style-position: inside;
}

#angebote .domains-list li {
    color: var(--color-white);
    text-align: right;
}

#angebote .domains-list li::before {
    color: var(--color-white);
}

#ueberuns {
    border-top: 4px solid var(--color-green);
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 3.5rem;
}

#ueberuns::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

#ueberuns h2 {
    color: var(--color-white);
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

#ueberuns p {
    color: var(--color-white);
    font-size: 1.25rem;
    position: relative;
    z-index: 2;
}

/* References Masonry Layout */
.references-grid {
    column-width: 250px;
    column-gap: 2rem;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.reference-tile {
    break-inside: avoid;
    margin-bottom: 2rem;
    width: 250px;
    height: 250px;
    box-sizing: border-box;
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    text-decoration: none;
    color: inherit;
}

.reference-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.reference-tile img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .references-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .references-grid {
        column-count: 1;
    }
}

#impressum {
    border-top: 4px solid var(--color-orange);
    background: linear-gradient(135deg, var(--color-orange) 0%, var(--color-orange-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 2.5rem 3.5rem;
    text-align: right;
}

#impressum::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    z-index: 1;
}

#impressum h2 {
    color: var(--color-white);
    font-size: 2.5rem;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
}

#impressum h3 {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-right: 4px solid rgba(255, 255, 255, 0.3);
    border-left: none;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: right;
}

#impressum h3:first-of-type {
    margin-top: 0;
}

#impressum h4 {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-align: right;
}

#impressum h5 {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-align: right;
}

#impressum p {
    color: var(--color-white);
    position: relative;
    z-index: 2;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: right;
}

#impressum .email-link {
    color: var(--color-white);
    text-decoration: underline;
    transition: opacity 0.3s ease;
}

#impressum .email-link:hover {
    opacity: 0.8;
}

/* Contact Form Styles */
.contact-form {
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
    text-align: right;
}

.contact-form-iframe {
    width: 100%;
    min-height: 600px;
    border: none;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    margin-bottom: 3rem;
    background: transparent;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: right;
}

.contact-form label {
    display: block;
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    text-align: right;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.15);
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

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

.submit-button {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.submit-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-form input.error,
.contact-form textarea.error {
    border-color: rgba(255, 107, 53, 0.6);
    background: rgba(255, 107, 53, 0.1);
}

.form-message {
    position: relative;
    z-index: 2;
}

/* Content Page Body Override */
.content-main {
    overflow-y: auto;
}

body .content-main {
    height: calc(100vh - 80px);
}

