/* =================================================================
   VIDEO TUTORIALS PAGE - STYLES
   Red / Coral colour scheme (YouTube-inspired)
   ================================================================= */

/* Mobile header spacing */
.video-tutorials-page { padding-top: var(--fixed-header-height, 80px); }

/* =================================================================
   HERO SECTION
   ================================================================= */

.vt-hero {
    width: 100%;
    margin: 0;
    padding: 3rem 0;
    background: rgba(255, 255, 255, 0.04);
    position: relative;
}

.vt-hero-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 0.55fr 0.45fr;
    gap: 2.5rem;
    align-items: center;
}

.vt-hero-content {
    position: relative;
    z-index: 1;
}

/* Pill badge */
.vt-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.34rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 71, 87, 0.7);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 107, 107, 0.3));
    color: #ff9a9e;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
}

.vt-hero-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #ff4757;
    box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.8);
    animation: vt-pill-ping 1.8s infinite;
    flex-shrink: 0;
}

@keyframes vt-pill-ping {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.8); }
    50%       { box-shadow: 0 0 0 6px rgba(255, 71, 87, 0); }
}

.vt-hero-content h1 {
    margin: 0;
    margin-top: 1.5rem;
    font-size: clamp(2.4rem, 3.8vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.vt-hero-content p {
    margin: 1.2rem 0 0;
    color: rgba(255, 255, 255, 0.7);
    max-width: 100%;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Stat pills */
.vt-hero-stats {
    margin-top: 1.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.vt-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 500;
}

.vt-stat-pill strong {
    color: #fff;
    font-weight: 700;
}

/* Decorative visual */
.vt-hero-visual {
    position: relative;
}

.vt-hero-grid-mock {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 20px;
    border: 1px solid rgba(255, 71, 87, 0.2);
    background:
        radial-gradient(circle at top left, rgba(255, 71, 87, 0.12), transparent 55%),
        radial-gradient(circle at bottom right, rgba(255, 107, 107, 0.1), transparent 60%),
        rgba(10, 14, 19, 0.95);
    padding: 1.4rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

.vt-hero-card {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1.2rem 0.8rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vt-hero-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.15);
}

.vt-hero-card--1 { background: linear-gradient(135deg, rgba(255, 71, 87, 0.18), rgba(255, 107, 107, 0.08)); }
.vt-hero-card--2 { background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(0, 255, 136, 0.08)); }
.vt-hero-card--3 { background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(139, 92, 246, 0.08)); }
.vt-hero-card--4 { background: linear-gradient(135deg, rgba(255, 165, 2, 0.15), rgba(251, 146, 60, 0.08)); }

.vt-hero-card-icon {
    font-size: 2rem;
    line-height: 1;
    animation: vt-icon-float 3s ease-in-out infinite;
}

.vt-hero-card--2 .vt-hero-card-icon { animation-delay: 0.5s; }
.vt-hero-card--3 .vt-hero-card-icon { animation-delay: 1s; }
.vt-hero-card--4 .vt-hero-card-icon { animation-delay: 1.5s; }

@keyframes vt-icon-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-4px) scale(1.1); }
}

.vt-hero-card-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
}

/* Hero responsive */
@media (max-width: 900px) {
    .vt-hero {
        padding: 0;
        margin: 0;
        margin-bottom: 1.5rem;
    }

    .vt-hero-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        margin: 0;
    }

    .vt-hero-content {
        order: 2;
        padding: 2rem 1.75rem;
    }

    .vt-hero-visual {
        order: 1;
    }

    .vt-hero-grid-mock {
        border-radius: 0;
        border: none;
        box-shadow: none;
        aspect-ratio: auto;
    }
}

@media (max-width: 768px) {
    .vt-hero-content h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
        margin-top: 1rem;
    }

    .vt-hero-content p {
        font-size: 0.95rem;
        margin-top: 1rem;
    }

    .vt-hero-content {
        padding: 1.75rem 1.25rem;
    }

    .vt-hero-card-icon {
        font-size: 1.6rem;
    }

    .vt-hero-card-label {
        font-size: 0.72rem;
    }
}

/* =================================================================
   MAIN CONTENT AREA
   Override .main-content from tool-style.css since hero provides
   the top spacing instead of the default 6rem margin-top.
   ================================================================= */

.video-tutorials-page .vt-main-content {
    margin-top: 2rem;
    padding-bottom: 3rem;
}

@media (max-width: 992px) {
    .video-tutorials-page .vt-main-content {
        margin-top: 1.5rem;
    }
}
@media (max-width: 768px) {
    .video-tutorials-page .vt-main-content {
        margin-top: 1rem;
    }
}
@media (max-width: 480px) {
    .video-tutorials-page .vt-main-content {
        margin-top: 0.5rem;
    }
}

/* =================================================================
   VIDEOS SECTION (standalone context)
   ================================================================= */

.vt-videos-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
}

.vt-videos-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vt-videos-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

