/* Templates Page Styles */

.logo a {
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active::after {
    width: 100%;
}

/* Templates Hero */
.templates-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
}

.templates-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.templates-hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Featured Templates Stats */
.featured-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.featured-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Template Filters */
.template-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* Templates Gallery */
.templates-gallery {
    padding: 80px 0;
    background: var(--bg-light);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 350px));
    gap: 2rem;
    justify-content: center;
}

.template-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.template-preview {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.template-content {
    text-align: center;
    padding: 2rem;
    color: white;
    z-index: 2;
    position: relative;
}

.template-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.template-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.template-content .date {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.template-content .venue {
    font-size: 1rem;
    opacity: 0.8;
}

/* Template Designs */
.wedding-elegant {
    background: linear-gradient(135deg, #d4af37, #f4e4bc);
    position: relative;
}

.wedding-elegant::before {
    content: '🌸';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.wedding-elegant::after {
    content: '🌸';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.3;
}

.wedding-modern {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    position: relative;
}

.wedding-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="white" stroke-width="2" opacity="0.1"/></svg>');
}

.party-birthday {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    position: relative;
}

.party-birthday::before {
    content: '🎈';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.party-birthday::after {
    content: '🎂';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1.5rem;
}

.party-graduation {
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
}

.party-graduation::before {
    content: '🎓';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.corporate-conference {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    position: relative;
}

.corporate-conference::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.05) 10px,
        rgba(255,255,255,0.05) 20px
    );
}

.corporate-networking {
    background: linear-gradient(135deg, #134e5e, #71b280);
    position: relative;
}

.baby-shower {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    position: relative;
}

.baby-shower::before {
    content: '🍼';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.baby-shower::after {
    content: '🧸';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.baby-gender {
    background: linear-gradient(135deg, #fd79a8, #74b9ff);
    position: relative;
}

.baby-gender::before {
    content: '💝';
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: 0.4;
}

/* Template Info */
.template-info {
    padding: 1.5rem;
}

.template-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.template-info p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.use-template-btn {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.use-template-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Filter Animation */
.template-card {
    transition: all 0.5s ease;
}

.template-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .template-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .template-preview {
        height: 250px;
    }
    
    .template-content {
        padding: 1.5rem;
    }
    
    .template-content h3 {
        font-size: 1.5rem;
    }
}

/* Image-based templates */
.template-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

.template-fallback {
    display: none;
    height: 300px;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* When image fails to load, show fallback */
.template-preview img[style*="display: none"] + .template-fallback {
    display: flex !important;
}

/* Upload instructions */
.upload-instructions {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 4px solid var(--primary-color);
}

.upload-instructions h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-instructions ol {
    margin-left: 1.5rem;
}

.upload-instructions li {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.upload-instructions code {
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
}

/* Template management */
.template-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.template-status.custom {
    background: var(--primary-color);
}

.template-status.default {
    background: var(--text-light);
}
/* Language Filter Styles */
.template-filters {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.filter-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.filter-section label {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

.language-dropdown {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}

.language-dropdown:hover,
.language-dropdown:focus {
    background: white;
    border-color: white;
    outline: none;
}

.category-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Language Tags */
.language-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.language-tag.telugu {
    background: #ff6b6b;
}

.language-tag.hindi {
    background: #4ecdc4;
}

.language-tag.gujarati {
    background: #45b7d1;
}

.language-tag.tamil {
    background: #96ceb4;
}

/* Multi-language Typography */
.template-content h3 {
    font-family: 'Arial', 'Noto Sans Telugu', 'Noto Sans Devanagari', 'Noto Sans Gujarati', 'Noto Sans Tamil', sans-serif;
}

.template-info h4 {
    font-family: 'Arial', 'Noto Sans Telugu', 'Noto Sans Devanagari', 'Noto Sans Gujarati', 'Noto Sans Tamil', sans-serif;
}

/* Language-specific font improvements */
[data-language="telugu"] .template-content,
[data-language="telugu"] .template-info {
    font-family: 'Noto Sans Telugu', 'Arial', sans-serif;
}

[data-language="hindi"] .template-content,
[data-language="hindi"] .template-info {
    font-family: 'Noto Sans Devanagari', 'Arial', sans-serif;
}

[data-language="gujarati"] .template-content,
[data-language="gujarati"] .template-info {
    font-family: 'Noto Sans Gujarati', 'Arial', sans-serif;
}

[data-language="tamil"] .template-content,
[data-language="tamil"] .template-info {
    font-family: 'Noto Sans Tamil', 'Arial', sans-serif;
}

/* Responsive adjustments for language filters */
@media (max-width: 768px) {
    .template-filters {
        gap: 1.5rem;
    }
    
    .filter-section {
        width: 100%;
    }
    
    .language-dropdown {
        width: 100%;
        max-width: 300px;
    }
    
    .category-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}
/* Additional Template Styles */
.wedding-modern {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

.wedding-vintage {
    background: linear-gradient(135deg, #8b4513, #daa520);
    color: white;
}

.wedding-traditional {
    background: linear-gradient(135deg, #dc143c, #ff6347);
    color: white;
}

.party-graduation {
    background: linear-gradient(135deg, #4a90e2, #7b68ee);
    color: white;
}

.party-anniversary {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: white;
}

.party-housewarming {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

.party-diwali {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.corporate-launch {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
}

.corporate-networking {
    background: linear-gradient(135deg, #16a085, #1abc9c);
    color: white;
}

.corporate-conference {
    background: linear-gradient(135deg, #2980b9, #3498db);
    color: white;
}

.corporate-seminar {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
}

.baby-gender-reveal {
    background: linear-gradient(135deg, #ff69b4, #87ceeb);
    color: white;
}

.baby-shower {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

/* Template count indicator */
.templates-hero::after {
    content: "20+ Professional Templates";
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.templates-hero {
    position: relative;
}

/* Enhanced template card hover effects */
.template-card:hover .template-preview {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.template-card:hover .use-template-btn {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Language-specific font improvements */
.template-content {
    font-family: inherit;
}

.language-tag.telugu,
.template-content h3,
.template-content p {
    font-family: 'Noto Sans Telugu', sans-serif;
}

.language-tag.hindi {
    font-family: 'Noto Sans Devanagari', sans-serif;
}

.language-tag.gujarati {
    font-family: 'Noto Sans Gujarati', sans-serif;
}

.language-tag.tamil {
    font-family: 'Noto Sans Tamil', sans-serif;
}

/* Results counter */
.results-counter {
    text-align: center;
    margin: 2rem 0;
    color: var(--text-color);
    font-weight: 500;
}

/* Template loading animation */
@keyframes templateLoad {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.template-card {
    animation: templateLoad 0.6s ease forwards;
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .templates-hero::after {
        position: static;
        display: block;
        text-align: center;
        margin: 1rem 0;
    }
    
    .template-filters {
        flex-direction: column;
        gap: 1rem;
    }
    
    .category-filters {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}
/* Language-specific font improvements */
[data-language="telugu"] .template-content,
[data-language="telugu"] .template-info {
    font-family: 'Noto Sans Telugu', 'Arial', sans-serif;
}

[data-language="hindi"] .template-content,
[data-language="hindi"] .template-info {
    font-family: 'Noto Sans Devanagari', 'Arial', sans-serif;
}

[data-language="gujarati"] .template-content,
[data-language="gujarati"] .template-info {
    font-family: 'Noto Sans Gujarati', 'Arial', sans-serif;
}

[data-language="tamil"] .template-content,
[data-language="tamil"] .template-info {
    font-family: 'Noto Sans Tamil', 'Arial', sans-serif;
}

/* Language tag colors */
.language-tag.telugu {
    background: #ff6b6b;
}

.language-tag.hindi {
    background: #4ecdc4;
}

.language-tag.gujarati {
    background: #45b7d1;
}

.language-tag.tamil {
    background: #96ceb4;
}

/* Results counter */
.results-counter {
    text-align: center;
    margin: 2rem 0;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Enhanced template card animations */
.template-card {
    transition: all 0.5s ease;
}

.template-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Template count indicator in hero */
.templates-hero::after {
    content: "12+ Multi-Language Templates";
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.templates-hero {
    position: relative;
}
/* Fix for language filtering - ensure hidden cards are completely hidden */
.template-card.hidden {
    display: none !important;
}

/* Debug: Add visible border to active cards */
.template-card:not(.hidden) {
    border: 2px solid transparent;
}

/* Language filtering animation */
.template-card {
    transition: all 0.3s ease;
}
/* Ensure consistent template card sizing */
.template-card {
    width: 350px;
    max-width: 350px;
    min-width: 350px;
}

/* Center single cards when filtered */
.templates-grid:has(.template-card:not(.hidden):only-child) {
    justify-content: center;
}

/* Alternative for browsers that don't support :has() */
@supports not (selector(:has(*))) {
    .templates-grid {
        justify-content: center;
    }
}
/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}

/* Add a subtle highlight to the templates section when scrolled to */
.templates-gallery {
    scroll-margin-top: 20px;
}

/* Smooth fade-in animation for visible templates */
.template-card:not(.hidden) {
    animation: fadeInUp 0.4s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Enhanced Template Cards */
.template-stats {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.template-stats .stat {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

.template-popularity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.75rem 0;
    padding: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
}

.popularity-stars {
    font-size: 0.9rem;
}

.popularity-text {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.template-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Enhanced Template Previews */
.wedding-elegant .template-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #d4af37;
}

.party-birthday .template-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #ec4899;
}

.corporate-conference .template-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #6366f1;
}

.template-content .date {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.template-content .venue {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Responsive Template Stats */
@media (max-width: 768px) {
    .template-stats {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .template-stats .stat {
        text-align: center;
    }
    
    .template-popularity {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}

/* Template Card Hover Effects */
.template-card:hover .template-stats .stat {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.02);
}

.template-card:hover .popularity-text {
    color: var(--primary-dark);
}

/* Language-specific styling */
.template-card[data-language="telugu"] .template-content,
.template-card[data-language="hindi"] .template-content,
.template-card[data-language="gujarati"] .template-content,
.template-card[data-language="tamil"] .template-content {
    font-family: 'Noto Sans Telugu', 'Noto Sans Devanagari', 'Noto Sans Gujarati', 'Noto Sans Tamil', sans-serif;
}

.language-tag.telugu,
.language-tag.hindi,
.language-tag.gujarati,
.language-tag.tamil {
    font-family: 'Noto Sans Telugu', 'Noto Sans Devanagari', 'Noto Sans Gujarati', 'Noto Sans Tamil', sans-serif;
}

/* Featured Stats in Templates Hero */
.featured-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.featured-stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 150px;
    transition: transform 0.3s ease;
}

.featured-stat:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.15);
}

.featured-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.featured-stat .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .featured-stats {
        gap: 1rem;
    }
    
    .featured-stat {
        min-width: 120px;
        padding: 0.75rem;
    }
    
    .featured-stat .stat-number {
        font-size: 1.5rem;
    }
    
    .featured-stat .stat-label {
        font-size: 0.8rem;
    }
}
/* NEW TEMPLATE STYLES */

/* Graduation Template */
.graduation-ceremony {
    background: linear-gradient(135deg, #667eea, #764ba2);
    position: relative;
}

.graduation-ceremony::before {
    content: '🎓';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.graduation-ceremony::after {
    content: '📜';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

/* Telugu Wedding Template */
.wedding-telugu {
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
    position: relative;
}

.wedding-telugu::before {
    content: '🌺';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    opacity: 0.4;
}

.wedding-telugu::after {
    content: '🕉️';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Gujarati Festival Template */
.festival-navratri {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    position: relative;
}

.festival-navratri::before {
    content: '🪔';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.festival-navratri::after {
    content: '🎭';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Baby Shower Modern Template */
.baby-shower-modern {
    background: linear-gradient(135deg, #a8e6cf, #dcedc1);
    position: relative;
}

.baby-shower-modern::before {
    content: '👶';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.baby-shower-modern::after {
    content: '🍼';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Tamil Housewarming Template */
.housewarming-traditional {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    position: relative;
}

.housewarming-traditional::before {
    content: '🏠';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.housewarming-traditional::after {
    content: '🔑';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Golden Anniversary Template */
.anniversary-golden {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    position: relative;
}

.anniversary-golden::before {
    content: '💍';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.anniversary-golden::after {
    content: '💐';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

/* Bollywood Birthday Template */
.party-bollywood {
    background: linear-gradient(135deg, #e17055, #fdcb6e);
    position: relative;
}

.party-bollywood::before {
    content: '🎂';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.party-bollywood::after {
    content: '🎵';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Corporate Gala Template */
.corporate-gala {
    background: linear-gradient(135deg, #2d3436, #636e72);
    position: relative;
}

.corporate-gala::before {
    content: '🏆';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.corporate-gala::after {
    content: '🥂';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

/* Telugu Festival Template */
.festival-ugadi {
    background: linear-gradient(135deg, #00b894, #00cec9);
    position: relative;
}

.festival-ugadi::before {
    content: '🌸';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.festival-ugadi::after {
    content: '🥭';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Gujarati Wedding Template */
.wedding-gujarati {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    position: relative;
}

.wedding-gujarati::before {
    content: '💒';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.wedding-gujarati::after {
    content: '🌹';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Retirement Party Template */
.party-retirement {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    position: relative;
}

.party-retirement::before {
    content: '🎉';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.party-retirement::after {
    content: '⏰';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Tamil Birthday Template */
.party-tamil-birthday {
    background: linear-gradient(135deg, #ff7675, #fd79a8);
    position: relative;
}

.party-tamil-birthday::before {
    content: '🎂';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.party-tamil-birthday::after {
    content: '🎈';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Holiday Party Template */
.party-holiday {
    background: linear-gradient(135deg, #00b894, #55a3ff);
    position: relative;
}

.party-holiday::before {
    content: '🎄';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.party-holiday::after {
    content: '❄️';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Corporate Launch Template */
.corporate-launch {
    background: linear-gradient(135deg, #0984e3, #74b9ff);
    position: relative;
}

.corporate-launch::before {
    content: '🚀';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.corporate-launch::after {
    content: '💡';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

/* Template Stats Enhancement */
.template-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.template-stats .stat {
    font-size: 0.85rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

/* Template Popularity Enhancement */
.template-popularity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.popularity-stars {
    font-size: 0.9rem;
}

.popularity-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* Language Tags Enhancement */
.language-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.language-tag.hindi {
    background: linear-gradient(135deg, #ff9a56, #ff6b6b);
    color: white;
}

.language-tag.telugu {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.language-tag.tamil {
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: white;
}

.language-tag.gujarati {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
}

.language-tag:not(.hindi):not(.telugu):not(.tamil):not(.gujarati) {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

/* Enhanced Hover Effects for New Templates */
.template-card:hover .template-preview::before,
.template-card:hover .template-preview::after {
    transform: scale(1.1);
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* Mobile Responsiveness for New Templates */
@media (max-width: 768px) {
    .template-stats {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .template-stats .stat {
        font-size: 0.8rem;
    }
    
    .template-popularity {
        justify-content: center;
    }
    
    .popularity-text {
        font-size: 0.75rem;
    }
}
/* TEMPLATES LAYOUT WITH LEFT SIDEBAR */
.templates-layout {
    padding: 2rem 0 3rem;
    background: var(--bg-light);
    min-height: 70vh;
}

.templates-wrapper {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-height: 500px;
}

.templates-wrapper.sidebar-hidden {
    gap: 0;
}

.templates-wrapper.sidebar-hidden .templates-main {
    width: 100%;
    max-width: 100%;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.templates-wrapper.sidebar-hidden .templates-sidebar {
    display: none !important;
    opacity: 0;
    transform: translateX(-100%);
}

/* LEFT SIDEBAR - VISIBLE BY DEFAULT */
.templates-sidebar {
    width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    display: block;
    opacity: 1;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.templates-sidebar.visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.sidebar-content {
    padding: 1.5rem;
}

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

.categories-header-clickable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    flex: 1;
    margin-right: 1rem;
}

.categories-header-clickable:hover {
    background: rgba(99, 102, 241, 0.05);
}

.categories-header-clickable h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar-toggle-arrow {
    font-size: 0.9rem;
    color: var(--text-light);
    transition: transform 0.3s ease;
}

.categories-header-clickable:hover .sidebar-toggle-arrow {
    color: var(--primary-color);
}

.sidebar-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collapse-all-btn,
.hide-sidebar-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.collapse-all-btn:hover,
.hide-sidebar-btn:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.hide-sidebar-btn:hover {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
    color: #ef4444;
}

.collapse-icon,
.hide-icon {
    font-size: 0.8rem;
}

/* SHOW CATEGORIES BUTTON - IMPROVED */
.show-categories-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.show-categories-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.show-categories-btn:hover::before {
    left: 100%;
}

.show-categories-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.show-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.show-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* CATEGORY LIST */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.category-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.category-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.category-item.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.category-item.expanded {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.category-item.expanded.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.expand-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: var(--text-light);
    margin-left: 0.5rem;
}

.category-item.expanded .expand-arrow {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.category-item.expandable {
    position: relative;
}

.category-item.expandable:hover .expand-arrow {
    color: var(--primary-color);
    transform: scale(1.1);
}

.category-item.expandable.active:hover .expand-arrow {
    color: white;
}

.category-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.category-name {
    font-weight: 500;
}

/* SUBCATEGORY LIST */
.subcategory-list {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
}

.subcategory-list.expanded {
    display: flex;
    opacity: 1;
    max-height: 500px;
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 500px;
        transform: translateY(0);
    }
}

@keyframes arrowRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

.subcategory-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    color: var(--text-light);
    font-size: 0.85rem;
}

.subcategory-item:hover {
    background: rgba(99, 102, 241, 0.05);
    color: var(--text-dark);
}

.subcategory-item.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 500;
}

.subcategory-icon {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.subcategory-name {
    font-weight: 400;
}

/* MAIN CONTENT AREA */
.templates-main {
    flex: 1;
    min-height: 500px;
}

/* TOP FILTER BAR - FIXED POSITION */
.top-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-light);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
}

.sidebar-content h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.toggle-icon {
    font-size: 1rem;
}

.toggle-text {
    font-size: 0.9rem;
}

.language-selector-container {
    position: relative;
    z-index: 1001;
}

.language-select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    position: relative;
    z-index: 1000;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.language-select option {
    background: white;
    color: var(--text-dark);
    padding: 0.5rem;
    font-size: 0.95rem;
}

.language-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.language-select.selected {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

/* EMPTY STATE */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.empty-state-content {
    max-width: 400px;
    padding: 2rem;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;
}

/* TEMPLATES GRID */
.templates-grid {
    margin-top: 0;
}

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

.results-header h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin: 0;
}

.results-count {
    color: var(--text-light);
    font-size: 0.9rem;
}

.template-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* CLEAN TEMPLATE CARDS - NO HIGHLIGHTING */
.template-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

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

/* Template metadata overlay - hidden by default */
.template-metadata {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    min-width: 180px;
}

.template-card:hover .template-metadata {
    opacity: 1;
    visibility: visible;
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.metadata-item:last-child {
    margin-bottom: 0;
}

.metadata-label {
    font-weight: 500;
    opacity: 0.8;
}

.metadata-value {
    font-weight: 600;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.empty-state-content h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.empty-state-content p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Filter Hints */
.filter-hints {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 25px;
    font-size: 0.9rem;
}

.hint-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 600;
}

.hint-text {
    color: var(--text-dark);
    font-weight: 500;
}

/* Templates Grid */
.templates-grid {
    animation: fadeIn 0.5s ease;
}

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

.results-header h3 {
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.results-count {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

/* Template Cards Container */
.template-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeInUp 0.6s ease;
}

/* CRITICAL: Ensure templates are completely hidden on initial load */
.template-card {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Only show templates when they have the visible class */
.template-card.template-visible {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Enhanced Template Cards */
.template-card {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.template-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* Template Metadata Overlay - Minimal by default, revealed on hover */
.template-metadata {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 180px;
}

.template-card:hover .template-metadata {
    opacity: 1;
    transform: translateY(0);
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.metadata-item:last-child {
    margin-bottom: 0;
}

.metadata-label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.metadata-value {
    font-weight: 600;
    color: white;
    text-align: right;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .templates-layout {
        flex-direction: column;
    }
    
    .templates-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar-content {
        padding: 1.5rem;
    }
    
    .category-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.5rem;
    }
    
    .category-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .category-icon {
        font-size: 1rem;
    }
    
    .templates-main {
        padding: 1.5rem;
    }
    
    .template-cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .empty-state-content {
        padding: 2rem;
    }
    
    .filter-hints {
        flex-direction: column;
        align-items: center;
    }
    
    .show-categories-btn {
        position: fixed;
        top: auto;
        bottom: 2rem;
        left: 1rem;
        transform: none;
        writing-mode: horizontal-tb;
        text-orientation: mixed;
        flex-direction: row;
        padding: 0.5rem 0.75rem;
        border-radius: 25px;
    }
    
    .show-icon {
        margin-bottom: 0;
        margin-right: 0.5rem;
        font-size: 1rem;
    }
    
    .show-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        padding: 1rem;
    }
    
    .templates-main {
        padding: 1rem;
    }
    
    .category-list {
        grid-template-columns: 1fr;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CLEAN PILL-STYLE CATEGORY MENU */

.category-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 3rem 0 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.category-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.pill-icon {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

/* Template Card Hover Metadata Overlay */
.template-card {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

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

.template-metadata {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 200px;
}

.template-card:hover .template-metadata {
    opacity: 1;
    transform: translateY(0);
}

.metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding: 2px 0;
}

.metadata-item:last-child {
    margin-bottom: 0;
}

.metadata-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
}

.metadata-value {
    font-weight: 500;
    color: white;
    text-align: right;
    font-size: 0.85rem;
}

/* Enhanced Template Cards */
.template-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.template-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.template-card:hover .template-preview::before,
.template-card:hover .template-preview::after {
    transform: scale(1.2) rotate(5deg);
    opacity: 0.9;
    transition: all 0.3s ease;
}

/* Language Selector */
.language-selector {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.language-dropdown {
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
}

.language-dropdown:hover,
.language-dropdown:focus {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .category-menu {
        gap: 0.75rem;
        padding: 1.5rem;
        margin: 2rem 0 1.5rem 0;
    }
    
    .category-pill {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-width: 140px;
        justify-content: center;
    }
    
    .pill-icon {
        font-size: 1.1rem;
    }
    
    .language-dropdown {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .category-menu {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .category-pill {
        width: 200px;
        justify-content: center;
        padding: 12px 16px;
    }
}

.main-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-dropdown {
    position: relative;
    display: inline-block;
}

.category-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 140px;
    justify-content: center;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    z-index: 1000;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    padding: 1rem 0;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 10px 20px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 8px;
}

.dropdown-content a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: translateX(4px);
}

.category-dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease;
}

/* Mega Menu Styles for Business and Parties */
.business-mega-menu,
.parties-mega-menu {
    min-width: 500px;
    padding: 2rem;
}

.submenu {
    display: flex;
    gap: 2rem;
}

.submenu-column {
    flex: 1;
}

.submenu-column h4 {
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.submenu-column a {
    margin: 0;
    padding: 8px 0;
    border-radius: 0;
    font-size: 0.9rem;
}

.submenu-column a:hover {
    background: none;
    color: var(--primary-color);
    transform: translateX(8px);
    padding-left: 8px;
}

/* Language Filter Enhanced */
.language-filter-enhanced {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.language-dropdown {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: white;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.language-dropdown:hover,
.language-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}

/* Animation for dropdown */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Active state for category buttons */
.category-btn.active {
    background: linear-gradient(135deg, var(--success-color), #00b894);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-categories {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .category-btn {
        min-width: 200px;
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    .dropdown-content {
        min-width: 250px;
        left: 0;
        transform: none;
        margin-top: 4px;
    }
    
    .business-mega-menu,
    .parties-mega-menu {
        min-width: 280px;
        padding: 1.5rem;
    }
    
    .submenu {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .template-filters-enhanced {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .category-btn {
        min-width: 180px;
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    
    .dropdown-content {
        min-width: 200px;
    }
    
    .business-mega-menu,
    .parties-mega-menu {
        min-width: 250px;
        padding: 1rem;
    }
}

/* Hover effects for better UX */
.category-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 8px;
    background: transparent;
}

.category-dropdown:hover::after {
    width: 100%;
}

/* Custom scrollbar for mega menus */
.business-mega-menu::-webkit-scrollbar,
.parties-mega-menu::-webkit-scrollbar {
    width: 6px;
}

.business-mega-menu::-webkit-scrollbar-track,
.parties-mega-menu::-webkit-scrollbar-track {
    background: var(--bg-lighter);
    border-radius: 3px;
}

.business-mega-menu::-webkit-scrollbar-thumb,
.parties-mega-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}
/* NEW COMPREHENSIVE TEMPLATE STYLES */

/* Valentine's Day Templates */
.valentines-romantic {
    background: linear-gradient(135deg, #ff6b9d, #c44569);
    position: relative;
}

.valentines-romantic::before {
    content: '💕';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.valentines-romantic::after {
    content: '🌹';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

.valentines-party {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    position: relative;
}

.valentines-party::before {
    content: '💖';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.valentines-party::after {
    content: '🎉';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

.valentines-proposal {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    position: relative;
}

.valentines-proposal::before {
    content: '💍';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.valentines-proposal::after {
    content: '💐';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

.valentines-galentines {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    position: relative;
}

.valentines-galentines::before {
    content: '👯‍♀️';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.valentines-galentines::after {
    content: '🥂';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Baby Templates */
.baby-shower-elegant {
    background: linear-gradient(135deg, #a8e6cf, #dcedc1);
    position: relative;
}

.baby-shower-elegant::before {
    content: '👶';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.baby-shower-elegant::after {
    content: '🍼';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

.baby-gender-reveal {
    background: linear-gradient(135deg, #fd79a8, #74b9ff);
    position: relative;
}

.baby-gender-reveal::before {
    content: '🎈';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.baby-gender-reveal::after {
    content: '❓';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Kids' Birthday Templates */
.kids-superhero {
    background: linear-gradient(135deg, #ff7675, #74b9ff);
    position: relative;
}

.kids-superhero::before {
    content: '🦸‍♂️';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.kids-superhero::after {
    content: '⚡';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

.kids-princess {
    background: linear-gradient(135deg, #fd79a8, #fdcb6e);
    position: relative;
}

.kids-princess::before {
    content: '👑';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.kids-princess::after {
    content: '✨';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

/* Business Templates */
.business-networking {
    background: linear-gradient(135deg, #2d3436, #636e72);
    position: relative;
}

.business-networking::before {
    content: '🤝';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.business-networking::after {
    content: '💼';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

.business-retirement {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    position: relative;
}

.business-retirement::before {
    content: '🎉';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.business-retirement::after {
    content: '⏰';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Party Templates */
.party-cocktail {
    background: linear-gradient(135deg, #2d3436, #636e72);
    position: relative;
}

.party-cocktail::before {
    content: '🍸';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

.party-cocktail::after {
    content: '🌃';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.6;
}

.party-dinner {
    background: linear-gradient(135deg, #e17055, #fdcb6e);
    position: relative;
}

.party-dinner::before {
    content: '🍽️';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

.party-dinner::after {
    content: '🍷';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.8rem;
    opacity: 0.5;
}

/* Enhanced Template Card Interactions */
.template-card {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.template-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.template-card:hover .template-preview::before,
.template-card:hover .template-preview::after {
    transform: scale(1.2) rotate(5deg);
    opacity: 0.9;
    transition: all 0.3s ease;
}

/* FESTIVAL TEMPLATE STYLES - Each with unique design */

/* Diwali Festival - Golden & Orange with Diyas */
.diwali-festival {
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ffd700);
    position: relative;
    overflow: hidden;
}

.diwali-festival::before {
    content: '🪔';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2.5rem;
    opacity: 0.7;
    animation: flicker 2s ease-in-out infinite alternate;
}

.diwali-festival::after {
    content: '✨';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 2rem;
    opacity: 0.6;
    animation: sparkle 1.5s ease-in-out infinite;
}

/* Christmas - Red & Green with Snow Effect */
.christmas-celebration {
    background: linear-gradient(135deg, #c41e3a, #2e8b57, #ffffff);
    position: relative;
    overflow: hidden;
}

.christmas-celebration::before {
    content: '🎄';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: sway 3s ease-in-out infinite;
}

.christmas-celebration::after {
    content: '❄️';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: fall 4s linear infinite;
}

/* Holi - Rainbow Gradient with Color Splash */
.holi-festival {
    background: linear-gradient(45deg, #ff0080, #ff8c00, #ffd700, #32cd32, #1e90ff, #8a2be2);
    background-size: 300% 300%;
    animation: rainbow 3s ease infinite;
    position: relative;
}

.holi-festival::before {
    content: '🌈';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

.holi-festival::after {
    content: '💨';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 2rem;
    opacity: 0.6;
    animation: drift 3s ease-in-out infinite;
}

/* Onam - Kerala Green & Gold with Floral Pattern */
.onam-festival {
    background: linear-gradient(135deg, #228b22, #ffd700, #ff6347);
    position: relative;
}

.onam-festival::before {
    content: '🌺';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.7;
    animation: bloom 2.5s ease-in-out infinite;
}

.onam-festival::after {
    content: '🥥';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.6;
}

/* Ganesh Chaturthi - Orange & Red with Sacred Symbols */
.ganesh-chaturthi {
    background: linear-gradient(135deg, #ff4500, #dc143c, #ffd700);
    position: relative;
}

.ganesh-chaturthi::before {
    content: '🐘';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: gentle-sway 3s ease-in-out infinite;
}

.ganesh-chaturthi::after {
    content: '🕉️';
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 2rem;
    opacity: 0.7;
    animation: glow 2s ease-in-out infinite alternate;
}

/* Durga Puja - Royal Red & Gold with Bengali Motifs */
.durga-puja {
    background: linear-gradient(135deg, #8b0000, #dc143c, #ffd700);
    position: relative;
}

.durga-puja::before {
    content: '🏺';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
}

.durga-puja::after {
    content: '🔱';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: divine-glow 2.5s ease-in-out infinite alternate;
}

/* Eid - Crescent Moon & Star with Islamic Green */
.eid-celebration {
    background: linear-gradient(135deg, #006400, #32cd32, #ffd700);
    position: relative;
}

.eid-celebration::before {
    content: '🌙';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: moon-phase 4s ease-in-out infinite;
}

.eid-celebration::after {
    content: '⭐';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: twinkle 1.5s ease-in-out infinite;
}

/* Karva Chauth - Moonlight Silver & Pink */
.karva-chauth {
    background: linear-gradient(135deg, #c0c0c0, #ff69b4, #4169e1);
    position: relative;
}

.karva-chauth::before {
    content: '🌕';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.9;
    animation: moon-glow 3s ease-in-out infinite alternate;
}

.karva-chauth::after {
    content: '🪔';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: flicker 2s ease-in-out infinite alternate;
}

/* Baisakhi - Harvest Yellow & Green */
.baisakhi-festival {
    background: linear-gradient(135deg, #ffd700, #32cd32, #ff8c00);
    position: relative;
}

.baisakhi-festival::before {
    content: '🌾';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: wheat-sway 3s ease-in-out infinite;
}

.baisakhi-festival::after {
    content: '🥁';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

/* Pongal - Tamil Harvest Brown & Yellow */
.pongal-festival {
    background: linear-gradient(135deg, #d2691e, #ffd700, #228b22);
    position: relative;
}

.pongal-festival::before {
    content: '🍯';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
}

.pongal-festival::after {
    content: '🐄';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

/* Dussehra - Victory Red & Gold */
.dussehra-celebration {
    background: linear-gradient(135deg, #dc143c, #ffd700, #ff4500);
    position: relative;
}

.dussehra-celebration::before {
    content: '🏹';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
}

.dussehra-celebration::after {
    content: '🔥';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: fire-dance 2s ease-in-out infinite;
}

/* Raksha Bandhan - Brother-Sister Pink & Blue */
.raksha-bandhan {
    background: linear-gradient(135deg, #ff69b4, #87ceeb, #ffd700);
    position: relative;
}

.raksha-bandhan::before {
    content: '🎀';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
}

.raksha-bandhan::after {
    content: '💝';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: heart-beat 2s ease-in-out infinite;
}

/* Janmashtami - Krishna Blue & Peacock */
.janmashtami {
    background: linear-gradient(135deg, #000080, #4169e1, #ffd700);
    position: relative;
}

.janmashtami::before {
    content: '🦚';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: peacock-dance 4s ease-in-out infinite;
}

.janmashtami::after {
    content: '🪈';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
}

/* Halloween - Spooky Orange & Black */
.halloween-party {
    background: linear-gradient(135deg, #000000, #ff4500, #800080);
    position: relative;
}

.halloween-party::before {
    content: '🎃';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.9;
    animation: spooky-glow 2s ease-in-out infinite alternate;
}

.halloween-party::after {
    content: '👻';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.7;
    animation: float-spooky 3s ease-in-out infinite;
}

/* New Year - Glamorous Gold & Black */
.new-year-celebration {
    background: linear-gradient(135deg, #000000, #ffd700, #c0c0c0);
    position: relative;
    overflow: hidden;
}

.new-year-celebration::before {
    content: '🎊';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    opacity: 0.8;
    animation: confetti-fall 2s linear infinite;
}

.new-year-celebration::after {
    content: '🥂';
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 2rem;
    opacity: 0.8;
    animation: champagne-bubble 3s ease-in-out infinite;
}

/* ANIMATIONS FOR FESTIVAL TEMPLATES */
@keyframes flicker {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.6; transform: rotate(0deg); }
    50% { opacity: 1; transform: rotate(180deg); }
}

@keyframes sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@keyframes fall {
    0% { transform: translateY(-10px) rotate(0deg); }
    100% { transform: translateY(10px) rotate(360deg); }
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes drift {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

@keyframes bloom {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.2) rotate(10deg); }
}

@keyframes gentle-sway {
    0%, 100% { transform: rotate(-1deg); }
    50% { transform: rotate(1deg); }
}

@keyframes glow {
    0% { opacity: 0.7; text-shadow: 0 0 5px #ffd700; }
    100% { opacity: 1; text-shadow: 0 0 15px #ffd700; }
}

@keyframes divine-glow {
    0% { opacity: 0.7; text-shadow: 0 0 5px #dc143c; }
    100% { opacity: 1; text-shadow: 0 0 15px #dc143c; }
}

@keyframes moon-phase {
    0%, 100% { transform: rotate(0deg); opacity: 0.8; }
    50% { transform: rotate(15deg); opacity: 1; }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes moon-glow {
    0% { opacity: 0.9; text-shadow: 0 0 10px #c0c0c0; }
    100% { opacity: 1; text-shadow: 0 0 20px #ffffff; }
}

@keyframes wheat-sway {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes fire-dance {
    0%, 100% { transform: scale(1) rotate(-2deg); }
    50% { transform: scale(1.1) rotate(2deg); }
}

@keyframes heart-beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes peacock-dance {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(5deg) scale(1.1); }
    75% { transform: rotate(-5deg) scale(1.1); }
}

@keyframes spooky-glow {
    0% { opacity: 0.9; text-shadow: 0 0 10px #ff4500; }
    100% { opacity: 1; text-shadow: 0 0 20px #ff4500, 0 0 30px #ff4500; }
}

@keyframes float-spooky {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

@keyframes confetti-fall {
    0% { transform: translateY(-5px) rotate(0deg); }
    100% { transform: translateY(5px) rotate(360deg); }
}

@keyframes champagne-bubble {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Template Category Indicators */
.template-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Valentine's category indicator */
.template-card[data-category*="valentines"]::before {
    background: linear-gradient(90deg, #ff6b9d, #c44569);
}

/* Baby category indicator */
.template-card[data-category*="baby"]::before {
    background: linear-gradient(90deg, #a8e6cf, #dcedc1);
}

/* Kids category indicator */
.template-card[data-category*="kids"]::before {
    background: linear-gradient(90deg, #ff7675, #74b9ff);
}

/* Business category indicator */
.template-card[data-category*="business"]::before {
    background: linear-gradient(90deg, #2d3436, #636e72);
}

/* Party category indicator */
.template-card[data-category*="party"]::before {
    background: linear-gradient(90deg, #e17055, #fdcb6e);
}

/* Responsive enhancements for new templates */
@media (max-width: 768px) {
    .template-card:hover {
        transform: translateY(-8px) scale(1.01);
    }
    
    .template-preview::before,
    .template-preview::after {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .template-card:hover {
        transform: translateY(-4px);
    }
    
    .template-preview::before,
    .template-preview::after {
        font-size: 1.2rem;
    }
}

/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {
    .templates-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .templates-sidebar {
        width: 100%;
        position: static;
    }
    
    .sidebar-content {
        padding: 1rem;
    }
    
    .top-filter-bar {
        justify-content: center;
    }
    
    .language-select {
        min-width: 100%;
    }
    
    .template-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .template-metadata {
        position: static;
        opacity: 1;
        visibility: visible;
        background: rgba(99, 102, 241, 0.1);
        color: var(--text-dark);
        margin: 1rem;
        border: 1px solid var(--border-color);
    }
}

@media (max-width: 480px) {
    .templates-layout {
        padding: 1rem 0 2rem;
    }
    
    .empty-state-content {
        padding: 1rem;
    }
    
    .category-item,
    .subcategory-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

.show-categories-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-categories-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}
/* RESET BUTTON - IMPROVED */
.reset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
    position: relative;
    overflow: hidden;
}

.reset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.reset-btn:hover::before {
    left: 100%;
}

.reset-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.reset-btn:active {
    transform: translateY(0);
}

.reset-btn:active .reset-icon {
    animation: spin 0.5s ease-in-out;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.reset-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.reset-text {
    font-size: 0.9rem;
}