/* ============================================
   All Tools Page Styles - ExamFormTools
   ============================================ */

/* Hero Section */
.tools-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.tools-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.tools-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tools-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Enhanced Tools Stats Section */
.tools-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 60px 20px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e2e8f0;
}



.stats-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}


.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 30%; animation-delay: 1s; }
.particle:nth-child(3) { left: 50%; animation-delay: 2s; }
.particle:nth-child(4) { left: 70%; animation-delay: 3s; }
.particle:nth-child(5) { left: 90%; animation-delay: 4s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100px) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-100px) scale(1);
        opacity: 1;
    }
}

.stat-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    padding: 30px 40px;
    text-align: center;
    min-width: 160px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}


.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-box:hover {
    transform: translateY(-8px) scale(1.02);
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}


.stat-box:hover::before {
    transform: scaleX(1);
}

.stat-box .icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}


.stat-box:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}


.stat-box .number {
    font-size: 2.8rem;
    font-weight: 800;
    display: block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}



.stat-box .label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.stat-box.animate {
    animation: countUp 0.6s ease forwards;
}

.stat-box:nth-child(2).animate { animation-delay: 0.1s; }
.stat-box:nth-child(3).animate { animation-delay: 0.2s; }
.stat-box:nth-child(4).animate { animation-delay: 0.3s; }

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

/* Search & Filter Section */
.tools-controls {
    background: white;
    padding: 30px 0;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.controls-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    width: 20px;
    height: 20px;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

.search-input::placeholder {
    color: #94a3b8;
}

.clear-search {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: none;
    font-size: 1.2rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-search:hover {
    background: #f1f5f9;
    color: #64748b;
}

.clear-search.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}


/* Category Pills */
.category-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}


.category-pill {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    background: white;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.category-pill:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.category-pill.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* View Toggle & Sort */
.view-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}


.sort-select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: #667eea;
}

.view-toggle {
    display: flex;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 10px 15px;
    border: none;
    background: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-btn:hover {
    background: #f8fafc;
    color: #667eea;
}

.view-btn.active {
    background: #667eea;
    color: white;
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

/* Results Count */
.results-info {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.95rem;
    text-align: center;
}


.results-count {
    font-weight: 600;
    color: #1e293b;
}

.active-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #3730a3;
}

.filter-tag button {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-tag button:hover {
    background: #6366f1;
    color: white;
}

/* Tools Grid Section */
.tools-section {
    padding: 40px 0 80px;
    min-height: 500px;
}

.tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Grid View */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    transition: all 0.3s ease;
    width: 100%;
}


/* List View */
.tools-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tools-list .tool-card {
    flex-direction: row;
    text-align: left;
    padding: 25px;
    align-items: center;
}

.tools-list .tool-icon-wrapper {
    margin: 0 25px 0 0;
    flex-shrink: 0;
}

.tools-list .tool-content {
    flex: 1;
    min-width: 0;
}

.tools-list .tool-features {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.tools-list .tool-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
}

.tools-list .tool-description {
    text-align: left;
}

.tools-list .tool-features {
    justify-content: flex-start;
}

.tools-list .tool-meta {
    justify-content: flex-start;
    gap: 20px;
}


/* Tool Card */
.tool-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 380px;
    box-sizing: border-box;
}

.tool-card .tool-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}


.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
    border-color: #c7d2fe;
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card.hidden {
    display: none;
}

.tool-card.featured {
    border: 2px solid #667eea;
    position: relative;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: -35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 40px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.tool-icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.tool-icon {
    width: 40px;
    height: 40px;
    color: #667eea;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    color: white;
}

.tool-category-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.tool-card h3 {
    font-size: 1.3rem;
    color: #1e293b;
    margin-bottom: 12px;
    font-weight: 700;
}

.tool-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}


.tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #10b981;
    background: #f0fdf4;
    padding: 4px 10px;
    border-radius: 15px;
}

.tool-feature svg {
    width: 12px;
    height: 12px;
}

.tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

.tool-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f59e0b;
    font-weight: 600;
    font-size: 0.9rem;
}

.tool-rating svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tool-users {
    color: #94a3b8;
    font-size: 0.85rem;
}

.tool-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tool-link:hover {
    text-decoration: none;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 80px 20px;
    display: none;
}

.no-results.visible {
    display: block;
}

.no-results-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-icon svg {
    width: 50px;
    height: 50px;
    color: #94a3b8;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #1e293b;
    margin-bottom: 10px;
}

.no-results p {
    color: #64748b;
    margin-bottom: 25px;
}

