/**
 * Frontend CSS (loaded globally)
 * Additional styling that doesn't come from block styles
 */

/* Ensure logos render correctly */
.wp-block-hs-customers svg,
.wp-block-hs-customers img {
    max-width: 100%;
    height: auto;
}

/* ===========================================================
   Customer Case Hero -- White text on dark background
   =========================================================== */

body.single-hs_customer_case .hs-hero__title {
    color: #ffffff !important;
    font-weight: 700 !important;
}

body.single-hs_customer_case .hs-hero__text {
    color: #ffffff !important;
}

body.single-hs_customer_case .hs-hero__container {
    align-items: flex-start;
}

body.single-hs_customer_case .hs-hero__inner {
    justify-content: flex-start;
    padding-left: 0;
}

body.single-hs_customer_case .hs-hero__title {
    font-size: clamp(2.2rem, 3.4vw, 3.4rem);
    line-height: 1.08;
    margin: 0 0 0.75rem;
}

body.single-hs_customer_case .hs-hero__text {
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    line-height: 1.5;
    margin-bottom: 1.4rem;
    color: rgba(255, 255, 255, 0.85);
}

body.single-hs_customer_case .hs-hero__media {
    align-items: flex-start;
    justify-content: flex-end;
    padding-top: 0.3rem;
}

body.single-hs_customer_case .hs-hero__media .wp-block-hs-customers {
    max-width: 240px;
}

body.single-hs_customer_case .hs-hero__media .hs-customer-logo-wrapper {
    width: auto;
}

body.single-hs_customer_case .hs-hero__media .hs-customer-logo-wrapper svg,
body.single-hs_customer_case .hs-hero__media .hs-customer-logo-wrapper img {
    width: 100%;
    height: auto;
    filter: grayscale(100%) brightness(0) invert(1);
}

body.single-hs_customer_case .hs-hero__link {
    display: inline-flex;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

body.single-hs_customer_case .hs-hero__link:hover {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.7);
}


/* ===========================================================
   Section 1: Testimonial Highlight (full-width, light with green accent)
   =========================================================== */

