@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   Refined TinyWow UI - Global & Layout
   ========================================================================== */

:root {
    --aiot-primary: #1A8FE3;
    --aiot-bg: #FFFFFF;
    --aiot-bg-alt: #F8FAFC;
    --aiot-text: #020817;
    --aiot-muted: #64748B;
    --aiot-border: #F1F5F9;
    --aiot-highlight_bg: #D81B60;
    /* Highlight box color */

    /* Category Colors */
    --aiot-pdf: #6F56EC;
    --aiot-image: #F66213;
    --aiot-video: #D61C4E;
    --aiot-ai: #1C67CA;
    --aiot-files: #247881;
}

.aiot-front-page-container {
    font-family: 'Poppins', sans-serif !important;
    color: var(--aiot-text) !important;
    background-color: var(--aiot-bg) !important;
}

.aiot-container {
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

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

.aiot-hero {
    padding: 100px 0 60px !important;
    text-align: center !important;
    background: radial-gradient(circle at 10% 20%, rgba(26, 143, 227, 0.03) 0%, rgba(255, 255, 255, 1) 90%) !important;
}

.aiot-hero-title {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 24px !important;
    color: #1a1e26 !important;
    letter-spacing: -0.01em !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    line-height: 1.2 !important;
}

.aiot-highlight {
    background: var(--aiot-highlight_bg) !important;
    color: #fff !important;
    padding: 4px 24px !important;
    border-radius: 4px !important;
    display: inline-block !important;
}

.aiot-hero-subtitle {
    font-size: 1.1rem !important;
    color: var(--aiot-muted) !important;
    margin-bottom: 48px !important;
    font-weight: 400 !important;
}

/* Search Bar Refined */
.aiot-search-wrapper {
    max-width: 760px !important;
    margin: 0 auto 60px !important;
    position: relative !important;
    /* Required for suggestions anchor */
}

.aiot-search-form {
    background: #fff !important;
    border-radius: 99px !important;
    padding: 6px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid var(--aiot-border) !important;
    display: block !important;
}

.aiot-search-inner {
    display: flex !important;
    align-items: center !important;
    padding: 0 15px !important;
}

.aiot-icon-search-glass {
    color: var(--aiot-primary) !important;
    font-size: 1.2rem !important;
    margin-right: 15px !important;
    opacity: 0.6 !important;
}

.aiot-search-input {
    flex-grow: 1 !important;
    border: none !important;
    background: transparent !important;
    padding: 18px 10px !important;
    font-size: 1.15rem !important;
    color: var(--aiot-text) !important;
    outline: none !important;
    box-shadow: none !important;
}

.aiot-search-button {
    background: var(--aiot-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 0 45px !important;
    height: 54px !important;
    border-radius: 99px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.aiot-search-button:hover {
    background: #1579c1 !important;
    transform: scale(1.02) !important;
}

/* ==========================================================================
   Refined Category Cards (New Style)
   ========================================================================== */

.aiot-category-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 24px !important;
    margin-bottom: 40px !important;
}

.aiot-cat-card-new {
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 240px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
    text-decoration: none !important;
}

.aiot-cat-card-new:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
}

/* Base card specific types */
.aiot-cat-card-new.purple {
    background-color: var(--aiot-pdf) !important;
}

.aiot-cat-card-new.orange {
    background-color: var(--aiot-image) !important;
}

.aiot-cat-card-new.crimson {
    background-color: var(--aiot-video) !important;
}

.aiot-cat-card-new.blue {
    background-color: #1461CC !important;
}

.aiot-cat-card-new.teal {
    background-color: #247881 !important;
}

.card-top {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px !important;
}

.cat-icon-box {
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.4rem !important;
}

.tool-count {
    color: #fff !important;
    opacity: 0.8 !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
}

.card-body {
    padding: 0 20px 20px !important;
    /* color: #fff !important; */
    flex-grow: 1 !important;
    text-align: left !important;
}

.card-body h3 {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    /* color: #fff !important; */
}

.card-body p {
    font-size: 0.9rem !important;
    margin: 0 !important;
    opacity: 0.7 !important;
    font-weight: 400 !important;
    /* color: #fff !important; */
}

.arrow-icon {
    position: absolute !important;
    right: 20px !important;
    bottom: 85px !important;
    font-size: 1.4rem !important;
    opacity: 0.6 !important;
    color: #fff !important;
}

/* Card Footer */
.card-footer {
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 15px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    margin-top: auto !important;
}

.footer-label {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.footer-tool {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
}

/* Footer tool text highlighting based on card category */
.purple .footer-tool {
    color: var(--aiot-pdf) !important;
}

.orange .footer-tool {
    color: var(--aiot-image) !important;
}

.crimson .footer-tool {
    color: var(--aiot-video) !important;
}

.blue .footer-tool {
    color: #1461CC !important;
}

.teal .footer-tool {
    color: #247881 !important;
}

/* ==========================================================================
   Statistics Section
   ========================================================================== */

.aiot-stats-section {
    padding: 80px 0 !important;
}

.aiot-stats-row {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    background: #fff !important;
    border-radius: 20px !important;
    padding: 60px 40px !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--aiot-border) !important;
}

.stat-item {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 0 60px !important;
    border-right: 1px solid var(--aiot-border) !important;
}

.stat-item:last-child {
    border-right: none !important;
}

.stat-num {
    font-size: 3.25rem !important;
    font-weight: 800 !important;
    color: #1A8FE3 !important;
    letter-spacing: -0.03em !important;
}

.stat-text {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

/* ==========================================================================
   Popular Tools & Grid Override
   ========================================================================== */

.section-header h2 {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    margin-bottom: 20px !important;
}

.aiot-custom-content .card-columns {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px !important;
}

.aiot-custom-content .card {
    border-radius: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    padding: 24px !important;
    background: #fff !important;
}

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

@media (max-width: 1100px) {
    .aiot-hero-title {
        font-size: 2.75rem !important;
    }

    .stat-item {
        padding: 0 30px !important;
    }

    .aiot-category-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .aiot-stats-row {
        flex-wrap: wrap !important;
        text-align: center !important;
    }

    .stat-item {
        width: 50% !important;
        border-right: none !important;
        padding: 20px !important;
        justify-content: center !important;
    }

    .aiot-custom-content .card-columns {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .aiot-hero-title {
        flex-direction: column !important;
        font-size: 2.25rem !important;
    }

    .aiot-category-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-item {
        width: 100% !important;
    }

    .aiot-search-button {
        padding: 0 25px !important;
    }

    .aiot-search-input {
        font-size: 1rem !important;
    }
}

/* ==========================================================================
   Popular Tools Section – Tabs + Cards
   ========================================================================== */

.aiot-popular-section {
    /* background: #EBF3FD !important; */
    padding: 80px 0 !important;
}

.aps-heading {
    text-align: center !important;
    margin-bottom: 36px !important;
}

.aps-heading h2 {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 8px !important;
}

.aps-sub {
    font-size: 1rem !important;
    color: #64748b !important;
    margin: 0 !important;
}

/* ── Tabs ── */
.aps-tabs {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    background: #fff !important;
    border-radius: 50px !important;
    padding: 6px 8px !important;
    margin-bottom: 36px !important;
    width: fit-content !important;
    max-width: 100% !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06) !important;
    margin: auto;
}

.aps-tab {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    border: none !important;
    background: transparent !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    cursor: pointer !important;
    transition: all .2s !important;
    white-space: nowrap !important;
}

.aps-tab:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.aps-tab.active {
    background: #1A8FE3 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(26, 143, 227, .3) !important;
}

.aps-tab.active svg,
.aps-tab.active img {
    filter: brightness(0) invert(1) !important;
}

/* ── Tool Cards Grid ── */
.aps-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}

.aiot-tool-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    background: #fff !important;
    border-radius: 14px !important;
    padding: 18px 16px !important;
    text-decoration: none !important;
    color: inherit !important;
    border: 1px solid #e8f0fb !important;
    transition: transform .2s, box-shadow .2s !important;
    min-height: 100px !important;
}

