/*
 * Suja Product Hub – Frontend Styles v1.1
 * Matches sujainfo.com theme: light healthcare-tech surfaces,
 * brand-blue headings, teal accents, orange CTA, rounded components.
 *
 * v1.1 changes:
 *   - Centered tab navigation row
 *   - Larger heading, description, feature, button typography
 *   - Two-column feature list on desktop (matches live site)
 *   - Smaller product image (max 380px, adjusted column ratio)
 *   - Enlarged specialty subsection (bigger heading, intro, cards)
 *   - Specialty card image support (.sph-spec-card__img)
 *   - Wound Care removed from defaults (PHP)
 *   - Improved specialty card padding and gap
 *
 * Color palette (HSL-derived hex):
 *   --brand-blue   hsl(214,62%,26%)  ≈ #1a3d6e
 *   --brand-teal   hsl(187,71%,40%)  ≈ #1bb0c7
 *   --brand-orange hsl(24,95%,53%)   ≈ #f97316
 *   --soft-blue    hsl(210,60%,96%)  ≈ #eef5fc
 *   --card         hsl(210,50%,97%)  ≈ #f3f7fb
 *   --border       hsl(210,40%,90%)  ≈ #d5e3f0
 *   --muted-fg     hsl(213,18%,40%)  ≈ #4a5f7a
 */

/* ── Reset / base for widget scope ──────────────────────────────────────── */
.sph-section *,
.sph-section *::before,
.sph-section *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.sph-section ul {
    list-style: none;
}

.sph-section a {
    text-decoration: none;
}

.sph-section img {
    display: block;
    max-width: 100%;
}

/* ── Section container ───────────────────────────────────────────────────── */
.sph-section {
    background-color: #ffffff;
    padding: 80px 0;
    width: 100%;
}

.sph-container {
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ── Tab navigation ──────────────────────────────────────────────────────── */
/*
 * FIX: Center tabs on desktop. On mobile with overflow we switch to flex-start.
 * justify-content:center works fine on desktop where all 5 tabs (≈840px) fit in 1240px.
 */
.sph-tabs {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;      /* CENTER the tab row within the container */
    gap: 12px;
    padding-bottom: 6px;
    margin-bottom: 28px;
    /* No overflow on desktop – tabs fit comfortably */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sph-tabs::-webkit-scrollbar {
    display: none;
}

/* Mobile grid variant */
.sph-tabs--mobile-grid {
    flex-wrap: wrap;
    overflow-x: visible;
}

/* Each tab – no flex-shrink so they hold their min-width on desktop */
.sph-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 155px;
    padding: 18px 22px;
    background-color: #ffffff;
    border: 1.5px solid #d5e3f0;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.sph-tab:hover {
    background-color: #f0f7ff;
    border-color: #1bb0c7;
    box-shadow: 0 2px 8px rgba(27, 176, 199, 0.12);
}

.sph-tab:focus-visible {
    outline: 2px solid #1bb0c7;
    outline-offset: 2px;
}

.sph-tab.sph-tab--active {
    background-color: #1a3d6e;
    border-color: #1a3d6e;
    box-shadow: 0 4px 14px rgba(26, 61, 110, 0.22);
}

/* Logo image inside tab */
.sph-tab__logo {
    width: auto;
    max-width: 110px;
    height: 38px;
    object-fit: contain;
    transition: filter 0.18s ease;
}

.sph-tab.sph-tab--active .sph-tab__logo {
    /* Invert logo colour to white on active blue background */
    filter: brightness(0) invert(1);
}

/* Fallback text name (shown if no logo) */
.sph-tab__name {
    font-size: 13px;
    font-weight: 700;
    color: #1a3d6e;
    line-height: 1.2;
    transition: color 0.18s ease;
}

.sph-tab.sph-tab--active .sph-tab__name {
    color: #ffffff;
}

/* Short tab description */
.sph-tab__desc {
    font-size: 12px;         /* FIX: was 11px */
    font-weight: 400;
    color: #6b7f96;
    line-height: 1.35;
    transition: color 0.18s ease;
}

.sph-tab.sph-tab--active .sph-tab__desc {
    color: rgba(255, 255, 255, 0.82);
}

/* ── Content panels ──────────────────────────────────────────────────────── */
.sph-panels {
    position: relative;
}

.sph-panel {
    display: none;
    background-color: #f3f7fb;
    border: 1.5px solid #d5e3f0;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(26, 61, 110, 0.07);
    overflow: hidden;
    animation: sphFadeIn 0.30s ease forwards;
}

.sph-panel.sph-panel--active {
    display: block;
}

.sph-panel[hidden] {
    display: none !important;
}

.sph-panel.sph-panel--active[hidden] {
    display: block !important;
}

@keyframes sphFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/*
 * FIX: Two-column layout – give text more room (55%), image less (45%).
 * This shrinks the image footprint and increases heading visibility.
 */
.sph-panel__inner {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 56px;
    padding: 48px 52px;
    align-items: center;
}

/* Left: text content */
.sph-content {
    display: flex;
    flex-direction: column;
}

/* ── Eyebrow ──────────────────────────────────────────────────────────────── */
.sph-eyebrow {
    display: inline-block;
    font-size: 12px;             /* FIX: was 11px */
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: #1bb0c7;
    margin-bottom: 14px;
}

/* ── Heading ──────────────────────────────────────────────────────────────── */
/*
 * FIX: Was clamp(22px,3vw,30px) – far too small. Now matches the original
 * bold large heading seen on sujainfo.com (≈34–40px on desktop).
 */
.sph-heading {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    color: #1a3d6e;
    line-height: 1.2;
    margin-bottom: 18px;
}

/* ── Description ──────────────────────────────────────────────────────────── */
/*
 * FIX: Was 15px. Increased to 16px for better readability.
 */
.sph-description {
    font-size: 16px;
    color: #4a5f7a;
    line-height: 1.72;
    margin-bottom: 28px;
}

/* ── Feature list ─────────────────────────────────────────────────────────── */
/*
 * FIX: Changed from single-column flex to two-column CSS grid,
 * matching the original sujainfo.com layout (features show side-by-side).
 */
.sph-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 32px;
    margin-bottom: 36px;
}

