/* MediVorrat Website - Design wie App */

/* === Root Variables === */
:root {
    --primary-blue: #007AFF;
    --purple: #AF52DE;
    --background: #F2F2F7;
    --card-bg: rgba(255, 255, 255, 0.7);
    --text-primary: #000000;
    --text-secondary: #6C6C70;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
}

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

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

/* === Header === */
header {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.3s;
}

nav a:hover {
    opacity: 0.8;
}

/* === Hamburger Menu (Mobile) === */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
}

.mobile-menu-overlay.active {
    display: block;
}

/* === Hero Section === */
.hero {
    padding: 80px 20px;
    text-align: center;
    color: white;
}

.hero h2 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 24px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-image {
    max-width: 300px;
    margin: 0 auto 40px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
}

/* === Glass Card === */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

/* === Features Section === */
.features {
    padding: 80px 20px;
}

.features h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    font-size: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-blue), var(--purple));
    border-radius: 20px;
    color: white;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === Screenshots Section === */
.screenshots {
    padding: 80px 20px;
    text-align: center;
}

.screenshots h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 60px;
    color: white;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.screenshot-item {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.screenshot-item img {
    width: 100%;
    display: block;
}

/* === Download Section === */
.download {
    padding: 80px 20px;
    text-align: center;
}

.download h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: white;
}

.download p {
    font-size: 20px;
    margin-bottom: 40px;
    color: white;
    opacity: 0.9;
}

.app-store-badge {
    display: inline-block;
    transition: transform 0.3s;
}

.app-store-badge:hover {
    transform: scale(1.05);
}

.app-store-badge img {
    height: 60px;
}

/* === Button === */
.btn {
    display: inline-block;
    padding: 16px 32px;
    background: white;
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* === Footer === */
footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    padding: 40px 20px;
    text-align: center;
    margin-top: 80px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 0.8;
}

footer p {
    opacity: 0.8;
    font-size: 14px;
}

/* === Content Pages === */
.content-page {
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.content-page h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: white;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.content-page h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 30px 0 15px;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-page h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 10px;
    color: var(--primary-blue);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-page p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.content-page ul, .content-page ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content-page li {
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* FAQ Styling */
.faq-item {
    margin-bottom: 25px;
}

.faq-question {
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 8px;
    font-size: 18px;
}

.faq-answer {
    color: var(--text-secondary);
    margin-left: 20px;
}

/* === Tables === */
.content-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.content-page table th,
.content-page table td {
    padding: 12px;
    text-align: left;
    word-wrap: break-word;
    word-break: break-word;
}

/* === Responsive === */
@media (max-width: 768px) {
    /* Show Hamburger Button */
    .hamburger {
        display: flex;
    }
    
    /* Convert Tables to List Layout on Mobile */
    .content-page table,
    .content-page table tbody,
    .content-page table tr,
    .content-page table th,
    .content-page table td {
        display: block;
        width: 100%;
    }
    
    /* Hide table header on mobile */
    .content-page table thead {
        display: none;
    }
    
    /* Style each row as a card */
    .content-page table tr {
        margin-bottom: 20px;
        padding: 15px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 12px;
        border: 1px solid rgba(0, 122, 255, 0.2);
    }
    
    /* First cell (Aspekt) - Bold heading */
    .content-page table td:first-child {
        font-weight: 700;
        font-size: 16px;
        color: var(--primary-blue);
        margin-bottom: 8px;
        padding: 0 0 8px 0;
        border-bottom: 1px solid rgba(0, 122, 255, 0.2);
    }
    
    /* Second cell (Details) - Normal text */
    .content-page table td:last-child {
        padding: 8px 0 0 0;
        font-size: 15px;
        line-height: 1.6;
    }
    
    /* Hide Desktop Navigation */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(102, 126, 234, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 99;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 25px;
    }
    
    nav a {
        font-size: 20px;
        display: block;
        padding: 10px 0;
    }
    
    .header-content {
        flex-direction: row;
        gap: 0;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    .features h2,
    .screenshots h2,
    .download h2 {
        font-size: 28px;
    }
    
    .features-grid,
    .screenshots-grid {
        grid-template-columns: 1fr;
    }
    
    /* Content Page Headings - Smaller on Mobile */
    .content-page h1 {
        font-size: 28px;
        padding: 0 10px;
        line-height: 1.3;
    }
    
    .content-page h2 {
        font-size: 20px;
    }
    
    .content-page h3 {
        font-size: 18px;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .glass-card {
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

.hero-image {
    position: relative;
    display: block;
}

.hero-image img.light {
    display: block;
    width: 100%;
}

.hero-image img.dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-image:hover img.dark {
    opacity: 1;
}

/* Screenshot Hover: Light ↔ Dark */
.screenshot-item {
    position: relative;
}

.screenshot-item img.dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-item:hover img.dark {
    opacity: 1;
}

/* Touch Toggle */
.hero-image.show-dark img.dark,
.screenshot-item.show-dark img.dark {
    opacity: 1;
}

/* Hover nur für Geräte mit Maus */
@media (hover: hover) {
    .hero-image:hover img.dark,
    .screenshot-item:hover img.dark {
        opacity: 1;
    }
}

/* Touch-Geräte: Hover deaktivieren, nur Toggle */
@media (hover: none) {
    .hero-image:hover img.dark,
    .screenshot-item:hover img.dark {
        opacity: 0;
    }
    
    .hero-image.show-dark img.dark,
    .screenshot-item.show-dark img.dark {
        opacity: 1;
    }
}