/* Forms & Templates Advanced Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #60a5fa;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero Section */
.forms-hero {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%), 
                url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.forms-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}

.forms-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.forms-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.forms-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

.forms-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    opacity: 0.95;
}

/* Search Section */
.search-section {
    padding: 3rem 0;
    background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.search-container {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
    animation: slideInDown 0.6s ease-out 0.2s both;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-input {
    width: 100%;
    padding: 1.25rem 3.5rem 1.25rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    outline: none;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    background: white;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-lg);
    transform: translateY(-2px);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.25rem;
    pointer-events: none;
    transition: var(--transition);
}

.search-input:focus + .search-icon {
    color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Category Tabs */
.category-tabs {
    padding: 2rem 0;
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.tabs-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    background: white;
    color: var(--dark-color);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-color);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.tab-btn:hover::before {
    width: 300px;
    height: 300px;
}

.tab-btn:hover {
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.tab-btn.active::before {
    width: 300px;
    height: 300px;
}

/* Forms Section */
.forms-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.category-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.category-section.hidden {
    display: none;
}

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.category-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
    margin-top: 1.5rem;
}

/* Forms Grid */
.forms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.form-card:hover::before {
    transform: scaleX(1);
}

.form-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.form-card-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.form-card:hover .form-icon {
    transform: rotate(10deg) scale(1.1);
}

.form-card-title {
    flex: 1;
}

.form-card-title h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.form-number {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.form-card-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.form-card-footer {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.form-tag {
    padding: 0.375rem 0.875rem;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--transition);
}

.form-tag.popular {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.form-tag.new {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.form-card:hover .form-tag {
    transform: translateY(-2px);
}

.form-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-download,
.btn-preview {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-download {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-download:active {
    transform: translateY(0);
}

.btn-preview {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-preview:hover {
    background: var(--primary-color);
    color: white;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeIn 0.5s ease-out;
}

.no-results i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #64748b;
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-top: 4rem;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.info-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.info-banner-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.info-banner h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.info-banner p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-contact {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
}

.btn-contact:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 968px) {
    .forms-hero {
        height: 350px;
    }

    .forms-hero-title {
        font-size: 2.8rem;
    }

    .forms-hero-subtitle {
        font-size: 1.1rem;
    }

    .forms-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .tabs-container {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    .forms-hero {
        height: 300px;
    }

    .forms-hero-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }

    .forms-hero-subtitle {
        font-size: 1rem;
    }

    .forms-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .category-title {
        font-size: 2rem;
    }

    .tabs-container {
        gap: 0.5rem;
    }

    .tab-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .info-banner {
        padding: 2rem 1.5rem;
    }

    .info-banner h3 {
        font-size: 1.5rem;
    }

    .info-banner p {
        font-size: 1rem;
    }

    .search-input {
        font-size: 0.95rem;
    }
}

@media (max-width: 640px) {
    .forms-hero {
        height: 250px;
    }

    .forms-hero-title {
        font-size: 1.8rem;
    }

    .forms-hero-subtitle {
        font-size: 0.9rem;
    }

    .category-title {
        font-size: 1.75rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .forms-hero {
        height: 220px;
    }

    .forms-hero-title {
        font-size: 1.5rem;
    }

    .forms-hero-subtitle {
        font-size: 0.85rem;
    }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 1rem;
    background: var(--dark-color);
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}
