/*
Theme Name: 5. Midnight Cinema
Tags: video, cinema, movie, widescreen, dark
Author URI: https://velocitymedia.pro
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Requires PHP: 7.4
Version: 1.3.2
Tested up to: 6.7
Author: Velocity Media
Description: Cinematic experience with widescreen thumbnail layouts. Theater-inspired dark theme with dramatic red accent lighting.
*/

/* ===== CSS Variables ===== */
:root {
    /* Colors - Dark Theme */
    --g5-bg-primary: #0a0a0f;
    --g5-bg-secondary: #141419;
    --g5-bg-tertiary: #1c1c24;
    --g5-bg-card: #1a1a22;
    --g5-bg-hover: #252530;

    --g5-text-primary: #ffffff;
    --g5-text-secondary: #a0a0a8;
    --g5-text-muted: #6b6b75;

    --g5-accent: #ec4899;
    --g5-accent-hover: #db2777;
    --g5-accent-light: #f472b6;
    --g5-gold: #ffd700;

    --g5-border: #2a2a35;
    --g5-border-light: #3a3a45;

    /* Typography */
    --g5-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --g5-font-xs: 0.75rem;
    --g5-font-sm: 0.875rem;
    --g5-font-base: 1rem;
    --g5-font-lg: 1.125rem;
    --g5-font-xl: 1.25rem;

    /* Spacing */
    --g5-xs: 4px;
    --g5-sm: 8px;
    --g5-md: 16px;
    --g5-lg: 24px;
    --g5-xl: 32px;
    --g5-2xl: 48px;

    /* Layout */
    --g5-max-width: 1400px;
    --g5-header-height: 70px;
    --g5-sidebar-width: 320px;

    /* Border Radius */
    --g5-radius-sm: 6px;
    --g5-radius-md: 10px;
    --g5-radius-lg: 16px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--g5-font);
    font-size: var(--g5-font-base);
    line-height: 1.6;
    color: var(--g5-text-primary);
    background: var(--g5-bg-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--g5-accent);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

/* ===== Container ===== */
.g5-container {
    width: 100%;
    max-width: var(--g5-max-width);
    margin: 0 auto;
    padding: 0 var(--g5-md);
}

/* ===== Header ===== */
.g5-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(10, 10, 15, 0.98), rgba(10, 10, 15, 0.95));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--g5-border);
}

.g5-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--g5-header-height);
    gap: var(--g5-lg);
}

/* Logo */
.g5-logo {
    display: flex;
    align-items: center;
    gap: var(--g5-sm);
    flex-shrink: 0;
}

.g5-logo img {
    height: 40px;
    width: auto;
}

.g5-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--g5-accent), var(--g5-accent-light));
    border-radius: var(--g5-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 30px rgba(236, 72, 153, 0.3);
}

.g5-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.g5-logo-text span {
    color: var(--g5-accent);
}

/* Navigation */
.g5-nav {
    display: flex;
    align-items: center;
    gap: var(--g5-xs);
}

.g5-nav-link {
    padding: var(--g5-sm) var(--g5-md);
    font-size: var(--g5-font-sm);
    font-weight: 500;
    color: var(--g5-text-secondary);
    border-radius: var(--g5-radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
}

.g5-nav-link:hover,
.g5-nav-link.active {
    color: var(--g5-text-primary);
    background: var(--g5-bg-tertiary);
}

.g5-nav-link.active {
    color: var(--g5-accent);
}

/* Search Box */
.g5-search {
    flex: 1;
    max-width: 360px;
    position: relative;
}

.g5-search-form {
    display: flex;
    background: var(--g5-bg-tertiary);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-lg);
    overflow: hidden;
    transition: border-color 0.2s;
}

.g5-search-form:focus-within {
    border-color: var(--g5-accent);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.g5-search-input {
    flex: 1;
    padding: 12px var(--g5-md);
    background: transparent;
    border: none;
    color: var(--g5-text-primary);
    font-size: var(--g5-font-sm);
    outline: none;
}

.g5-search-input::placeholder {
    color: var(--g5-text-muted);
}

.g5-search-btn {
    padding: 12px var(--g5-md);
    background: none;
    border: none;
    color: var(--g5-text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.g5-search-btn:hover {
    color: var(--g5-accent);
}

/* Mobile Menu Button */
.g5-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.g5-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--g5-text-primary);
    border-radius: 2px;
    transition: all 0.2s;
}

.g5-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.g5-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.g5-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Search Toggle */
.g5-search-toggle {
    display: none;
    padding: var(--g5-sm);
    background: none;
    border: none;
    color: var(--g5-text-primary);
    cursor: pointer;
}

/* Mobile Menu */
.g5-mobile-menu {
    position: fixed;
    top: var(--g5-header-height);
    left: 0;
    bottom: 0;
    width: fit-content;
    min-width: 280px;
    max-width: 320px;
    background: var(--g5-bg-primary);
    z-index: 1001;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s, visibility 0.3s;
    visibility: hidden;
}

.g5-mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.g5-mobile-menu-inner {
    padding: var(--g5-md);
}

.g5-mobile-nav-title {
    padding: var(--g5-md) var(--g5-sm);
    font-size: var(--g5-font-xs);
    font-weight: 600;
    color: var(--g5-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--g5-border);
    margin-top: var(--g5-sm);
}

.g5-mobile-nav-link {
    display: flex;
    align-items: center;
    gap: var(--g5-sm);
    padding: var(--g5-md);
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-base);
    border-radius: var(--g5-radius-sm);
    transition: all 0.2s;
}

