/* =============================================================================
   KTECH PROJECT SHORTCODES STYLES (UX BUILDER & FRONTEND)
   File: assets/css/builder/project-shortcodes.css
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. PROJECT SLIDER SHORTCODE ([project_slider])
   ----------------------------------------------------------------------------- */
.ktech-project-slider-wrapper {
    position: relative;
    width: 100%;
    margin: 25px 0;
    overflow: hidden;
}

.ktech-project-slider-container {
    position: relative;
    display: flex;
    align-items: center;
}

.ktech-project-slider-track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 5px;
    width: 100%;
    cursor: grab;
    user-select: none;
}

.ktech-project-slider-track::-webkit-scrollbar {
    display: none;
}

.ktech-project-slider-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.ktech-project-slide-item {

    flex: 0 0 calc(33.333% - 16px);
    min-width: 280px;
    scroll-snap-align: start;
    box-sizing: border-box;
}

.ktech-project-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    /* border-radius: 8px; */
    overflow: hidden;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.ktech-project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.ktech-project-card-img {
    width: 100%;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
}

.ktech-project-card:hover .ktech-project-card-img {
    transform: scale(1.03);
}

.ktech-project-card-content {
    padding: 16px 4px 8px 4px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ktech-project-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.ktech-project-card:hover .ktech-project-card-title {
    color: #2563eb;
}

.ktech-project-card-excerpt {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Navigation Arrows (Shared style defined in style.css) */


/* -----------------------------------------------------------------------------
   2. PROJECT ARCHIVE LIST SHORTCODE ([project_archive_list])
   ----------------------------------------------------------------------------- */
.ktech-project-archive-wrapper {
    color: #1e293b;
    width: 100%;
    margin: 20px 0;
}

.ktech-project-archive-wrapper * {
    box-sizing: border-box;
}

/* Featured Top Project Card */
.ktech-project-featured-card {
    display: flex;
    flex-wrap: wrap;
    background: #ffffff;
    /* border-radius: 8px; */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 40px;
    border: 1px solid #f1f5f9;
    text-decoration: none !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ktech-project-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.ktech-project-featured-media {
    flex: 1.4;
    min-width: 300px;
    min-height: 360px;
    position: relative;
    overflow: hidden;
}

.ktech-project-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.ktech-project-featured-card:hover .ktech-project-featured-media img {
    transform: scale(1.03);
}

.ktech-project-featured-info {
    flex: 1;
    min-width: 280px;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ktech-project-featured-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 16px 0;
    transition: color 0.2s ease;
}

.ktech-project-featured-card:hover .ktech-project-featured-title {
    color: #2563eb;
}

.ktech-project-featured-excerpt {
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.65;
    margin-bottom: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Common Button Link */
.ktech-project-link-btn {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.ktech-project-link-btn:hover {
    color: #1d4ed8;
    transform: translateX(3px);
}

/* Grid Layout */
.ktech-project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-bottom: 40px;
}

.ktech-project-grid-card {
    /* background: #ffffff; */
    /* border-radius: 8px; */
    overflow: hidden;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.ktech-project-grid-card:hover {
    transform: translateY(-4px);
}

.ktech-project-grid-media {
    width: 100%;
    height: 220px;
    /* border-radius: 6px; */
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
}

.ktech-project-grid-card:hover .ktech-project-grid-media {
    transform: scale(1.04);
}

.ktech-project-grid-content {
    padding: 16px 4px 8px 4px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ktech-project-grid-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 8px 0;
    transition: color 0.2s ease;
}

.ktech-project-grid-card:hover .ktech-project-grid-title {
    color: #2563eb;
}

.ktech-project-grid-excerpt {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Pagination */
.ktech-project-pagination {
    margin-top: 30px;
    text-align: center;
}

.ktech-project-pagination .nav-links {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.ktech-project-pagination a,
.ktech-project-pagination span {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.ktech-project-pagination .current,
.ktech-project-pagination a:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

/* -----------------------------------------------------------------------------
   3. RESPONSIVE BREAKPOINTS
   ----------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .ktech-project-slide-item {
        flex: 0 0 calc(50% - 12px);
    }

    .ktech-project-featured-card {
        flex-direction: column;
    }

    .ktech-project-featured-media {
        min-height: 200px;
        width: 100%;
    }

    .ktech-project-featured-info {
        padding: 28px 20px;
    }

    .ktech-project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .ktech-project-slide-item {
        flex: 0 0 85%;
    }

    .ktech-project-grid {
        grid-template-columns: 1fr;
    }
}

/* MOBILE COLUMNS OVERRIDES FOR PROJECT ARCHIVE GRID */
@media (max-width: 767px) {
    .ktech-project-grid {
        grid-template-columns: repeat(var(--mobile-cols, 1), 1fr) !important;
    }

    .ktech-project-grid.ktech-grid-m-1 {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .ktech-project-grid.ktech-grid-m-2 {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .ktech-project-grid.ktech-grid-m-3 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}