/* Premium UI Components - Additional Styles */
/* Extends frontend-omnicalc.css with advanced components */

/* ============================================ */
/* ENHANCED HERO SECTION */
/* ============================================ */

.hero-immersive {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 60px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.4;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 10;
    position: relative;
}

.hero-title {
    font-size: 49px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--omni-text);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--omni-muted);
    margin-bottom: 40px;
}

.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================ */
/* ADVANCED SEARCH BAR */
/* ============================================ */

.search-bar-advanced {
    position: relative;
    max-width: 600px;
    margin: 0 auto 32px;
}

#calculator-search {
    width: 100%;
    padding: 18px 24px;
    font-size: 16px;
    border: 2px solid var(--omni-border);
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 104, 252, 0.1);
}

#calculator-search:focus {
    border-color: var(--omni-primary);
    box-shadow: 0 6px 20px rgba(59, 104, 252, 0.2);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-suggestions.show {
    display: block;
}

.search-results-dropdown {
    padding: 12px;
}

.results-section {
    margin-bottom: 16px;
}

.results-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--omni-muted);
    text-transform: uppercase;
    margin: 8px 12px;
    letter-spacing: 0.5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--omni-text);
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: var(--omni-background);
    text-decoration: none;
}

.search-result-item i {
    color: var(--omni-primary);
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.search-result-item strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.search-result-item small {
    color: var(--omni-muted);
    font-size: 12px;
}

.view-all-results {
    display: block;
    text-align: center;
    padding: 12px;
    color: var(--omni-primary);
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid var(--omni-border);
    margin-top: 8px;
}

.view-all-results:hover {
    background-color: var(--omni-background);
    text-decoration: none;
}

/* ============================================ */
/* QUICK ACTION CHIPS */
/* ============================================ */

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 2px solid var(--omni-border);
    border-radius: 50px;
    color: var(--omni-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.action-chip:hover {
    background: var(--omni-primary);
    color: white;
    border-color: var(--omni-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 104, 252, 0.3);
    text-decoration: none;
}

.action-chip i {
    font-size: 16px;
}

/* ============================================ */
/* PREMIUM CALCULATOR CARDS */
/* ============================================ */

.calculator-card-premium {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 28px;
    transition: all 0.3s ease;
    border: 1px solid var(--omni-border);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calculator-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 36px rgba(59, 104, 252, 0.15);
    border-color: var(--omni-primary);
}

.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--omni-primary), var(--omni-secondary));
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.card-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(59, 104, 252, 0.1), rgba(190, 5, 193, 0.1));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.card-icon i {
    font-size: 32px;
    background: linear-gradient(135deg, var(--omni-primary), var(--omni-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-card-premium h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--omni-text);
}

.calculator-card-premium p {
    color: var(--omni-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--omni-border);
}

.usage-count, .category-badge {
    font-size: 13px;
    color: var(--omni-muted);
}

.category-badge {
    background: rgba(59, 104, 252, 0.1);
    color: var(--omni-primary);
    padding: 4px 12px;
    border-radius: 8px;
    font-weight: 500;
}

.card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: var(--omni-primary);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-cta:hover {
    background: #2952E8;
    color: white;
    transform: scale(1.02);
    text-decoration: none;
}

/* ============================================ */
/* CAROUSEL/SLIDER */
/* ============================================ */

.calculator-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

@media (min-width: 1006px) {
    .calculator-carousel {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================ */
/* CATEGORY CARDS */
/* ============================================ */

.category-card-modern {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 32px;
    text-decoration: none;
    display: block;
    overflow: hidden;
    border: 2px solid var(--omni-border);
    transition: all 0.3s ease;
}

.category-card-modern:hover {
    border-color: var(--omni-primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(59, 104, 252, 0.15);
    text-decoration: none;
}

.category-icon-wrapper {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(59, 104, 252, 0.1), rgba(190, 5, 193, 0.1));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.category-icon-wrapper i {
    font-size: 36px;
    background: linear-gradient(135deg, var(--omni-primary), var(--omni-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-card-modern h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--omni-text);
    margin-bottom: 12px;
}

.category-card-modern p {
    color: var(--omni-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.category-stats {
    color: var(--omni-primary);
    font-size: 13px;
    font-weight: 500;
}

.category-hover-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--omni-primary), var(--omni-secondary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card-modern:hover .category-hover-effect {
    transform: scaleX(1);
}

/* ============================================ */
/* TRENDING SECTION */
/* ============================================ */

.section-header-with-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.time-filter {
    display: flex;
    gap: 8px;
    background: white;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--omni-border);
}

.time-filter button {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--omni-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.time-filter button.active {
    background: var(--omni-primary);
    color: white;
}

.time-filter button:hover:not(.active) {
    background: var(--omni-background);
}

.trending-grid {
    display: grid;
    gap: 16px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--omni-border);
    transition: all 0.3s ease;
}

.trending-item:hover {
    border-color: var(--omni-primary);
    box-shadow: 0 8px 24px rgba(59, 104, 252, 0.1);
    transform: translateX(4px);
}

.rank-badge {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--omni-primary), var(--omni-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.trending-content {
    flex-grow: 1;
}

.trending-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.trending-content p {
    color: var(--omni-muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.trending-stats {
    display: flex;
    gap: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--omni-muted);
}

.stat-item i {
    color: var(--omni-primary);
}

.trending-link {
    padding: 10px 20px;
    background: var(--omni-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.trending-link:hover {
    background: #2952E8;
    color: white;
    transform: scale(1.05);
    text-decoration: none;
}

/* ============================================ */
/* BLOG CARDS */
/* ============================================ */

.blog-card-premium {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--omni-border);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-premium:hover {
    border-color: var(--omni-primary);
    box-shadow: 0 12px 36px rgba(59, 104, 252, 0.15);
    transform: translateY(-4px);
}

.blog-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card-premium:hover .blog-image-wrapper img {
    transform: scale(1.1);
}

.blog-category-overlay {
    position: absolute;
    top: 16px;
    left: 16px;
    background: white;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--omni-primary);
}

.blog-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--omni-muted);
}

.author-avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.dot {
    color: var(--omni-border);
}

.blog-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-content p {
    color: var(--omni-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.read-more {
    color: var(--omni-primary);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 10px;
    text-decoration: none;
}

/* ============================================ */
/* STATS & METRICS */
/* ============================================ */

.social-proof {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.stat-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--omni-muted);
}

.stat-inline i {
    color: var(--omni-primary);
}

/* ============================================ */
/* FORM ENHANCEMENTS */
/* ============================================ */

.input-with-unit {
    display: flex;
    gap: 8px;
}

.input-with-unit input {
    flex-grow: 1;
}

.unit-selector {
    padding: 12px;
    border: 2px solid var(--omni-border);
    border-radius: 8px;
    background: white;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
    min-width: 80px;
}

.unit-selector:focus {
    border-color: var(--omni-primary);
}

.select-modern {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--omni-border);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.select-modern:focus {
    border-color: var(--omni-primary);
}

.slider-input-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider-input-group input[type="range"] {
    flex-grow: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--omni-border);
    outline: none;
    -webkit-appearance: none;
}

.slider-input-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--omni-primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(59, 104, 252, 0.3);
}

.slider-input-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--omni-primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(59, 104, 252, 0.3);
}

.slider-input-group output {
    min-width: 60px;
    text-align: center;
    padding: 8px 12px;
    background: var(--omni-background);
    border-radius: 8px;
    font-weight: 600;
    color: var(--omni-primary);
}

.field-hint {
    display: block;
    font-size: 12px;
    color: var(--omni-muted);
    margin-top: 6px;
}

/* ============================================ */
/* BADGES */
/* ============================================ */

.badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #00C853;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #FF6D00, #FFC107);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================ */
/* LOADING STATES */
/* ============================================ */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================ */
/* RESPONSIVE ADJUSTMENTS */
/* ============================================ */

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .calculator-carousel {
        grid-template-columns: 1fr;
    }
    
    .section-header-with-tabs {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .trending-item {
        flex-direction: column;
        text-align: center;
    }
    
    .social-proof {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 584px) {
    .quick-actions {
        justify-content: flex-start;
    }
    
    .action-chip {
        font-size: 13px;
        padding: 8px 16px;
    }
}
