/**
 * AGD Webinars Frontend Styles
 * Datei: assets/css/agd-webinars.css
 */

/* ========================================
   Base & Container
   ======================================== */
.agd-webinar-archive {
    padding: 40px 0;
    background: #fff;
    min-height: 100vh;
    font-family: JostRegular, sans-serif;
}

.agd-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: sans-serif;

}

/* ========================================
   Archive Header
   ======================================== */
.agd-archive-header {
    margin-bottom: 30px;
}

.agd-page-title {
    font-size: 30px;
    font-weight: 400;
    color: #ff6900;
    margin: 0 0 30px 0;

}

/* ========================================
   Filter Bar (Staffel Tabs)
   ======================================== */
.agd-filter-bar {
    background: white;
    padding: 20px 0px;
    margin-bottom: 30px;
    border-top: 1px solid #707070;
    border-bottom: 1px solid #707070;
}

.agd-filter-tabs {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.agd-filter-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;

}

.agd-filter-tab {
    padding: 5px;
    background: #f0f0f0;
    border: 1px solid #f0f0f0;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    /* text-transform: uppercase; */
    outline: none;
}

.agd-filter-tab:hover {
    background: #e0e0e0;
    color: #333;
    outline: none;
}

.agd-filter-tab.active {
    border: 1px solid #ff6900;
    background-color: #fff0e5;
    color: #ff6900;
    cursor: default;
    outline: none;
}

.agd-tab-count {
    opacity: 0.8;
    /* font-size: 12px; */
}

/* ========================================
   Webinar Grid
   ======================================== */
.agd-webinar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* ========================================
   Webinar Card
   ======================================== */
.agd-webinar-card {
    background: white;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.agd-webinar-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Card Media */
.agd-card-media {
    position: relative;
    background: #000;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.agd-media-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.agd-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.agd-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.agd-thumbnail-placeholder .dashicons {
    font-size: 48px;
    color: #ccc;
}

/* Play Button */
.agd-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.agd-webinar-card:hover .agd-play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.agd-play-button svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Badges */
.agd-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.agd-badge {
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
}

.agd-badge-staffel {
    background: rgba(255, 105, 0, 0.9);
}

.agd-badge-folge {
    background: rgba(0, 0, 0, 0.7);
}

/* Card Body */
.agd-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.agd-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.agd-folge-label {
    font-weight: 700;
}

.agd-card-speakers {
    font-size: 14px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Card Actions */
.agd-card-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
    /* border-top: 1px solid #f0f0f0; */
}

.agd-action-primary,
.agd-action-secondary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 16px;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.agd-action-primary>span {
    display: inline-block;
    padding-top: 2px;
}

.agd-action-primary {
    color: #ff6900;
}

.agd-action-primary:hover {
    color: #e55800;
}

.agd-action-secondary {
    color: #666;
}

.agd-action-secondary:hover {
    color: #ff6900;
}

.agd-action-primary .dashicons,
.agd-action-secondary .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.agd-action-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: #ffd700;
    color: #333;
    font-size: 11px;
    font-weight: 700;
    border-radius: 2px;
    text-transform: uppercase;
}

/* ========================================
   Pagination
   ======================================== */
.agd-pagination {
    text-align: center;
    margin: 40px 0;
}

.agd-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background: white;
    border: 1px solid #e0e0e0;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
}

.agd-pagination .page-numbers:hover {
    background: #ff6900;
    color: white;
    border-color: #ff6900;
}

.agd-pagination .current {
    background: #ff6900;
    color: white;
    border-color: #ff6900;
}

.agd-pagination .dots {
    background: transparent;
    border: none;
}

/* ========================================
   No Results
   ======================================== */
.agd-no-results {
    background: white;
    padding: 60px 20px;
    text-align: center;
    color: #666;
}

/* ========================================
   Loading State
   ======================================== */
.agd-webinars-wrapper.loading {
    position: relative;
    min-height: 400px;
    opacity: 0.6;
}

.agd-webinars-wrapper.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #ff6900;
    border-radius: 50%;
    animation: agd-spin 1s linear infinite;
}

