/* Internal Linking System Styles */
/* Enhances SEO and user navigation with styled internal links */

/* Internal Link Base Styles */
.internal-link {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.internal-link:hover {
    color: #2980b9;
    border-bottom-color: #3498db;
    text-decoration: none;
}

.internal-link:visited {
    color: #8e44ad;
}

/* Specific Link Types */
.naat-link {
    color: #e74c3c;
}

.naat-link:hover {
    color: #c0392b;
    border-bottom-color: #e74c3c;
}

.artist-link {
    color: #9b59b6;
    font-style: italic;
}

.artist-link:hover {
    color: #8e44ad;
    border-bottom-color: #9b59b6;
}

.category-link {
    color: #f39c12;
    font-weight: 600;
}

.category-link:hover {
    color: #e67e22;
    border-bottom-color: #f39c12;
}

/* Quick Navigation */
.quick-nav {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    backdrop-filter: blur(10px);
}

.quick-nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.quick-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.quick-link:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Internal Links Sections */
.internal-links-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.section-title {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Related Naats Grid */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 15px;
}

.related-item {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.related-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.related-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-link h4 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.1em;
    line-height: 1.4;
}

.related-artist {
    color: #6c757d;
    font-style: italic;
    margin: 5px 0;
    font-size: 0.9em;
}

.related-category {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 500;
    display: inline-block;
    margin-top: 8px;
}

/* Artist Naats Grid */
.artist-naats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.artist-naat-item {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid #28a745;
}

.artist-naat-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.2);
}

.artist-naat-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.artist-naat-link h4 {
    color: #1e7e34;
    margin: 0 0 8px 0;
    font-size: 1em;
}

.naat-duration {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    margin-right: 8px;
}

.naat-category {
    background: #6c757d;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
}

/* Category Naats Grid */
.category-naats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.category-naat-item {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid #ffc107;
}

.category-naat-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.category-naat-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-naat-link h4 {
    color: #856404;
    margin: 0 0 8px 0;
    font-size: 1em;
}

.naat-meaning {
    color: #6c757d;
    font-style: italic;
    font-size: 0.85em;
    margin-top: 5px;
    display: block;
}

/* View All Links */
.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 25px;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.view-all-link:hover {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.2);
    text-decoration: none;
    transform: translateX(5px);
}

/* Navigation Links (Prev/Next) */
.naat-navigation {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    color: white;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nav-link {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-direction {
    font-weight: 600;
    font-size: 0.9em;
    opacity: 0.8;
}

.nav-title {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
}

.nav-artist {
    font-style: italic;
    opacity: 0.8;
    font-size: 0.9em;
}

.nav-placeholder {
    /* Empty space for alignment */
}

.prev-link {
    text-align: left;
}

.next-link {
    text-align: right;
}

/* Language Navigation */
.language-navigation {
    background: rgba(156, 39, 176, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(156, 39, 176, 0.2);
}

.language-navigation h4 {
    color: #7b1fa2;
    margin: 0 0 15px 0;
    font-size: 1.1em;
}

.language-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.language-tab-link {
    background: #9c27b0;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.language-tab-link:hover {
    background: #7b1fa2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(123, 31, 162, 0.3);
}

.language-tab-link:active {
    transform: translateY(0);
}

/* Enhanced Breadcrumbs */
.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 15px 0;
    backdrop-filter: blur(10px);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 10px;
}

.breadcrumb li {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
}

.breadcrumb .current-page {
    color: white;
    font-weight: 600;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

/* Tags and Labels */
.language-tag, .theme-tag {
    background: #17a2b8;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    display: inline-block;
    margin: 2px;
}

.theme-tag {
    background: #6f42c1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-nav-links {
        flex-direction: column;
        align-items: center;
    }
    
    .quick-link {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .related-grid,
    .artist-naats-grid,
    .category-naats-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-link {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.3em;
    }
    
    .breadcrumb ol {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .language-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .internal-links-section {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .related-item,
    .artist-naat-item,
    .category-naat-item {
        padding: 15px;
    }
    
    .quick-nav {
        padding: 12px;
    }
    
    .naat-navigation {
        padding: 20px 15px;
    }
}

/* Dark Mode Support */
.dark-mode .internal-links-section {
    background: rgba(30, 30, 46, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .section-title {
    color: #e9ecef;
    border-bottom-color: #4dabf7;
}

.dark-mode .related-item {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-color: #4a5568;
    color: #e9ecef;
}

.dark-mode .related-item:hover {
    background: linear-gradient(135deg, #4a5568, #2d3748);
}

.dark-mode .related-link h4 {
    color: #e9ecef;
}

.dark-mode .artist-naat-item {
    background: linear-gradient(135deg, #1a202c, #2d3748);
    border-left-color: #4fd1c7;
}

.dark-mode .artist-naat-link h4 {
    color: #4fd1c7;
}

.dark-mode .category-naat-item {
    background: linear-gradient(135deg, #2d3748, #4a5568);
    border-left-color: #fbbf24;
}

.dark-mode .category-naat-link h4 {
    color: #fbbf24;
}

.dark-mode .view-all-link {
    background: rgba(77, 171, 247, 0.2);
    border-color: rgba(77, 171, 247, 0.3);
    color: #4dabf7;
}

.dark-mode .view-all-link:hover {
    background: rgba(77, 171, 247, 0.3);
    color: #74c0fc;
}

.dark-mode .language-navigation {
    background: rgba(139, 69, 19, 0.2);
    border-color: rgba(139, 69, 19, 0.3);
}

.dark-mode .language-navigation h4 {
    color: #fbb6ce;
}

/* Print Styles */
@media print {
    .quick-nav,
    .naat-navigation,
    .language-navigation {
        display: none;
    }
    
    .internal-links-section {
        break-inside: avoid;
        background: white;
        border: 1px solid #ccc;
    }
    
    .internal-link {
        color: #000;
        border-bottom: none;
        text-decoration: underline;
    }
}

/* Focus Styles for Accessibility */
.internal-link:focus,
.quick-link:focus,
.nav-link:focus,
.language-tab-link:focus,
.view-all-link:focus {
    outline: 2px solid #4dabf7;
    outline-offset: 2px;
}

/* Loading Animation for Dynamic Content */
.internal-links-loading {
    opacity: 0.6;
    pointer-events: none;
}

.internal-links-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
