/* WordPress Theme Styles - Google Material Design Inspired */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #e8f0fe;
    --text-color: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
    --shadow-lg: 0 2px 6px 2px rgba(60,64,67,.15), 0 8px 24px 4px rgba(60,64,67,.15);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
}

[data-theme="dark"] {
    --text-color: #e8eaed;
    --text-secondary: #9aa0a6;
    --text-tertiary: #80868b;
    --bg-color: #202124;
    --bg-secondary: #292a2d;
    --bg-tertiary: #35363a;
    --border-color: #5f6368;
    --primary-light: #1a73e8;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,.3), 0 1px 3px 1px rgba(0,0,0,.15);
    --shadow-md: 0 1px 3px 0 rgba(0,0,0,.3), 0 4px 8px 3px rgba(0,0,0,.15);
    --shadow-lg: 0 2px 6px 2px rgba(0,0,0,.15), 0 8px 24px 4px rgba(0,0,0,.15);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    clip: auto !important;
    clip-path: none;
    color: var(--primary-color);
    display: block;
    font-size: 14px;
    font-weight: 500;
    height: auto;
    left: 8px;
    line-height: 1.5;
    padding: 12px 16px;
    text-decoration: none;
    top: 8px;
    width: auto;
    z-index: 100000;
}

/* Header & Navigation */
.site-header {
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    background: var(--bg-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-brand .custom-logo {
    height: 40px;
    width: auto;
}

.nav-logo {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0;
}

.nav-search {
    flex: 1;
    max-width: 600px;
    margin: 0 32px;
}

.search-form {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 24px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.search-form:focus-within {
    background: var(--bg-color);
    box-shadow: var(--shadow-sm);
    border-color: var(--border-color);
}

.search-form input[type="search"] {
    flex: 1;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 14px;
    font-family: inherit;
}

.search-form input[type="search"]::placeholder {
    color: var(--text-tertiary);
}

.search-form input[type="search"]:focus {
    outline: none;
}

.search-form button {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0 16px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    border-radius: 0 24px 24px 0;
}

.search-form button:hover {
    background: var(--bg-tertiary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--bg-secondary);
}

.menu-toggle-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    left: 0;
    transition: var(--transition);
}

.menu-toggle-icon::before {
    top: -7px;
}

.menu-toggle-icon::after {
    bottom: -7px;
}

.nav-menu .nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    display: block;
}

.nav-menu a:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.nav-menu .current-menu-item a {
    background: var(--primary-light);
    color: var(--primary-color);
}

.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
    margin-left: 8px;
    color: var(--text-secondary);
}

.dark-mode-toggle:hover {
    background: var(--bg-secondary);
}

/* Hero Section */
.hero {
    background: var(--bg-color);
    padding: 80px 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 32px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 64px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
    color: var(--text-color);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
    font-weight: 400;
}

/* Sections */
.section {
    margin: 64px 0;
}

.section h2 {
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--text-color);
    font-weight: 400;
    letter-spacing: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.view-all:hover {
    background: var(--primary-light);
}

/* Channels Grid */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.channel-card {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.channel-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.channel-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.channel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.channel-card:hover .channel-image img {
    transform: scale(1.03);
}

.channel-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a73e8 0%, #34a853 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 400;
    font-size: 48px;
    letter-spacing: 0;
}

.channel-placeholder.large {
    height: 200px;
    font-size: 64px;
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ea4335;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.channel-info {
    padding: 20px;
}

.channel-info h3 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
}

.channel-info h3 a {
    color: var(--text-color);
    text-decoration: none;
}

.channel-info h3 a:hover {
    color: var(--primary-color);
}

.category {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    margin-bottom: 12px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.category:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.channel-info p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.6;
}

.channel-stats {
    display: flex;
    justify-content: space-between;
    margin: 16px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.rating {
    color: #fbbc04;
}

.join-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 24px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3);
}

.join-btn:hover {
    box-shadow: var(--shadow-sm);
    background: var(--primary-dark);
}