.sph-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.sph-feature__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;             /* FIX: was 18px */
    height: 20px;
    min-width: 20px;
    color: #1bb0c7;
    margin-top: 1px;
}

.sph-feature__icon svg {
    width: 100%;
    height: 100%;
}

.sph-feature__text {
    font-size: 15px;         /* FIX: was 14px */
    font-weight: 500;
    color: #1a3d6e;
    line-height: 1.45;
}

/* ── Buttons row ──────────────────────────────────────────────────────────── */
.sph-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* ── Base button ──────────────────────────────────────────────────────────── */
/*
 * FIX: Font size 14px → 15px, consistent with body text scale.
 */
.sph-btn {
    display: inline-block;
    font-size: 15px;         /* FIX: was 14px */
    font-weight: 700;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.sph-btn:hover {
    transform: translateY(-1px);
}

.sph-btn:active {
    transform: translateY(0);
}

/* Primary – orange pill (matches sujainfo CTA style) */
.sph-btn--primary {
    padding: 14px 32px;       /* FIX: was 12px 28px – slightly larger */
    background-color: #f97316;
    color: #ffffff;
    border: 2px solid transparent;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.32);
}

.sph-btn--primary:hover {
    background-color: #ea6c0a;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.42);
}

/* Secondary – outlined blue pill */
.sph-btn--secondary {
    padding: 13px 32px;       /* FIX: was 11px 28px */
    background-color: transparent;
    color: #1a3d6e;
    border: 2px solid #1a3d6e;
    border-radius: 50px;
}

.sph-btn--secondary:hover {
    background-color: #1a3d6e;
    color: #ffffff;
}

/* ── Product image (right column) ─────────────────────────────────────────── */
.sph-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 8px;
}

/*
 * FIX: Was max-width 480px which looked oversized.
 * Reduced to 380px for better balance with text column.
 */