.suggested-searches {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.suggested-search {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    color: #667eea;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggested-search:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

/* Loading State */
.tools-loading {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.tools-loading.visible {
    display: block;
}

.loading-spinner-large {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Popular Tools Section */
.popular-tools {
    background: #f8fafc;
    padding: 60px 0;
}

.popular-tools h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #1e293b;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}


.popular-card {
    background: white;
    color: #1e293b;
    padding: 30px 25px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.popular-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.popular-card:hover {
    transform: translateY(-8px);
    border-color: #667eea;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.popular-card:hover::before {
    transform: scaleX(1);
}

.popular-card .icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    transition: all 0.3s ease;
    line-height: 1;
}


.popular-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.popular-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e293b;
}

.popular-card p {
    font-size: 0.9rem;
    color: #64748b;
}


/* ============================================
   HOMEPAGE TOOLS SECTION STYLES
   ============================================ */

/* Tools Section Header */
.tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.tools-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

/* Homepage Tools Grid - Similar to Blog Grid */
#homepage-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Homepage Tool Card Link */
.homepage-tool-card-link {
    text-decoration: none;
    color: inherit;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

/* Homepage Tool Card - Similar to Blog Card */
.homepage-tool-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: 480px;
    position: relative;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(white, white),
        linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(102, 126, 234, 0.1) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.homepage-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(102, 126, 234, 0.1) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.homepage-tool-card:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(-10deg) translateY(-12px);
    box-shadow: 0 20px 40px rgba(118, 75, 162, 0.3), 0 10px 20px rgba(0, 0, 0, 0.1);
}

.homepage-tool-card:hover::before {
    opacity: 1;
}

/* Homepage Tool Image Wrapper */
.homepage-tool-image-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.homepage-tool-image {
    width: 100%;
    height: 100%;
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.homepage-tool-card:hover .homepage-tool-image {
    transform: scale(1.05);
    filter: brightness(1.1) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.3));
}

/* Homepage Tool Content */
.homepage-tool-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Homepage Tool Meta */
.homepage-tool-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.homepage-tool-category {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
}

.homepage-tool-rating {
    color: #f59e0b;
    font-weight: 600;
}

/* Homepage Tool Title */
.homepage-tool-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
    line-height: 1.4;
    flex: 1;
    transition: color 0.3s ease;
}

.homepage-tool-card:hover .homepage-tool-title {
    color: #667eea;
}

/* Homepage Tool Description */
.homepage-tool-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Homepage Tool Features */
.homepage-tool-features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.homepage-tool-feature {
    background: #f0fdf4;
    color: #10b981;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Homepage Tool Footer */
.homepage-tool-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.homepage-tool-users {
    color: #666;
    font-size: 0.85rem;
}

.homepage-tool-cta {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.homepage-tool-card-link:hover .homepage-tool-cta {
    gap: 10px;
}

/* See All Tools Button */
.tools-see-all {
    text-align: center;
    margin-top: 40px;
}

.tools-see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    background: black;
    color: white;
    border: 2px solid black;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.tools-see-all-link:hover {
    background: white;
    color: #1e293b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design for Homepage Tools */
@media (max-width: 1024px) {
    #homepage-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tools-header h2 {
        font-size: 2rem;
    }
    
    .homepage-tool-card {
        height: 460px;
    }
}

@media (max-width: 768px) {
    #homepage-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .tools-header h2 {
        font-size: 1.75rem;
    }
    
    .homepage-tool-card {
        height: 440px;
    }
    
    .homepage-tool-image-wrapper {
        height: 150px;
    }
    
    .homepage-tool-content {
        padding: 16px;
    }
    
    .homepage-tool-title {
        font-size: 1rem;
    }
    
    .homepage-tool-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    #homepage-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .homepage-tool-card {
        height: 420px;
    }
    
    .tools-header h2 {
        font-size: 1.5rem;
    }
    
    .homepage-tool-image-wrapper {
        height: 140px;
    }
    
    .homepage-tool-content {
        padding: 14px;
    }
    
    .homepage-tool-title {
        font-size: 0.95rem;
    }
    
    .homepage-tool-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }
    
    .tools-see-all {
        margin-top: 30px;
        padding: 0 20px;
    }
    
    .tools-see-all-link {
        display: flex;
        padding: 16px 24px;
        font-size: 1rem;
        min-height: 48px;
        width: 100%;
        max-width: 300px;
        justify-content: center;
        box-sizing: border-box;
    }
}

/* Additional mobile responsiveness for see all button */
@media (max-width: 360px) {
    .tools-see-all-link {
        padding: 14px 20px;
        font-size: 0.95rem;
        max-width: 100%;
    }
}


