.ian-functions-page {
    color: #334155;
    background: #f8fafc;
}

.ian-functions-heading {
    max-width: 900px;
    margin: 0 auto;
    padding: 58px 24px 42px;
    text-align: center;
}

.ian-functions-eyebrow,
.ian-related-eyebrow,
.ian-module-card-meta > span:first-child,
.ian-module-cta > div:first-child > span {
    color: #0465ae;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ian-functions-heading h1 {
    margin: 8px 0 16px;
    color: #172033;
    font-size: 38px;
    line-height: 1.2;
}

.ian-functions-heading p {
    max-width: 760px;
    margin: 0 auto;
    color: #64748b;
    font-size: 18px;
    line-height: 1.65;
}

.ian-modules-container {
    max-width: 1500px;
    padding: 0 14px 50px !important;
}

.ian-module-tools {
    margin: 0 4px 22px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.ian-module-search {
    position: relative;
    max-width: 520px;
    margin: 0 auto 16px;
}

.ian-module-search > span,
.ian-module-search > svg {
    position: absolute;
    top: 50%;
    left: 16px;
    color: #64748b;
    transform: translateY(-50%);
}

.ian-module-search input {
    box-sizing: border-box;
    width: 100%;
    height: 46px;
    padding: 0 16px 0 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: 0;
    background: #fff;
    color: #1e293b;
    font: inherit;
}

.ian-module-search input:focus {
    border-color: #2684ff;
    box-shadow: 0 0 0 3px rgba(38, 132, 255, .14);
}

.ian-module-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.ian-module-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #d5dde7;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.ian-module-filter:hover,
.ian-module-filter-active {
    border-color: #0465ae;
    background: #eaf4fb;
    color: #0465ae;
}

.ian-modules-grid {
    align-items: stretch;
}

.ian-module-grid-item {
    display: flex;
}

.ian-module-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 315px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(15, 23, 42, .06);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.ian-module-card:hover {
    border-color: #b9d8ef;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .1);
    transform: translateY(-2px);
}

.ian-module-card-meta,
.ian-module-card-header,
.ian-module-detail-header,
.ian-module-detail-title {
    display: flex;
    align-items: center;
}

.ian-module-card-meta {
    justify-content: space-between;
    min-height: 22px;
    margin-bottom: 14px;
}

.ian-module-card-meta > span:first-child {
    color: #64748b;
    font-size: 10px;
}

.ian-module-state {
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a5700;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
}

.ian-module-state-new {
    background: #dcfce7;
    color: #166534;
}

.ian-module-card-header {
    justify-content: space-between;
    gap: 20px;
}

.ian-module-card h2 {
    margin: 0;
    color: #1e293b;
    font-size: 22px;
    line-height: 1.25;
}

.ian-module-card-icon,
.ian-module-detail-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: #eaf4fb;
    color: #0465ae;
    font-size: 25px;
}

.ian-module-card-description {
    display: -webkit-box;
    overflow: hidden;
    flex: 1 1 auto;
    max-height: 6.6em;
    margin-top: 20px;
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.ian-module-card-actions {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #edf1f5;
    text-align: right;
}

.ian-module-more,
.ian-module-back {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    text-decoration: none !important;
}

.ian-module-more .fa-arrow-right {
    transition: transform .2s ease;
}

.ian-module-more:hover .fa-arrow-right {
    transform: translateX(3px);
}

.ian-modules-empty {
    padding: 70px 20px;
    color: #64748b;
    text-align: center;
}

.ian-modules-empty > span,
.ian-modules-empty > svg {
    font-size: 28px;
}

.ian-modules-empty h2 {
    margin: 14px 0 4px;
    color: #334155;
}

.ian-modules-empty p {
    margin: 0;
}

.ian-module-detail-panel.ui-panel {
    width: 100%;
    border: 0;
    background: transparent;
}

.ian-module-detail-panel.ui-panel .ui-panel-content {
    padding: 0;
    border: 0;
    background: transparent;
}

.ian-module-detail {
    overflow: hidden;
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .08);
}

.ian-module-detail-header {
    justify-content: space-between;
    gap: 24px;
    padding: 30px 38px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fbfe 0%, #eef7fd 100%);
}

.ian-module-detail-title {
    gap: 18px;
}

.ian-module-detail-title > div:last-child > span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ian-module-detail-title h2 {
    margin: 4px 0 0;
    color: #172033;
    font-size: 30px;
    line-height: 1.2;
}

.ian-module-back {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #fff;
    color: #334155 !important;
}

.ian-module-back:hover {
    border-color: #0465ae;
    color: #0465ae !important;
}

.ian-module-screenshot {
    max-width: 1120px;
    margin: 36px auto 0;
    padding: 0 36px;
}

