/* Services B Section Styles based on Figma Design */

.services-b-section {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
    padding: 76px 0 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    scroll-margin-top: 165px;
}

/* Header Frame */
.services-b-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    max-width: 680px;
    width: 90%;
    text-align: center;
}

.services-b-subtitle {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -1.2px;
    color: #15b4b6;
    margin: 0;
}

.services-b-header-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.services-b-header-icon.in-view {
    animation: servicesBSlideIn 1s ease-in-out forwards;
}

.services-b-header-icon-img {
    width: 215px;
    height: 235px;
    object-fit: contain;
}

@keyframes servicesBSlideIn {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-b-title {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -1.2px;
    color: #0c4b4d;
    margin: 0;
}

/* Cards Wrapper */
.services-b-cards-grid {
    display: flex;
    flex-direction: row;
    gap: 16px;
    max-width: 1438px;
    width: 90%;
    justify-content: center;
    box-sizing: border-box;
}

/* Card base - 471px width */
.services-b-card {
    flex: 1;
    min-width: 300px;
    max-width: 471px;
    min-height: 450px;
    box-sizing: border-box;
    border-radius: 8px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.services-b-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.services-b-card-toggle-btn {
    background: transparent;
    border: none;
    padding: 6px;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.25s ease;
    color: inherit;
    outline: none;
}

.services-b-card-toggle-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.services-b-card-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
}

.services-b-icon-svg {
    display: block;
    transition: filter 0.35s ease, opacity 0.35s ease, color 0.35s ease;
}

/* Hover & Expanded subtle glow (lightens original tone) */
.services-b-card-toggle-btn:hover .services-b-icon-svg {
    filter: brightness(1.25) drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

.services-b-card.is-expanded .services-b-icon-svg {
    filter: brightness(1.35) drop-shadow(0 0 8px currentColor);
}

.services-b-card.services-b-card-a.is-expanded .services-b-icon-svg,
.services-b-card.services-b-card-a .services-b-card-toggle-btn:hover .services-b-icon-svg {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.85)) brightness(1.2);
}

.services-b-card.services-b-card-b.is-expanded .services-b-icon-svg,
.services-b-card.services-b-card-b .services-b-card-toggle-btn:hover .services-b-icon-svg {
    color: #e8ffff;
    filter: drop-shadow(0 0 8px rgba(232, 255, 255, 0.7));
}

.services-b-card.services-b-card-c.is-expanded .services-b-icon-svg,
.services-b-card.services-b-card-c .services-b-card-toggle-btn:hover .services-b-icon-svg {
    color: #12777a;
    filter: drop-shadow(0 0 8px rgba(34, 181, 183, 0.85)) brightness(1.25);
}

.services-b-card-title {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -1px;
    margin: 16px 0 0 0;
}

/* Card Body & Dynamic Views */
.services-b-card-body {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 20px;
}

.services-b-card-default-view {
    display: grid;
    grid-template-rows: 1fr;
    opacity: 1;
    transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.35s ease;
}

.services-b-card-default-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.services-b-card-lead {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.6px;
    margin: 0;
}

.services-b-card-desc {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.6px;
    margin: 0;
}

/* Bullets View (Pills list) */
.services-b-card-bullets-view {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
    transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.35s ease;
}

.services-b-card-bullets-inner {
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.services-b-card-pills-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    align-items: center;
    width: 100%;
}

.services-b-card-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 100%;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    padding: 7px 20px;
    border-radius: 999px;
    box-sizing: border-box;
    transform: translateY(12px);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Expanded State */
.services-b-card.is-expanded .services-b-card-default-view {
    grid-template-rows: 0fr;
    opacity: 0;
    pointer-events: none;
}

.services-b-card.is-expanded .services-b-card-bullets-view {
    grid-template-rows: 1fr;
    opacity: 1;
    pointer-events: auto;
}

.services-b-card.is-expanded .services-b-card-pill {
    opacity: 1;
    transform: translateY(0);
}

.services-b-card.is-expanded .services-b-card-pill:nth-child(1) { transition-delay: 0.04s; }
.services-b-card.is-expanded .services-b-card-pill:nth-child(2) { transition-delay: 0.09s; }
.services-b-card.is-expanded .services-b-card-pill:nth-child(3) { transition-delay: 0.14s; }
.services-b-card.is-expanded .services-b-card-pill:nth-child(4) { transition-delay: 0.19s; }

/* Card A styling */
.services-b-card-a {
    background-color: #0c4b4d;
    color: #ffffff;
}

.services-b-card-a .services-b-card-title,
.services-b-card-a .services-b-card-lead {
    color: #ffffff !important;
}

.services-b-card-a .services-b-card-desc {
    color: rgba(255, 255, 255, 0.88) !important;
}

.services-b-card-a .services-b-card-pill {
    background-color: #ffffff;
    color: #0c4b4d;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.services-b-card-a:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(12, 75, 77, 0.25);
}

/* Card B styling */
.services-b-card-b {
    background-color: #59bcb1;
    color: #0c4b4d;
}

.services-b-card-b .services-b-card-title,
.services-b-card-b .services-b-card-lead,
.services-b-card-b .services-b-card-desc {
    color: #0c4b4d !important;
}

.services-b-card-b .services-b-card-pill {
    background-color: #0c4b4d;
    color: #ffffff;
    border: 1px solid #0c4b4d;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.services-b-card-b:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(89, 188, 177, 0.25);
}

/* Card C styling - Translucent Teal */
.services-b-card-c {
    background-color: rgba(34, 181, 183, 0.38);
    border: 1px solid #22b5b7;
    color: #0c4b4d;
}

