/* Root Variables - Most common values */
:root {
    --color-primary: #0b2540;
    --color-primary-light: #1a365d; /* Slightly lighter primary for text */
    --color-secondary: #22c7d8;
    --color-bg: #f0f4f8;
    --color-surface: #ffffff;
    --color-surface-muted: #e2eef3;
    --color-text: #2d3748;
    --color-muted: #5f738e;
    --color-border: #d1e2eb;
    --color-accent-blue: #0056b3;
    --shadow-rgb: 200, 210, 220;
}

/* Global HTML/Body Styles */
html,
body {
    min-width: 100vw;
    overflow-x: hidden;
    scroll-behavior: smooth; /* Sanftes Scrollen für Anker-Links */
}

/* Sticky Top Banner */
.top-banner {
    background-color: var(--color-primary);
    color: #cbd5e1;
    font-size: 10px;
    letter-spacing: 0.1em;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    /* Tailwind's font-sans and leading-relaxed classes are used on the body tag.
       These CSS properties are typically handled by Tailwind's base styles.
       Explicitly setting them here ensures consistency. */
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    line-height: 1.625; /* Equivalent to Tailwind's leading-relaxed */
}

/* General Link and Button Styles */
a,
.link-primary {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.link-primary:hover {
    color: var(--color-secondary);
}

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

.btn-primary:hover {
    background-color: #0d315d;
}

.btn-outline {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: rgba(34, 199, 216, 0.08);
}

/* Surface and Text Colors */
.surface {
    background-color: var(--color-surface);
}

.surface-muted {
    background-color: var(--color-surface-muted);
}

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

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

.border-system {
    border-color: var(--color-border);
}

/* Layout Overrides */
header, main, footer, #mobileMenu {
    max-width: 100vw;
}

#mobileMenu {
    left: 1rem;
    right: 1rem;
    max-width: calc(100vw - 2rem);
}

/* Article Body Styles (for content loaded via JS or static) */
.article-body h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary-light);
    margin-bottom: 2rem;
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 800; /* Using the bolder weight from legal.html for consistency */
    color: var(--color-text);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 0.5rem;
}

.article-body p {
    margin-bottom: 1.25rem;
    color: var(--color-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

.article-body ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-muted);
}

.article-body li {
    margin-bottom: 0.5rem;
}

/* Focus Ring */
.focus\:ring-blue-500\/20:focus {
    box-shadow: 0 0 0 0.25rem rgba(34, 199, 216, 0.2);
}

/* Animations */
.animate-fade {
    animation: fadeIn 0.5s ease-out forwards;
}

.skeleton-pulse {
    animation: pulse-bg 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Card Styles */
.medical-shadow {
    box-shadow: 0 8px 30px rgba(var(--shadow-rgb), 0.3);
}

.content-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card {
    scroll-margin-top: 130px; /* Mobile: Banner + Header + Puffer für Anker-Links */
}

@media (min-width: 768px) {
    .card {
        scroll-margin-top: 200px; /* Desktop: Größeres Logo + Banner + Puffer für Anker-Links */
    }
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(var(--shadow-rgb), 0.5);
}

/* Dropdown Animation */
.dropdown-menu {
    transition: all 0.2s ease-in-out;
    transform: translateY(10px);
}
.group:hover .dropdown-menu {
    transform: translateY(0);
}

/* Newsletter responsive optimization (from index.html) */
aside > div {
    width: 100%;
    box-sizing: border-box;
}

aside div[class*="rounded-2xl"] {
    width: 100%;
    box-sizing: border-box;
}

/* Tailwind utility class overrides from legal.html */
.text-slate-900, .text-slate-800 { color: var(--color-text); }
.text-slate-600 { color: var(--color-primary); }
.text-slate-500, .text-slate-400 { color: var(--color-muted); }
.text-blue-600 { color: var(--color-secondary); }
.bg-blue-600 { background-color: var(--color-secondary); }

/* Peptid Content Styles (External Fragments) */
.peptid-artikel h2 {
    /* Farbe wird nun über Tailwind-Klassen im HTML gesteuert (z.B. text-blue-900) */
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.peptid-artikel h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.peptid-artikel .fokus {
    background-color: var(--color-surface-muted);
    padding: 1.25rem;
    border-radius: 1rem;
    border-left: 4px solid var(--color-secondary);
    margin-bottom: 2rem;
    font-style: italic;
}

.peptid-artikel ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.peptid-artikel li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.peptid-artikel li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--color-secondary);
    font-weight: bold;
}

