/* Page-specific styles for News and Blog */

/* Page Header */
.page-header {
    background: var(--bg-secondary);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Media Section */
.media-section .section-header {
    margin-bottom: 3rem;
}

.media-section .section-header.shorts-header {
    margin-top: 3rem;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.video-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.video-card h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    padding: 1rem 1.5rem 0.5rem;
    margin: 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    cursor: pointer;
}

.video-container.youtube-short {
    padding-bottom: 177.78%; /* 9:16 for shorts */
}

.video-container .video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease;
}

.video-container .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-container:hover .play-button {
    background: rgba(0,0,0,0.8);
}

.video-container .play-button::after {
    content: '▶';
    font-size: 1.8rem;
    color: white;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-container.loaded .video-thumbnail,
.video-container.loaded .play-button {
    opacity: 0;
    pointer-events: none;
}

.video-container.loaded iframe {
    opacity: 1;
}

/* Blog Filters */
.blog-filters {
    padding: 2rem 0;
    background: var(--bg-secondary);
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn.active,
.category-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.search-wrapper {
    display: flex;
    align-items: center;
}

.blog-search-input {
    padding: 0.6rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    min-width: 250px;
}

.search-btn {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
    padding: 0.6rem 1rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 1200px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 540px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.blog-image {
    position: relative;
    height: 200px;
}

.blog-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.blog-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-content-area {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
}

.blog-title a:hover {
    color: var(--primary);
}

.blog-excerpt {
    color: var(--text-secondary);
    flex-grow: 1;
    margin: 1rem 0;
}

.blog-footer {
    margin-top: auto;
}

.read-more-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
    text-align: center;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
}

.page-btn.active,
.page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Newsletter Signup */
.newsletter-signup {
    background: var(--bg-secondary);
    padding: 4rem 0;
    text-align: center;
}

/* Single Blog Post */
.blog-post .post-article {
    max-width: 900px;
    margin: 0 auto;
}

.blog-post .post-image {
    margin-bottom: 1.5rem;
}

.post-hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
}

.post-body {
    color: var(--text-primary);
    line-height: 1.75;
    font-size: 1.05rem;
}

.post-tags {
    margin-top: 1.5rem;
}

.post-tags .blog-tag {
    display: inline-block;
    margin-right: 0.5rem;
    color: var(--primary);
}

.post-nav {
    margin-top: 2rem;
}

.newsletter-content h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.newsletter-form {
    margin-top: 2rem;
}

.newsletter-form .form-group {
    display: flex;
    justify-content: center;
}

.newsletter-form input {
    min-width: 300px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.newsletter-form .btn-primary {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
