/*
 * Single Template Format Taxonomy - Modern Hero & Template Grid
 * Responsive, modern design with gradient backgrounds and smooth animations
 */

/* ==========================================
   Reset & Base
========================================== */
.tf-single-main {
    --tf-color: #667eea;
    --tf-color-light: color-mix(in srgb, var(--tf-color) 20%, white);
    --tf-color-dark: color-mix(in srgb, var(--tf-color) 80%, black);
    background: #0a0a0f;
    color: #e5e7eb;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

/* ==========================================
   Hero Section
========================================== */
.tf-hero {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 120px 20px 0;
    background: #0a0a0f;
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
}

/* Hero Background */
.tf-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.tf-hero__gradient {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    filter: blur(60px);
}

.tf-hero__pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0);
    background-size: 40px 40px;
    opacity: 0.3;
}

/* Animated Orbs */
.tf-hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float-orb 20s ease-in-out infinite;
}

.tf-hero__orb--1 {
    width: 400px;
    height: 400px;
    background: var(--tf-color);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.tf-hero__orb--2 {
    width: 300px;
    height: 300px;
    background: color-mix(in srgb, var(--tf-color) 50%, #f093fb);
    bottom: -100px;
    left: -100px;
    animation-delay: 7s;
}

.tf-hero__orb--3 {
    width: 350px;
    height: 350px;
    background: color-mix(in srgb, var(--tf-color) 70%, #00f2fe);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-30px, -30px) scale(1.1); }
    50% { transform: translate(30px, -20px) scale(0.9); }
    75% { transform: translate(-20px, 30px) scale(1.05); }
}

/* Hero Container */
.tf-hero__container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 60px;
    overflow: visible;
}

/* Hero Content */
.tf-hero__content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.tf-hero__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: icon-pulse 3s ease-in-out infinite;
}

.tf-hero__icon svg {
    width: 100%;
    height: 100%;
    color: var(--tf-color);
    filter: drop-shadow(0 0 20px var(--tf-color));
}

@keyframes icon-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tf-hero__badge {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--tf-color), var(--tf-color-dark));
    color: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tf-hero__title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 16px;
    background: linear-gradient(135deg, #fff, var(--tf-color-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: title-glow 2s ease-in-out infinite alternate;
}

@keyframes title-glow {
    from { filter: drop-shadow(0 0 20px rgba(255,255,255,0.3)); }
    to { filter: drop-shadow(0 0 40px var(--tf-color)); }
}

.tf-hero__subtitle {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    color: var(--tf-color);
    margin: 0 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tf-hero__desc {
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.7;
    color: #9ca3af;
    margin: 0 0 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature Chips */
.tf-hero__features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
}

.tf-feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e7eb;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tf-feature-chip:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--tf-color);
    transform: translateY(-2px);
}

.tf-feature-chip svg {
    width: 16px;
    height: 16px;
    color: var(--tf-color);
}

/* Hero Actions */
.tf-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.tf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.tf-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.tf-btn--primary {
    background: linear-gradient(135deg, var(--tf-color), var(--tf-color-dark));
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 40px var(--tf-color-light);
}

.tf-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.4), 0 0 60px var(--tf-color);
}

.tf-btn--primary:hover svg {
    transform: translateY(4px);
}

.tf-btn--ghost {
    background: rgba(255,255,255,0.05);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.tf-btn--ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--tf-color);
    transform: translateY(-2px);
}

.tf-btn--ghost:hover svg {
    transform: translateX(4px);
}

/* Hero Stats */
.tf-hero__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    max-width: 700px;
    margin: 0 auto;
}

.tf-stat {
    padding: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.tf-stat:hover {
    transform: translateY(-4px);
    border-color: var(--tf-color);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.tf-stat__num {
    display: block;
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--tf-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.tf-stat__label {
    display: block;
    font-size: 14px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   Templates Section
========================================== */
.tf-templates {
    padding: 0 20px 80px;
    background: #0a0a0f;
    position: relative;
    margin-top: 0;
}

.tf-templates__container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Header */
.tf-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.tf-section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--tf-color-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px;
}

.tf-section-desc {
    font-size: 18px;
    color: #9ca3af;
    margin: 0;
}

/* Templates Grid */
.tf-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* Template Card */
.tf-template-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tf-template-card:hover {
    transform: translateY(-8px);
    border-color: var(--tf-color);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 40px var(--tf-color-light);
}

/* Card Thumbnail */
.tf-template-card__thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(0,0,0,0.3));
}

.tf-template-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tf-template-card:hover .tf-template-card__thumb img {
    transform: scale(1.1);
}

.tf-template-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
}

.tf-template-card__thumb-placeholder svg {
    width: 80px;
    height: 80px;
}

/* Card Overlay */
.tf-template-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tf-template-card:hover .tf-template-card__overlay {
    opacity: 1;
}

.tf-template-card__demo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.95);
    color: #1f2937;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tf-template-card__demo:hover {
    background: #fff;
    transform: scale(1.05);
}

.tf-template-card__demo svg {
    width: 20px;
    height: 20px;
}

/* Card Body */
.tf-template-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tf-template-card__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.tf-template-card__title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tf-template-card__title a:hover {
    color: var(--tf-color);
}

.tf-template-card__excerpt {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.6;
    flex: 1;
}

/* Card Footer */
.tf-template-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.tf-template-card__price {
    font-size: 18px;
    font-weight: 700;
    color: var(--tf-color);
}

.tf-template-card__price--free {
    color: #10b981;
}

.tf-template-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tf-template-card__link:hover {
    color: var(--tf-color);
    gap: 10px;
}

.tf-template-card__link svg {
    width: 16px;
    height: 16px;
}

/* No Results */
.tf-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.tf-no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.tf-no-results p {
    font-size: 18px;
    margin: 0;
}

/* Load More */
.tf-templates__load-more {
    text-align: center;
    padding-top: 40px;
}

.tf-btn--outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.2);
}

.tf-btn--outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--tf-color);
}

/* ==========================================
   Responsive Design
========================================== */
@media (max-width: 768px) {
    .tf-hero {
        min-height: auto;
        padding: 80px 20px 60px;
    }
    
    .tf-hero__container {
        gap: 40px;
    }
    
    .tf-hero__icon {
        width: 60px;
        height: 60px;
        padding: 15px;
    }
    
    .tf-hero__actions {
        flex-direction: column;
        width: 100%;
    }
    
    .tf-btn {
        width: 100%;
        justify-content: center;
    }
    
    .tf-templates-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tf-hero__wave svg {
        height: 40px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tf-templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .tf-templates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