.aiot-tool-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .09) !important;
    border-color: #c7dff8 !important;
    text-decoration: none !important;
}

.atc-icon-wrap {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
    background: #f0f7ff !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.atc-icon {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain !important;
}

.atc-icon-placeholder {
    font-size: 1.25rem !important;
}

.atc-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.atc-title {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 3px !important;
    line-height: 1.3 !important;
}

.atc-cat {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 5px !important;
}

.atc-desc {
    font-size: 0.8rem !important;
    color: #64748b !important;
    margin: 0 0 4px !important;
    line-height: 1.45 !important;
}

.atc-views {
    display: inline-block !important;
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    margin-top: 2px !important;
    letter-spacing: .01em !important;
}

.aiot-no-tools {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    color: #94a3b8 !important;
    padding: 40px 0 !important;
    font-size: 1rem !important;
}

/* ── Spinner animation ── */
#aps-loader svg {
    animation: aps-spin 1s linear infinite !important;
}

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

/* ── All Tools CTA ── */
.aps-all-btn {
    display: inline-block !important;
    padding: 13px 42px !important;
    border: 2px solid #1A8FE3 !important;
    border-radius: 50px !important;
    color: #1A8FE3 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    transition: all .2s !important;
}

.aps-all-btn:hover {
    background: #1A8FE3 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .aps-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .aps-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .aps-tabs {
        gap: 4px !important;
        padding: 4px 6px !important;
    }

    .aps-tab {
        padding: 7px 12px !important;
        font-size: .8rem !important;
    }

    .aps-heading h2 {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 480px) {
    .aps-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   Tool Category Page Specifics
   ========================================================================== */

.aiot-category-page .aiot-cat-hero {
    background: #fff !important;
    padding: 100px 0 60px !important;
    text-align: center !important;
    position: relative !important;
}

.aiot-cat-title {
    font-size: 3.5rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin: 0 0 15px !important;
    text-transform: capitalize !important;
}

.aiot-cat-subtitle {
    font-size: 1.1rem !important;
    color: #64748b !important;
    margin-bottom: 40px !important;
}

.aiot-category-page .aiot-search-wrapper {
    max-width: 600px !important;
    margin: 0 auto !important;
}

.aiot-category-content {
    padding: 60px 0 80px !important;
    background: #f8fafc !important;
}

/* Decorative Confetti Icons */
.aiot-confetti {
    position: absolute !important;
    width: 20px !important;
    height: 20px !important;
    border-radius: 4px !important;
    z-index: 1 !important;
    opacity: 0.8 !important;
}

.confetti-1 {
    top: 15% !important;
    left: 5% !important;
    background: #f43f5e !important;
    transform: rotate(45deg) !important;
}

.confetti-2 {
    top: 10% !important;
    right: 8% !important;
    background: #6366f1 !important;
    width: 25px !important;
    height: 25px !important;
    transform: rotate(15deg) !important;
}

.confetti-3 {
    bottom: 20% !important;
    left: 10% !important;
    background: #fbbf24 !important;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%) !important;
}

.confetti-4 {
    top: 40% !important;
    right: 5% !important;
    background: #2dd4bf !important;
    border-radius: 50% !important;
}

/* Pagination Styling */
.aiot-pagination {
    margin-top: 60px !important;
    text-align: center !important;
}

.aiot-pagination .nav-links {
    display: inline-flex !important;
    gap: 10px !important;
}

.aiot-pagination .page-numbers {
    width: 45px !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #1a1e26 !important;
    border: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
}

.aiot-pagination .page-numbers:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.aiot-pagination .page-numbers.current {
    background: #1A8FE3 !important;
    color: #fff !important;
    border-color: #1A8FE3 !important;
}

@media (max-width: 768px) {
    .aiot-cat-title {
        font-size: 2.5rem !important;
    }
}

/* ==========================================================================
   Single Tool Page Specifics
   ========================================================================== */

.aiot-single-tool-page .aiot-tool-hero {
    background: #fff !important;
    text-align: center !important;
    position: relative !important;
    overflow: hidden !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* .aiot-cat-title and .aiot-cat-subtitle are now used here for consistency */

.aiot-tool-meta-header {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
}

/* Tool Layout */
.aiot-tool-layout {
    display: grid !important;
    gap: 30px !important;
    padding: 50px 0 !important;
}

.aiot-tool-layout.has-sidebar {
    grid-template-columns: 1fr 320px !important;
}

.aiot-tool-layout.no-sidebar {
    grid-template-columns: 1fr !important;
    max-width: 1000px !important;
    margin: 0 auto !important;
}

.aiot-tool-main-content {
    background: #fff !important;
    border-radius: 20px !important;
    padding: 40px !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #f1f5f9 !important;
}

.aiot-tool-article .entry-content {
    margin: 0 !important;
}

/* Related section inside single page */
.aiot-related-section {
    margin-top: 60px !important;
    padding-top: 40px !important;
    border-top: 1px solid #f1f5f9 !important;
}

.aiot-related-title {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin-bottom: 30px !important;
    text-align: left !important;
}

/* Sidebar Styling */
.aiot-tool-sidebar {
    position: sticky !important;
    top: 100px !important;
    align-self: start !important;
}

.aiot-tool-sidebar section {
    background: #fff !important;
    border-radius: 16px !important;
    padding: 24px !important;
    border: 1px solid #f1f5f9 !important;
    margin-bottom: 24px !important;
}

.aiot-tool-sidebar .widget-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #1A8FE3 !important;
    display: inline-block !important;
}

@media (max-width: 992px) {
    .aiot-tool-layout.has-sidebar {
        grid-template-columns: 1fr !important;
    }

    .aiot-tool-sidebar {
        position: static !important;
    }
}

@media (max-width: 768px) {

    .aiot-tool-main-content {
        padding: 20px !important;
    }
}

/* ──────────────────────────────────────────────────────────────────
   Global Search Suggestions (Premium UI)
   ────────────────────────────────────────────────────────────────── */

.aiot-suggestions {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .08) !important;
    z-index: 999 !important;
    max-height: 340px !important;
    overflow-y: auto !important;
}

.aiot-suggestion-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 18px !important;
    text-decoration: none !important;
    color: #1a1e26 !important;
    font-size: .95rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    transition: background .15s !important;
}

.aiot-suggestion-item:last-child {
    border-bottom: none !important;
}

.aiot-suggestion-item:hover {
    background: #f8fafc !important;
    text-decoration: none !important;
}

.aiot-suggestion-icon {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
}

.aiot-suggestion-name {
    font-weight: 600 !important;
    color: #0f172a !important;
}

.aiot-suggestion-cat {
    font-size: .78rem !important;
    color: #94a3b8 !important;
    margin-left: auto !important;
    font-weight: 500 !important;
}