:root {
    --opt-resource-navy: #071e3b;
    --opt-resource-navy-soft: #1f2d40;
    --opt-resource-blue: #0761bc;
    --opt-resource-sky: #159bd7;
    --opt-resource-text: #10213a;
    --opt-resource-muted: #607089;
    --opt-resource-line: #dbe4ee;
    --opt-resource-pale: #f4f8fc;
    --opt-resource-white: #ffffff;
}

.opt-resources,
.opt-resources * {
    box-sizing: border-box;
}

.opt-resources {
    color: var(--opt-resource-text);
    font-family: inherit;
    background: var(--opt-resource-white);
}

.opt-resources img {
    display: block;
    max-width: 100%;
}

.opt-resources-container {
    width: min(100% - 48px, 1440px);
    margin-inline: auto;
}

/* Archive hero */
.opt-resources-archive-hero {
    position: relative;
    display: flex;
    min-height: 245px;
    align-items: center;
    overflow: hidden;
    color: var(--opt-resource-white);
    background: url("/wp-content/plugins/optisol-resources/assets/images/resource.png") no-repeat;
    background-size: cover;
    background-position: center;
}

.opt-resources-archive-hero::after {
    position: absolute;
    right: 4%;
    content: "Resources";
    color: rgba(255, 255, 255, .035);
    font-size: clamp(90px, 12vw, 220px);
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
}

.opt-resources-archive-hero.has-image::after {
    display: none;
}

.opt-resources-archive-hero .opt-resources-container {
    position: relative;
    z-index: 1;
}

.opt-resources-archive-hero h1 {
    margin: 0 0 20px;
    color: inherit;
    font-size: clamp(44px, 5vw, 76px);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.035em;
}

.opt-resources-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
}

.opt-resources-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.opt-resources-breadcrumb a:hover,
.opt-resources-breadcrumb a:focus-visible {
    color: var(--opt-resource-white);
}

/* Archive tabs */
.opt-resources-tabs {
    position: relative;
    z-index: 2;
    border-bottom: 1px solid var(--opt-resource-line);
    background: var(--opt-resource-white);
    box-shadow: 0 10px 30px rgba(7, 30, 59, .05);
}

.opt-resources-tabs-inner {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 2vw, 68px);
    overflow-x: auto;
    scrollbar-width: thin;
}

.opt-resources-tab {
    flex: 0 0 auto;
    padding: 5px 20px;
    border-radius: 999px;
    color: #4e4e4e;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, transform .2s ease;
}

.opt-resources-tab:hover,
.opt-resources-tab:focus-visible {
    color: var(--opt-resource-blue);
    transform: translateY(-1px);
}

.opt-resources-tab.is-active {
    color: var(--opt-resource-white);
    background: var(--opt-resource-blue);
}

/* Archive cards */
.opt-resources-listing {
    min-height: 520px;
    padding: 80px 0 96px;
    background: var(--opt-resource-pale);
}

.opt-resources-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.opt-resource-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--opt-resource-line);
    border-radius: 18px;
    background: var(--opt-resource-white);
    box-shadow: 0 16px 42px rgba(7, 30, 59, .07);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.opt-resource-card:hover {
    border-color: rgba(7, 97, 188, .34);
    box-shadow: 0 22px 55px rgba(7, 30, 59, .13);
    transform: translateY(-6px);
}

.opt-resource-card-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #092b55, #159bd7);
}

.opt-resource-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.opt-resource-card:hover .opt-resource-card-image img {
    transform: scale(1.035);
}

.opt-resource-card-placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 24%, rgba(255,255,255,.20), transparent 18%),
        linear-gradient(135deg, #071e3b, #0761bc 70%, #28a8e5);
}

.opt-resource-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}

.opt-resource-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
    align-items: center;
    margin-bottom: 16px;
    color: var(--opt-resource-muted);
    font-size: 13px;
}

.opt-resource-type {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    color: #07579f;
    background: #e8f4fd;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}

.opt-resource-card-title {
    margin: 0 0 14px;
    color: var(--opt-resource-text);
    font-size: clamp(21px, 2vw, 27px);
    font-weight: 700;
    line-height: 1.28;
    letter-spacing: -.02em;
}

.opt-resource-card-title a {
    color: inherit;
    text-decoration: none;
}

.opt-resource-card-summary {
    margin: 0 0 24px;
    color: var(--opt-resource-muted);
    font-size: 16px;
    line-height: 1.7;
}

.opt-resource-card-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: var(--opt-resource-blue);
    font-weight: 700;
    text-decoration: none;
}

