/**
 * Custom CSS for Theme 13 - Modern Editorial
 * Additional styles and enhancements
 */

/* Navigation Styles */
.main-navigation {
    position: relative;
}

.nav-menu {
    position: relative;
}

.nav-menu ul {
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    display: block;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-color, #007cba);
}

.nav-menu a.current {
    color: var(--primary-color, #007cba);
    font-weight: 600;
}

/* Sticky Header Enhancements */
.site-header {
    transition: all 0.3s ease;
}

/* Header Alignment Enhancements */
.header-content {
    position: relative;
}

.site-branding,
.main-navigation,
.header-actions {
    position: relative;
    z-index: 1;
}


/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.1);
    z-index: 9999;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color, #007cba);
    width: 0%;
    transition: width 0.1s ease;
}

/* Enhanced Button Styles */
.read-more-btn,
.contact-button,
.view-all-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.read-more-btn:before,
.contact-button:before,
.view-all-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.read-more-btn:hover:before,
.contact-button:hover:before,
.view-all-btn:hover:before {
    left: 100%;
}

/* Touch Device Enhancements */
@media (hover: none) and (pointer: coarse) {
    .read-more-btn:active,
    .contact-button:active,
    .view-all-btn:active {
        transform: scale(0.95);
    }
    
    .blog-card:active {
        transform: scale(0.98);
    }
}

/* Enhanced Form Styles */
.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color, #007cba);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color, #007cba);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--secondary-color, #00a0d2);
}

/* Social Sharing Buttons */
.social-sharing {
    margin: 2rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
}

.sharing-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook {
    background: #4267b2;
    color: white;
}

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

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Post Navigation */
.post-navigation {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    position: relative;
}

.nav-next {
    text-align: right;
}

.nav-subtitle {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.nav-previous a:hover .nav-title,
.nav-next a:hover .nav-title {
    color: var(--primary-color, #007cba);
}

/* Related Posts */
.related-posts {
    margin: 3rem 0;
    padding: 2rem 0;
    background: #f8f9fa;
}

.related-posts h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.related-post {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post-thumbnail {
    position: relative;
    overflow: hidden;
}

.related-post-thumbnail img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post:hover .related-post-thumbnail img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.5rem;
}

.related-post-content h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.related-post-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-content h4 a:hover {
    color: var(--primary-color, #007cba);
}

.related-post-meta {
    color: #666;
    font-size: 0.875rem;
}

/* Enhanced Grid Layouts */
@media (min-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .newsletter-form {
        max-width: 500px;
    }
    
    .sharing-buttons {
        justify-content: center;
    }
}

/* Accessibility Improvements */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color, #007cba);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .blog-card,
    .related-post {
        border: 2px solid #000;
    }
    
    .category-tag,
    .read-more-btn,
    .contact-button {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
}