.join-btn:active {
    transform: scale(0.98);
}

.join-btn.large {
    padding: 12px 32px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-color);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.category-card h3 {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 400;
}

.category-card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.channel-count {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Search Layout */
.search-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    margin-top: 24px;
}

.filters-sidebar {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 80px;
    border: 1px solid var(--border-color);
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group h3 {
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-filters,
.sort-options,
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-option,
.sort-option {
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    font-size: 14px;
    font-weight: 400;
}

.filter-option:hover,
.sort-option:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.filter-option.active,
.sort-option.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 500;
}

.count {
    float: right;
    color: var(--text-tertiary);
    font-size: 13px;
}

/* Channel Detail */
.breadcrumb {
    margin: 24px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.channel-detail {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.channel-header {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 32px;
    padding: 32px;
    background: var(--bg-secondary);
}

.channel-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.channel-meta h1 {
    font-size: 36px;
    margin-bottom: 12px;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.5px;
}

.channel-meta .category {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
}

.channel-meta .channel-stats {
    display: flex;
    gap: 32px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.channel-meta .stat {
    text-align: left;
}

.channel-meta .stat-number {
    font-size: 24px;
    font-weight: 400;
}

.channel-content {
    padding: 32px;
}

.channel-description h2 {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 400;
}

.channel-content .channel-content {
    line-height: 1.6;
    color: var(--text-secondary);
}

.channel-content .channel-content p {
    margin-bottom: 16px;
}

.channel-content .channel-content h2,
.channel-content .channel-content h3,
.channel-content .channel-content h4 {
    margin: 24px 0 12px;
    font-weight: 400;
}

.related-channels {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.related-channels h2 {
    margin-bottom: 24px;
    font-size: 20px;
    font-weight: 400;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Archive Headers */
.archive-header,
.category-header {
    text-align: center;
    margin: 40px 0;
}

.archive-header h1,
.category-header h1 {
    font-size: 36px;
    margin-bottom: 12px;
    font-weight: 400;
    letter-spacing: -0.5px;
}

.archive-header p,
.category-description {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 48px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
}

.no-results h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 400;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Footer */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 64px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 16px;
    color: var(--text-color);
    font-weight: 400;
    font-size: 16px;
}

.footer-section a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 8px;
    transition: var(--transition);
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.post-card {
    background: var(--bg-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-thumbnail {
    height: 200px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.03);
}

.post-content {
    padding: 20px;
}

.post-content h2 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 400;
}

.post-content h2 a {
    color: var(--text-color);
    text-decoration: none;
}

.post-content h2 a:hover {
    color: var(--primary-color);
}

.post-meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 12px;
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 14px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    display: inline-block;
    padding: 4px 0;
}

.read-more:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .channels-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .channel-header {
        grid-template-columns: 250px 1fr;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
    }
    
    .nav-brand {
        margin-bottom: 12px;
    }
    
    .nav-search {
        margin: 12px 0;
        max-width: 100%;
        width: 100%;
        order: 3;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        top: 16px;
        right: 24px;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        order: 4;
    }
    
    .nav-menu.active {
        display: block;
    }
    
    .nav-menu .nav-links {
        flex-direction: column;
        gap: 4px;
        text-align: left;
    }
    
    .dark-mode-toggle {
        position: absolute;
        top: 16px;
        left: 24px;
        margin: 0;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .search-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .channel-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 16px;
        padding: 24px;
    }
    
    .channels-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 48px 0;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .section h2 {
        font-size: 24px;
    }
    
    .channel-meta h1 {
        font-size: 28px;
    }
    
    .archive-header h1,
    .category-header h1 {
        font-size: 28px;
    }
}

/* WordPress Specific */
.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100%;
}

.wp-block-image img {
    height: auto;
    max-width: 100%;
}

/* Comments */
.comments-area {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
    margin-bottom: 1rem;
}

.comment-form .submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.comment-form .submit:hover {
    background: var(--primary-dark);
}