.opt-resource-card-link span {
    transition: transform .2s ease;
}

.opt-resource-card-link:hover span,
.opt-resource-card-link:focus-visible span {
    transform: translateX(4px);
}

.opt-resources .navigation.pagination {
    margin-top: 54px;
}

.opt-resources .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    justify-content: center;
}

.opt-resources .page-numbers {
    display: inline-flex;
    min-width: 42px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border: 1px solid var(--opt-resource-line);
    border-radius: 10px;
    color: var(--opt-resource-text);
    background: var(--opt-resource-white);
    text-decoration: none;
}

.opt-resources .page-numbers.current,
.opt-resources .page-numbers:hover {
    border-color: var(--opt-resource-blue);
    color: var(--opt-resource-white);
    background: var(--opt-resource-blue);
}

.opt-resources-empty {
    padding: 100px 24px;
    text-align: center;
}

.opt-resources-empty h2 {
    margin: 0 0 12px;
    color: var(--opt-resource-text);
}

.opt-resources-empty p {
    margin: 0;
    color: var(--opt-resource-muted);
}

/* Single resource hero */
.opt-resource-single-hero {
    position: relative;
    display: flex;
    min-height: 300px;
    align-items: center;
    color: var(--opt-resource-white);
    background: linear-gradient(115deg, #26354a, #1e2a3b);
    background-position: center;
    background-size: cover;
}

.opt-resource-single-hero::after {
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    content: "";
    background: rgba(255,255,255,.11);
}

.opt-resource-single-hero .opt-resources-container {
    position: relative;
    z-index: 1;
    padding-block: 70px;
}

.opt-resource-single-hero .opt-resources-breadcrumb {
    margin-bottom: 10px;
}

.opt-resource-single-type {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    color: #9edaff;
    background: rgba(255,255,255,.08);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.opt-resource-single-type::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    content: "";
    background: #69b7ff;
}

.opt-resource-single-hero h1 {
    max-width: 1160px;
    margin: 0 0 10px;
    color: inherit;
    font-size: clamp(29px, 3vw, 70px);
    font-weight: 700;
    line-height: normal;
    letter-spacing: 0;
}

.opt-resource-single-meta {
    display: flex;
    gap: 22px;
    align-items: center;
    color: rgba(255,255,255,.60);
    font-size: 14px;
}

.opt-resource-single-meta > * + *::before {
    margin-right: 22px;
    content: "•";
}

/* Single resource body */
.opt-resource-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 72px;
    align-items: start;
    padding-block: 50px 100px;
}

.opt-resource-section + .opt-resource-section {
    margin-top: 52px;
}

.opt-resource-section > h2 {
    position: relative;
    margin: 0 0 32px;
    padding-bottom: 18px;
    color: #071426;
    font-size: clamp(24px, 2vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.025em;
}

.opt-resource-section > h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    border-radius: 999px;
    content: "";
    background: var(--opt-resource-sky);
}

.opt-resource-rich-text,
.opt-resource-content {
    color: #5f6f84;
    font-size: 17px;
    line-height: 1.85;
}

.opt-resource-rich-text > :first-child,
.opt-resource-content > :first-child {
    margin-top: 0;
}

.opt-resource-rich-text > :last-child,
.opt-resource-content > :last-child {
    margin-bottom: 0;
}

.opt-resource-content h2,
.opt-resource-content h3,
.opt-resource-content h4 {
    color: var(--opt-resource-text);
}

.opt-resource-author {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 30px;
}

.opt-resource-author img {
    width: 58px;
    height: 58px;
    border: 2px solid #e5eef7;
    border-radius: 50%;
    object-fit: cover;
}

.opt-resource-author strong,
.opt-resource-author span {
    display: block;
}

.opt-resource-author strong {
    color: var(--opt-resource-text);
    font-size: 18px;
    line-height: normal;
}

