/* Internal Linking Styles */
.internal-linking-container {
    margin: 40px 0;
    padding: 32px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Related Pages Section */
.related-pages-section {
    margin-bottom: 40px;
}

.related-pages-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    text-align: center;
}

.related-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.related-page-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(249, 115, 22, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
}

.related-page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.related-page-card:hover::before {
    opacity: 1;
}

.related-page-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
}

.related-page-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6 0%, #f97316 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.related-page-icon i {
    color: white;
    font-size: 20px;
}

.related-page-content {
    flex: 1;
}

.related-page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.3;
}

.related-page-description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    margin: 0;
}

/* Category Navigation Section */
.category-nav-section {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
}

.category-nav-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
    text-align: center;
}

.category-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.category-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-page-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.category-page-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #3b82f6 0%, #f97316 100%);
    transition: width 0.3s ease;
    z-index: -1;
}

.category-page-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.category-page-link:hover::before {
    width: 100%;
}

/* Light theme variant */
.internal-linking-container.light {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #000000;
}

.internal-linking-container.light .related-pages-title,
.internal-linking-container.light .category-nav-title {
    color: #000000;
}

.internal-linking-container.light .related-page-card {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.internal-linking-container.light .related-page-title {
    color: #000000;
}

.internal-linking-container.light .related-page-description {
    color: rgba(0, 0, 0, 0.6);
}

.internal-linking-container.light .category-section {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.internal-linking-container.light .category-title {
    color: #000000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.internal-linking-container.light .category-page-link {
    color: rgba(0, 0, 0, 0.7);
}

.internal-linking-container.light .category-page-link:hover {
    color: #000000;
    background: rgba(0, 0, 0, 0.05);
}

/* Responsive design */
@media (max-width: 768px) {
    .internal-linking-container {
        padding: 20px;
        margin: 20px 0;
    }
    
    .related-pages-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-nav-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .related-page-link {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .related-page-icon {
        width: 40px;
        height: 40px;
    }
    
    .related-page-icon i {
        font-size: 18px;
    }
}

/* Animation for related page cards */
.related-page-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(20px);
}

.related-page-card:nth-child(1) { animation-delay: 0.1s; }
.related-page-card:nth-child(2) { animation-delay: 0.2s; }
.related-page-card:nth-child(3) { animation-delay: 0.3s; }
.related-page-card:nth-child(4) { animation-delay: 0.4s; }
.related-page-card:nth-child(5) { animation-delay: 0.5s; }
.related-page-card:nth-child(6) { animation-delay: 0.6s; }

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

/* SEO-friendly focus states */
.related-page-link:focus,
.category-page-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Print styles */
@media print {
    .internal-linking-container {
        background: white;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .related-page-card,
    .category-section {
        background: white;
        border: 1px solid #ccc;
    }
    
    .related-page-title,
    .category-title {
        color: #000;
    }
    
    .related-page-description,
    .category-page-link {
        color: #333;
    }
}
