/**
 * Pharma One public-site finish.
 * Loaded last so every page shares the same color, type, contrast, and spacing.
 * Hero copy stays visible: entrance motion must not start headlines at opacity 0.
 */

:root {
    --po-polish-navy: #062a46;
    --po-polish-navy-2: #0b3d66;
    --po-polish-blue: #0e6298;
    --po-polish-orange: #f47b20;
    --po-polish-orange-deep: #d2650c;
    --po-polish-ink: #12263a;
    --po-polish-text: #3c5368;
    --po-polish-muted: #5d7388;
    --po-polish-line: rgba(6, 42, 70, 0.12);
    --po-polish-soft: #f3f7fb;
    --po-polish-card: #ffffff;
}

::selection {
    background: #f47b20;
    color: #ffffff;
}

body.po-site {
    color: var(--po-polish-text);
    background:
        radial-gradient(980px 420px at 110% -8%, rgba(244, 123, 32, 0.09), transparent 55%),
        radial-gradient(820px 380px at -12% 8%, rgba(14, 98, 152, 0.08), transparent 52%),
        #f4f8fb;
}

body.po-site :is(h1, h2, h3, h4, h5, h6) {
    color: var(--po-polish-ink);
    font-weight: 800;
    text-wrap: wrap;
    overflow-wrap: break-word;
    word-break: normal;
}