.services-b-card-c .services-b-card-title,
.services-b-card-c .services-b-card-lead,
.services-b-card-c .services-b-card-desc {
    color: #0c4b4d !important;
}

.services-b-card-c .services-b-card-pill {
    background-color: #0c4b4d;
    color: #ffffff;
    border: 1px solid #0c4b4d;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.services-b-card-c:hover {
    transform: translateY(-5px);
    background-color: rgba(34, 181, 183, 0.48);
    box-shadow: 0 12px 24px rgba(34, 181, 183, 0.15);
}

/* Card Footer & Outline CTA */
.services-b-card-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    z-index: 2;
}

.services-b-card-cta-btn {
    background: transparent;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 6px 18px;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.2px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    outline: none;
    transition: all 0.25s ease;
}

.services-b-card-cta-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.services-b-card-a .services-b-card-cta-btn {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.services-b-card-a .services-b-card-cta-btn:hover {
    color: #ffffff;
    border-color: #ffffff;
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.services-b-card-b .services-b-card-cta-btn {
    color: #0c4b4d;
    border-color: rgba(12, 75, 77, 0.4);
}

.services-b-card-b .services-b-card-cta-btn:hover {
    color: #0c4b4d;
    border-color: #0c4b4d;
    background-color: rgba(12, 75, 77, 0.08);
    transform: translateY(-1px);
}

.services-b-card-c .services-b-card-cta-btn {
    color: #0c4b4d;
    border-color: rgba(12, 75, 77, 0.4);
}

.services-b-card-c .services-b-card-cta-btn:hover {
    color: #0c4b4d;
    border-color: #0c4b4d;
    background-color: rgba(12, 75, 77, 0.08);
    transform: translateY(-1px);
}

/* Separator Horizontal Row - Separador (1328px width, 407px height) */
.services-b-separator {
    max-width: 1328px;
    width: 90%;
    box-sizing: border-box;
    position: relative;
    height: 407px;
}

.services-b-separator-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Desktop / Mobile Graphic Containers */
.services-b-separator-desktop-graphic {
    display: none;
}

.services-b-separator-mobile-graphic {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    height: 324px;
    margin: 30px auto;
    z-index: 1;
}

@media (min-width: 1200px) {
    .services-b-separator-desktop-graphic {
        display: block;
        position: absolute;
        left: 50%;
        margin-left: -664px;
        top: 0;
        width: 1328px;
        height: 407px;
        z-index: 1;
    }
    
    .services-b-separator-mobile-graphic {
        display: none;
    }
}

.services-b-separator-left {
    max-width: 482px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

@media (min-width: 1200px) {
    .services-b-separator-left {
        position: absolute;
        left: 0;
        top: 100px;
        text-align: left;
    }
}

.services-b-scaleup-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -1px;
    color: #000000;
    margin: 0;
}

.services-b-tech-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.8px;
    background: linear-gradient(135deg, #15b4b6 0%, #094f50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    margin: 4px 0 0 0;
}

.services-b-separator-svg,
.services-b-hexagon-svg {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- SVG Drawing Animations --- */
.draw-path {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    will-change: stroke-dashoffset;
}

.draw-line-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    will-change: stroke-dashoffset;
}

/* Fills Fade-in */
.fill-path {
    opacity: 0;
    transition: opacity 1.5s ease-in-out 1.2s;
    will-change: opacity;
}

.services-b-separator.in-view .fill-path {
    opacity: 1.0;
}

/* For browsers where JS doesn't run / fallback */
.services-b-separator:not(.js-enabled) .draw-path,
.services-b-separator:not(.js-enabled) .draw-line-path {
    stroke-dashoffset: 0;
}
.services-b-separator:not(.js-enabled) .fill-path {
    opacity: 1.0;
}

.services-b-separator-right {
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 2;
}

@media (min-width: 1200px) {
    .services-b-separator-right {
        position: absolute;
        right: 0;
        top: 220px;
        text-align: right;
    }
}

.services-b-efficiency-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 30px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -1px;
    color: #299e91;
    margin: 0;
}

/* Responsive & Mobile Adaptability */
@media (max-width: 1200px) {
    .services-b-cards-grid {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .services-b-card {
        max-width: 471px;
        width: 100%;
        height: auto;
        min-height: 400px;
    }
    
    .services-b-separator {
        height: auto;
        min-height: auto;
        margin-top: 50px;
    }
    
    .services-b-separator-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 24px;
    }
    
    .services-b-separator-left,
    .services-b-separator-right {
        position: relative;
        left: auto;
        right: auto;
        top: auto;
        text-align: center;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .services-b-section {
        padding: 50px 0 100px;
        gap: 50px;
        scroll-margin-top: 110px;
    }

    .services-b-header {
        gap: 36px;
    }

    .services-b-subtitle {
        font-size: 18px;
        letter-spacing: -0.5px;
    }

    .services-b-title {
        font-size: 20px;
        letter-spacing: -0.6px;
    }

    .services-b-card-lead,
    .services-b-card-desc {
        font-size: 16px;
    }

    .services-b-card-title {
        font-size: 24px;
        letter-spacing: -0.8px;
    }

    .services-b-scaleup-text {
        font-size: 22px;
        letter-spacing: -0.8px;
    }

    .services-b-tech-text {
        font-size: 32px;
        letter-spacing: -1.2px;
    }

    .services-b-efficiency-text {
        font-size: 20px;
        letter-spacing: -0.8px;
    }

    .services-b-separator-mobile-graphic {
        max-width: 260px;
        height: 280px;
    }
}

