/* Main CSS for Seifert Aviation Software Website */

/* Font Face Definitions - Google Fonts Option */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

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

/* Color Variables */
:root {
    --primary-dark: #0A2540;
    --primary-darker: #051729; /* Neue Variable für Cookie-Banner und Header */
    --primary-medium: #4A90A4;
    --primary-light: #5DADE2;
    --accent-orange: #FF8C00;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --dark-gray: #333333;
}

/* Typography */
body {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #333333;
    background-color: #FFFFFF;
}

h1 {
    font-size: 2.5rem (40px);
    font-weight: bold;
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem (32px);
    font-weight: bold;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.5rem (24px);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #4A90A4;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FF8C00;
}

/* Color Scheme */
:root {
    --primary-dark: #0A2540;
    --primary-medium: #4A90A4;
    --primary-light: #5DADE2;
    --accent-orange: #FF8C00;
    --white: #FFFFFF;
    --light-gray: #F5F5F5;
    --dark-gray: #333333;
}

/* Container */
.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Sections */
section {
    padding: 80px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-medium);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: var(--accent-orange);
    transform: translateY(-2px);
}

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

.btn-primary:hover {
    background-color: var(--primary-medium);
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* Fallback */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    overflow-x: hidden; /* Verhindert nur horizontales Überlaufen */
    overflow-y: visible; /* Erlaubt vertikales Scrollen/Anzeigen */
}

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

/* Word-wrapping for all card content */
.card p,
.card h3,
.card h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word; /* Fallback */
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Hero Section */
.hero {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
}

/* Startseite: Fullscreen Hero */
.hero.fullscreen {
    min-height: calc(100vh - 70px);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Unterseiten: Reduziertes Padding */
.hero.page-header {
    padding: 60px 0;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* App Icons */
.app-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem; /* Gleichmäßiger Abstand zwischen den Icons */
    width: 100%;
    height: calc(100vh - 70px); /* Volle Höhe minus Header */
    padding: 0;
    overflow: visible; /* Verhindert Abschneiden des Box-Shadow (Orange Glow) */
}

.app-icon {
    width: clamp(300px, 50%, 640px); /* Mindestens 300px, bevorzugt 50%, maximal 640px */
    height: clamp(400px, 80vh, 800px); /* Mindestens 400px, bevorzugt 80vh, maximal 800px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    cursor: pointer;
    padding: 3rem; /* Erhöht für ausreichend Platz für Box-Shadow (60px blur) */
    position: relative; /* Für Popup-Positionierung */
    overflow: visible; /* Verhindert Abschneiden des Box-Shadow */
}

/* Desktop: Hover-Effekt bleibt bestehen */
@media (hover: hover) and (pointer: fine) {
    .app-icon:hover {
        transform: scale(1.1); /* Stärkerer Zoom-Effekt */
        z-index: 10;
    }

    .app-icon:hover img {
        filter: brightness(1.1); /* Leichte Aufhellung */
    }
}

/* Mobile/Touch: Scroll-basierte Aktivierung mit .active-Klasse */
@media (hover: none) and (pointer: coarse) {
    .app-icon.active {
        transform: scale(1.15);
        z-index: 10;
    }

    .app-icon.active img {
        filter: brightness(1.15) saturate(1.05);
    }
}

.app-icon img {
    width: 100%; /* Icons nehmen volle Breite des Containers ein */
    height: 100%; /* Icons nehmen volle Höhe des Containers ein */
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Behält Seitenverhältnis bei */
    border-radius: 30px; /* Stärker abgerundete Ecken */
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}


/* Features Section */
.features {
    background-color: var(--light-gray);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-item h3 {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

/* Stats Section */
.stats {
    background-color: var(--primary-dark);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--accent-orange);
    margin-bottom: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-medium);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Contact Card - Structured Design */
.contact-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.contact-card h2 {
    margin-bottom: 0.8rem;
    color: var(--primary-dark);
}

.contact-intro {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

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

.contact-item {
    margin-bottom: 0;
}

.contact-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.contact-value {
    margin-top: 0;
}

.contact-value p {
    margin: 0 0 0.5rem 0;
    line-height: 1.6;
    color: var(--dark-gray);
}

.contact-value a {
    color: var(--primary-medium);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.contact-value a:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

/* Two-column layout for medium screens and up */
@media (min-width: 992px) {
    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Ensure both cards have same height and styling */
.feature-grid .card {
    display: flex;
    flex-direction: column;
}

.feature-grid .card h2 {
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

/* Responsive adjustments for contact card */
@media (max-width: 768px) {
    .contact-item {
        padding: 1rem 0;
    }
    
    .contact-text {
        text-align: left;
    }
}

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

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

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

.hidden {
    display: none;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-darker);
    color: var(--white);
    padding: 1rem;
    z-index: 1000;
    display: none; /* Hidden by default */
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.cookie-banner.show {
    display: flex;
    animation: slideUp 0.5s ease;
}

.cookie-banner.hide {
    animation: slideDown 0.5s ease forwards;
}

.cookie-banner[aria-hidden="true"] {
    display: none !important;
}

.cookie-banner[aria-hidden="false"] {
    display: flex;
}

.cookie-banner p {
    margin: 0;
    flex: 1;
    min-width: 250px;
}

.cookie-banner .btn {
    margin-left: 0.5rem;
    white-space: nowrap;
}

/* Slide-Up Animation (show) */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide-Down Animation (hide) */
@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Responsive adjustments for cookie banner */
@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .cookie-banner p {
        margin-bottom: 1rem;
        min-width: auto;
        margin-right: 0;
    }
    
    .cookie-banner .btn {
        margin: 0.25rem;
        width: 100%;
        max-width: 200px;
    }
}

/* Checkbox Styling */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: var(--white);
    border: 2px solid var(--primary-medium);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: var(--light-gray);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-medium);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}