/* ═══════════════════════════════════════
   TUTORIALS PAGE
═══════════════════════════════════════ */

.tutorial-section {
    margin: 30px 0;
}

.tutorial-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--white);
    text-shadow: 3px 4px 0 rgba(0,0,0,0.25);
    text-align: center;
    margin-bottom: 24px;
    -webkit-text-stroke: 1.8px rgba(0,0,0,0.18);
    paint-order: stroke fill;
    letter-spacing: 0.5px;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    width: 100%;
}

.tutorial-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tutorial-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #2a2a4a;
    border: 3px solid #353232;
}

.tutorial-thumbnail:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.tutorial-thumbnail img,
.thumbnail-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.tutorial-thumbnail:hover .play-overlay {
    opacity: 1;
}

.tutorial-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    text-align: center;
    line-height: 1.3;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════
   VIDEO MODAL
═══════════════════════════════════════ */

.tutorial-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tutorial-modal.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.modal-dialog {
    position: relative;
    z-index: 1001;
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    background: linear-gradient(135deg, var(--navy) 0%, #0d1a3a 100%);
    border-radius: 16px;
    border: 3px solid var(--coral);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(255, 107, 122, 0.3), 0 0 40px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    animation: slideUp 0.3s ease;
    margin: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid rgba(255, 107, 122, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

.modal-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--white);
    margin: 0;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.3);
    -webkit-text-stroke: 0.8px rgba(0,0,0,0.15);
    paint-order: stroke fill;
    letter-spacing: 0.5px;
    flex: 1;
}

.modal-close {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--coral) 0%, var(--coral-dark) 100%);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 107, 122, 0.3);
    margin-left: 12px;
}

.modal-close:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(255, 107, 122, 0.4);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.modal-body {
    flex: 1;
    padding: 16px;
    background: #000;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-video {
    width: 100%;
    height: 100%;
    max-height: calc(85vh - 80px);
    display: block;
    border-radius: 8px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */

@media (max-width: 1024px) {
    .tutorial-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .tutorial-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .tutorial-section {
        margin: 20px 0;
    }

    .tutorial-title {
        margin-bottom: 16px;
    }

    .modal-dialog {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
        border-width: 2px;
    }

    .modal-header {
        padding: 16px 20px;
        gap: 12px;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .modal-close {
        width: 40px;
        height: 40px;
    }

    .modal-close svg {
        width: 18px;
        height: 18px;
    }

    .modal-body {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .tutorial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .tutorial-thumbnail {
        border-width: 2px;
    }

    .tutorial-label {
        font-size: 0.75rem;
    }

    .modal-dialog {
        width: 98%;
        max-height: 95vh;
        border-radius: 10px;
    }

    .modal-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }

    .modal-title {
        font-size: 1.1rem;
        flex: 1 1 100%;
        margin-bottom: 8px;
    }

    .modal-close {
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        margin-left: 0;
    }

    .modal-close svg {
        width: 16px;
        height: 16px;
    }
}
