/* Mobile Styles for WP-XV Theme */

/* Mobile devices (up to 767px) */
@media (max-width: 767px) {
    /* Body padding */
    body {
        padding-top: 40px;
        padding: 4px 8px 8px;
    }

    /* Container */
    .container {
        padding: 0 8px;
    }

    /* Header Mobile Layout */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        z-index: 1000;
        padding: 8px 0;
    }

    .header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0;
        gap: 10px;
    }

    /* Site Branding - Center on Mobile */
    .site-branding {
        flex: 1;
        justify-content: center;
        text-align: center;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .site-title {
        font-size: 16px;
    }

    .custom-logo {
        max-height: 30px;
    }

    /* Desktop Search and Navigation - Hide on Mobile */
    .desktop-search,
    .desktop-navigation {
        display: none !important;
    }

    /* Mobile Toggles - Show on Mobile */
    .mobile-categories-toggle,
    .mobile-search-toggle,
    .mobile-menu-toggle {
        display: block;
        font-size: 18px;
    }

    /* Mobile Search Form */
    .mobile-search {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #dee3ed;
    }

    .mobile-search.active {
        display: block !important;
    }

    /* Mobile Categories Menu */
    .mobile-categories-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: #fff;
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;
        transition: left 0.3s ease;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }

    .mobile-categories-menu.active {
        left: 0;
        display: block !important;
    }

    .mobile-categories-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #dee3ed;
    }

    .mobile-categories-header h3 {
        font-size: 18px;
        margin: 0;
        color: #000;
        font-weight: 700;
    }

    .mobile-categories-close {
        background: none;
        border: none;
        color: #000;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
    }

    .mobile-categories-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-categories-list li {
        border-bottom: 1px solid #dee3ed;
    }

    .mobile-categories-list a {
        display: block;
        padding: 12px 0;
        color: #000;
        font-size: 14px;
        font-family: Arial, sans-serif;
    }

    .mobile-categories-list a:hover {
        color: #de2600;
    }

    /* Mobile Additional Menu */
    .mobile-additional-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        background-color: #fff;
        z-index: 9999;
        overflow-y: auto;
        padding: 20px;
        transition: right 0.3s ease;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }

    .mobile-additional-menu.active {
        right: 0;
        display: block !important;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #dee3ed;
    }

    .mobile-menu-header h3 {
        font-size: 18px;
        margin: 0;
        color: #000;
        font-weight: 700;
    }

    .mobile-menu-close {
        background: none;
        border: none;
        color: #000;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
    }

    .mobile-menu-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-menu-list li {
        border-bottom: 1px solid #dee3ed;
    }

    .mobile-menu-list a {
        display: block;
        padding: 12px 0;
        color: #000;
        font-size: 14px;
        font-family: Arial, sans-serif;
    }

    .mobile-menu-list a:hover {
        color: #de2600;
    }

    /* Video Grid - Mobile (1 column) */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .video-card {
        border: 1px solid #dee3ed;
    }

    .video-thumbnail {
        width: 100%;
        height: auto;
        padding-top: 56.25%;
    }

    .video-thumbnail img {
        position: absolute;
        top: 0;
        left: 0;
    }

    .video-title {
        font-size: 12px;
        padding: 10px;
        min-height: auto;
        line-height: 1.5;
    }

    /* Related Videos - 2 columns, 6 rows (12 videos) */
    .related-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Breadcrumbs */
    .breadcrumbs {
        font-size: 11px;
        padding: 10px 0;
    }

    .breadcrumb-separator {
        margin: 0 5px;
    }

    /* Headings */
    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }

    /* Category Header */
    .category-header h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .category-description {
        font-size: 12px;
    }

    /* Single Video Page */
    .video-header h1 {
        font-size: 20px;
        margin-bottom: 12px;
    }

    .video-categories {
        gap: 6px;
        margin-bottom: 15px;
    }

    .video-categories a {
        padding: 4px 8px;
        font-size: 11px;
    }

    .video-content {
        font-size: 12px;
        margin-bottom: 20px;
    }

    /* Pagination */
    .pagination {
        gap: 3px;
        margin: 20px 0;
        flex-wrap: wrap;
    }

    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }

    /* Footer */
    .site-footer {
        padding: 20px 0;
        margin-top: 30px;
    }

    .footer-content {
        font-size: 12px;
    }

    /* Search Form */
    .search-form input[type="search"] {
        font-size: 12px;
        padding: 8px 10px;
    }

    .search-form button {
        padding: 8px 12px;
        font-size: 12px;
    }

    /* Main Content */
    .site-main {
        padding: 15px 0;
    }

    /* Related Videos Section */
    .related-videos {
        margin-top: 20px;
    }

    .related-videos h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    /* Overlay for mobile menus */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 9997;
        cursor: pointer;
    }

    .mobile-menu-overlay.active {
        display: block;
    }
}

/* Very small mobile devices (up to 480px) */
@media (max-width: 480px) {
    /* Video Grid stays 1 column */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .video-title {
        font-size: 12px;
        padding: 8px;
    }

    /* Related Videos - 2 columns on very small screens */
    .related-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    /* Site Title */
    .site-title {
        font-size: 14px;
    }

    .custom-logo {
        max-height: 25px;
    }

    /* Mobile menus width adjustment */
    .mobile-categories-menu,
    .mobile-additional-menu {
        width: 85%;
    }
}

/* Tablet devices (768px to 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    /* Container */
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    /* Video Grid - 4 columns on tablet */
    .video-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    /* Related Videos - 4 columns on tablet */
    .related-videos-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }

    /* Search Form */
    .search-form {
        max-width: 400px;
    }

    /* Navigation */
    .main-navigation a {
        font-size: 12px;
    }

    .main-navigation ul {
        gap: 15px;
    }
}
