/* ==================== СТРАНИЦА ИНТЕРНЕТСІЗ ШАБЛОНДАР ==================== */
.templates-page {
    min-height: 100vh;
}

.templates-section {
    padding: 60px 20px;
    background: var(--light-bg);
}

.templates-container {
    max-width: 1400px;
    margin: 0 auto;
}

.templates-title {
    font-size: 3rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.templates-description {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 50px;
}

/* ==================== СЕТКА ШАБЛОНОВ ==================== */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* ==================== КАРТОЧКА ШАБЛОНА ==================== */
.template-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.template-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.1) 0%, rgba(245, 87, 108, 0.1) 100%);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.template-card:hover::before {
    opacity: 1;
    top: -10%;
    right: -10%;
}

.template-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Бейдж с расширением */
.template-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(245, 87, 108, 0.3);
}

/* Иконка PowerPoint */
.template-icon {
    text-align: center;
    font-size: 4.5rem;
    color: #d24726;
    position: relative;
    z-index: 1;
    animation: iconBounce 3s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.template-card:hover .template-icon {
    animation: iconSpin 0.6s ease;
}

@keyframes iconSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Контент карточки */
.template-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.template-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    text-transform: capitalize;
    font-weight: 600;
}

.template-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #999;
}

.template-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.template-meta i {
    color: #f093fb;
}

/* Кнопка действия */
.template-actions {
    position: relative;
    z-index: 1;
}

.template-btn {
    width: 100%;
    padding: 14px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.template-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.template-btn:hover::before {
    width: 400px;
    height: 400px;
}

.template-btn i,
.template-btn span {
    position: relative;
    z-index: 1;
}

.template-btn-download {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.3);
}

.template-btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 87, 108, 0.4);
}

.template-btn-download i {
    font-size: 1.2rem;
}

/* ==================== НЕТ ФАЙЛОВ ==================== */
.templates-grid .no-files {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
    background: white;
    border-radius: 20px;
}

.templates-grid .no-files i {
    font-size: 5rem;
    margin-bottom: 20px;
    color: #ddd;
}

.templates-grid .no-files p {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.templates-grid .no-files-hint {
    font-size: 1rem;
    color: #bbb;
}

.templates-grid .no-files code {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #f093fb;
}

/* ==================== АДАПТИВНОСТЬ ==================== */
@media (max-width: 1024px) {
    .templates-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .templates-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .templates-section {
        padding: 40px 15px;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .templates-title {
        font-size: 2rem;
    }
    
    .templates-description {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .template-card {
        padding: 20px;
    }
    
    .template-icon {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .templates-title {
        font-size: 1.8rem;
    }
    
    .template-icon {
        font-size: 3rem;
    }
    
    .template-title {
        font-size: 1.1rem;
    }
}