.opt-resource-author span {
    color: var(--opt-resource-muted);
    font-size: 14px;
    line-height: normal;
}

.opt-resource-sidebar {
    position: sticky;
    top: 110px;
}

.opt-resource-cta {
    padding: 38px 32px;
    border-radius: 18px;
    color: var(--opt-resource-white);
    background: linear-gradient(135deg, #0b2c5d, #178fd0);
    box-shadow: 0 20px 46px rgba(7, 49, 94, .20);
}

.opt-resource-cta h2 {
    margin: 0 0 14px;
    color: inherit;
    font-size: 24px;
    line-height: 1.25;
}

.opt-resource-cta p {
    margin: 0 0 26px;
    color: rgba(255,255,255,.76);
    font-size: 15px;
    line-height: 1.65;
}

.opt-resource-cta a,
.opt-resource-button {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 22px;
    border-radius: 9px;
    color: var(--opt-resource-blue);
    background: var(--opt-resource-white);
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.opt-resource-cta a:hover,
.opt-resource-cta a:focus-visible,
.opt-resource-button:hover,
.opt-resource-button:focus-visible {
    box-shadow: 0 10px 24px rgba(0,0,0,.16);
    transform: translateY(-2px);
}

.opt-resource-video-frame {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(7,30,59,.13);
}

.opt-resource-video-frame iframe,
.opt-resource-video-frame video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
}

.opt-resource-button {
    color: var(--opt-resource-white);
    background: var(--opt-resource-blue);
}

/* Gravity Forms inside whitepapers/newsletters */
.opt-resource-form .gform_wrapper {
    margin: 0;
}

.opt-resource-form .gform_fields {
    row-gap: 22px;
}

.opt-resource-form .gfield_label {
    color: var(--opt-resource-text);
    font-weight: 600;
}

.opt-resource-form input:not([type="submit"]),
.opt-resource-form textarea,
.opt-resource-form select {
    min-height: 54px;
    border: 1px solid #b9c5d2 !important;
    border-radius: 8px !important;
    background: var(--opt-resource-white) !important;
    box-shadow: none !important;
}

.opt-resource-form textarea {
    min-height: 180px;
}

.opt-resource-form input[type="submit"],
.opt-resource-form button[type="submit"] {
    min-height: 50px;
    padding: 12px 25px !important;
    border: 0 !important;
    border-radius: 7px !important;
    color: var(--opt-resource-white) !important;
    background: var(--opt-resource-sky) !important;
    font-weight: 700 !important;
    box-shadow: 0 10px 24px rgba(21,155,215,.24);
}

@media (max-width: 1024px) {
    .opt-resources-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .opt-resource-single-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 42px;
    }
}

@media (max-width: 780px) {
    .opt-resources-container {
        width: min(100% - 32px, 1440px);
    }

    .opt-resources-archive-hero {
        min-height: 285px;
    }

    .opt-resources-tabs-inner {
        min-height: 78px;
        justify-content: flex-start;
        gap: 8px;
        padding-inline: 4px;
    }

    .opt-resources-tab {
        padding: 12px 18px;
        font-size: 15px;
    }

    .opt-resources-listing {
        padding: 54px 0 72px;
    }

    .opt-resources-grid {
        grid-template-columns: 1fr;
    }

    .opt-resource-single-hero {
        min-height: 390px;
    }

    .opt-resource-single-hero .opt-resources-container {
        padding-block: 48px;
    }

    .opt-resource-single-hero .opt-resources-breadcrumb {
        margin-bottom: 10px;
    }

    .opt-resource-single-hero h1 {
        margin-bottom: 28px;
    }

    .opt-resource-single-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-block: 54px 76px;
    }

    .opt-resource-sidebar {
        position: static;
    }
}

@media (max-width: 480px) {
    .opt-resources-container {
        width: min(100% - 24px, 1440px);
    }

    .opt-resource-card-body {
        padding: 22px;
    }

    .opt-resource-single-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .opt-resource-single-meta > * + *::before {
        display: none;
    }

    .opt-resource-cta {
        padding: 30px 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opt-resource-card,
    .opt-resource-card-image img,
    .opt-resource-card-link span,
    .opt-resource-cta a,
    .opt-resource-button,
    .opt-resources-tab {
        transition: none;
    }
}