.g5-mobile-nav-link:hover,
.g5-mobile-nav-link.active {
    background: var(--g5-bg-hover);
    color: var(--g5-text-primary);
}

.g5-mobile-nav-link.active {
    color: var(--g5-accent);
}

/* Mobile Search */
.g5-search-mobile {
    display: none;
    padding: var(--g5-md);
}

.g5-search-mobile.active {
    display: block;
}

/* Autocomplete */
.g5-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--g5-bg-secondary);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-md);
    margin-top: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--g5-accent) var(--g5-bg-tertiary);
}

.g5-autocomplete::-webkit-scrollbar {
    width: 8px;
}

.g5-autocomplete::-webkit-scrollbar-track {
    background: var(--g5-bg-tertiary);
    border-radius: 4px;
}

.g5-autocomplete::-webkit-scrollbar-thumb {
    background: var(--g5-accent);
    border-radius: 4px;
    border: 2px solid var(--g5-bg-tertiary);
}

.g5-autocomplete::-webkit-scrollbar-thumb:hover {
    background: var(--g5-accent-light);
}

.g5-autocomplete.active {
    display: block;
}

.g5-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--g5-text-primary);
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid var(--g5-border);
}

.g5-autocomplete-item:last-child {
    border-bottom: none;
}

.g5-autocomplete-item:hover,
.g5-autocomplete-item.selected {
    background: var(--g5-bg-hover);
}

.g5-autocomplete-item svg {
    flex-shrink: 0;
    opacity: 0.5;
}

/* Hide default browser clear button on search input */
.g5-search-input::-webkit-search-cancel-button,
.g5-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.g5-search-input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}


/* ===== Main Layout ===== */
.g5-main {
    min-height: calc(100vh - var(--g5-header-height) - 200px);
    padding: var(--g5-lg) 0;
}

.g5-layout {
    display: grid;
    grid-template-columns: 1fr var(--g5-sidebar-width);
    gap: var(--g5-xl);
}

.g5-content {
    min-width: 0;
}

/* ===== Section ===== */
.g5-section {
    margin-bottom: var(--g5-2xl);
}

.g5-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--g5-lg);
    padding-bottom: var(--g5-md);
    border-bottom: 1px solid var(--g5-border);
}

.g5-section-title {
    display: flex;
    align-items: center;
    gap: var(--g5-sm);
    font-size: 1.4rem;
    font-weight: 700;
}

.g5-section-title .icon {
    font-size: 1.2rem;
}

.g5-section-link {
    color: var(--g5-accent);
    font-weight: 500;
    font-size: var(--g5-font-sm);
}

/* ===== Video Grid - Landscape 16:9 ===== */
.g5-video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--g5-md);
}

.g5-video-card {
    display: block;
    background: var(--g5-bg-card);
    border-radius: var(--g5-radius-md);
    overflow: hidden;
    transition: all 0.3s;
}

.g5-video-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.g5-video-card:hover .g5-video-overlay {
    opacity: 1;
}

.g5-video-card:hover .g5-play-btn {
    transform: scale(1);
    opacity: 1;
}

.g5-video-thumb {
    position: relative;
    aspect-ratio: var(--fv-thumb-aspect-ratio, 16/9);
    overflow: hidden;
    background: var(--g5-bg-tertiary);
}

.g5-video-thumb img {
    width: 100%;
    height: 100%;
    transition: transform 0.3s;
}

.g5-video-card:hover .g5-video-thumb img {
    transform: scale(1.08);
}

.g5-video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.g5-play-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--g5-accent);
    color: white;
    border-radius: 50%;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s;
    box-shadow: 0 0 30px rgba(229, 9, 20, 0.4);
}

.g5-play-btn:hover {
    background: var(--g5-accent-light);
    transform: scale(1.1) !important;
}

