/**
 * HDev Library Module - Documents Tab Styles
 * Carousel hiển thị 2 documents/row với aspect ratio 9:16
 */

/* ===================================
   DOCUMENTS CAROUSEL WRAPPER
   =================================== */
.hdev-documents-carousel-wrapper {
    position: relative;
    margin: 0 auto 0;
    padding: 0 80px;
}

/* ===================================
   CAROUSEL CONTAINER
   =================================== */
.hdev-documents-carousel {
    overflow: hidden;
    width: 100%;
}

.hdev-documents-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    transition: transform 0.6s cubic-bezier(0.215, 0.610, 0.355, 1.000);
}


/* ===================================
   DOCUMENT ITEM
   =================================== */
.hdev-document-item {
    flex: 0 0 calc(50% - 15px);
    /* Each item takes 50% width minus half the gap on desktop */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hdev-document-thumbnail {
    position: relative;
    aspect-ratio: 3/ 4;
    border-radius: 1.25rem;
    overflow: hidden;
    cursor: pointer;
}

.hdev-document-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hdev-document-item:hover .hdev-document-thumbnail img {
    transform: scale(1.05);
}

/* ===================================
   HOVER OVERLAY & DOWNLOAD BUTTON
   =================================== */
.hdev-document-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hdev-document-item:hover .hdev-document-overlay {
    opacity: 1;
}

.hdev-document-download {
    width: 4.375rem;
    height: 4.375rem;
    border-radius: 50%;
    background: linear-gradient(90deg, #e4b477 0%, #f7da81 50%, #e4b477 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.5s ease-in-out;
    transform: scale(0);
    position: relative;
}

.hdev-document-item:hover .hdev-document-download {
    transform: scale(1);
}

.hdev-document-download::after {
    content: '';
    position: absolute;
    top: -0.625rem;
    left: -0.625rem;
    right: -0.625rem;
    bottom: -0.625rem;
    background: rgba(255, 206, 123, 0.2);
    border-radius: 50%;
    z-index: -1;
}

.hdev-document-download svg {
    width: auto;
    height: 50%;
    fill: var(--color-primary);
}

/* ===================================
   DOCUMENT TITLE
   =================================== */
.hdev-document-title {
    font-family: var(--hdev-font-heading);
    font-size: var(--hdev-fs-text-desc);
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin: 0;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===================================
   NAVIGATION ARROWS
   =================================== */
.hdev-docs-nav {
    position: absolute;
    top: 35%;
    transform: translateY(-50%);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    padding: 0;
}

.hdev-docs-nav svg {
    width: 60px;
    height: 60px;
    stroke: var(--color-primary);
    transition: stroke 0.3s ease;
}

.hdev-docs-prev {
    left: 0;
}

.hdev-docs-next {
    right: 0;
}

/* ===================================
   DOT PAGINATION
   =================================== */
.hdev-documents-pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.hdev-docs-dot {
    font-size: 16px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.hdev-docs-dot:hover {
    color: var(--color-secondary);
    transform: scale(1.2);
}

.hdev-docs-dot.active {
    color: var(--color-primary);
    transform: scale(1.3);
}

/* ===================================
   RESPONSIVE - DESKTOP
   =================================== */
@media (min-width: 1600px) {
    .hdev-documents-carousel-wrapper {
        max-width: 730px;
    }

    .hdev-docs-nav {
        top: 43%;
    }
}

/* ===================================
   RESPONSIVE - LAPTOP
   =================================== */
@media (max-width: 1599px) and (min-width: 850px) {
    .hdev-documents-carousel-wrapper {
        max-width: 600px;
    }

    .hdev-docs-nav {
        top: 35%;
    }
}

/* ===================================
   RESPONSIVE - TABLET
   =================================== */
@media (max-width: 1199px) {
    .hdev-documents-carousel-wrapper {
        max-width: var(--container-width-xs);
        padding: 0 50px;
        margin-top: 40px;
    }

    .hdev-documents-track {
        gap: 20px;
    }

    .hdev-docs-nav {
        width: 50px;
        height: 50px;
    }

    .hdev-docs-nav svg {
        width: 20px;
        height: 20px;
    }
}

/* ===================================
   RESPONSIVE - MOBILE (Carousel Style)
   =================================== */
@media (max-width: 767px) {
    .hdev-documents-carousel-wrapper {
        padding: 0 50px;
        margin-top: 30px;
    }

    .hdev-documents-track {
        display: flex;
        gap: 20px;
        /* Don't use grid on mobile, use flexbox for carousel */
    }

    .hdev-document-item {
        flex: 0 0 100%;
        gap: 12px;
        /* Each item takes full width */
    }

    .hdev-document-title {
        font-size: 14px;
    }

    .hdev-docs-nav {
        display: none;
        /* Hide arrows on mobile - users can swipe */
    }

    .hdev-docs-nav svg {
        width: 40px;
        height: 40px;
    }

    .hdev-docs-prev {
        left: 5px;
    }

    .hdev-docs-next {
        right: 5px;
    }

    .hdev-document-download {
        padding: 12px 20px;
        font-size: 13px;
    }

    .hdev-document-download svg {
        width: 22px;
        height: 22px;
    }

    .hdev-documents-pagination {
        margin-top: 25px;
        gap: 8px;
    }

    .hdev-docs-dot {
        font-size: 14px;
    }
}