.sph-image {
    width: 100%;
    max-width: 380px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPECIALTY SUBSECTION  (CareAxes Specialty-Focused Workflows)
   FIX: All sizes enlarged to match the reference screenshot
   ═══════════════════════════════════════════════════════════════════════════ */
.sph-specialties {
    border-top: 1.5px solid #d5e3f0;
    padding: 52px;            /* FIX: was 40px */
}

.sph-specialties__heading {
    font-size: clamp(22px, 3vw, 30px);   /* FIX: was clamp(18px,2.5vw,24px) */
    font-weight: 700;
    color: #1a3d6e;
    margin-bottom: 10px;
}

.sph-specialties__intro {
    font-size: 16px;          /* FIX: was 14px */
    color: #4a5f7a;
    line-height: 1.68;
    max-width: 720px;
    margin-bottom: 36px;      /* FIX: was 28px */
}

/* Specialty card grid */
.sph-spec-grid {
    display: grid;
    gap: 20px;                /* FIX: was 16px */
    margin-bottom: 28px;
}

.sph-spec-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.sph-spec-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.sph-spec-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Specialty card ─────────────────────────────────────────────────────── */
.sph-spec-card {
    background-color: #ffffff;
    border: 1.5px solid #d5e3f0;
    border-radius: 18px;      /* FIX: was 16px */
    padding: 26px 24px;       /* FIX: was 20px */
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sph-spec-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(26, 61, 110, 0.11);
}

/* Specialty card image / icon */
.sph-spec-card__img-wrap {
    width: 60px;              /* FIX: new – card image zone */
    height: 60px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.sph-spec-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Pastel icon placeholder (shown when no image is uploaded) */
.sph-spec-card__img-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e8f4f8;
    color: #1bb0c7;
    font-size: 26px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.sph-spec-card__title {
    font-size: 16px;          /* FIX: was 14px */
    font-weight: 700;
    color: #1a3d6e;
    margin-bottom: 10px;
    line-height: 1.3;
}

.sph-spec-card__desc {
    font-size: 14px;          /* FIX: was 13px */
    color: #4a5f7a;
    line-height: 1.6;
    margin-bottom: 18px;
    flex: 1;
}

.sph-spec-card__link {
    font-size: 14px;          /* FIX: was 13px */
    font-weight: 700;
    color: #f97316;           /* Orange to match CTA style from reference */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease, gap 0.15s ease;
    margin-top: auto;
}

.sph-spec-card__link:hover {
    color: #ea6c0a;
    gap: 7px;
}

/* ── Additional specialty pills area ──────────────────────────────────────── */
.sph-pills-area {
    background-color: #eef5fc;
    border: 1.5px solid #d5e3f0;
    border-radius: 16px;
    padding: 24px 28px;       /* FIX: was 20px 24px */
}

.sph-pills__heading {
    font-size: 16px;          /* FIX: was 14px */
    font-weight: 700;
    color: #1a3d6e;
    margin-bottom: 8px;
}

.sph-pills__intro {
    font-size: 14px;          /* FIX: was 13px */
    color: #4a5f7a;
    margin-bottom: 18px;
    line-height: 1.6;
}

.sph-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sph-pill {
    display: inline-block;
    padding: 7px 16px;        /* FIX: was 6px 14px */
    background-color: #ffffff;
    border: 1.5px solid #d5e3f0;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #1a3d6e;
    line-height: 1;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 1024px) ────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sph-panel__inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 36px;
    }

    /* Image goes above text on tablet */
    .sph-image-wrap {
        order: -1;
        padding-left: 0;
    }

    .sph-image {
        max-width: 420px;
        margin: 0 auto;
    }

    /* Features: single column on tablet */
    .sph-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .sph-spec-grid--cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .sph-spec-grid--cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .sph-specialties {
        padding: 36px;
    }
}

/* ── Mobile (≤ 768px) ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    /* FIX: On mobile switch to scroll + left-aligned tabs */
    .sph-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        gap: 8px;
        margin-bottom: 20px;
        padding-bottom: 8px;
    }

    .sph-tab {
        min-width: 130px;
        padding: 14px 16px;
    }

    .sph-tab__logo {
        height: 30px;
        max-width: 88px;
    }

    .sph-tab__desc {
        font-size: 11px;
    }
}

/* ── Small mobile (≤ 640px) ───────────────────────────────────────────────── */
@media (max-width: 640px) {
    .sph-section {
        padding: 48px 0;
    }

    .sph-panel__inner {
        gap: 24px;
        padding: 24px 20px;
    }

    .sph-specialties {
        padding: 28px 20px;
    }

    .sph-spec-grid--cols-4,
    .sph-spec-grid--cols-3,
    .sph-spec-grid--cols-2 {
        grid-template-columns: 1fr;
    }

    .sph-buttons {
        flex-direction: column;
        align-items: flex-start;
    }

    .sph-image {
        max-width: 100%;
    }

    .sph-heading {
        font-size: clamp(22px, 7vw, 28px);
    }

    .sph-specialties__heading {
        font-size: clamp(18px, 6vw, 22px);
    }
}

/* ── Mobile grid tab variant ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .sph-tabs--mobile-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        justify-content: unset;
    }

    .sph-tabs--mobile-grid .sph-tab {
        min-width: unset;
        width: 100%;
    }
}
