/* ResuPrecision Template Gallery Stylesheet */

.template-section {
    padding: var(--space-xxxl) 0;
    background-color: var(--color-neutral);
}

.gallery-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-xxl) auto;
}

.gallery-subtitle {
    color: var(--color-tertiary);
    margin-top: var(--space-sm);
    line-height: 24px;
}

/* Category Filters Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xxl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px var(--space-lg);
    background-color: var(--color-white);
    border: 1px solid var(--outline-variant);
    border-radius: var(--rounded-full);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-secondary);
    box-shadow: var(--shadow-low);
    transition: all var(--transition-normal);
}

.filter-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-1px);
}

.filter-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    box-shadow: 0px 4px 10px rgba(37, 99, 235, 0.2);
}

/* Grid Layout */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

/* Template Card Layout */
.template-card {
    background-color: var(--color-white);
    border-radius: var(--rounded-lg);
    overflow: hidden;
    box-shadow: var(--shadow-low);
    border: 1px solid var(--surface-container-high);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-high);
    border-color: var(--outline-variant);
}

/* Image Container */
.template-image-wrapper {
    position: relative;
    width: 100%;
    height: 320px;
    background-color: var(--surface-container-low);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--surface-container);
}

.template-image-wrapper img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    border-radius: var(--rounded-sm);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.template-card:hover .template-image-wrapper img {
    transform: scale(1.04);
}

/* Hover Overlay action */
.template-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(2px);
    z-index: 2;
}

.template-card:hover .template-hover-overlay {
    opacity: 1;
}

.overlay-btn {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--rounded-full);
    box-shadow: var(--shadow-low);
    transform: translateY(10px);
    transition: all var(--transition-normal);
}

.template-card:hover .overlay-btn {
    transform: translateY(0);
}

/* Card Body Content */
.template-card-body {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: var(--color-white);
    z-index: 1;
}

.template-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.template-category-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.template-badge {
    color: var(--color-tertiary);
    font-size: 12px;
}

.template-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-secondary);
}

.template-card-desc {
    font-size: 13px;
    color: var(--color-tertiary);
    line-height: 18px;
}


.bg-architectural_premium {
    background-color: #f8fafc;
}

.bg-creative_catalyst {
    background-color: #f1f5f9;
}

.bg-ethereal_mesh {
    background-color: #e2e8f0;
}

.bg-global_director {
    background-color: #f8fafc;
}

.bg-midnight_executive {
    background-color: #f8fafc;
}

.bg-modern_split {
    background-color: #f8fafc;
}

.bg-neo_classicist {
    background-color: #f8fafc;
}

.bg-tech_minimalist {
    background-color: #eceef0;
}

/* Responsive gallery rules */
@media (max-width: 1023px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .template-grid {
        grid-template-columns: 1fr;
    }

    .gallery-subtitle {
        font-size: 14px;
    }
}