/* Additional specific styles for templates page */
.templates-main-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.template-card {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--background-card);
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.template-preview {
    position: relative;
    height: 200px;
    overflow: hidden;    
    background-image: url(../../themes/no-image.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.template-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.template-card:hover .template-preview img {
    transform: scale(1.05);
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.4));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.template-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.template-card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.template-type {
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 1.2rem;
    font-weight: 500;
    border-radius: 2rem;
    color: white;
    background-color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.template-description {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.template-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.template-author {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 1.3rem;
}

.template-actions {
    display: flex;
    gap: 1rem;
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.filter-tag {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    background-color: var(--background-dark);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-tag:hover,
.filter-tag.active {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-tag.active {
    box-shadow: var(--shadow-sm);
}

.template-search {
    max-width: 60rem;
    margin: 0 auto 3rem;
    position: relative;
}

.template-search input {
    width: 100%;
    padding: 1.5rem 2rem 1.5rem 5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background-color: var(--background-card);
    font-size: 1.6rem;
    transition: all 0.3s ease;
    outline: none;
}

.template-search input:focus {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.template-search::before {
    content: '🔍';
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.5;
}

.featured-templates {
    margin-bottom: 6rem;
}

.template-banner {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 4rem;
    margin: 2rem;
    position: relative;
    overflow: hidden;
    color: white;
}

.template-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../media/pattern.png');
    opacity: 0.1;
    pointer-events: none;
}

.template-banner h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.template-banner p {
    font-size: 1.8rem;
    opacity: 0.9;
    max-width: 80rem;
    margin: 0 auto 3rem;
    text-align: center;
}

.template-details {
    padding: 5rem 0;
}

.template-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 3rem;
    margin: 4rem 0;
}

.template-feature {
    background-color: var(--background-card);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.template-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.template-feature h4 {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.template-feature h4::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    background-color: var(--secondary-dark);
    border-radius: 50%;
    margin-right: 1rem;
    padding: 0.5rem;
    font-size: 1.4rem;
    color: white;
}

.how-to-use {
    background-color: var(--background-dark);
    padding: 5rem 0;
    margin-top: 5rem;
}

.steps-container {
    margin-top: 4rem;
    counter-reset: step-counter;
}

.step-card {
    display: grid;
    grid-template-columns: 8rem 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.step-card:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 8rem;
    left: 4rem;
    height: calc(100% - 4rem);
    width: 2px;
    background-color: var(--border-color);
}

.step-number {
    counter-increment: step-counter;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8rem;
    height: 8rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 3rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.step-content {
    padding-top: 1rem;
}

.step-content h4 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.submit-template {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    border-radius: var(--radius-lg);
    padding: 4rem;
    margin: 6rem 0;
    position: relative;
    overflow: hidden;
    text-align: center;
    color: var(--text-primary);
}

.submit-template h3 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.submit-template p {
    font-size: 1.8rem;
    max-width: 70rem;
    margin: 0 auto 3rem;
}

.template-category {
    margin-bottom: 6rem;
}

.template-example {
    background-color: var(--background-dark);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.category-header h3 {
    margin: 0;
    padding: 0;
    font-size: 2.4rem;
}

.view-all {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--primary-color);
}

.template-badge {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    font-weight: 600;
    z-index: 2;
}

.badge-new {
    background-color: var(--primary-color);
    color: white;
}

.badge-featured {
    background-color: var(--secondary-color);
    color: var(--text-primary);
}

.badge-popular {
    background-color: var(--warning-color);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .template-banner {
        padding: 3rem 2rem;
    }

    .template-features {
        grid-template-columns: 1fr;
    }

    .step-card {
        grid-template-columns: 6rem 1fr;
        gap: 1.5rem;
    }

    .step-number {
        width: 6rem;
        height: 6rem;
        font-size: 2.4rem;
    }

    .step-card:not(:last-child)::after {
        top: 6rem;
        left: 3rem;
    }
}