body.po-site main :is(p, li, .po-text, .po-copy) a:not(.btn):not([class*="btn"]) {
    color: var(--po-polish-blue);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

body.po-site main :is(p, li, .po-text, .po-copy) a:not(.btn):not([class*="btn"]):hover {
    color: var(--po-polish-orange-deep);
}

/* ------------------------------------------------
   Heroes: readable on the first paint, every page
   ------------------------------------------------ */
body.po-site :is(
    .hero-media-content,
    .hero-media-content-inner,
    .hero-media-badge,
    .hero-media-description,
    .hero-action-row,
    .po-hero-slide-meta,
    .po-hero-proof,
    .po-hero-proof-item,
    .home-hero-metrics,
    .home-hero-metric,
    .about-hero-content,
    .about-badge,
    .about-hero-lead,
    .about-hero-trust,
    .about-trust-chip,
    .po-mfg-hero-content,
    .po-mfg-badge,
    .po-mfg-hero-lead,
    .po-mfg-hero-actions,
    .gallery-premium-hero-content,
    .gallery-premium-badge,
    .career-hero-content,
    .career-hero-copy,
    .career-badge,
    .contact-hero-content,
    .onegroup-hero-content,
    .po-price-hero-content,
    .po-products-hero,
    .po-products-hero-copy,
    .po-products-hero-actions,
    .po-products-hero-proof,
    .po-verify-hero,
    .po-verify-hero-grid,
    .profile-hero-content,
    .po-team-hero,
    .po-news-public-hero,
    .po-news-public-copy,
    .po-branches-hero,
    .po-branches-hero-grid,
    .poql-hero,
    .poql-hero-inner,
    .po-pl-hero-copy,
    .po-pl-hero-content,
    .po-pl-hero-panel,
    .tp-hero-content,
    .factory-hero-copy,
    .po-awards-hero-layout,
    .po-cart-hero-content,
    .po-order-hero-content
) {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    filter: none !important;
}

body.po-site :is(
    .hero-media-content,
    .about-hero-content,
    .po-mfg-hero-content,
    .gallery-premium-hero-content,
    .career-hero-copy,
    .contact-hero-content,
    .onegroup-hero-content,
    .po-price-hero-content,
    .po-products-hero-copy,
    .profile-hero-content,
    .po-news-public-copy,
    .poql-hero-inner,
    .po-pl-hero-copy,
    .tp-hero-content,
    .factory-hero-copy,
    .po-cart-hero-content,
    .po-order-hero-content,
    .po-verify-hero,
    .po-team-hero,
    .po-branches-hero,
    .po-awards-hero-layout
) :is(h1, h2, p, .hero-media-badge, .about-badge, .po-mfg-badge, .gallery-premium-badge, .career-badge, span) {
    opacity: 1 !important;
    animation: none !important;
}

body.po-site :is(
    .hero-media-content h1,
    .about-hero h1,
    .po-mfg-hero h1,
    .gallery-premium-hero h1,
    .career-hero h1,
    .contact-hero h1,
    .onegroup-hero h1,
    .po-price-hero h1,
    .po-products-hero h1,
    .po-verify-hero h1,
    .profile-hero h1,
    .po-team-hero h1,
    .po-news-public-hero h1,
    .po-branches-hero h1,
    .poql-hero h1,
    .po-pl-hero h1,
    .tp-hero h1,
    .factory-hero h1,
    .po-awards-hero h1,
    .po-cart-hero h1,
    .po-order-hero h1
) {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 14px 36px rgba(0, 0, 0, 0.42);
    letter-spacing: -0.035em;
    line-height: 1.02;
}

/* Keep the left side of photo heroes dark enough for white type */
body.po-site .pharmaone-home .hero-media-slide::before {
    background:
        linear-gradient(102deg, rgba(2, 12, 24, 0.94) 0%, rgba(6, 28, 50, 0.86) 38%, rgba(6, 28, 50, 0.48) 62%, rgba(6, 28, 50, 0.22) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 36%, rgba(0, 0, 0, 0.4)) !important;
}

body.po-site :is(.about-hero, .po-mfg-hero, .gallery-premium-hero, .career-hero, .factory-hero, .tp-hero)::before {
    background:
        radial-gradient(circle at 82% 18%, rgba(244, 123, 32, 0.28), transparent 26%),
        linear-gradient(90deg, rgba(3, 16, 30, 0.96) 0%, rgba(6, 29, 51, 0.88) 46%, rgba(6, 29, 51, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55)) !important;
}

[dir="rtl"] body.po-site .pharmaone-home .hero-media-slide::before,
[dir="rtl"] body.po-site :is(.about-hero, .po-mfg-hero, .gallery-premium-hero, .career-hero, .factory-hero, .tp-hero)::before {
    background:
        radial-gradient(circle at 18% 18%, rgba(244, 123, 32, 0.28), transparent 26%),
        linear-gradient(270deg, rgba(3, 16, 30, 0.96) 0%, rgba(6, 29, 51, 0.88) 46%, rgba(6, 29, 51, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.55)) !important;
}

/* ------------------------------------------------
   Shared surfaces, cards, forms, tables
   ------------------------------------------------ */
body.po-site :is(
    .po-card,
    .home-capability-card,
    .home-production-card,
    .home-quality-card,
    .po-profile-card,
    .po-credential-card,
    .po-news-public-card,
    .po-team-card,
    .po-price-highlight-card,
    .po-mfg-card,
    .po-stat-link.home-stat-card
) {
    border-radius: 22px !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfe 100%) !important;
    border: 1px solid var(--po-polish-line) !important;
    box-shadow: 0 16px 40px rgba(6, 42, 70, 0.07) !important;
}

body.po-site :is(
    .po-card,
    .home-capability-card,
    .home-production-card,
    .home-quality-card,
    .po-profile-card,
    .po-credential-card,
    .po-team-card,
    .po-stat-link.home-stat-card
) :is(h1, h2, h3, h4, h5, h6, p, span, strong) {
    transform: none !important;
}

body.po-site :is(
    .po-card,
    .home-capability-card,
    .home-production-card,
    .home-quality-card,
    .po-profile-card,
    .po-team-card,
    .po-stat-link.home-stat-card
):hover {
    transform: translateY(-6px) !important;
    border-color: rgba(244, 123, 32, 0.35) !important;
    box-shadow: 0 22px 48px rgba(6, 42, 70, 0.12) !important;
}

/* Cards and info boxes wrap on whole words and stay inside the box. */
body.po-site :is(
    [class*="-card"],
    [class*="-metric"],
    [class*="-stat"],
    [class*="-chip"],
    [class*="-panel"],
    [class*="-tile"],
    .po-trust-item,
    .po-products-overview-item,
    .po-hero-proof-item,
    .home-hero-metric
) {
    min-width: 0;
}

