/**
 * Serie Single Template Styles
 * 
 * Diese Datei kann optional ins Child-Theme integriert werden.
 * Dann können die Inline-Styles aus single-serie.php entfernt werden.
 * 
 * @package GeneratePress Child - Content Directory
 * @since 3.0
 */

/* ============================================
   CSS Variables
   ============================================ */
.cd-serie-single {
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-secondary: #64748b;
    --color-border: #e2e8f0;
    --color-bg-light: #f8fafc;
    --color-text: #1e293b;
    --radius: 12px;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

/* ============================================
   Hero Section
   ============================================ */
.cd-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    color: white;
    margin-bottom: 3rem;
}

.cd-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.6), rgba(0,0,0,0.8));
}

.cd-hero__content {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
    z-index: 1;
}

.cd-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.cd-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.cd-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.95;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.cd-meta-item svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.cd-hero__description {
    max-width: 700px;
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cd-hero__description p {
    margin: 0 0 1rem 0;
}

.cd-hero__description p:last-child {
    margin-bottom: 0;
}

.cd-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ============================================
   Buttons
   ============================================ */
.cd-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.cd-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.cd-btn--primary {
    background: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.cd-btn--primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cd-btn--secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}

.cd-btn--secondary:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* ============================================
   Container & Layout
   ============================================ */
.cd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cd-content {
    padding-bottom: 4rem;
}

/* ============================================
   Sections
   ============================================ */
.cd-section {
    margin-bottom: 3rem;
}

.cd-section__title {
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text);
}

/* ============================================
   Production Grid
   ============================================ */
.cd-production-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.cd-production-item {
    background: var(--color-bg-light);
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.cd-production-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow);
}

.cd-production-item--full {
    grid-column: 1 / -1;
}

.cd-production-item__label {
    font-weight: 600;
    color: var(--color-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cd-production-item__value {
    color: var(--color-text);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ============================================
   Staffel Grid
   ============================================ */
.cd-staffel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.cd-staffel-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--color-border);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cd-staffel-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

.cd-staffel-card__image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.cd-staffel-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 100%);
    opacity: 0;
    transition: var(--transition);
}

.cd-staffel-card:hover .cd-staffel-card__image::after {
    opacity: 1;
}

.cd-staffel-card__image--placeholder {
    background: linear-gradient(135deg, var(--color-primary) 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cd-staffel-card__number {
    font-size: 4rem;
    font-weight: 800;
    color: white;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.cd-staffel-card__content {
    padding: 1.5rem;
}

.cd-staffel-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.cd-staffel-card__title a {
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

.cd-staffel-card__title a:hover {
    color: var(--color-primary);
}

.cd-staffel-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-secondary);
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cd-staffel-card__meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.cd-staffel-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition);
}

.cd-staffel-card__link:hover {
    text-decoration: underline;
    gap: 0.75rem;
}

.cd-staffel-card__link svg {
    transition: transform 0.2s ease;
}

.cd-staffel-card__link:hover svg {
    transform: translateX(4px);
}

/* ============================================
   Post Content
   ============================================ */
.cd-post-content {
    line-height: 1.8;
    max-width: 800px;
    color: var(--color-text);
}

.cd-post-content h2,
.cd-post-content h3,
.cd-post-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.cd-post-content p {
    margin-bottom: 1rem;
}

.cd-post-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cd-post-content a:hover {
    color: var(--color-primary-hover);
}

.cd-post-content ul,
.cd-post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.cd-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* ============================================
   Smooth Scrolling
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* Scroll Margin für Anchor-Links */
#alle-episoden {
    scroll-margin-top: 2rem;
}

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .cd-hero__content {
        padding: 3rem 2rem;
    }
    
    .cd-staffel-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cd-hero {
        min-height: 400px;
    }
    
    .cd-hero__content {
        padding: 2.5rem 1.5rem;
    }
    
    .cd-hero__title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .cd-hero__description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .cd-hero__meta {
        gap: 0.75rem;
    }
    
    .cd-meta-item {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .cd-staffel-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .cd-production-grid {
        grid-template-columns: 1fr;
    }
    
    .cd-container {
        padding: 0 1rem;
    }
    
    .cd-section {
        margin-bottom: 2rem;
    }
    
    .cd-section__title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .cd-hero {
        min-height: 350px;
    }
    
    .cd-hero__title {
        font-size: 1.75rem;
    }
    
    .cd-hero__meta {
        font-size: 0.875rem;
        gap: 0.5rem;
    }
    
    .cd-hero__description {
        font-size: 0.95rem;
    }
    
    .cd-hero__actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cd-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cd-staffel-card__image {
        height: 180px;
    }
    
    .cd-staffel-card__number {
        font-size: 3rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .cd-hero__actions,
    .cd-staffel-card__link,
    .cd-btn {
        display: none;
    }
    
    .cd-hero {
        min-height: auto;
        background: none !important;
        color: black;
    }
    
    .cd-hero__overlay {
        display: none;
    }
    
    .cd-hero__title {
        color: black;
        text-shadow: none;
    }
    
    .cd-staffel-card {
        break-inside: avoid;
    }
}

/* ============================================
   Accessibility
   ============================================ */

/* Focus Styles */
.cd-btn:focus-visible,
.cd-staffel-card__title a:focus-visible,
.cd-staffel-card__link:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .cd-hero__overlay {
        background: rgba(0,0,0,0.9);
    }
    
    .cd-btn--primary {
        border: 2px solid white;
    }
    
    .cd-staffel-card {
        border-width: 2px;
    }
}
