/*
 * Suja Product Hub – Frontend Styles
 * Matches sujainfo.com theme: light healthcare-tech surfaces,
 * brand-blue headings, teal accents, orange CTA, rounded components.
 *
 * 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 ──────────────────────────────────────────────────────── */
.sph-tabs {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 32px;
    /* Hide scrollbar cross-browser */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

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

.sph-tab {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 140px;
    padding: 16px 20px;
    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;
    /* Remove default button styles */
    -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.20);
}

/* Logo image inside tab */
.sph-tab__logo {
    width: auto;
    max-width: 100px;
    height: 36px;
    object-fit: contain;
    /* Tint for active state handled via filter */
    transition: filter 0.18s ease;
}

.sph-tab.sph-tab--active .sph-tab__logo {
    filter: brightness(0) invert(1);
}

/* Fallback text name */
.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: 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.80);
}

/* ── 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 12px rgba(26, 61, 110, 0.06);
    overflow: hidden;
    /* Fade-in animation */
    animation: sphFadeIn 0.30s ease forwards;
}

.sph-panel.sph-panel--active,
.sph-panel[hidden="false"] {
    display: block;
}

/* Remove [hidden] override from panel so we control via class */
.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); }
}

/* Two-column inner layout */
.sph-panel__inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    padding: 40px;
    align-items: center;
}

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

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

/* Heading */
.sph-heading {
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 700;
    color: #1a3d6e;
    line-height: 1.25;
    margin-bottom: 16px;
}

/* Description */
.sph-description {
    font-size: 15px;
    color: #4a5f7a;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Feature list */
.sph-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.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: 18px;
    height: 18px;
    min-width: 18px;
    color: #1bb0c7;
    margin-top: 2px;
}

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

.sph-feature__text {
    font-size: 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: 12px;
}

/* Primary button – rounded orange */
.sph-btn {
    display: inline-block;
    font-size: 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);
}

.sph-btn--primary {
    padding: 12px 28px;
    background-color: #f97316;
    color: #ffffff;
    border: 2px solid transparent;
    border-radius: 50px;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.30);
}

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

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

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

/* Right: product image */
.sph-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sph-image {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

/* ── Specialty Subsection ─────────────────────────────────────────────── */
.sph-specialties {
    border-top: 1.5px solid #d5e3f0;
    padding: 40px;
}

.sph-specialties__heading {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    color: #1a3d6e;
    margin-bottom: 8px;
}

.sph-specialties__intro {
    font-size: 14px;
    color: #4a5f7a;
    line-height: 1.65;
    max-width: 680px;
    margin-bottom: 28px;
}

/* Specialty card grid */
.sph-spec-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.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); }

.sph-spec-card {
    background-color: #ffffff;
    border: 1.5px solid #d5e3f0;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sph-spec-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 61, 110, 0.10);
}

.sph-spec-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #1a3d6e;
    margin-bottom: 8px;
}

.sph-spec-card__desc {
    font-size: 13px;
    color: #4a5f7a;
    line-height: 1.55;
    margin-bottom: 16px;
    flex: 1;
}

.sph-spec-card__link {
    font-size: 13px;
    font-weight: 700;
    color: #1a3d6e;
    transition: color 0.15s ease;
}

.sph-spec-card__link:hover {
    color: #1bb0c7;
}

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

.sph-pills__heading {
    font-size: 14px;
    font-weight: 700;
    color: #1a3d6e;
    margin-bottom: 6px;
}

.sph-pills__intro {
    font-size: 13px;
    color: #4a5f7a;
    margin-bottom: 16px;
    line-height: 1.55;
}

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

.sph-pill {
    display: inline-block;
    padding: 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: 32px;
    }

    .sph-image-wrap {
        order: -1; /* image above text on tablet/mobile */
    }

    .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: 32px;
    }
}

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

    .sph-tabs {
        gap: 8px;
        margin-bottom: 20px;
    }

    .sph-tab {
        min-width: 120px;
        padding: 12px 14px;
    }

    .sph-tab__logo {
        height: 28px;
        max-width: 80px;
    }

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

    .sph-specialties {
        padding: 24px 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-btn {
        width: auto;
    }

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

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

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