body.single-hs_customer_case .case-section-testimonial {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

body.single-hs_customer_case .case-testimonial-highlight {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

body.single-hs_customer_case .case-testimonial-highlight__quote {
    position: relative;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    line-height: 1.6;
    color: #0f172a;
    margin: 0 0 2rem;
    font-style: normal;
    border: none;
    padding: 0;
}

body.single-hs_customer_case .case-testimonial-highlight__quote p {
    margin: 0;
}

body.single-hs_customer_case .case-testimonial-highlight__mark {
    display: block;
    font-size: 5rem;
    line-height: 0.5;
    color: #00ea6e;
    opacity: 0.5;
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

body.single-hs_customer_case .case-testimonial-highlight__attribution {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

body.single-hs_customer_case .case-testimonial-highlight__photo-ring {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    border: 3px solid #00ea6e;
    padding: 3px;
    background: #ffffff;
    flex-shrink: 0;
}

body.single-hs_customer_case .case-testimonial-highlight__photo {
    width: 100%;
    height: 100%;
    border-radius: 999px;
    object-fit: cover;
}

body.single-hs_customer_case .case-testimonial-highlight__person {
    text-align: left;
}

body.single-hs_customer_case .case-testimonial-highlight__name {
    display: block;
    font-size: 1rem;
    color: #0f172a;
}

body.single-hs_customer_case .case-testimonial-highlight__position {
    display: block;
    font-size: 0.9rem;
    color: #64748b;
}


/* ===========================================================
   Section 2: Metadata Bar (categories, languages, links)
   =========================================================== */

body.single-hs_customer_case .case-section-meta {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

body.single-hs_customer_case .case-meta-bar {
    display: flex;
    justify-content: center;
    gap: 0;
}

body.single-hs_customer_case .case-meta-bar__group {
    padding: 0 2.5rem;
    border-left: 1px solid rgba(15, 23, 42, 0.1);
}

body.single-hs_customer_case .case-meta-bar__group:first-child {
    padding-left: 0;
    border-left: none;
}

body.single-hs_customer_case .case-meta-bar__group:last-child {
    padding-right: 0;
}

body.single-hs_customer_case .case-meta-bar__divider {
    display: none;
}

body.single-hs_customer_case .case-meta-bar__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 0.6rem;
}

/* Tags */
body.single-hs_customer_case .case-meta-bar__tags {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

body.single-hs_customer_case .case-meta-bar__tag {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    background: rgba(15, 23, 42, 0.07);
    color: #0f172a;
}

/* Languages */
body.single-hs_customer_case .case-meta-bar__languages {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

body.single-hs_customer_case .case-meta-bar__language {
    font-size: 0.9rem;
    color: #334155;
}

body.single-hs_customer_case .case-meta-bar__flag {
    margin-right: 0.2rem;
}

/* Links */
body.single-hs_customer_case .case-meta-bar__links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

body.single-hs_customer_case .case-meta-bar__links a {
    font-size: 0.9rem;
    color: #0f172a;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

body.single-hs_customer_case .case-meta-bar__links a:hover {
    color: #0f1aff;
}

body.single-hs_customer_case .case-meta-bar__links a span {
    font-size: 0.85rem;
    color: rgba(15, 23, 42, 0.45);
}

@media (max-width: 540px) {
    body.single-hs_customer_case .case-meta-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    body.single-hs_customer_case .case-meta-bar__group {
        padding: 0;
        border-left: none;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(15, 23, 42, 0.1);
    }

    body.single-hs_customer_case .case-meta-bar__group:first-child {
        padding-top: 0;
        border-top: none;
    }
}


/* ===========================================================
   Section 3: Article Text (centered reading column)
   =========================================================== */

body.single-hs_customer_case .case-section-article {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

body.single-hs_customer_case .case-article-reading__content {
    max-width: 720px;
    margin: 0 auto;
    font-size: clamp(1.05rem, 1.15vw, 1.15rem);
    line-height: 1.75;
    color: #334155;
}

body.single-hs_customer_case .case-article-reading__content p {
    margin-bottom: 1.5rem;
}

body.single-hs_customer_case .case-article-reading__content p:last-child {
    margin-bottom: 0;
}

body.single-hs_customer_case .case-article-reading__content blockquote {
    margin: 2rem 0;
    padding: 1.5rem 1.5rem 1.5rem 1.75rem;
    border-left: 3px solid #00ea6e;
    background: #ffffff;
    border-radius: 0 12px 12px 0;
    font-size: clamp(1.05rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    color: #0f172a;
    font-style: normal;
}

body.single-hs_customer_case .case-article-reading__content blockquote p {
    margin-bottom: 0.75rem;
}

body.single-hs_customer_case .case-article-reading__content blockquote p:last-child {
    margin-bottom: 0;
}


/* ===========================================================
   Section 4: Journey (Challenge → Solution → Results)
   =========================================================== */

body.single-hs_customer_case .case-section-journey {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

body.single-hs_customer_case .case-journey {
    max-width: 800px;
    margin: 0 auto;
}

/* Step row */
body.single-hs_customer_case .case-journey__step {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    padding: 1rem 0;
}

/* Large decorative number */
body.single-hs_customer_case .case-journey__number {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1;
    color: rgba(15, 23, 42, 0.06);
    flex-shrink: 0;
    min-width: 2.5ch;
    text-align: right;
    -webkit-user-select: none;
    user-select: none;
}

/* Content with left accent border */
body.single-hs_customer_case .case-journey__content {
    border-left: 3px solid rgba(15, 23, 42, 0.12);
    padding-left: 1.5rem;
    max-width: 720px;
}

body.single-hs_customer_case .case-journey__content--blue {
    border-left-color: #0f1aff;
}

body.single-hs_customer_case .case-journey__content--green {
    border-left-color: #00ea6e;
}

body.single-hs_customer_case .case-journey__content--dark {
    border-left-color: #0f172a;
}

body.single-hs_customer_case .case-journey__heading {
    font-size: clamp(1.3rem, 1.8vw, 1.6rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: #0f172a;
    line-height: 1.2;
}

body.single-hs_customer_case .case-journey__text {
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.7;
    color: #334155;
}

body.single-hs_customer_case .case-journey__text p {
    margin: 0 0 1rem;
}

body.single-hs_customer_case .case-journey__text p:last-child {
    margin-bottom: 0;
}

/* Dashed connector between steps */
body.single-hs_customer_case .case-journey__connector {
    display: flex;
    justify-content: flex-end;
    width: 2.5ch;
    padding: 0.25rem 0;
    margin-left: calc(clamp(3rem, 5vw, 4.5rem) * 0.25);
}

body.single-hs_customer_case .case-journey__connector::before {
    content: "";
    display: block;
    width: 2px;
    height: 2rem;
    border-left: 2px dashed rgba(15, 23, 42, 0.12);
}

@media (max-width: 480px) {
    body.single-hs_customer_case .case-journey__step {
        flex-direction: column;
        gap: 0.5rem;
    }

    body.single-hs_customer_case .case-journey__number {
        text-align: left;
        min-width: auto;
    }

    body.single-hs_customer_case .case-journey__connector {
        width: auto;
        margin-left: 0;
        padding-left: 0.5rem;
    }
}


/* ===========================================================
   Section 5: About (centered reading column)
   =========================================================== */

body.single-hs_customer_case .case-section-about {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

body.single-hs_customer_case .case-about-section {
    max-width: 720px;
    margin: 0 auto;
}

body.single-hs_customer_case .case-about-section__heading {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin: 0 0 1rem;
}

body.single-hs_customer_case .case-about-section__content {
    font-size: clamp(1rem, 1.1vw, 1.1rem);
    line-height: 1.7;
    color: #334155;
}

body.single-hs_customer_case .case-about-section__content p {
    margin: 0 0 1rem;
}

body.single-hs_customer_case .case-about-section__content p:last-child {
    margin-bottom: 0;
}


/* ===========================================================
   Section 6: Footer Navigation (prev/next)
   =========================================================== */

body.single-hs_customer_case .case-section-footer {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

body.single-hs_customer_case .case-footer {
    padding-top: 2.5rem;
}

/* Prev / Next navigation */
body.single-hs_customer_case .case-nav {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 1.5rem;
}

body.single-hs_customer_case .case-nav__prev,
body.single-hs_customer_case .case-nav__next {
    flex: 0 1 auto;
}

body.single-hs_customer_case .case-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    padding: 0.85rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(.68, -0.2, .4, 1.2);
    border: 2px solid transparent;
}

/* Previous: outlined green */
body.single-hs_customer_case .case-nav__prev .case-nav__link {
    background: transparent;
    color: #00ea6e;
    border-color: #00ea6e;
}

body.single-hs_customer_case .case-nav__prev .case-nav__link:hover {
    background: rgba(0, 234, 110, 0.08);
    border-color: #00c95e;
    color: #00c95e;
    transform: translateY(-1px);
}

/* Next: solid green */
body.single-hs_customer_case .case-nav__next .case-nav__link {
    background: #00ea6e;
    color: #000000;
    box-shadow: 0 2px 8px hsla(155, 100%, 45%, 0.3);
}

body.single-hs_customer_case .case-nav__next .case-nav__link:hover {
    background: hsl(155, 100%, 35%);
    color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px hsla(155, 100%, 35%, 0.4);
}

body.single-hs_customer_case .case-nav__arrow {
    font-size: 1rem;
    flex-shrink: 0;
}

body.single-hs_customer_case .case-nav__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

body.single-hs_customer_case .case-nav__label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
}

body.single-hs_customer_case .case-nav__title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (max-width: 540px) {
    body.single-hs_customer_case .case-nav {
        flex-direction: column;
        gap: 1rem;
    }

    body.single-hs_customer_case .case-nav__link {
        width: 100%;
        justify-content: center;
    }
}


/* ===========================================================
   Responsive: Testimonial
   =========================================================== */

@media (max-width: 768px) {
    body.single-hs_customer_case .case-section-testimonial {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    body.single-hs_customer_case .case-testimonial-highlight__quote {
        font-size: 1.2rem;
    }

    body.single-hs_customer_case .case-testimonial-highlight__mark {
        font-size: 3.5rem;
    }
}


/* ===========================================================
   Print styles
   =========================================================== */

@media print {
    .wp-block-hs-customers.hs-color-mode--light {
        color: #000000;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .hs-customer-logo-link:focus {
        outline-width: 3px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hs-customer-logo-wrapper,
    .hs-customer-logo-link:hover .hs-customer-logo-wrapper {
        transition: none;
        transform: none;
    }
}


/* ===========================================================
   Customer Case Archive (grid cards)
   =========================================================== */

.customer-cases-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.customer-case-item {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 280px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.customer-case-item:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 23, 42, 0.2);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.customer-case-item__header {
    display: flex;
    justify-content: flex-end;
}

.customer-case-item .case-logo {
    max-width: 140px;
}

.customer-case-item .case-logo svg,
.customer-case-item .case-logo img {
    width: 100%;
    height: auto;
}

.customer-case-item .case-title {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.2;
}

.customer-case-item .case-title a {
    color: #0f172a;
    text-decoration: none;
}

.customer-case-item .case-tagline {
    margin: 0;
    color: #475569;
    line-height: 1.5;
}

.customer-case-item .case-read-more {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #0f172a;
    font-weight: 600;
}

.customer-case-item .case-read-more::after {
    content: "→";
    font-size: 1rem;
    color: rgba(15, 23, 42, 0.6);
}

@media (max-width: 640px) {
    .customer-case-item {
        padding: 1.4rem;
    }
}
