/* Index.cshtml (Homepage) Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::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"><rect width="100" height="100" fill="none"/><path d="M0 50 Q 25 25, 50 50 T 100 50" stroke="rgba(255,255,255,0.1)" fill="none" stroke-width="2"/></svg>') repeat;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Category Section */
.category-section {
    margin-bottom: 60px;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
}

.category-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: #2d3748;
}

.category-count {
    margin-left: auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Calculator Cards */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.calc-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.calc-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102,126,234,0.3);
    border-color: #667eea;
}

.calc-card:hover::before {
    transform: scaleX(1);
}

.calc-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calc-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

.calc-description {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.calc-badge {
    display: inline-block;
    background: rgba(102,126,234,0.1);
    color: #667eea;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-count {
        margin-left: 0;
        margin-top: 10px;
    }
}

/* Language Toggle Visibility */
.calc-card[data-lang] {
    display: block;
}

/* Tag Cloud Section */
.tag-cloud-section {
    background: linear-gradient(135deg, #f6f8fc 0%, #ffffff 100%);
    padding: 60px 0;
    margin-bottom: 60px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.1);
}

.tag-cloud-header {
    text-align: center;
    margin-bottom: 40px;
}

.tag-cloud-title {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.tag-cloud-subtitle {
    color: #718096;
    font-size: 1.1rem;
}

.tag-cloud-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.tag-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.tag-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.tag-item:hover::before {
    opacity: 1;
}

.tag-item:hover .tag-text,
.tag-item:hover .tag-count {
    color: white;
    position: relative;
    z-index: 1;
}

.tag-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.tag-item.active .tag-text,
.tag-item.active .tag-count {
    color: white;
}

.tag-text {
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.tag-count {
    margin-left: 8px;
    background: rgba(102, 126, 234, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #667eea;
    position: relative;
    z-index: 1;
}

.tag-item:hover .tag-count,
.tag-item.active .tag-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Tag size variations based on popularity */
.tag-item.tag-xl {
    font-size: 1.3rem;
    padding: 14px 28px;
}

.tag-item.tag-lg {
    font-size: 1.15rem;
    padding: 12px 24px;
}

.tag-item.tag-md {
    font-size: 1rem;
    padding: 10px 20px;
}

.tag-item.tag-sm {
    font-size: 0.9rem;
    padding: 8px 16px;
}

.tag-item.tag-xs {
    font-size: 0.85rem;
    padding: 6px 14px;
}

/* Tag filter status */
.tag-filter-status {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    display: none;
}

.tag-filter-status.active {
    display: block;
}

.tag-filter-text {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.tag-clear-filter {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 15px;
    background: white;
    border: 2px solid #667eea;
    border-radius: 20px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-clear-filter:hover {
    background: #667eea;
    color: white;
}

/* Responsive adjustments for tag cloud */
@media (max-width: 768px) {
    .tag-cloud-title {
        font-size: 2rem;
    }

    .tag-cloud-container {
        gap: 10px;
        padding: 15px;
    }

    .tag-item {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .tag-item.tag-xl {
        font-size: 1.1rem;
        padding: 10px 20px;
    }

    .tag-item.tag-lg {
        font-size: 1rem;
        padding: 9px 18px;
    }
}

/* ==================== Search Section ==================== */
.search-section {
    background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
    padding: 50px 0 30px;
    margin-bottom: 40px;
}

.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-title {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.search-subtitle {
    color: #718096;
    font-size: 1rem;
    margin: 0;
}

/* Search Input Container */
.search-container {
    max-width: 700px;
    margin: 0 auto 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: #667eea;
    font-size: 1.2rem;
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 16px 50px 16px 50px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.search-input::placeholder {
    color: #a0aec0;
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    background: #e2e8f0;
    border: none;
    color: #718096;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.clear-search-btn:hover {
    background: #cbd5e0;
    color: #2d3748;
    transform: rotate(90deg);
}

/* Search Suggestions Dropdown */
.search-suggestions {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.suggestions-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-bottom: 1px solid #e2e8f0;
}

.suggestions-count {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

.suggestions-list {
    max-height: 400px;
    overflow-y: auto;
}

/* Suggestion Item */
.suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 16px 20px;
    border-bottom: 1px solid #f7fafc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.suggestion-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.suggestion-title mark {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 700;
}

.suggestion-desc {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 8px;
    line-height: 1.5;
}

.suggestion-desc mark {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 1px 3px;
    border-radius: 2px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.suggestion-tag {
    font-size: 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.suggestion-score {
    flex-shrink: 0;
}

.relevance-badge {
    font-size: 0.75rem;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #718096;
}

.no-results i {
    font-size: 3rem;
    color: #cbd5e0;
    margin-bottom: 16px;
}

.no-results p {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.no-results-hint {
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Popular Searches */
.popular-searches {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.popular-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 600;
}

.popular-tag {
    font-size: 0.85rem;
    background: white;
    color: #667eea;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.popular-tag:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-section {
        padding: 40px 0 20px;
    }

    .search-title {
        font-size: 1.8rem;
    }

    .search-subtitle {
        font-size: 0.9rem;
    }

    .search-container {
        padding: 0 15px;
    }

    .search-input {
        font-size: 0.9rem;
        padding: 14px 50px 14px 45px;
    }

    .search-icon {
        font-size: 1rem;
        left: 16px;
    }

    .suggestion-item {
        padding: 12px 15px;
        gap: 12px;
    }

    .suggestion-icon {
        font-size: 1.5rem;
        width: 30px;
    }

    .suggestion-title {
        font-size: 0.95rem;
    }

    .suggestion-desc {
        font-size: 0.85rem;
    }

    .popular-searches {
        padding: 0 15px;
    }

    .popular-tag {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}

/* Scrollbar Styling for Suggestions List */
.suggestions-list::-webkit-scrollbar {
    width: 6px;
}

.suggestions-list::-webkit-scrollbar-track {
    background: #f7fafc;
}

.suggestions-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.suggestions-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