/* Desktop-Styles für Peptid-Tabellen (Anwendung & Dosierung) */
.peptid-table-wrapper {
    margin: 2em 0;
    overflow-x: auto;
}
.peptid-table {
    width: 100%;
    border-collapse: collapse;
    line-height: 1.5;
    font-size: 0.95em;
}
.peptid-table th, .peptid-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 15px;
    vertical-align: top;
}
.peptid-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-align: left;
    color: #333;
}
.peptid-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}
.peptid-table tbody tr:hover {
    background-color: #f1f5f9;
}

/* Mobile-Optimierung für Tabellen (Anwendung & Dosierung) in Peptid-Artikeln */
@media (max-width: 900px) {
    .peptid-table {
        display: block;
        width: 100%;
        background: transparent;
        border: none;
    }
    .peptid-table thead {
        display: none;
    }
    .peptid-table tbody, 
    .peptid-table tr, 
    .peptid-table td {
        display: block;
        width: 100%;
    }
    .peptid-table tr {
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 16px;
        margin-bottom: 24px;
        padding: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        overflow: hidden;
    }
    .peptid-table td {
        border: none;
        padding: 16px 20px;
        margin-bottom: 0;
        border-bottom: 1px solid #e2e8f0;
        white-space: normal;
        text-align: left;
    }
    .peptid-table td:nth-child(1) {
        background-color: #f8fafc;
        border-bottom: 2px solid #e2e8f0;
        padding: 14px 20px;
    }
    .peptid-table td:nth-child(2)::before {
        content: "Spezifikation";
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #64748b;
        font-weight: 800;
        margin-bottom: 6px;
    }
    .peptid-table td:nth-child(3)::before {
        content: "Anwendungshinweise & Tipps";
        display: block;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: #64748b;
        font-weight: 800;
        margin-bottom: 6px;
    }
    .peptid-table td:last-child {
        border-bottom: none;
    }
    .peptid-table td strong {
        color: #1a365d;
        font-size: 1.1rem;
        margin-bottom: 0;
        display: inline-block;
    }
    /* Entfernt horizontales Scrollen der Wrapper */
    [class*="overflow-x-auto"],
    .peptid-table-wrapper {
        overflow-x: visible !important;
        border: none !important;
        box-shadow: none !important;
    }
}

.status-report {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-left: 6px solid var(--color-accent-blue);
    padding: 20px;
    margin-top: 30px;
    border-radius: 4px;
}

.status-report h4 {
    margin-top: 0;
    color: var(--color-accent-blue);
    margin-bottom: 1rem;
}

.status-item {
    font-size: 0.95em;
    margin-bottom: 10px;
    line-height: 1.5;
    color: var(--color-text);
}

.status-item:last-child {
    margin-bottom: 0;
}

/* Protocol Note (Wichtige Hinweise) styling for all individual peptide pages */
.protocol-note {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 6px solid #f59e0b;
    padding: 20px;
    margin-top: 30px;
    border-radius: 4px;
}

.protocol-note strong {
    color: #92400e;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.protocol-note p {
    font-size: 0.95em;
    line-height: 1.5;
    color: var(--color-text);
    margin-bottom: 10px;
}

.protocol-note p:last-child {
    margin-bottom: 0;
}

/* Search Results Dropdown Animation */
#search-results-dropdown {
    /* Standard-Zustand (wenn sichtbar) */
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    pointer-events: auto; /* Ermöglicht Klicks */
}

#search-results-dropdown.hidden {
    /* Zustand, wenn die 'hidden'-Klasse aktiv ist */
    /* Überschreibt Tailwind's 'display: none;' für Animationen */
    display: block !important; 
    opacity: 0;
    transform: translateY(-10px); /* Startet leicht oberhalb */
    visibility: hidden;
    pointer-events: none; /* Verhindert Klicks, wenn ausgeblendet */
}