body.po-site :is(
    [class*="-card"],
    [class*="-metric"],
    [class*="-stat"],
    [class*="-chip"],
    [class*="-panel"],
    [class*="-tile"],
    .po-trust-item,
    .po-products-overview-item,
    .po-hero-proof-item,
    .home-hero-metric
) :is(h1, h2, h3, h4, h5, h6, p, strong, small, li) {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    text-wrap: wrap !important;
    hyphens: none !important;
    max-width: 100%;
}

body.po-site :is(
    .po-profile-card,
    .home-capability-card,
    .home-quality-card,
    .home-production-card,
    .po-production-list-card,
    .po-credential-card,
    .home-stat-card,
    .po-pathway-card
) :is(h3, h4, h5, h6) {
    font-size: clamp(1.12rem, 1.05vw, 1.35rem) !important;
    line-height: 1.28 !important;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

body.po-site :is(
    .po-profile-card,
    .home-capability-card,
    .home-quality-card,
    .home-production-card,
    .po-production-list-card
) p {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

body.po-site .home-hero-metric strong,
body.po-site .home-hero-metric span {
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
}

body.po-site .home-hero-metric {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center;
    gap: 6px;
    min-height: 96px;
    padding: 16px 18px !important;
}

body.po-site .home-hero-metric strong {
    font-size: clamp(16px, 1.15vw, 22px) !important;
    line-height: 1.25 !important;
    letter-spacing: 0 !important;
}

body.po-site .home-hero-metric span {
    font-size: 13px !important;
    line-height: 1.35 !important;
}

body.po-site .home-hero-metric::after {
    width: 52px;
    height: 52px;
    opacity: 0.4;
}

body.po-site .contact-mini-card {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
    height: auto !important;
}

body.po-site .contact-mini-card :is(a, span, strong) {
    display: block;
    width: 100%;
    max-width: 100%;
    line-height: 1.45 !important;
    white-space: normal !important;
}

body.po-site :is(
    .career-role-card,
    .po-products-overview-item,
    .po-mfg-stat-card,
    .po-mfg-capability-card,
    .poql-stat,
    .contact-guide-card
) {
    height: auto !important;
    overflow: hidden;
}

body.po-site :is(.career-role-card, .po-products-overview-item) :is(p, span, h5, strong) {
    display: block;
    -webkit-line-clamp: unset !important;
    overflow: visible !important;
}

body.po-site :is(label, .form-label) {
    color: var(--po-polish-ink);
    font-weight: 700;
    letter-spacing: 0.01em;
}

body.po-site :is(.form-control, .form-select, textarea, input[type="search"], input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"]) {
    min-height: 48px;
    border-radius: 14px !important;
    border: 1px solid rgba(11, 74, 122, 0.18) !important;
    background: #ffffff !important;
    color: var(--po-polish-ink) !important;
    box-shadow: inset 0 1px 2px rgba(6, 42, 70, 0.04);
}

body.po-site textarea,
body.po-site textarea.form-control {
    min-height: 140px;
    height: auto;
}

body.po-site :is(.form-control, .form-select, textarea, input):focus {
    border-color: var(--po-polish-blue) !important;
    box-shadow: 0 0 0 4px rgba(14, 98, 152, 0.16) !important;
    outline: none;
}

body.po-site .table {
    overflow: hidden;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(6, 42, 70, 0.06);
}

body.po-site .table thead th {
    background: var(--po-polish-navy);
    color: #ffffff;
    border-color: transparent;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.po-site .table tbody td {
    border-color: #e6eef5;
    color: var(--po-polish-text);
    vertical-align: middle;
}

body.po-site .table tbody tr:nth-child(even) {
    background: #f6fafd;
}

body.po-site :is([class$="-empty"], [class*="empty-state"], .po-empty) {
    border: 1px dashed rgba(11, 74, 122, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f5f9fc);
    color: var(--po-polish-muted);
    text-align: center;
}

body.po-site .btn,
body.po-site .btn-base-color,
body.po-site .btn-dark-gray,
body.po-site .btn-white {
    letter-spacing: 0.01em;
}

body.po-site .career-role-card {
    opacity: 1 !important;
    transform: none !important;
}

body.po-site .btn:disabled,
body.po-site .btn[disabled],
body.po-site .btn.disabled {
    opacity: 0.55;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    body.po-site :is(
        .po-reveal,
        [data-reveal],
        [data-po-reveal],
        [data-po-mfg-reveal],
        .gallery-premium-reveal,
        .contact-reveal,
        .poql-reveal,
        .po-branches-reveal,
        .po-order-reveal
    ) {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        filter: none !important;
    }
}

@media (max-width: 1199.98px) {
    body.po-site .box-layout {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.po-site .pharmaone-nav .navbar-toggler {
        display: inline-flex !important;
        flex: 0 0 46px;
        margin-inline-start: 12px;
    }
}

@media (max-width: 991.98px) {
    body.po-site :is(h1, h2, h3, h4) {
        text-wrap: wrap !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
    }

    body.po-site :is(
        .hero-media-content h1,
        .about-hero h1,
        .po-mfg-hero h1,
        .gallery-premium-hero h1,
        .career-hero h1,
        .contact-hero h1,
        .factory-hero h1,
        .po-products-hero h1,
        .po-price-hero h1,
        .po-verify-hero h1,
        .poql-hero h1,
        .po-pl-hero h1,
        .tp-hero h1,
        .po-awards-hero h1,
        .po-cart-hero h1,
        .onegroup-hero h1
    ) {
        max-width: 100%;
        font-size: clamp(1.85rem, 7.4vw, 2.7rem) !important;
        letter-spacing: -0.03em;
        overflow-wrap: break-word !important;
        word-break: normal;
    }
}

@media (max-width: 767.98px) {
    html,
    body.po-site,
    body.po-site .box-layout {
        max-width: 100% !important;
        overflow-x: clip !important;
    }

    body.po-site .hero-media-content,
    body.po-site .about-hero-content,
    body.po-site .container {
        box-sizing: border-box !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    body.po-site :is(
        .hero-media-content,
        .hero-media-content-inner,
        .about-hero-content,
        .po-mfg-hero-content,
        .gallery-premium-hero-content,
        .career-hero-copy,
        .po-products-hero-copy
    ) {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    body.po-site :is(
        .hero-media-content h1,
        .about-hero h1,
        .po-mfg-hero h1,
        .gallery-premium-hero h1,
        .career-hero h1,
        .po-products-hero h1,
        .contact-hero h1,
        .factory-hero h1
    ) {
        font-size: 1.7rem !important;
        line-height: 1.08 !important;
        white-space: normal !important;
        text-wrap: wrap !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        max-width: 100% !important;
    }

    body.po-site :is(.hero-media-badge, .about-badge, .po-mfg-badge, .gallery-premium-badge, .career-badge, .po-products-eyebrow) {
        max-width: 100%;
        height: auto !important;
        white-space: normal !important;
    }

    body.po-site :is(
        .hero-action-row,
        .po-mfg-hero-actions,
        .career-hero-actions,
        .factory-hero-actions,
        .tp-hero-actions,
        .po-products-hero-actions,
        .po-cart-hero-actions,
        .po-order-hero-actions
    ) {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch;
        width: 100%;
        grid-template-columns: none !important;
    }

    body.po-site :is(
        .hero-action-row,
        .po-mfg-hero-actions,
        .career-hero-actions,
        .factory-hero-actions,
        .tp-hero-actions,
        .po-products-hero-actions,
        .po-cart-hero-actions
    ) :is(a, button, .btn) {
        width: 100% !important;
        max-width: 100%;
        white-space: normal !important;
    }

    body.po-site .home-hero-metrics {
        grid-template-columns: 1fr 1fr !important;
        max-width: 100%;
    }

    body.po-site .home-hero-metric strong {
        white-space: normal !important;
    }

    body.po-site .career-role-grid,
    body.po-site .po-products-overview-panel {
        grid-template-columns: 1fr 1fr !important;
    }
}