/* Responsive Design */
@media (max-width: 1200px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .popular-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-box {
        padding: 25px 30px;
        min-width: 140px;
    }
    
    .stat-box .number {
        font-size: 2.2rem;
    }
    
    .tools-list .tool-card {
        flex-direction: column;
        text-align: center;
    }
    
    .tools-list .tool-icon-wrapper {
        margin: 0 auto 20px;
    }
    
    .tools-list .tool-link {
        flex-direction: column;
    }
    
    .tools-list .tool-description {
        text-align: center;
    }
    
    .tools-list .tool-features {
        justify-content: center;
    }
    
    .tools-list .tool-meta {
        justify-content: center;
    }
}


@media (max-width: 768px) {
    .tools-hero {
        padding: 60px 0 40px;
    }
    
    .tools-stats {
        gap: 15px;
        padding: 40px 20px;
    }
    
    .stat-box {
        padding: 20px 25px;
        min-width: 120px;
        flex: 1 1 calc(50% - 15px);
        max-width: 200px;
    }
    
    .stat-box .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .stat-box .number {
        font-size: 1.8rem;
    }
    
    .controls-container {
        gap: 15px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: center;
    }
    
    .category-pills {
        justify-content: center;
    }
    
    .category-pill {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .view-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tool-card {
        padding: 25px;
        min-height: auto;
    }
    
    .results-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .popular-grid {
        grid-template-columns: 1fr;
    }
    
    .tools-list .tool-card {
        flex-direction: column;
        text-align: center;
    }
    
    .tools-list .tool-icon-wrapper {
        margin: 0 auto 20px;
    }
    
    .tools-list .tool-link {
        flex-direction: column;
    }
    
    .tools-list .tool-description {
        text-align: center;
    }
    
    .tools-list .tool-features {
        justify-content: center;
    }
    
    .tools-list .tool-meta {
        justify-content: center;
    }
}


@media (max-width: 480px) {
    .search-input {
        padding: 14px 18px 14px 45px;
        font-size: 0.95rem;
    }
    
    .tools-stats {
        padding: 30px 15px;
    }
    
    .stat-box {
        padding: 15px 20px;
        min-width: 100px;
        flex: 1 1 100%;
        max-width: none;
    }
    
    .stat-box .icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-box .number {
        font-size: 1.5rem;
    }
    
    .tool-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .tool-icon {
        width: 32px;
        height: 32px;
    }
    
    .tool-card {
        padding: 20px;
        min-height: auto;
    }
    
    .tool-card h3 {
        font-size: 1.1rem;
    }
    
    .tool-description {
        font-size: 0.9rem;
    }
    
    .popular-card {
        padding: 20px;
    }
    
    .popular-card .icon {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .category-pill {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .view-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .sort-select {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}


/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for keyboard navigation */
.tool-card:focus-within {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.category-pill:focus,
.view-btn:focus,
.sort-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ============================================
   RELATED TOOLS SECTION STYLES (for use-other-tool component)
   ============================================ */

.related-tools-section {
    padding: 60px 0;
    
}

.related-tools-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #1e293b;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.related-tool-card-link {
    text-decoration: none;
    color: inherit;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.related-tool-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(white, white),
        linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.2) 50%, rgba(102, 126, 234, 0.1) 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

.related-tool-card:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(-10deg) translateY(-12px);
    box-shadow: 0 20px 40px rgba(118, 75, 162, 0.3), 0 10px 20px rgba(0, 0, 0, 0.1);
}

.related-tool-icon-wrapper {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.related-tool-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}


.related-tool-card:hover .related-tool-emoji {
    transform: scale(1.1);
}

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

.related-tool-category {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.related-tool-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
    line-height: 1.3;
}

.related-tool-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.related-tool-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.related-tool-card-link:hover .related-tool-cta {
    gap: 10px;
}

.related-tools-footer {
    text-align: center;
}

/* Responsive Design for Related Tools */
@media (max-width: 1024px) {
    .related-tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .related-tools-section h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .related-tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .related-tools-section {
        padding: 40px 0;
    }
    
    .related-tool-icon-wrapper {
        height: 120px;
    }
    
    .related-tool-emoji {
        font-size: 3rem;
    }

}

@media (max-width: 480px) {
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
    
    .related-tools-section h2 {
        font-size: 1.5rem;
    }
    
    .related-tool-content {
        padding: 16px;
    }
}

/* Print styles */
@media print {
    .tools-controls,
    .tools-cta {
        display: none;
    }
    
    .tool-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
