/* Omni Calculator — Homepage styles */

.page-home {
    font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
    background: #f5f7fa;
}

.page-home .site-footer,
.page-home .footer-v2 {
    margin-top: 0;
}

/* Header logo */
.omni-home-header {
    padding: 2rem 0 1.5rem;
    background: transparent;
}

.omni-home-header-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.omni-home-header-row .omni-logo {
    margin: 0 auto;
}

.omni-home-header-row .dark-mode-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

.omni-logo {
    display: inline-flex;
    align-items: baseline;
    text-decoration: none !important;
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.omni-logo-smart {
    background: linear-gradient(90deg, #ff6b4a 0%, #e84393 35%, #9b59b6 55%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.omni-logo-calc {
    color: #1e3a5f;
    margin-left: 2px;
}

/* Hero */
.omni-home {
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(255, 182, 193, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 80% 20%, rgba(186, 230, 253, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 80%, rgba(233, 213, 255, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, #fafbfc 0%, #f0f4f8 100%);
    padding-bottom: 0;
}

.omni-hero {
    padding: 1rem 0 3.5rem;
    position: relative;
    z-index: 10;
}

.omni-hero-lead {
    font-size: 1.35rem;
    font-weight: 600;
    color: #5a6a7e;
    margin-bottom: 0.25rem;
}

.omni-hero-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.omni-hero-count {
    color: #288dfd;
    white-space: nowrap;
}

.omni-hero-word {
    color: #2d3a4a;
    width: 100%;
    margin-top: 0.1rem;
}

/* Math symbol badges */
.omni-math-icons {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    vertical-align: middle;
}

.math-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.math-plus  { background: #ff6b4a; }
.math-minus { background: #f5a623; }
.math-multiply { background: #3498db; }
.math-divide { background: #9b59b6; }

/* Hero search */
.omni-hero-search {
    max-width: 520px;
    margin-left: auto;
}

.omni-search-wrap {
    position: relative;
    z-index: 100;
}

.omni-search-input {
    width: 100%;
    height: 64px;
    padding: 0 4rem 0 1.75rem;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    color: #2d3a4a;
    background: #fff;
    border: 2px solid #e8ecf1;
    border-radius: 50px;
    box-shadow: 0 4px 24px rgba(40, 141, 253, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.omni-search-input::placeholder {
    color: #a0aec0;
    font-weight: 600;
}

.omni-search-input:focus,
.omni-search-input.is-active {
    border-color: #288dfd;
    box-shadow: 0 4px 24px rgba(40, 141, 253, 0.15), 0 0 0 3px rgba(40, 141, 253, 0.1);
}

.omni-search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: #288dfd;
    font-size: 1.35rem;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}

.omni-search-btn:hover {
    background: rgba(40, 141, 253, 0.08);
}

/* Omni search dropdown */
.omni-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    max-height: 380px;
    overflow-y: auto;
    padding: 0.35rem 0;
}

.omni-search-dropdown.is-open {
    display: block;
}

.omni-search-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.85rem 1.25rem;
    color: #2d3a4a !important;
    text-decoration: none !important;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.12s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.omni-search-item:hover,
.omni-search-item.is-highlighted {
    background: #f0f6ff;
}

.omni-search-item-title {
    color: #2d3a4a;
    overflow: hidden;
    text-overflow: ellipsis;
}

.omni-search-item-dot {
    color: #e74c3c;
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.omni-search-item-cat {
    color: #8a96a8;
    font-weight: 600;
    flex-shrink: 0;
}

.omni-search-empty {
    padding: 1rem 1.25rem;
    color: #8a96a8;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Categories panel */
.omni-categories-section {
    margin-top: -1.5rem;
    padding-bottom: 3rem;
    position: relative;
    z-index: 5;
}

.omni-categories-panel {
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.75rem 2.25rem;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.06);
    position: relative;
}

.omni-categories-panel::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 48px;
    width: 0;
    height: 0;
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid #fff;
}

/* Category cards */
.omni-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 0.75rem 1.25rem;
    background: #fff;
    border: 1.5px solid #e8ecf1;
    border-radius: 14px;
    color: #2d3a4a;
    text-decoration: none !important;
    height: 100%;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.omni-category-card:hover {
    border-color: #288dfd;
    box-shadow: 0 6px 20px rgba(40, 141, 253, 0.12);
    transform: translateY(-2px);
    color: #2d3a4a;
}

.omni-cat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
    font-size: 1.45rem;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s, box-shadow 0.2s;
}

.omni-category-card:hover .omni-cat-icon {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

.omni-cat-icon i {
    font-weight: 900;
}

.omni-cat-name {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: #2d3a4a;
    line-height: 1.25;
}

.omni-cat-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8a96a8;
}

/* Lower sections */
.omni-section {
    padding: 3rem 0;
    background: #f5f7fa;
}

.omni-section-alt {
    background: #fff;
}

.omni-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3a4a;
    margin-bottom: 1.5rem;
}

.page-home .calc-card {
    border-radius: 14px;
    border-color: #e8ecf1;
    font-family: 'Nunito', sans-serif;
}

.page-home .calc-card:hover {
    border-color: #288dfd;
    box-shadow: 0 6px 20px rgba(40, 141, 253, 0.1);
}

.page-home .calc-card-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 991.98px) {
    .omni-hero-search {
        margin-left: 0;
        max-width: 100%;
    }

    .omni-hero {
        padding-bottom: 2rem;
    }

    .omni-logo {
        font-size: 2.25rem;
    }

    .omni-categories-panel::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 575.98px) {
    .omni-hero-lead {
        font-size: 1.1rem;
    }

    .omni-hero-title {
        font-size: 2rem;
    }

    .omni-search-input {
        height: 54px;
        font-size: 1rem;
        padding-left: 1.25rem;
    }

    .omni-category-card {
        padding: 1rem 0.5rem;
    }

    .omni-cat-icon {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
    }

    .omni-cat-name {
        font-size: 0.9rem;
    }

    .omni-cat-count {
        font-size: 0.75rem;
    }
}
