/* Card Stacking Animation Styles */

/* Stack Animation Container */
.stack-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stack-offset {
    display: flex;
    width: 100%;
    height: 8rem;
    background-color: transparent;
}

@media only screen and (min-width: 768px) {
    .stack-offset {
        height: 10rem;
    }
}

@media only screen and (min-width: 1400px) {
    .stack-offset {
        height: 11rem;
    }
}

.services-stack {
    width: 100%;
    position: relative;
    height: 65vh;
    min-height: 615px;
}

@media only screen and (min-width: 768px) {
    .services-stack {
        height: 500px;
        min-height: 0;
    }
}

@media only screen and (min-width: 1400px) {
    .services-stack {
        height: 600px;
    }
}

@media only screen and (min-width: 1600px) {
    .services-stack {
        height: 700px;
    }
}

.stack-item {
    display: flex;
    position: absolute;
    width: 100%;
    height: 100%;
    padding-bottom: 2rem;
    gap: 4%;
    justify-content: center;
    align-items: stretch;
}

@media only screen and (min-width: 768px) {
    .stack-item {
        padding-bottom: 3rem;
        padding: 0 5% 3rem 5%;
    }
}

@media only screen and (min-width: 1200px) {
    .stack-item {
        padding: 0 8% 3rem 8%;
    }
}

@media only screen and (min-width: 1600px) {
    .stack-item {
        padding-bottom: 5rem;
        padding: 0 10% 5rem 10%;
    }
}

.services-stack__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 2rem;
    color: #141414;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.services-stack__inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.services-stack__title {
    padding: 2.6rem 3rem 0 3rem;
    margin-bottom: 2.3rem;
}

.services-stack__title h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #141414;
}

.services-stack__title h5 {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.7;
    color: #666;
}

@media only screen and (min-width: 768px) {
    .services-stack__title {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin-bottom: 0;
        padding: 2.6rem 2rem 0 3rem;
    }
}

@media only screen and (min-width: 1400px) {
    .services-stack__title {
        padding: 3rem 3rem 0 4rem;
    }

    .services-stack__title h3 {
        font-size: 2.2rem;
    }

    .services-stack__title h5 {
        font-size: 1.1rem;
    }
}

.services-stack__icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.services-stack__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: none;
}

@media only screen and (min-width: 768px) {
    .services-stack__icon {
        width: 70px;
        height: 70px;
        margin-bottom: 2rem;
    }
}

@media only screen and (min-width: 1400px) {
    .services-stack__icon {
        width: 80px;
        height: 80px;
    }
}

.services-stack__descr {
    padding: 0 3rem;
    margin-bottom: 2.3rem;
}

.services-stack__text {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    color: #555;
}

@media only screen and (min-width: 768px) {
    .services-stack__descr {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        margin-bottom: 0;
        padding: 2rem 2rem 3rem 3rem;
    }
}

@media only screen and (min-width: 1400px) {
    .services-stack__descr {
        padding: 2rem 3rem 4rem 4rem;
    }

    .services-stack__text {
        font-size: 1rem;
    }
}

/* Link styling */
.stack-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    width: 65%;
    height: 100%;
}

