/* ============================================
   Homepage Styles
   Modern, clean design for Pentavi Toolkits
   ============================================ */

/* ============================================
   Hero Section
   ============================================ */

.home-hero {
    background: linear-gradient(135deg, var(--accent-emphasis) 0%, #2563eb 100%);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.home-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.home-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    margin-bottom: 20px;
}

.hero-badge svg {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin: 0 0 16px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 28px 0;
    line-height: 1.6;
}

/* Hero Search Box */
.hero-search {
    position: relative;
    max-width: 480px;
}

.hero-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.hero-search-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.hero-search-input {
    width: 100%;
    padding: 16px 48px 16px 48px;
    background: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-normal);
}

.hero-search-input::placeholder {
    color: var(--text-muted);
}

.hero-search-input:focus {
    outline: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.hero-search-clear {
    position: absolute;
    right: 14px;
    width: 28px;
    height: 28px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 2;
}

.hero-search-clear svg {
    width: 14px;
    height: 14px;
}

.hero-search-clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Hero Search Results */
.hero-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-result-category {
    padding: 10px 16px 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
}

.hero-search-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-fast);
}

.hero-search-item:last-child {
    border-bottom: none;
}

.hero-search-item:hover {
    background: var(--bg-secondary);
}

.hero-search-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.hero-search-item-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-emphasis);
}

.hero-search-item-info {
    flex: 1;
    min-width: 0;
}

.hero-search-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.hero-search-item-desc {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-search-item-arrow {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: all var(--transition-fast);
}

.hero-search-item:hover .hero-search-item-arrow {
    opacity: 1;
    transform: translateX(0);
}

.hero-search-no-results {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
}

.hero-search-no-results svg {
    width: 40px;
    height: 40px;
    color: var(--border-default);
    margin-bottom: 12px;
}

.hero-search-no-results p {
    margin: 0;
    font-size: 14px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: white;
    line-height: 1;
}

.hero-stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

/* ============================================
   Category Sections
   ============================================ */

.category-section {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.category-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.category-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent-emphasis);
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.category-description {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.category-count {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ============================================
   Tool Cards Grid
   ============================================ */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.tool-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.tool-card:hover {
    border-color: var(--accent-emphasis);
    box-shadow: 0 8px 24px rgba(9, 105, 218, 0.12);
    transform: translateY(-3px);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(9, 105, 218, 0.08) 0%, rgba(37, 99, 235, 0.08) 100%);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    transition: all var(--transition-normal);
}

.tool-card:hover .tool-card-icon {
    background: linear-gradient(135deg, var(--accent-emphasis) 0%, #2563eb 100%);
}

.tool-card-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-emphasis);
    transition: all var(--transition-normal);
}

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

.tool-card-info {
    flex: 1;
    min-width: 0;
}

.tool-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    transition: color var(--transition-fast);
}

.tool-card:hover .tool-card-name {
    color: var(--accent-emphasis);
}

.tool-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card-arrow {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 12px;
}

.tool-card-arrow svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-normal);
}

.tool-card:hover .tool-card-arrow svg {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-emphasis);
}

/* ============================================
   Quick Stats Section
   ============================================ */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.quick-stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition-fast);
}

.quick-stat-card:hover {
    border-color: var(--border-default);
}

.quick-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.quick-stat-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-emphasis);
}

.quick-stat-info {
    flex: 1;
}

.quick-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.quick-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============================================
   No Results State
   ============================================ */

.no-results {
    text-align: center;
    padding: 64px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.no-results-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--border-default);
}

.no-results h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.no-results p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   Footer Section
   ============================================ */

.home-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.home-footer p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.home-footer a {
    color: var(--accent-emphasis);
    text-decoration: none;
}

.home-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 1024px) {
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-stats {
        gap: 24px;
    }

    .hero-stat-value {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 32px 24px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 16px 32px;
    }

    .hero-stat-value {
        font-size: 22px;
    }

    .quick-stats {
        grid-template-columns: 1fr 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-wrap: wrap;
    }

    .category-count {
        margin-top: 8px;
        margin-left: 58px;
    }
}

@media (max-width: 576px) {
    .home-hero {
        padding: 24px 20px;
    }

    .hero-badge {
        font-size: 11px;
    }

    .hero-title {
        font-size: 24px;
    }

    .hero-search-input {
        padding: 14px 44px 14px 44px;
        font-size: 14px;
    }

    .quick-stats {
        grid-template-columns: 1fr;
    }

    .quick-stat-card {
        padding: 16px;
    }

    .category-icon {
        width: 40px;
        height: 40px;
    }

    .category-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .tool-card,
    .quick-stat-card,
    .hero-search-item,
    .tool-card-icon,
    .tool-card-arrow svg,
    .hero-search-item-arrow {
        transition: none;
    }

    .tool-card:hover {
        transform: none;
    }
}
