/* Category Subdomains Frontend Styles */

/* Subdomain Header Styles */
.cs-subdomain-header {
    margin-bottom: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #0073aa;
}

.cs-category-hero {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cs-category-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.cs-category-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.cs-category-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cs-post-count {
    background: #0073aa;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.cs-category-link a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.cs-category-link a:hover {
    text-decoration: underline;
}

/* Posts Header */
.cs-posts-header {
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

.cs-section-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin: 0;
}

/* Related Categories Widget */
.cs-related-categories {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 1rem;
}

.cs-related-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

.cs-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs-related-item {
    margin: 0;
}

.cs-related-link {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.cs-related-link:hover {
    background: #0073aa;
    color: white;
    text-decoration: none;
}

.cs-related-count {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 0.25rem;
}

/* Navigation Styles */
.cs-nav-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.cs-nav-toggle {
    background: #0073aa;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 25px 0 0 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cs-nav-toggle:hover {
    background: #005a87;
    transform: translateX(-5px);
}

.cs-nav-icon {
    font-size: 1.2rem;
}

.cs-nav-text {
    font-size: 0.9rem;
    font-weight: 500;
}

.cs-nav-menu {
    position: absolute;
    right: 100%;
    top: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 280px;
    max-height: 400px;
    overflow-y: auto;
    transform: translateX(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cs-nav-menu.cs-nav-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.cs-nav-header {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-nav-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.cs-nav-close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.cs-nav-close:hover {
    color: #333;
}

.cs-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cs-nav-item {
    margin: 0;
    border-bottom: 1px solid #f5f5f5;
}

.cs-nav-item:last-child {
    border-bottom: none;
}

.cs-nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.cs-nav-link:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #0073aa;
}

.cs-nav-current .cs-nav-link {
    background: #e3f2fd;
    color: #0073aa;
    font-weight: 500;
}

.cs-nav-title {
    flex-grow: 1;
}

.cs-nav-count {
    background: #e9ecef;
    color: #666;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
}

.cs-nav-current .cs-nav-count {
    background: #0073aa;
    color: white;
}

.cs-nav-description {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    padding: 0 1rem 0.5rem;
}

.cs-nav-footer {
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

.cs-nav-footer small {
    color: #999;
    font-size: 0.8rem;
}

/* Breadcrumb Navigation */
.cs-breadcrumb {
    margin-bottom: 1rem;
}

.cs-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cs-breadcrumb-item {
    margin: 0;
}

.cs-breadcrumb-item:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: #999;
}

.cs-breadcrumb-item a {
    color: #0073aa;
    text-decoration: none;
}

.cs-breadcrumb-item a:hover {
    text-decoration: underline;
}

.cs-breadcrumb-current {
    color: #666;
}

/* Shortcode Styles */
.cs-shortcode-nav {
    margin: 1.5rem 0;
}

.cs-nav-style-horizontal .cs-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cs-nav-style-horizontal .cs-nav-item {
    border-bottom: none;
}

.cs-nav-style-horizontal .cs-nav-link {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0.5rem 1rem;
}

.cs-nav-style-vertical .cs-nav-list {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

.cs-subdomain-dropdown {
    width: 100%;
    max-width: 300px;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
}

/* Subdomain Grid */
.cs-subdomain-grid {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.cs-grid-cols-1 { grid-template-columns: 1fr; }
.cs-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cs-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cs-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.cs-subdomain-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cs-subdomain-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.cs-card-title {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.cs-card-title a {
    color: #2c3e50;
    text-decoration: none;
}

.cs-card-title a:hover {
    color: #0073aa;
}

.cs-card-count {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.cs-card-description {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.cs-card-link {
    display: inline-flex;
    align-items: center;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cs-card-link:hover {
    color: #005a87;
    text-decoration: none;
}

/* Recent Posts Shortcode */
.cs-recent-posts {
    margin: 1.5rem 0;
}

.cs-recent-post {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cs-recent-post:last-child {
    border-bottom: none;
}

.cs-post-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.cs-post-title a {
    color: #2c3e50;
    text-decoration: none;
}

.cs-post-title a:hover {
    color: #0073aa;
}

.cs-post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cs-post-date,
.cs-post-author {
    margin-right: 1rem;
}

.cs-post-excerpt {
    color: #555;
    line-height: 1.5;
}

/* Widget Styles */
.cs-widget-nav {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.cs-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cs-widget-list li {
    margin: 0 0 0.5rem;
    padding: 0;
}

.cs-widget-list li:last-child {
    margin-bottom: 0;
}

.cs-widget-list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.cs-widget-list a:hover {
    color: #0073aa;
}

.cs-widget-list .current-cat a {
    color: #0073aa;
    font-weight: 600;
}

.post-count {
    color: #666;
    font-size: 0.9rem;
    font-weight: normal;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .cs-nav-container {
        position: static;
        transform: none;
        margin: 1rem 0;
    }
    
    .cs-nav-toggle {
        border-radius: 8px;
        justify-content: center;
    }
    
    .cs-nav-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        margin-top: 1rem;
        display: none;
    }
    
    .cs-nav-menu.cs-nav-open {
        display: block;
    }
    
    .cs-category-title {
        font-size: 2rem;
    }
    
    .cs-category-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cs-subdomain-grid {
        grid-template-columns: 1fr !important;
    }
    
    .cs-related-list {
        flex-direction: column;
    }
    
    .cs-nav-style-horizontal .cs-nav-list {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cs-subdomain-header {
        padding: 1rem;
    }
    
    .cs-category-title {
        font-size: 1.5rem;
    }
    
    .cs-category-description {
        font-size: 1rem;
    }
    
    .cs-nav-menu {
        min-width: 250px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cs-subdomain-header {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .cs-category-title {
        color: #ecf0f1;
    }
    
    .cs-category-description {
        color: #bdc3c7;
    }
    
    .cs-related-categories {
        background: #34495e;
    }
    
    .cs-related-title {
        color: #ecf0f1;
        border-bottom-color: #7f8c8d;
    }
    
    .cs-nav-menu {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .cs-nav-link {
        color: #ecf0f1;
    }
    
    .cs-nav-link:hover {
        background: #34495e;
    }
    
    .cs-nav-header {
        border-bottom-color: #34495e;
    }
    
    .cs-nav-header h4 {
        color: #ecf0f1;
    }
}

/* Print styles */
@media print {
    .cs-nav-container,
    .cs-nav-menu {
        display: none !important;
    }
}