.g5-video-duration {
    position: absolute;
    bottom: var(--g5-sm);
    right: var(--g5-sm);
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: white;
}

.g5-video-quality {
    position: absolute;
    top: var(--g5-sm);
    left: var(--g5-sm);
    padding: 3px 8px;
    background: var(--g5-accent);
    border-radius: var(--g5-radius-sm);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
}

.g5-video-info {
    padding: var(--g5-md);
}

.g5-video-title {
    font-size: var(--g5-font-sm);
    font-weight: 600;
    color: var(--g5-text-primary);
    margin-bottom: var(--g5-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.g5-video-rating {
    color: var(--g5-gold);
}

/* ===== Sidebar ===== */
.g5-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--g5-lg);
    position: sticky;
    top: calc(var(--g5-header-height) + var(--g5-md));
    align-self: flex-start;
}

.g5-sidebar-section {
    background: var(--g5-bg-secondary);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-lg);
    padding: var(--g5-lg);
}

.g5-sidebar-title {
    display: flex;
    align-items: center;
    gap: var(--g5-sm);
    font-size: 1.1rem;
    font-weight: 700;
    padding-bottom: var(--g5-md);
    border-bottom: 1px solid var(--g5-border);
    color: var(--g5-text-primary);
}

.g5-sidebar-title svg {
    color: var(--g5-accent);
}

.g5-sidebar-list {
    list-style: none;
}

.g5-sidebar-list li {
    border-bottom: 1px solid var(--g5-border);
}

.g5-sidebar-list li:last-child {
    border-bottom: none;
}

.g5-sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-sm);
    transition: all 0.2s;
}

.g5-sidebar-list a:hover {
    color: var(--g5-accent);
}

/* Active state for sidebar category */
.g5-sidebar-list li.active a {
    color: var(--g5-accent);
    font-weight: 600;
}

.g5-sidebar-list li.active {
    border-left: 3px solid var(--g5-accent);
    padding-left: 10px;
    margin-left: -10px;
}

.g5-sidebar-list .count {
    color: var(--g5-text-muted);
    font-size: var(--g5-font-xs);
}

/* Tags Cloud */
.g5-tags-cloud {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: var(--g5-sm);
}

.g5-tag {
    padding: var(--g5-sm) var(--g5-md);
    background: var(--g5-bg-tertiary);
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-xs);
    border-radius: var(--g5-radius-lg);
    transition: all 0.2s;
}

.g5-tag:hover {
    background: var(--g5-accent);
    color: white;
}

/* ===== Pagination ===== */
.g5-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--g5-sm);
    margin-top: var(--g5-xl);
}

.g5-page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--g5-md);
    background: var(--g5-bg-tertiary);
    color: var(--g5-text-secondary);
    font-weight: 500;
    border-radius: var(--g5-radius-sm);
    transition: all 0.2s;
}

.g5-page-link:hover:not(.disabled):not(.active) {
    background: var(--g5-bg-hover);
    color: var(--g5-text-primary);
}

.g5-page-link.active {
    background: var(--g5-accent);
    color: white;
}

.g5-page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Footer ===== */
.g5-footer {
    background: var(--g5-bg-secondary);
    border-top: 1px solid var(--g5-border);
    padding: var(--g5-2xl) 0 var(--g5-lg);
    margin-top: var(--g5-lg);
}

/* ===== Back to Top ===== */
.g5-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--g5-accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.g5-back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.g5-back-to-top:hover {
    background: var(--g5-accent-hover);
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(229, 9, 20, 0.5);
}

.g5-back-to-top svg {
    width: 24px;
    height: 24px;
}

.g5-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: var(--g5-xl);
    margin-bottom: var(--g5-xl);
}

.g5-footer-logo {
    display: flex;
    align-items: center;
    gap: var(--g5-sm);
    margin-bottom: var(--g5-md);
}

.g5-footer-desc {
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-sm);
    line-height: 1.7;
    margin-bottom: var(--g5-md);
}

.g5-footer-title {
    font-size: var(--g5-font-base);
    font-weight: 700;
    margin-bottom: var(--g5-md);
    color: var(--g5-text-primary);
}

.g5-footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--g5-sm);
}

.g5-footer-links a {
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-sm);
    transition: color 0.2s;
}

.g5-footer-links a:hover {
    color: var(--g5-accent);
}

.g5-footer-bottom {
    padding-top: var(--g5-lg);
    border-top: 1px solid var(--g5-border);
    text-align: center;
    color: var(--g5-text-muted);
    font-size: var(--g5-font-sm);
}

/* ===== No Data ===== */
.g5-no-data {
    text-align: center;
    padding: 60px 20px;
    color: var(--g5-text-secondary);
}

