/* Image Tools Page Styles - Following Project Design System (Consistent with Utilities) */

/* Tool Content Section */
.tool-content {
    margin-bottom: 40px;
}

/* Welcome Section - Consistent with Utilities */
.welcome-section {
    margin-bottom: 3rem;
}

.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-card::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"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.welcome-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-card p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

/* Featured Tools Section - Consistent with Utilities */
.featured-tools {
    margin: 3rem 0;
}

.featured-tools h4 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.featured-tools h4::before {
    content: '';
    width: 6px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(245, 57, 57, 0.3);
}

.featured-tools h4::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--border-light), transparent);
    border-radius: 1px;
}

/* Tools Grid - Consistent with Utilities */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Tool Card - Following Project Card Design (Consistent with Utilities) */
.tool-card {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    padding: 24px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: left var(--transition-normal);
}

.tool-card:hover::before {
    left: 0;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Tool Icon - Following Project Icon Design */
.tool-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.tool-card h5 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card .btn {
    width: 100%;
    margin-top: auto;
    transition: all var(--transition-fast);
}

.tool-card:hover .btn {
    transform: translateY(-2px);
}

/* Enhanced Tool Styles */
.tool-header {
    padding: 32px 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 2rem;
}

.tool-icon-large {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-white);
    font-size: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.tool-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.tool-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.tool-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.stat-item i {
    color: var(--primary-color);
}

/* Search Container */
.search-container {
    position: relative;
}

.search-input {
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border-light);
    border-radius: 25px;
    font-size: 14px;
    width: 280px;
    transition: all var(--transition-normal);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 57, 57, 0.1);
    width: 320px;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-container::before {
    content: '🔍';
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-secondary);
}

/* Content Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.page-title {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -1px;
}

.header-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Coming Soon Cards */
.tool-card[style*="opacity: 0.7"] {
    position: relative;
}

.tool-card[style*="opacity: 0.7"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(245, 57, 57, 0.05) 10px,
        rgba(245, 57, 57, 0.05) 20px
    );
    pointer-events: none;
    border-radius: 20px;
}

.tool-card button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Form Enhancements */
.enhanced-input {
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.enhanced-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(245, 57, 57, 0.1);
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.input-wrapper {
    position: relative;
}

.input-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.character-counter {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* Loading States */
.tools-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.tools-grid.loading .tool-card {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Animation Enhancements */
@keyframes toolCardFloat {
    0%, 100% {
        transform: translateY(-4px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tool-card:hover {
        animation: none;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 0 16px;
    }
    
    .tool-card {
        padding: 20px;
        margin: 0;
    }
    
    .tool-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .tool-card h5 {
        font-size: 1.2rem;
    }
    
    .tool-card p {
        font-size: 0.85rem;
        min-height: auto;
    }
    
    .welcome-card {
        padding: 2rem 1.5rem;
    }
    
    .welcome-card h3 {
        font-size: 2rem;
    }
    
    .welcome-card p {
        font-size: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .search-input {
        width: 240px;
    }
    
    .search-input:focus {
        width: 280px;
    }
    
    .featured-tools h4 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        margin: 0 8px;
        gap: 12px;
    }
    
    .tool-card {
        padding: 16px;
        margin: 0;
    }
    
    .tool-icon {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .tool-card h5 {
        font-size: 1.1rem;
    }
    
    .welcome-card {
        padding: 1.5rem 1rem;
    }
    
    .welcome-card h3 {
        font-size: 1.8rem;
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .search-input {
        width: 200px;
    }
    
    .search-input:focus {
        width: 240px;
    }
    
    .featured-tools h4 {
        font-size: 1.3rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .featured-tools h4::after {
        display: none;
    }
}


/* Accessibility Improvements */
.tool-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tool-card[tabindex]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.no-results-message h3 {
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Fade In Animation */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}