.ian-module-screenshot img {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-height: 680px;
    border: 1px solid #dbe4ee;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .12);
}

.ian-module-detail-content {
    max-width: 940px;
    margin: 0 auto;
    padding: 42px 46px 48px;
    color: #334155;
    font-size: 16px;
    line-height: 1.75;
}

.ian-module-detail-content .ian-module-lead {
    margin: 0 0 34px;
    color: #1e293b;
    font-size: 20px;
    line-height: 1.6;
}

.ian-module-detail-content h3 {
    margin: 34px 0 10px;
    color: #172033;
    font-size: 21px;
    line-height: 1.35;
}

.ian-module-detail-content p {
    margin: 0 0 18px;
}

.ian-module-detail-content ul {
    margin: 14px 0 26px;
    padding-left: 24px;
}

.ian-module-detail-content li {
    margin: 8px 0;
    padding-left: 5px;
}

.ian-module-benefit {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 34px 0;
    padding: 24px;
    border: 1px solid #cce4f5;
    border-radius: 12px;
    background: #f1f8fd;
}

.ian-module-benefit > span,
.ian-module-benefit > svg {
    flex: 0 0 auto;
    margin-top: 3px;
    color: #0465ae;
    font-size: 25px;
}

.ian-module-benefit h3 {
    margin: 0 0 6px;
}

.ian-module-benefit p {
    margin: 0;
}

.ian-related-modules {
    padding: 38px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ian-related-modules > h2 {
    margin: 5px 0 20px;
    color: #172033;
    font-size: 24px;
}

.ian-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ian-related-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    padding: 12px 15px;
    border: 1px solid #dbe4ee;
    border-radius: 10px;
    background: #fff;
    color: #334155 !important;
    text-decoration: none !important;
    transition: border-color .2s ease, transform .2s ease;
}

.ian-related-card:hover {
    border-color: #2684ff;
    transform: translateY(-1px);
}

.ian-related-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #eaf4fb;
    color: #0465ae;
}

.ian-related-name {
    overflow: hidden;
    flex: 1 1 auto;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ian-module-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin: 38px;
    padding: 30px;
    border-radius: 14px;
    background: #0f2740;
    color: #fff;
}

.ian-module-cta > div:first-child {
    max-width: 700px;
}

.ian-module-cta > div:first-child > span {
    color: #7dc5f5;
}

.ian-module-cta h2 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: 25px;
    line-height: 1.3;
}

.ian-module-cta p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.55;
}

.ian-module-cta-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.ian-module-cta-primary,
.ian-module-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid #fff;
    border-radius: 9px;
    font-weight: 800;
    text-decoration: none !important;
}

.ian-module-cta-primary {
    background: #fff;
    color: #0f2740 !important;
}

.ian-module-cta-secondary {
    border-color: #5d7185;
    color: #fff !important;
}

.ian-module-cta-primary:hover,
.ian-module-cta-secondary:hover {
    border-color: #7dc5f5;
}

@media (max-width: 900px) {
    .ian-related-grid {
        grid-template-columns: 1fr;
    }

    .ian-module-cta {
        align-items: flex-start;
        flex-direction: column;
    }

    .ian-module-cta-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .ian-functions-heading {
        padding: 38px 20px 28px;
        text-align: left;
    }

    .ian-functions-heading h1 {
        font-size: 29px;
    }

    .ian-functions-heading p {
        font-size: 16px;
    }

    .ian-modules-container {
        padding: 0 8px 32px !important;
    }

    .ian-module-tools {
        margin: 0 4px 14px;
        padding: 14px;
    }

    .ian-module-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .ian-module-filter {
        flex: 0 0 auto;
    }

    .ian-module-card {
        min-height: 0;
        padding: 20px;
    }

    .ian-module-detail-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px 20px;
    }

    .ian-module-detail-title h2 {
        font-size: 25px;
    }

    .ian-module-back {
        align-self: stretch;
        justify-content: center;
    }

    .ian-module-screenshot {
        margin-top: 24px;
        padding: 0 18px;
    }

    .ian-module-detail-content {
        padding: 30px 22px 36px;
        font-size: 15px;
    }

    .ian-module-detail-content .ian-module-lead {
        font-size: 18px;
    }

    .ian-module-benefit {
        gap: 14px;
        padding: 19px;
    }

    .ian-related-modules {
        padding: 28px 20px;
    }

    .ian-module-cta {
        margin: 20px;
        padding: 24px 20px;
    }

    .ian-module-cta-actions,
    .ian-module-cta-primary,
    .ian-module-cta-secondary {
        box-sizing: border-box;
        width: 100%;
    }
}
