/*
Theme Name: AzigiTube
Theme URI: https://www.globaltecnews.com/
Author: AzigiTube
Author URI: https://www.globaltecnews.com/
Description: A fast, lightweight, AdSense-friendly WordPress video streaming theme built strictly around a clean 3-column grid, right sidebar widget area, dedicated header/post/footer ad slots, and easy per-post video URL embedding.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: azigitube
Tags: blog, entertainment, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, theme-options
*/

:root {
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    --bg-nav: #111827;
    --bg-nav-hover: #1f2937;
    --accent: #e11d48;
    --accent-hover: #be123c;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --radius: 8px;
    --container: 1220px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding-top: 18px;
}

.header-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 14px;
}

.site-title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.site-title a {
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.site-title .brand-badge {
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.site-description {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

.custom-logo-link img {
    max-height: 70px;
    width: auto;
    margin: 0 auto;
}

/* Ad Slots */
.ad-slot {
    width: 100%;
    text-align: center;
    margin: 14px auto;
    overflow: hidden;
}

.ad-slot-inner {
    display: inline-block;
    max-width: 100%;
    min-height: 50px;
}

.header-ad-wrap {
    padding-bottom: 14px;
}

.footer-ad-wrap {
    margin: 28px auto 20px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.post-top-ad-wrap {
    margin: 16px 0;
    padding: 10px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Navigation Bar + Search */
.main-nav-bar {
    background: var(--bg-nav);
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 50px;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
}

.primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.primary-menu > li {
    position: relative;
}

.primary-menu > li > a {
    display: block;
    padding: 14px 16px;
    color: #f3f4f6;
    font-size: 14px;
    font-weight: 600;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
    background: var(--accent);
    color: #ffffff;
}

/* Dropdown submenus */
.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-nav);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 0 0 6px 6px;
    z-index: 1000;
}

.primary-menu li:hover > .sub-menu {
    display: block;
}

.primary-menu .sub-menu li a {
    display: block;
    padding: 9px 16px;
    color: #e5e7eb;
    font-size: 13px;
}

.primary-menu .sub-menu li a:hover {
    background: var(--bg-nav-hover);
    color: #fff;
}

/* Header Search Form */
.header-search-form {
    display: flex;
    align-items: center;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 6px;
    overflow: hidden;
    margin: 6px 0;
}

.header-search-form input[type="search"] {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 7px 12px;
    font-size: 13px;
    width: 190px;
    outline: none;
}

.header-search-form input[type="search"]::placeholder {
    color: #9ca3af;
}

.header-search-form button {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.header-search-form button:hover {
    background: var(--accent-hover);
}

/* Main Content Layout (Content + Right Widget Sidebar) */
.site-main-wrapper {
    padding: 24px 0;
}

.content-sidebar-grid {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 24px;
    align-items: start;
}

.content-area {
    min-width: 0;
}

.archive-header {
    background: var(--bg-card);
    padding: 14px 18px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 18px;
}

.archive-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

/* 3-Column Video Grid (12 posts = 4 rows x 3 columns) */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.07);
}

.video-thumb-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #111827;
    overflow: hidden;
}

.video-thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.video-card:hover .video-thumb-link img {
    transform: scale(1.04);
}

.video-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937, #111827);
    color: #9ca3af;
    font-size: 12px;
    font-weight: 600;
}

.play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 42px;
    height: 42px;
    background: rgba(225, 29, 72, 0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
    transition: transform 0.15s ease, background 0.15s ease;
}

.video-card:hover .play-badge {
    transform: translate(-50%, -50%) scale(1.08);
    background: var(--accent);
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.video-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.video-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-title a {
    color: var(--text-main);
}

.video-card-title a:hover {
    color: var(--accent);
}

.video-card-meta {
    margin-top: auto;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.video-card-cat {
    color: var(--accent);
    font-weight: 600;
}

/* Pagination / Next Page / Load More */
.pagination-wrap {
    margin-top: 26px;
    text-align: center;
}

.nav-links,
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers,
.btn-load-more {
    display: inline-block;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.page-numbers:hover,
.page-numbers.current,
.btn-load-more:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Right Sidebar Widget Area */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.widget-title {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

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

.widget ul li {
    padding: 7px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: var(--text-main);
}

.widget ul li a:hover {
    color: var(--accent);
}

/* Single Video Post Page */
.single-article {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    word-break: break-word;
}

.breadcrumbs a {
    color: var(--text-main);
    font-weight: 600;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .sep {
    margin: 0 6px;
    color: #9ca3af;
}

.single-post-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
}

.single-post-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

/* Responsive 16:9 Video Player */
.video-player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: var(--radius);
    overflow: hidden;
    margin: 16px 0 20px;
}

.video-player-container iframe,
.video-player-container video,
.video-player-container embed,
.video-player-container object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.entry-content {
    font-size: 15px;
    line-height: 1.75;
    color: #1f2937;
}

.entry-content p {
    margin-top: 0;
    margin-bottom: 16px;
}

.post-tags {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 13px;
}

.post-tags a {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.post-tags a:hover {
    background: var(--accent);
    color: #fff;
}

/* Related Posts */
.related-posts-section {
    margin-top: 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.related-heading {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 800;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}

/* Comments */
.comments-area {
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

/* Footer */
.site-footer {
    background: var(--bg-nav);
    color: #d1d5db;
    padding: 22px 0;
    margin-top: 10px;
    font-size: 13px;
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.footer-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-menu a {
    color: #d1d5db;
}

.footer-menu a:hover {
    color: #ffffff;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .content-sidebar-grid {
        grid-template-columns: 1fr;
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 680px) {
    .nav-inner {
        flex-wrap: wrap;
        padding: 8px 0;
    }
    .menu-toggle {
        display: inline-block;
    }
    .primary-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        border-top: 1px solid #374151;
        margin-top: 8px;
    }
    .primary-menu.is-open {
        display: flex;
    }
    .primary-menu .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
    }
    .header-search-form {
        flex: 1;
        max-width: 240px;
    }
    .header-search-form input[type="search"] {
        width: 100%;
    }
    .video-grid {
        grid-template-columns: 1fr;
    }
    .single-post-title {
        font-size: 20px;
    }
}

/* Video Download Button Box */
.video-download-box {
    margin: 16px 0 22px;
    text-align: center;
}

.btn-video-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.28);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-video-download:hover {
    background: var(--accent-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(225, 29, 72, 0.35);
}

.btn-video-download .download-icon {
    font-size: 18px;
    line-height: 1;
}
