/* ============================================
   Templates Page Styles
   ============================================ */

/* Hero Section */
.templates-hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.templates-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.templates-hero-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 20px;
    line-height: 1.2;
}

.templates-hero-title .gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.templates-hero-subtitle {
    font-size: 18px;
    color: #64748b;
    line-height: 1.6;
}

/* Sections Grid */
.templates-sections {
    padding: 60px 0;
    background: #ffffff;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.section-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.section-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.section-card-link {
    display: flex;
    align-items: center;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    gap: 16px;
}

.section-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-card-icon i {
    font-size: 24px;
    color: #ffffff;
}

.section-card-content {
    flex: 1;
    min-width: 0;
}

.section-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 4px;
}

.section-card-description {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.section-card-count {
    font-size: 13px;
    color: #667eea;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-card-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.section-card-arrow i {
    color: #667eea;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.section-card:hover .section-card-arrow {
    background: #667eea;
}

.section-card:hover .section-card-arrow i {
    color: #ffffff;
    transform: translateX(2px);
}

.no-sections {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

/* Detail Page */
.templates-detail-hero {
    padding: 120px 0 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.templates-detail-breadcrumb {
    margin-bottom: 20px;
}

.templates-detail-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.templates-detail-breadcrumb a:hover {
    color: #ffffff;
}

.templates-detail-title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.templates-detail-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 600px;
}

/* Templates Grid Section */
.templates-grid-section {
    padding: 60px 0;
    background: #f8fafc;
}

.category-section {
    margin-bottom: 60px;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.template-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.template-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.template-card-image {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}

.template-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.template-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.template-card-placeholder i {
    font-size: 48px;
    color: #cbd5e1;
}

.template-card-content {
    padding: 16px;
}

.template-card-name {
    font-size: 15px;
    font-weight: 500;
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-templates {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
}

/* CTA Section */
.templates-cta {
    padding: 60px 0;
    background: #ffffff;
}

.cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 48px;
    color: #ffffff;
    text-align: center;
}

.cta-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
}

.cta-text {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.cta-actions {
    margin-bottom: 24px;
}

.cta-actions .btn {
    background: #ffffff;
    color: #667eea;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.cta-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.cta-features span {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.9;
}

.cta-features i {
    color: #4ade80;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .templates-hero {
        padding: 100px 0 40px;
    }

    .templates-hero-title {
        font-size: 28px;
    }

    .templates-hero-subtitle {
        font-size: 16px;
    }

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

    .section-card-link {
        padding: 20px;
    }

    .section-card-icon {
        width: 48px;
        height: 48px;
    }

    .section-card-icon i {
        font-size: 20px;
    }

    .section-card-title {
        font-size: 16px;
    }

    .templates-detail-hero {
        padding: 100px 0 30px;
    }

    .templates-detail-title {
        font-size: 24px;
    }

    .templates-detail-description {
        font-size: 14px;
    }

    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    .category-title {
        font-size: 20px;
    }

    .cta-card {
        padding: 32px 24px;
    }

    .cta-title {
        font-size: 22px;
    }

    .cta-features {
        flex-direction: column;
        gap: 12px;
    }
}

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

    .template-card-content {
        padding: 12px;
    }

    .template-card-name {
        font-size: 13px;
    }
}