.g5-no-data svg {
    margin: 0 auto 16px;
    opacity: 0.3;
}

/* ===== 404 ===== */
.g5-404 {
    text-align: center;
    padding: 80px 20px;
}

.g5-404 h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--g5-accent);
}

.g5-404 p {
    color: var(--g5-text-secondary);
    margin: var(--g5-md) 0 var(--g5-xl);
}

.g5-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--g5-sm);
    padding: 14px var(--g5-xl);
    background: var(--g5-accent);
    color: white;
    font-weight: 600;
    border-radius: var(--g5-radius-md);
    transition: all 0.2s;
}

.g5-btn:hover {
    background: var(--g5-accent-hover);
    color: white;
    transform: translateY(-2px);
}

/* ===== Breadcrumb ===== */
.g5-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: var(--g5-md) 0;
    font-size: var(--g5-font-sm);
    color: var(--g5-text-muted);
    flex-wrap: wrap;
}

.g5-breadcrumb a {
    color: var(--g5-text-secondary);
}

.g5-breadcrumb a:hover {
    color: var(--g5-accent);
}

.g5-breadcrumb svg {
    opacity: 0.5;
    flex-shrink: 0;
}

/* ===== Player Wrapper ===== */
.g5-player-wrapper {
    background: var(--g5-bg-secondary);
    border-radius: var(--g5-radius-lg);
    overflow: hidden;
    margin-bottom: var(--g5-lg);
}

.g5-server-selector {
    display: flex;
    align-items: center;
    gap: var(--g5-sm);
    padding: var(--g5-md);
    background: var(--g5-bg-tertiary);
    border-bottom: 1px solid var(--g5-border);
    flex-wrap: wrap;
}

.g5-server-btn {
    padding: 8px 16px;
    background: var(--g5-bg-card);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-sm);
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.g5-server-btn:hover {
    background: var(--g5-bg-hover);
    color: var(--g5-text-primary);
}

.g5-server-btn.active {
    background: var(--g5-accent);
    border-color: var(--g5-accent);
    color: white;
}

.g5-player {
    position: relative;
    background: #000;
}

.g5-player iframe,
.g5-player video {
    width: 100%;
    height: 100%;
}

.g5-player .player-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* ===== Video Details ===== */
.g5-video-details {
    padding: var(--g5-lg);
    background: var(--g5-bg-secondary);
    border-radius: var(--g5-radius-lg);
}

.g5-video-details h1 {
    font-size: var(--g5-font-xl);
    font-weight: 700;
    margin-bottom: var(--g5-md);
    line-height: 1.4;
}

.g5-video-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--g5-lg);
    padding: var(--g5-md) 0;
    border-bottom: 1px solid var(--g5-border);
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-sm);
}

.g5-video-stats span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.g5-video-stats svg {
    opacity: 0.7;
}

.g5-video-description {
    padding: var(--g5-lg) 0;
    color: var(--g5-text-secondary);
    line-height: 1.8;
}

.g5-video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--g5-sm);
}

/* ===== Like Button ===== */
.g5-like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--g5-bg-tertiary);
    border: 1px solid var(--g5-border);
    border-radius: var(--g5-radius-md);
    color: var(--g5-text-secondary);
    font-size: var(--g5-font-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.g5-like-btn:hover {
    background: var(--g5-bg-hover);
    color: var(--g5-accent);
    border-color: var(--g5-accent);
}

.g5-like-btn.liked {
    color: var(--g5-accent);
    transform: scale(1.05);
}

.g5-like-btn.liked .g5-like-icon {
    animation: g5-like-pop 0.3s ease;
}

@keyframes g5-like-pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .g5-video-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .g5-layout {
        grid-template-columns: 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .g5-header-inner {
        justify-content: flex-start;
    }

    .g5-logo {
        margin-right: auto;
    }

    .g5-nav {
        display: none;
    }

    .g5-menu-toggle {
        display: flex;
    }

    .g5-search-toggle {
        display: flex;
    }

    .g5-search {
        display: none;
    }

    .g5-layout {
        grid-template-columns: 1fr;
    }

    .g5-sidebar-list {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
    }

    .g5-autocomplete {
        position: relative;
    }
}

@media (max-width: 768px) {
    .g5-video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--g5-sm);
    }

    .g5-sidebar {
        grid-template-columns: 1fr;
    }

    .g5-footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: center;
    }

    .g5-footer-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .g5-footer-logo {
        justify-content: center;
    }
}

@media (max-width: 425px) {
    .g5-video-grid {
        grid-template-columns: 1fr;
    }

    .g5-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--g5-sm);
    }

    .g5-sidebar-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .g5-footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .g5-header-inner {
        gap: 10px;
    }
}