@keyframes agd-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .agd-webinar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .agd-container {
        padding: 0 15px;
    }

    .agd-page-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .agd-filter-bar {
        padding: 12px 15px;
    }

    .agd-filter-tabs {
        gap: 10px;
    }

    .agd-filter-tab {
        padding: 4px 8px;
        font-size: 12px;
    }

    .agd-webinar-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .agd-card-body {
        padding: 12px;
    }

    .agd-card-title {
        font-size: 14px;
    }

    .agd-card-speakers {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .agd-filter-label {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    .agd-filter-tabs {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .agd-filter-tab {
        flex-shrink: 0;
    }

    .agd-card-actions {
        font-size: 12px;
    }

    .agd-action-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/**
 * AGD Webinars Single View Styles
 * Diese Styles zu agd-webinars.css hinzufügen oder als separate Datei einbinden
 */

/* ========================================
   Single Webinar Layout
   ======================================== */
.agd-single-webinar {
    padding: 40px 0;
    background: #fff;
    min-height: 100vh;
}

/* ========================================
   Header & Breadcrumb
   ======================================== */
.agd-single-header {
    margin-bottom: 30px;
}

.agd-breadcrumb {
    font-size: 24px;
    color: #ff6900;
    margin-bottom: 15px;
    line-height: 1.4;
}

.agd-staffel-label,
.agd-folge-label {
    color: #ff6900;
}

.agd-title-text {
    color: #333;
}

.agd-back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.agd-back-link:hover {
    color: #ff6900;
}

/* ========================================
   Video Section
   ======================================== */
.agd-video-section {
    background: #000;
    margin-bottom: 30px;
}

.agd-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.agd-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.agd-video-placeholder {
    position: relative;
    padding-bottom: 56.25%;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agd-no-video-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.agd-no-video-message .dashicons {
    font-size: 64px;
    color: #444;
    margin-bottom: 20px;
    display: block;
}

/* ========================================
   Description
   ======================================== */
.agd-webinar-description {
    background: white;
    padding: 25px;
    margin-bottom: 30px;
    /* border: 1px solid #e0e0e0; */
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.agd-webinar-description p {
    margin: 0 0 15px 0;
}

.agd-webinar-description p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Speaker Section
   ======================================== */
.agd-speakers-section {
    background: white;
    padding: 25px;
    margin-bottom: 30px;
    /* border: 1px solid #e0e0e0; */

    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.agd-speaker-box {
    display: flex;
    gap: 25px;
}

.agd-speaker-image {
    flex-shrink: 0;
}

.agd-speaker-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.agd-speaker-content {
    flex: 1;
}

.agd-speaker-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    text-transform: uppercase;
}

.agd-speaker-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
}

.agd-speaker-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.agd-speaker-links a>span {
    display: inline-block;
    padding-top: 2px;
}

.agd-speaker-link {
    color: #ff6900;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    text-decoration: underline;
    line-height: 1.5;
}

.agd-speaker-link:hover {
    color: #e55800;
    text-decoration: none;
}

/* ========================================
   Downloads Section
   ======================================== */
.agd-downloads-section {
    background: white;
    padding: 25px;
    margin-bottom: 30px;
    /* border: 1px solid #e0e0e0; */
}

.agd-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-transform: uppercase;
}

.agd-downloads-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agd-download-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.agd-download-item:hover {
    background: #fff;
    border-color: #ff6900;
    /* transform: translateX(5px); */
}

.agd-download-item .dashicons {
    font-size: 24px;
    color: #ff6900;
}

.agd-download-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agd-download-title {
    font-size: 14px;
    font-weight: 500;
}

.agd-download-meta {
    font-size: 12px;
    color: #999;
}

/* ========================================
   FAQ Section
   ======================================== */
.agd-faq-section {
    background: white;
    padding: 25px;
    margin-bottom: 30px;
    /* border: 1px solid #e0e0e0; */
}

.agd-faq-accordion {
    border-top: 1px solid #e0e0e0;
}

.agd-faq-item {
    border-bottom: 1px solid #e0e0e0;
}

.agd-faq-question {
    width: 100%;
    padding: 15px 40px 15px 15px;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.agd-faq-question:hover {
    color: #ff6900;
}

.agd-faq-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #999;
}

.agd-faq-question[aria-expanded="true"] .agd-faq-toggle {
    transform: translateY(-50%) rotate(180deg);
}

.agd-faq-answer {
    padding: 0 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.agd-faq-content {
    padding: 0 0 20px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.agd-faq-content p {
    margin: 0 0 10px 0;
}

.agd-faq-content p:last-child {
    margin-bottom: 0;
}

/* ========================================
   Related Webinars
   ======================================== */
.agd-related-section {
    margin-top: 50px;
}

.agd-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.agd-related-item {
    background: white;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s ease;
    overflow: hidden;
}

.agd-related-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.agd-related-link {
    text-decoration: none;
    display: block;
}

.agd-related-thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

.agd-related-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agd-related-thumbnail .agd-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agd-related-thumbnail .dashicons {
    font-size: 32px;
    color: #ccc;
}

.agd-related-content {
    padding: 15px;
}

.agd-related-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.agd-related-speakers {
    font-size: 12px;
    color: #999;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .agd-breadcrumb {
        font-size: 18px;
    }

    .agd-speaker-box {
        flex-direction: column;
        text-align: center;
    }

    .agd-speaker-image {
        margin: 0 auto;
    }

    .agd-related-grid {
        grid-template-columns: 1fr;
    }

    .agd-download-item {
        padding: 10px 12px;
    }

    .agd-faq-question {
        font-size: 14px;
        padding-right: 30px;
    }
}

@media (max-width: 480px) {
    .agd-single-webinar {
        padding: 20px 0;
    }

    .agd-webinar-description,
    .agd-speakers-section,
    .agd-downloads-section,
    .agd-faq-section {
        padding: 20px 15px;
    }

    .agd-speaker-links {
        flex-direction: column;
        align-items: center;
    }
}

/**
 * AGD Webinars AJAX Styles
 * Füge diese Styles zu agd-webinars.css hinzu
 */

/* ========================================
   Loading States
   ======================================== */
.agd-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.agd-initial-loading,
.agd-spinner-wrapper {
    text-align: center;
    padding: 40px;
}

.agd-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 3px solid #f0f0f0;
    border-top-color: #ff6900;
    border-radius: 50%;
    animation: agd-spin 1s linear infinite;
}

@keyframes agd-spin {
    to {
        transform: rotate(360deg);
    }
}

.agd-webinar-results.loading {
    position: relative;
    min-height: 400px;
    opacity: 0.5;
    pointer-events: none;
}

/* ========================================
   AJAX Pagination
   ======================================== */
.agd-ajax-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    padding: 20px 0;
}

.agd-page-btn {
    padding: 10px 20px;
    background: white;
    border: 1px solid #e0e0e0;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.agd-page-btn:hover:not(:disabled) {
    background: #ff6900;
    color: white;
    border-color: #ff6900;
}

.agd-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agd-page-info {
    font-size: 14px;
    color: #666;
}

/* Load More Button */
.agd-load-more-wrapper {
    text-align: center;
    margin: 40px 0;
}

.agd-load-more-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff6900;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.agd-load-more-btn:hover:not(:disabled) {
    background: #e55800;
    transform: translateY(-2px);
}

.agd-load-more-btn:disabled {
    background: #ccc;
    cursor: wait;
}

/* ========================================
   Filter Tabs (Button Style)
   ======================================== */
.agd-filter-tab {
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agd-filter-tab:hover:not(.active) {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.agd-filter-tab.active {
    cursor: default;
}

/* ========================================
   Error States
   ======================================== */
.agd-error-message {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border: 1px solid #e0e0e0;
}

.agd-error-message .dashicons {
    font-size: 48px;
    color: #dc3232;
    margin-bottom: 20px;
}

.agd-error-message p {
    font-size: 16px;
    color: #666;
    margin: 0 0 20px;
}

.agd-retry-btn,
.agd-reset-filters-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #ff6900;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.agd-retry-btn:hover,
.agd-reset-filters-btn:hover {
    background: #e55800;
}

/* ========================================
   Animations
   ======================================== */
.agd-webinar-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.agd-webinar-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation for cards */
.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(1) {
    animation-delay: 0.05s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(2) {
    animation-delay: 0.10s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(3) {
    animation-delay: 0.15s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(4) {
    animation-delay: 0.20s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(5) {
    animation-delay: 0.25s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(6) {
    animation-delay: 0.30s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(7) {
    animation-delay: 0.35s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(8) {
    animation-delay: 0.40s;
}

.agd-webinar-grid[data-loading="false"] .agd-webinar-card:nth-child(9) {
    animation-delay: 0.45s;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .agd-ajax-pagination {
        flex-direction: column;
        gap: 15px;
    }

    .agd-page-btn {
        width: 100%;
        max-width: 200px;
    }

    .agd-filter-tab {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* ========================================
   Accessibility
   ======================================== */
.agd-filter-tab:focus,
.agd-page-btn:focus,
.agd-load-more-btn:focus {
    /* outline: 2px solid #ff6900;
    outline-offset: 2px; */
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}