/* Services A Section - Styles for dynamic services tab & isometric cube animation */

.services-a-section {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
    padding: 100px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.services-a-anchor-hook {
    position: absolute;
    top: 80px;
    left: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    scroll-margin-top: 165px;
}

.services-a-container {
    max-width: 1440px;
    width: 90%;
    margin: 0 auto;
    box-sizing: border-box;
}

.services-a-row {
    display: flex;
    flex-direction: row;
    gap: 80px;
    align-items: stretch;
    justify-content: space-between;
}

/* --- Left Column: SVG Cubes & Text Content --- */
.services-a-col-left {
    flex: 1;
    max-width: 580px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
}

.services-a-graphic-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.services-a-cubes-svg {
    display: block;
    max-width: 100%;
    height: auto;
    overflow: visible;
}

/* Glassy Cube Styling */
.cube-g {
    cursor: pointer;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cube-g polygon {
    transition: stroke-width 0.3s ease, stroke-opacity 0.3s ease;
}

.cube-g:hover {
    opacity: 1.0 !important;
}

.cube-g:hover polygon {
    stroke-opacity: 1.0;
    stroke-width: 1.2px;
}

/* Text area under Cubes */
.services-a-text-container {
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 215px; /* Adjusted to cover title, desc, margins and top progress line */
}

/* SVG progress line dividers */
.services-a-divider {
    width: 100%;
    height: 2px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}

.services-a-divider-top {
    margin-bottom: 20px;
}

.services-a-divider-svg {
    display: block;
    width: 100%;
    height: 2px;
}

.services-a-progress-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.services-a-divider.animating .services-a-progress-path {
    animation: drawLineProgress 15s linear forwards;
}

@keyframes drawLineProgress {
    from {
        stroke-dashoffset: 100;
    }
    to {
        stroke-dashoffset: 0;
    }
}

.services-a-text-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-a-active-title {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -2px;
    color: #0c4b4d;
    margin: 0 0 16px 0;
    text-transform: lowercase;
}

.services-a-active-desc {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.6px;
    color: #0c4b4d;
    opacity: 0.85;
    margin: 0;
}

/* --- Slide & Fade Animations for Text Change --- */
.services-a-text-content.exit {
    animation: textSlideOut 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.services-a-text-content.enter {
    animation: textSlideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

@keyframes textSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-12px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}


/* --- Right Column: Category Tabs Acordeão --- */
.services-a-col-right {
    flex: 1.2;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.services-a-tabs {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.services-a-tab-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 28px 30px;
    border-bottom: 1px solid rgba(20, 139, 141, 0.18);
    cursor: pointer;
    background-color: transparent;
    transition: background-color 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                padding-left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
    flex: 1;
}

/* Add top border to the first category tab */
.services-a-tab-item:first-child {
    border-top: 1px solid rgba(20, 139, 141, 0.18);
}

.services-a-tab-title {
    font-family: 'Helvetica Neue', Arial, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 21px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.7px;
    color: #0c4b4d;
    transition: color 0.3s ease, font-weight 0.1s ease;
}

.services-a-tab-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.services-a-tab-icon svg path {
    stroke: #0c4b4d;
    transition: stroke 0.3s ease;
}

/* Hover State */
.services-a-tab-item:hover {
    background-color: rgba(32, 180, 182, 0.04);
    padding-left: 36px; /* Smooth micro-animation sliding left */
}

/* Active State */
.services-a-tab-item.active {
    background-color: rgba(32, 180, 182, 0.07);
    padding-left: 36px;
    border-bottom-color: rgba(20, 139, 141, 0.3);
}

.services-a-tab-item.active .services-a-tab-title {
    font-weight: 700;
    color: #0c4b4d;
}

.services-a-tab-item.active .services-a-tab-icon {
    transform: rotate(45deg); /* Plus symbol rotates into an 'X' */
}

.services-a-tab-item.active .services-a-tab-icon svg path {
    stroke: #20b4b6; /* Accent color for active state icon */
}


/* --- Responsive and Adaptive Styles --- */

@media (max-width: 1024px) {
    .services-a-row {
        flex-direction: column;
        align-items: center;
        gap: 60px;
    }

    .services-a-col-left {
        max-width: 100%;
        align-items: center;
    }

    .services-a-text-container {
        text-align: center;
        min-height: auto;
        padding: 0 10px;
    }
    
    .services-a-col-right {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .services-a-anchor-hook {
        top: 40px;
        scroll-margin-top: 110px;
    }

    .services-a-section {
        padding: 60px 0;
    }

    .services-a-active-title {
        font-size: 30px;
        letter-spacing: -1.2px;
    }

    .services-a-active-desc {
        font-size: 15px;
        line-height: 1.45;
        letter-spacing: -0.4px;
    }

    .services-a-tab-item {
        padding: 18px 20px;
    }

    .services-a-tab-item:hover,
    .services-a-tab-item.active {
        padding-left: 24px;
    }

    .services-a-tab-title {
        font-size: 17px;
        letter-spacing: -0.5px;
    }
}