.stack-item a:hover .services-stack__inner {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

/* Mobile adjustments */
@media only screen and (max-width: 767px) {
    .stack-wrapper {
        padding: 0 1rem;
    }
    
    /* Keep the services-stack pinning behavior for mobile stacking */
    .services-stack {
        height: 80vh;
        min-height: 600px;
        position: relative;
    }
    
    /* Prepare stack-items for individual card animation */
    .stack-item {
        position: absolute;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0 1rem 3rem 1rem;
        justify-content: center;
        align-items: center;
        pointer-events: none; /* Let individual cards handle interactions */
    }

    /* Style each card as an individual stack element */
    .stack-item a {
        position: absolute;
        width: 85%;
        height: 70%;
        top: 15%;
        left: 50%;
        transform: translateX(-50%);
        pointer-events: all; /* Re-enable interactions for cards */
        z-index: 1; /* Let GSAP handle z-index through animation */
    }
    
    /* Remove conflicting positioning - let GSAP handle it */
    .stack-item:nth-child(1) a:nth-child(1),
    .stack-item:nth-child(1) a:nth-child(2),
    .stack-item:nth-child(2) a:nth-child(1),
    .stack-item:nth-child(2) a:nth-child(2),
    .stack-item:nth-child(3) a:nth-child(1),
    .stack-item:nth-child(3) a:nth-child(2),
    .stack-item:nth-child(4) a:nth-child(1),
    .stack-item:nth-child(4) a:nth-child(2) {
        position: absolute;
        top: 15%;
        /* Remove z-index and top overrides - let GSAP handle positioning */
    }

    /* TEAM SECTION MOBILE ADJUSTMENTS */
    /* Team cards don't have <a> wrappers, so we target them directly */
    .team-stack-wrapper .stack-item {
        pointer-events: all; /* Team cards handle interactions directly */
    }

    .team-stack-wrapper .stack-item .team-card {
        position: absolute;
        width: 85%;
        height: 70%;
        top: 15%;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1; /* Let GSAP handle z-index through animation */
    }

    /* Remove conflicting positioning for team cards - let GSAP handle it */
    .team-stack-wrapper .stack-item:nth-child(1) .team-card:nth-child(1),
    .team-stack-wrapper .stack-item:nth-child(1) .team-card:nth-child(2),
    .team-stack-wrapper .stack-item:nth-child(2) .team-card:nth-child(1),
    .team-stack-wrapper .stack-item:nth-child(2) .team-card:nth-child(2) {
        position: absolute;
        top: 15%;
        /* Remove z-index and top overrides - let GSAP handle positioning */
    }

    .stack-item .services-stack__inner {
        max-width: 100%;
        height: 100%;
        border-radius: 20px;
    }

    .services-stack__title {
        padding: 2rem 2rem 0 2rem;
        margin-bottom: 1.5rem;
        position: relative;
    }

    .services-stack__title h3 {
        font-size: 1.6rem;
    }

    .services-stack__descr {
        padding: 0 2rem 2rem 2rem;
        position: relative;
    }

    .services-stack__icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }
    
    /* Optimize treatment cards for mobile stacking */
    .treatment-image {
        height: 55%;
        min-height: 200px;
    }
    
    .treatment-content {
        height: 45%;
        padding: 20px;
        flex-grow: 0;
    }
    
    .treatment-content h3 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .treatment-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        -webkit-line-clamp: 2;
    }
    
    /* Ensure cards work well in stacking layout */
    .treatment-card {
        height: 100%;
        border-radius: 18px;
        display: flex;
        flex-direction: column;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }
    
    /* Adjust icons and badges for mobile */
    .treatment-icon {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
    
    .treatment-icon img {
        width: 25px;
        height: 25px;
    }
    
    .treatment-badge {
        top: 15px;
        left: 15px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    /* TEAM CARD MOBILE OPTIMIZATIONS */
    .team-card {
        height: 100%;
        border-radius: 18px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

    .team-member {
        padding: 30px 20px;
        min-height: 100%;
    }

    .team-member h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    .team-member p {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .team-header {
        top: 20px;
        padding: 0 15px;
    }

    .team-header h2 {
        font-size: 1.8rem;
    }
} 

/* Treatment Cards Styles */
.treatments-stack-wrapper {
    margin: 60px auto;
}

.treatment-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(209, 193, 173, 0.2);
}

.treatment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(209, 193, 173, 0.4);
}

.treatment-image {
    height: 60%;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.treatment-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, rgba(209, 193, 173, 0.2) 0%, rgba(209, 193, 173, 0.6) 100%);
    transition: opacity 0.3s ease;
}

.treatment-card:hover .treatment-image::before {
    opacity: 0.8;
}

.treatment-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(209, 193, 173, 0.3);
    z-index: 3;
    transition: all 0.3s ease;
}

.treatment-card:hover .treatment-icon {
    transform: rotate(360deg) scale(1.1);
    background: #d1c1ad;
}

.treatment-icon img {
    width: 30px;
    height: 30px;
    filter: brightness(0) saturate(100%) invert(74%) sepia(17%) saturate(378%) hue-rotate(344deg) brightness(94%) contrast(88%);
    transition: all 0.3s ease;
}

.treatment-card:hover .treatment-icon img {
    filter: brightness(0) invert(1);
}

.treatment-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #d1c1ad, #c1b19d);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(209, 193, 173, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.treatment-content {
    height: 40%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.treatment-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    line-height: 1.3;
}

.treatment-content p {
    font-size: 1rem;
    color: #6c757d;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modern Container Styles */
.modern-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
}

.modern-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.modern-section-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    line-height: 1.2;
}

.modern-section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.highlight {
    color: #d1c1ad;
    font-weight: 600;
}

/* Team Cards Styles */
.team-stack-wrapper {
    margin: 60px auto;
}

.team-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(209, 193, 173, 0.2);
    background: #fff;
    position: relative;
    z-index: 1;
    isolation: isolate;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: rgba(209, 193, 173, 0.4);
}

.team-header {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.team-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex-grow: 1;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    padding: 40px 30px;
    text-align: center;
    z-index: 1;
}

.team-member::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.team-card:hover .team-member::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.team-member figure {
    display: none; /* Hide the original figure element */
}

.team-member h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.3;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.team-member p {
    font-size: 1rem;
    color: #fff;
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 2;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* Ensure proper stacking for team stack items */
.team-stack .stack-item {
    isolation: isolate;
}

/* Mobile adjustments for new sections */
@media (max-width: 1024px) {
    .modern-section-title {
        font-size: 2.3rem;
    }
    
    .treatment-content {
        padding: 25px;
    }
    
    .treatment-content h3 {
        font-size: 1.3rem;
    }
    
    .team-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .modern-section-title {
        font-size: 2rem;
    }
    
    .modern-section-subtitle {
        font-size: 1rem;
    }
    
    .treatment-content {
        padding: 20px;
    }
    
    .treatment-content h3 {
        font-size: 1.2rem;
    }
    
    .treatment-content p {
        font-size: 0.9rem;
    }
    
    .team-card {
        border-radius: 15px;
    }
    
    .team-member {
        padding: 30px 20px;
    }
    
    .team-header {
        top: 20px;
        padding: 0 15px;
    }
    
    .team-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .modern-section-title {
        font-size: 1.8rem;
    }
    
    .team-header h2 {
        font-size: 1.6rem;
    }
    
    .team-member h3 {
        font-size: 1.3rem;
    }
    
    .team-member p {
        font-size: 0.9rem;
    }
} 