/**
 * Pitch and People Filter Styles
 * CSS for the dynamic episode filter bar
 */

.pitch-and-people-container {
    width: 100%;
}

/* Filter Bar Styles */
.pap-filter-bar {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: transparent;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pap-filter-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.pap-filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.pap-filter-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pap-filter-btn.active {
    background: #02b3ff;
    border-color: #02b3ff;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 179, 255, 0.4);
}

.pap-filter-btn.active:hover {
    background: #0196d9;
    border-color: #0196d9;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pap-filter-bar {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .pap-filter-buttons {
        grid-template-columns: repeat(3, 1fr);
        max-width: 100%;
    }
    
    .pap-filter-btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .pap-filter-bar {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .pap-filter-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
        min-width: auto;
    }
}

/* Episode filtering animations and layout preservation */
.pap-episode {
    transition: opacity 0.3s ease !important;
    /* Ensure consistent sizing */
    min-height: 0;
    height: auto;
}

.pap-episode.pap-hidden {
    display: none;
}

/* Ensure video containers maintain aspect ratio */
.pap-episode .pap-video-embed {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
}

.pap-episode .pap-video-embed > div {
    width: 100% !important;
    height: 0 !important;
    padding-top: 56.25% !important; /* 16:9 aspect ratio */
    position: relative !important;
}

.pap-episode .pap-video-embed iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* Prevent grid layout shifts */
.pitch-and-people-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    min-height: 0;
}

.pap-content .pap-title {
    margin-bottom: 5px;
}

/* Episode Tags Styling */
.pap-episode-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    margin-bottom: 15px;
}

.pap-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(2, 179, 255, 0.9);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.2;
}

.pap-tag:hover {
    background: rgba(2, 179, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* Tag-specific colors */
.pap-tag[data-tag="startup"] {
    background: rgba(46, 204, 113, 0.9);
    border-color: rgba(46, 204, 113, 0.3);
}

.pap-tag[data-tag="startup"]:hover {
    background: rgba(46, 204, 113, 1);
}

.pap-tag[data-tag="investor"] {
    background: rgba(231, 76, 60, 0.9);
    border-color: rgba(231, 76, 60, 0.3);
}

.pap-tag[data-tag="investor"]:hover {
    background: rgba(231, 76, 60, 1);
}

.pap-tag[data-tag="experte"] {
    background: rgba(155, 89, 182, 0.9);
    border-color: rgba(155, 89, 182, 0.3);
}

.pap-tag[data-tag="experte"]:hover {
    background: rgba(155, 89, 182, 1);
}

/* No results message */
.pap-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-style: italic;
    grid-column: 1 / -1;
    width: 100%;
}

.pap-no-results p {
    margin: 0;
    font-size: 1.1rem;
}

/* Focus states for accessibility */
.pap-filter-btn:focus {
    outline: 2px solid #02b3ff;
    outline-offset: 2px;
}

/* Loading state (optional enhancement) */
.pap-filter-loading .pitch-and-people-grid {
    opacity: 0.7;
    pointer-events: none;
}

/* Grid improvements for filtered state */
.pitch-and-people-grid {
    transition: opacity 0.3s ease;
}

/* Animation for filter changes */
@keyframes filterChange {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.pap-filter-animating .pitch-and-people-grid {
    animation: filterChange 0.6s ease;
}

/* Menu Icon Styles */
.pap-menu-icon {
    display: inline-block;
    vertical-align: baseline;
    margin-left: 0.1rem;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

/* Responsive menu icon sizing */
@media (max-width: 768px) {
    .pap-menu-icon {
        width: 14px;
        height: 14px;
        margin-right: 0.25rem;
    }
}

/* Load More Button Styles */
.pap-load-more-container {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem 1rem;
}

.pap-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #02b3ff;
    border: 2px solid #02b3ff;
    border-radius: 25px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 200px;
}

.pap-load-more-btn:hover:not(:disabled) {
    background: #0196d9;
    border-color: #0196d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 179, 255, 0.4);
}

.pap-load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.pap-load-more-spinner svg {
    display: block;
    color: #ffffff;
}

.pap-load-more-info {
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Animation for newly loaded episodes */
.pap-episode-new {
    opacity: 0 !important;
    transform: translateY(20px) !important;
    animation: slideInUp 0.5s ease forwards;
}

@keyframes slideInUp {
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.pap-episode-loaded {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Responsive adjustments for load more */
@media (max-width: 768px) {
    .pap-load-more-container {
        margin-top: 2rem;
        padding: 1.5rem 1rem;
    }
    
    .pap-load-more-btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        min-width: 180px;
    }
}
