/* Frontend Styles for WP Toolbox */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ffd700;
    --danger-color: #f56565;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container */
.toolbox-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.toolbox-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.toolbox-hero::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: rotate 30s linear infinite;
}

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

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    color: white;
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    animation: fadeInDown 0.8s ease;
}

.hero-title i {
    margin-right: 15px;
    font-size: 2.5rem;
}

.hero-description {
    color: rgba(255,255,255,0.95);
    font-size: 1.25rem;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Search Form */
.hero-search {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
}

.search-input-wrapper i {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1rem;
}

.search-input {
    flex: 1;
    padding: 18px 25px 18px 55px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--dark-color);
}

.search-btn {
    padding: 18px 35px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
}

/* Featured Tools Section */
.featured-tools-section {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title i {
    color: var(--warning-color);
    margin-right: 10px;
}

.featured-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.featured-tool-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.featured-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.featured-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.featured-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.featured-tool-card:hover .featured-icon {
    transform: scale(1.1) rotate(5deg);
}

.featured-tool-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    font-weight: 600;
}

.featured-tool-card p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 25px;
}

.featured-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

.featured-link:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.featured-link i {
    margin-left: 8px;
    transition: var(--transition);
}

.featured-link:hover i {
    transform: translateX(5px);
}

/* Main Tools Section */
.tools-section {
    padding: 60px 0 100px;
    background: #f8f9fa;
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 50px;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filter-tabs {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.filter-tabs::-webkit-scrollbar {
    height: 5px;
}

.filter-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.filter-tab {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    color: #718096;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
}

.filter-tab .count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.filter-tab.active .count {
    background: rgba(255,255,255,0.2);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.tool-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
}

.tool-card.featured {
    border: 2px solid var(--warning-color);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--warning-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.tool-icon {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.tool-icon::after {
    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: rotate 20s linear infinite;
}

.tool-icon i,
.tool-icon img {
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.tool-card:hover .tool-icon i {
    transform: scale(1.2) rotate(10deg);
}

.tool-icon img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.tool-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tool-title {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.tool-excerpt {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    gap: 8px;
}

.tool-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

.tool-link i {
    font-size: 0.9rem;
    transition: var(--transition);
}

.tool-link:hover i {
    transform: translateX(3px);
}

/* No Tools Found */
.no-tools-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #a0aec0;
}

.no-tools-found i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-tools-found p {
    font-size: 1.25rem;
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
    margin-top: 60px;
}

.load-more-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title i {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .featured-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .filter-tabs {
        flex-wrap: nowrap;
        overflow-x: scroll;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input-wrapper {
        flex-direction: column;
        border-radius: var(--border-radius);
    }
    
    .search-btn {
        width: 100%;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .toolbox-hero {
        padding: 60px 0;
    }
}