.template-hero {
    background: #f5f5f7;
    padding: 80px 15px;
    text-align: center;
}

.template-container {
    max-width: 1100px;
    margin: auto;
}

.template-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ece7ff;
    color: #5b34f5;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 30px;
}

.template-hero h1 {
    font-size: 52px;
    line-height: 1.1;
    font-weight: 800;
    color: #6a35ff;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

.template-hero p {
    font-size: 20px;
    color: #475569;
    margin-bottom: 40px;
}

.template-buttons {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.primary-btn {
    background: linear-gradient(90deg, #4f46e5, #9333ea);
    color: white;
    padding: 16px 34px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
    transition: 0.3s;
    box-shadow: 0 8px 20px rgba(91, 52, 245, 0.25);
}

.primary-btn:hover {
    transform: translateY(-3px);
}

.secondary-btn {
    border: 1.5px solid #c7c9ff;
    color: #4f46e5;
    padding: 16px 34px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 600;
    background: white;
    transition: 0.3s;
}

.secondary-btn:hover {
    background: #f8f7ff;
}

@media(max-width:768px) {

    .template-hero h1 {
        font-size: 44px;
    }

    .template-hero p {
        font-size: 17px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
        text-align: center;
    }

    .template-buttons {
        flex-direction: column;
    }
}

.template-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: none;
    background: #00a63e;
    color: white;
    padding: 15px 26px;
    border-radius: 12px;
    font-weight: 700;
    transition: .3s;
}

.template-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-blue {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border: none;
    background: #0d09cf;
    color: white;
    padding: 15px 26px;
    border-radius: 12px;
    font-weight: 700;
    transition: .3s;
}

.btn-blue:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* second section css */
.template-category-section {
    padding: 80px 20px;
    background: #f8fafc;
}

.template-wrapper {
    max-width: 1200px;
    margin: auto;
}

.template-top-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 60px;
}

.template-info-card {
    border-radius: 24px;
    padding: 35px;
    position: relative;
    overflow: hidden;
}

.excel-card {
    background: #e9f8ef;
    border: 1px solid #c8f0d6;
}

.word-card {
    background: #eef3ff;
    border: 1px solid #d7e2ff;
}

.icon-box {
    width: 55px;
    height: 55px;
    border-radius: 16px;
    background: #d5f5df;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00a63e;
    font-size: 22px;
    margin-bottom: 25px;
}

.icon-box.blue {
    background: #dbe7ff;
    color: #3563ff;
}

.template-info-card h2 {
    font-size: 34px;
    margin-bottom: 18px;
}

.template-info-card p {
    color: #5b6475;
    line-height: 1.7;
    margin-bottom: 25px;
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.tags span {
    background: #d9f7e3;
    color: #00a63e;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 13px;
}

.blue-tags span {
    background: #dfe8ff;
    color: #3563ff;
}

.template-info-card button {
    border: none;
    background: #00a63e;
    color: white;
    padding: 15px 26px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.blue-btn {
    background: #3563ff !important;
}

.green-btn {
    background: #217346 !important;
    color: white !important;
}


.template-search {
    text-align: center;
    margin-bottom: 40px;
}

.template-search p {
    margin-bottom: 20px;
    color: #475569;
}

.search-box {
    max-width: 500px;
    margin: auto;
    background: white;
    border-radius: 14px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #dbe0ea;
}

.search-box input {
    border: none;
    width: 100%;
    outline: none;
    font-size: 15px;
}

.template-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 50px;
}

.filter-btn {
    border: 1px solid #dbe0ea;
    background: white;
    padding: 12px 22px;
    border-radius: 50px;
    cursor: pointer;
    transition: .3s;
}

.filter-btn.active {
    background: linear-gradient(90deg, #4f46e5, #9333ea);
    color: white;
}

.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.gallery-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .06);
    transition: .3s;
}

.gallery-card:hover {
    transform: translateY(-8px);
}

.gallery-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.gallery-content {
    padding: 22px;
}

.gallery-content h3 {
    margin-bottom: 10px;
}

.gallery-content p {
    color: #64748b;
}

.hidden {
    display: none;
}

.gallery-buttons {
    margin-top: 15px;
}

.preview-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.3s ease;
}

.preview-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}


.template-category-section {
    padding: 40px 0 60px;
    background: #f8fafc;
}

.template-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.template-top-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.template-info-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.template-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.excel-card {
    border-top: 4px solid #217346;
}

.word-card {
    border-top: 4px solid #2b5797;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: #e8f5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-box i {
    font-size: 32px;
    color: #217346;
}

.icon-box.blue {
    background: #e8f0fe;
}

.icon-box.blue i {
    color: #2b5797;
}

.template-info-card h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.template-info-card p {
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.tags span {
    background: #f1f5f9;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #475569;
}

.template-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.template-btn.blue-btn {
    background: #217346;
    color: #fff;
}

.template-btn:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
}

.template-btn.blue-btn:hover {
    background: #1b5e3a;
}

.template-search {
    text-align: center;
    margin-bottom: 30px;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.template-search p {
    margin-bottom: 16px;
    color: #475569;
}

.search-box {
    display: flex;
    align-items: center;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    padding: 8px 16px;
    background: #fff;
}

.search-box i {
    color: #94a3b8;
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
}

.template-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    background: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
}

.filter-btn i {
    margin-right: 6px;
}

.filter-btn.active,
.filter-btn:hover {
    background: #334155;
    color: #fff;
    border-color: #334155;
}

.template-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.gallery-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

.gallery-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.gallery-content {
    padding: 20px;
}

.gallery-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.gallery-content p {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 16px;
}

.gallery-buttons {
    display: flex;
    gap: 12px;
}

.preview-btn {
    padding: 8px 20px;
    background: #f1f5f9;
    color: #334155;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.preview-btn:hover {
    background: #334155;
    color: #fff;
}

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

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

    .template-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}