/* ====================================
   INDUSTRY INSIGHTS PAGE STYLES
   ==================================== */

.subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-2xl) auto;
    line-height: 1.6;
}

.insights-controls {
    margin-bottom: var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.search-box {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
    width: 100%;
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(188, 163, 59, 0.6);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(188, 163, 59, 0.2);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(188, 163, 59, 0.5);
    box-shadow: 0 0 0 3px rgba(188, 163, 59, 0.1);
}

.category-filters {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(188, 163, 59, 0.2);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.category-btn .category-icon {
    font-size: 1.2em;
    line-height: 1;
}

.category-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(188, 163, 59, 0.15);
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: rgba(188, 163, 59, 0.9);
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(188, 163, 59, 0.4);
    transform: translateY(-2px);
}

.category-btn.active {
    background: linear-gradient(135deg,
        rgba(188, 163, 59, 0.2) 0%,
        rgba(188, 163, 59, 0.1) 100%);
    border-color: rgba(188, 163, 59, 0.6);
    color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(188, 163, 59, 0.2);
}

.category-btn.active .count {
    background: rgba(188, 163, 59, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

.article-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(188, 163, 59, 0.15);
    border-radius: 16px;
    padding: var(--space-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        rgba(188, 163, 59, 0) 0%,
        rgba(188, 163, 59, 0.6) 50%,
        rgba(188, 163, 59, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.06) 100%);
    border-color: rgba(188, 163, 59, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.article-card:hover::before {
    opacity: 1;
}

.article-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    gap: var(--space-sm);
}

.article-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(188, 163, 59, 0.15);
    border: 1px solid rgba(188, 163, 59, 0.3);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(188, 163, 59, 0.95);
    white-space: nowrap;
}

.article-category-badge .badge-icon {
    font-size: 1.1em;
}

.article-date {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

.article-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-source {
    font-size: 0.9rem;
    color: rgba(188, 163, 59, 0.8);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-source::before {
    content: '📄';
    font-size: 1em;
}

.article-excerpt {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(188, 163, 59, 0.1);
    margin-top: auto;
}

.article-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.article-tag {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.read-more-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(188, 163, 59, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.article-card:hover .read-more-btn {
    gap: 10px;
}

.read-more-btn svg {
    transition: transform 0.3s ease;
}

.article-card:hover .read-more-btn svg {
    transform: translateX(4px);
}

.no-results {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: rgba(255, 255, 255, 0.5);
}

.no-results svg {
    margin-bottom: var(--space-lg);
    opacity: 0.3;
}

.no-results h3 {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-sm);
}

.no-results p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.article-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.article-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    background: linear-gradient(135deg,
        rgba(20, 20, 25, 0.98) 0%,
        rgba(30, 30, 35, 0.98) 100%);
    border: 1px solid rgba(188, 163, 59, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid rgba(188, 163, 59, 0.2);
    gap: var(--space-lg);
}

.modal-title-section {
    flex: 1;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.modal-source {
    font-size: 0.95rem;
    color: rgba(188, 163, 59, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-source::before {
    content: '📄';
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(188, 163, 59, 0.2);
    border-radius: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(188, 163, 59, 0.2);
    border-color: rgba(188, 163, 59, 0.5);
    transform: rotate(90deg);
}

.modal-close svg {
    color: rgba(255, 255, 255, 0.8);
}

.modal-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.iframe-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10;
    gap: var(--space-md);
}

.iframe-loader.hidden {
    display: none;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(188, 163, 59, 0.2);
    border-top-color: rgba(188, 163, 59, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.iframe-loader p {
    color: rgba(0, 0, 0, 0.6);
    font-size: 1rem;
}

#article-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.iframe-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(248, 249, 250, 0.98) 100%);
    padding: var(--space-2xl);
    text-align: center;
    gap: var(--space-lg);
}

.iframe-fallback svg {
    color: rgba(188, 163, 59, 0.4);
    margin-bottom: var(--space-md);
}

.iframe-fallback h3 {
    font-size: 1.5rem;
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: var(--space-sm);
}

.iframe-fallback p {
    font-size: 1rem;
    color: rgba(0, 0, 0, 0.6);
    max-width: 500px;
}

.iframe-fallback .cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg,
        rgba(188, 163, 59, 0.9) 0%,
        rgba(188, 163, 59, 0.7) 100%);
    color: #ffffff;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(188, 163, 59, 0.4);
}

.iframe-fallback .cta-button:hover {
    background: linear-gradient(135deg,
        rgba(188, 163, 59, 1) 0%,
        rgba(188, 163, 59, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(188, 163, 59, 0.3);
}

@media (max-width: 768px) {
    .subtitle {
        margin-bottom: var(--space-xl);
    }

    .category-filters {
        gap: var(--space-sm);
    }

    .category-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .category-btn .category-label {
        display: none;
    }

    .category-btn .category-icon {
        font-size: 1.4em;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .modal-content {
        height: 95vh;
        border-radius: 16px;
        max-width: 100%;
    }

    .modal-header {
        padding: var(--space-md);
    }

    .modal-header h2 {
        font-size: 1.2rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
    }

    .article-modal {
        padding: 10px;
    }
}

.article-card {
    animation: fadeInUp 0.4s ease;
}

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

.article-card:nth-child(1) { animation-delay: 0.05s; }
.article-card:nth-child(2) { animation-delay: 0.1s; }
.article-card:nth-child(3) { animation-delay: 0.15s; }
.article-card:nth-child(4) { animation-delay: 0.2s; }
.article-card:nth-child(5) { animation-delay: 0.25s; }
.article-card:nth-child(6) { animation-delay: 0.3s; }