/* Controls row */
.vt-controls-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Level filter pills */
.vt-level-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vt-filter-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vt-filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.vt-filter-pill.active {
    background: var(--accent-primary, #00d4ff);
    color: #000;
    border-color: var(--accent-primary, #00d4ff);
    font-weight: 600;
}

.vt-filter-pill.active .vt-pill-count {
    background: rgba(0, 0, 0, 0.25);
    color: #000;
}

.vt-pill-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    margin-left: 4px;
    line-height: 1;
}

/* Date filter */
.vt-date-filter-wrapper {
    flex-shrink: 0;
}

.vt-date-select {
    padding: 0.45rem 2rem 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

.vt-date-select:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.vt-date-select:focus,
.vt-date-select:focus-visible {
    outline: none !important;
    box-shadow: none;
    border-color: var(--accent-primary, #00d4ff);
    background-color: rgba(255, 255, 255, 0.07);
}

.vt-date-select option {
    background: #1a1a2e;
    color: #fff;
}

/* Search */
.vt-search-wrapper {
    margin-left: auto;
    flex-shrink: 0;
}

.vt-search-box {
    position: relative;
    width: 240px;
}

.vt-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.vt-search-input {
    width: 100%;
    padding: 0.5rem 2.2rem 0.5rem 2.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: #fff;
    font-size: 0.8rem;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.vt-search-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.vt-search-input:focus,
.vt-search-input:focus-visible {
    border-color: var(--accent-primary, #00d4ff);
    background: rgba(255, 255, 255, 0.07);
    outline: none !important;
    box-shadow: none;
}

.vt-search-clear {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background 0.15s ease;
}

.vt-search-clear:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* =================================================================
   VIDEO GRID & CARDS
   ================================================================= */

.vt-videos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.vt-video-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.vt-video-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.vt-video-card-hidden {
    display: none;
}

.vt-video-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    overflow: hidden;
    background: #000;
}

.vt-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vt-video-card:hover .vt-video-thumbnail img {
    transform: scale(1.05);
}

.vt-video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease;
}

.vt-video-thumbnail:hover .vt-video-play-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.vt-play-icon {
    transition: transform 0.2s ease;
}

.vt-video-thumbnail:hover .vt-play-icon {
    transform: scale(1.1);
}

.vt-video-iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
}

.vt-video-info {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vt-video-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tool name badge */
.vt-video-tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent-primary, #00d4ff);
    text-decoration: none;
    transition: color 0.2s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vt-video-tool-badge:hover {
    color: var(--accent-secondary, #00ff88);
}

.vt-video-tool-badge svg {
    flex-shrink: 0;
}

/* Level badges */
.vt-video-level-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.vt-video-level-badge.level-beginner {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.vt-video-level-badge.level-intermediate {
    background: rgba(255, 165, 2, 0.15);
    color: #ffa502;
}

.vt-video-level-badge.level-advanced {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.vt-video-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vt-video-channel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease;
}

.vt-video-channel-link:hover {
    color: #ff4757;
}

.vt-video-channel-link svg {
    flex-shrink: 0;
}

/* Bookmark button */
.vt-video-bookmark-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    background: none;
    border: none;
    padding: 0.2rem 0.35rem;
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.vt-video-bookmark-btn:hover {
    color: #00d4ff;
    background: rgba(0, 212, 255, 0.08);
}

.vt-video-bookmark-btn.bookmarked {
    color: #00d4ff;
}

.vt-video-bookmark-btn.bookmarked:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.08);
}

.vt-video-bookmark-btn svg {
    flex-shrink: 0;
}

/* =================================================================
   PAGINATION
   ================================================================= */

.vt-pagination-wrapper {
    margin-top: 1.5rem;
}

.vt-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.vt-pg-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vt-pg-btn:hover:not(.vt-pg-disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-primary, #00d4ff);
    color: #fff;
}

.vt-pg-btn.vt-pg-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.vt-pg-arrow {
    font-size: 1.15rem;
    line-height: 1;
}

.vt-pg-numbers {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0 0.5rem;
}

.vt-pg-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    user-select: none;
}

.vt-pg-num {
    min-width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vt-pg-num:hover:not(.vt-pg-active) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.vt-pg-num.vt-pg-active {
    background: linear-gradient(135deg, var(--accent-primary, #00d4ff), var(--accent-secondary, #00ff88));
    border-color: transparent;
    color: #0a0e13;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 212, 255, 0.35);
}

.vt-pg-info {
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
}

.vt-pg-total {
    color: rgba(255, 255, 255, 0.35);
}

/* No results */
.vt-no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    display: none;
}

.vt-no-results h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

/* =================================================================
   RESPONSIVE
   ================================================================= */

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

@media (max-width: 768px) {
    .vt-videos-section {
        padding: 1.5rem 1rem;
    }

    .vt-pg-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    .vt-pg-numbers {
        margin: 0 0.25rem;
        gap: 0.2rem;
    }

    .vt-pg-num,
    .vt-pg-ellipsis {
        min-width: 32px;
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .vt-videos-section {
        padding: 1.25rem 0.75rem;
    }

    .vt-controls-row {
        flex-direction: column;
        align-items: stretch;
    }

    .vt-date-select,
    .vt-tool-select {
        width: 100%;
        max-width: none;
    }

    .vt-search-wrapper {
        margin-left: 0;
    }

    .vt-search-box {
        width: 100%;
    }

    .vt-videos-grid {
        grid-template-columns: 1fr;
    }

    .vt-level-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .vt-filter-pill {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .vt-pagination {
        flex-direction: column;
        gap: 0.75rem;
    }

    .vt-pg-numbers {
        order: 1;
        margin: 0;
    }

    .vt-pg-prev { order: 2; }
    .vt-pg-next { order: 3; }

    .vt-pg-btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .vt-pg-info { order: 4; }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary, #00d4ff), var(--accent-secondary, #00ff88));
    color: #0a0e13;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(0, 212, 255, 0.3);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px);
}
