/* ===================================
   INSIGHTS PAGE SPECIFIC STYLES
   =================================== */

/* Page Header with Background */
.page-header {
    position: relative;
    overflow: hidden;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../../Assets/insights.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 8rem 0 6rem;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    pointer-events: none;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../../Assets/insights.jpg');
}

/* Featured Insight */
.featured-insight {
    padding: 4rem 0;
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.featured-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
    will-change: transform;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.featured-content {
    padding: 3rem 3rem 3rem 0;
    display: flex;
    flex-direction: column;
}

.insight-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.insight-category {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.875rem;
}

.insight-date {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.featured-excerpt {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.insight-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-secondary);
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Insights Grid */
.insights-grid-section {
    padding: 4rem 0 6rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.insight-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    will-change: transform;
}

[data-theme="light"] .insight-card {
    background: #ffffff;
}

[data-theme="dark"] .insight-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(51, 65, 85, 0.6);
}

.insight-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.insight-image {
    height: 200px;
    overflow: hidden;
}

.insight-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease-out;
    will-change: transform;
}

.insight-card:hover .insight-image img {
    transform: scale(1.1);
}

.insight-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.insight-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.insight-excerpt {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-article-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    align-self: flex-start;
}

.read-article-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

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

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

/* Newsletter Section */
.newsletter-section {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.newsletter-content {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    border: 1px solid var(--border-color);
}

.newsletter-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.newsletter-form {
    display: flex;
    gap: 1rem;
    min-width: 400px;
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Image Placeholder */
.image-placeholder {
    width: 100%;
    height: 400px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--border-color);
}

.image-placeholder svg {
    color: var(--text-tertiary);
}

/* Responsive - Insights Page */
@media (max-width: 1024px) {
    .featured-card {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 5rem 0 4rem;
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../../Assets/insights.jpg');
    }
    
    [data-theme="dark"] .page-header {
        background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../../Assets/insights.jpg');
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-content {
        flex-direction: column;
        text-align: center;
    }
    
    .newsletter-form {
        min-width: auto;
        width: 100%;
        flex-direction: column;
    }
    
    .featured-content {
        padding: 2rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
}

/* Insight Modal */
.insight-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.insight-modal.active {
    opacity: 1;
    visibility: visible;
}

.insight-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.insight-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.25s ease-out;
    will-change: transform;
}

.insight-modal.active .modal-container {
    transform: scale(1);
}

.insight-modal .modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    will-change: transform;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.insight-modal .modal-close svg {
    color: #1e293b;
}

.insight-modal .modal-close:hover {
    background: rgba(239, 68, 68, 0.95);
    transform: rotate(90deg);
}

.insight-modal .modal-close:hover svg {
    color: white;
}

[data-theme="dark"] .insight-modal .modal-close {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .insight-modal .modal-close svg {
    color: #f1f5f9;
}

.insight-modal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.insight-modal .modal-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.insight-modal .modal-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transform: translateZ(0);
}

.insight-modal .modal-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.6) 100%);
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-insight-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    margin-top: 1rem;
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.modal-category,
.modal-date {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-category {
    color: var(--accent-color);
}

.insight-modal .modal-body {
    padding: 2.5rem;
    background: var(--bg-card);
}

.modal-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.modal-tag {
    padding: 0.5rem 1rem;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.modal-article-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.modal-article-content h3 {
    color: var(--text-primary);
    font-size: 1.35rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
}

.modal-article-content p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.modal-share {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.modal-share-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.modal-share-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
    border-color: #0077b5;
}

.share-btn.linkedin:hover {
    background: #006399;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
    border-color: #25D366;
}

.share-btn.whatsapp:hover {
    background: #1eab52;
}

.share-btn.email {
    background: #EA4335;
    color: white;
    border-color: #EA4335;
}

.share-btn.email:hover {
    background: #d33426;
}

.share-btn.copy {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.share-btn.copy:hover {
    background: var(--bg-tertiary);
}

.share-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* Modal Responsive */
@media (max-width: 768px) {
    .insight-modal .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .insight-modal .modal-header {
        height: 250px;
    }
    
    .modal-insight-title {
        font-size: 1.5rem;
    }
    
    .insight-modal .modal-body {
        padding: 1.5rem;
    }
    
    .modal-cta {
        flex-direction: column;
    }
    
    .modal-article-content h3 {
        font-size: 1.25rem;
    }
    
    .modal-share-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
        justify-content: center;
    }
}
