/* Stylesheet for the 'propuesta-valor' block (Senda Cards) */

section.block-propuesta-valor {
    padding: 80px 0;
    background: linear-gradient(180deg, #FAF6F0 0%, #EEE8DD 100%);
    text-align: center;
    color: #2A2822;
    overflow-x: hidden;
}

section.block-propuesta-valor .inner-propuesta-valor {
    max-width: var(--wp--custom--layout--desktop-width, 1200px);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.block-propuesta-valor .header-propuesta {
    max-width: 800px;
    margin: 0 0 48px 0;
    text-align: left;
}

.block-propuesta-valor .titulo {
    font-family: 'Outfit', sans-serif;
    font-size: var(--wp--preset--font-size--h-2, 36px);
    line-height: 1.25;
    font-weight: 800;
    margin: 0 0 16px 0;
}

.block-propuesta-valor .titulo span {
    color: var(--wp--preset--color--primary-100, #E58552);
}

.block-propuesta-valor .subtitulo {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 300;
    color: #2A2822;
    margin: 0;
}

/* Cards Grid / Carousel wrapper */
.senda-cards-grid-wrapper {
    width: 100%;
    position: relative;
}

.senda-cards-scroll-viewport {
    display: flex;
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* Desktop Styles (Grid Layout) */
@media (min-width: 1220px) {
    .senda-cards-scroll-viewport {
        display: grid;
        grid-template-columns: repeat(3, 350px);
        justify-content: center;
        gap: 24px;
    }
}

/* Mobile & Tablet Styles (Carousel Layout) */
@media (max-width: 1219px) {
    .senda-cards-grid-wrapper {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
    
    .senda-cards-scroll-viewport {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 20px;
        padding: 0 20px 10px 20px;
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbars */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .senda-cards-scroll-viewport::-webkit-scrollbar {
        display: none;
    }
}

/* Mobile Stacked Layout (768px and below) */
@media (max-width: 768px) {
    .senda-cards-grid-wrapper {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    .senda-cards-scroll-viewport {
        flex-direction: column !important;
        align-items: center !important;
        overflow-x: visible !important;
        scroll-snap-type: none !important;
        gap: 24px !important;
        padding: 0 !important;
    }
    
    .senda-card-wrapper {
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        scroll-snap-align: none !important;
    }
    
    .senda-cards-nav {
        display: none !important;
    }
}

/* Card Wrapper (Perspective container) */
.senda-card-wrapper {
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 490px;
    perspective: 1000px;
    flex-shrink: 0;
    scroll-snap-align: center;
    box-sizing: border-box;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.senda-card-wrapper:hover {
    transform: translateY(-8px);
}

/* Inner card wrapper (Handles the rotation) */
.senda-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Front & Back Faces */
.senda-card-front,
.senda-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition: box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.senda-card-wrapper:hover .senda-card-front,
.senda-card-wrapper:hover .senda-card-back {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Front Face */
.senda-card-front {
    background-color: #F5F5F7;
    overflow: hidden;
    position: relative;
}

.senda-card-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    z-index: 1;
}

.senda-card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Specific background images for Proposal Cards (bypasses WP kses inline-style stripping) */
.senda-card-wrapper:nth-child(1) .senda-card-bg {
    background-image: url('https://get.sendahealth.com/api/media/file/card1.webp') !important;
}
.senda-card-wrapper:nth-child(2) .senda-card-bg {
    background-image: url('https://get.sendahealth.com/api/media/file/card2.webp') !important;
}
.senda-card-wrapper:nth-child(3) .senda-card-bg {
    background-image: url('https://get.sendahealth.com/api/media/file/card3.webp') !important;
}

/* Zoom background graphic on card hover */
.senda-card-wrapper:hover .senda-card-bg {
    transform: scale(1.08);
}

.senda-card-front-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

.senda-card-front-content h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 300;
    line-height: 1.3;
    margin: 0;
}

/* Card 1 Front Title overrides to match specific color */
.senda-card-wrapper:nth-child(1) .senda-card-front h3 {
    color: #000000;
}
.senda-card-wrapper:nth-child(2) .senda-card-front h3 {
    color: #2A2822;
}
.senda-card-wrapper:nth-child(3) .senda-card-front h3 {
    color: #2A2822;
}

/* Back Face */
.senda-card-back {
    color: #FFFFFF;
    padding: 28px 24px;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.senda-card-back h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #FFFFFF;
}

.senda-card-back-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.senda-card-back p {
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-align: left;
}

/* Flip Buttons styling */
.btn-flip,
.btn-unflip {
    border: none;
    border-radius: 50%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, opacity 0.2s ease;
    outline: none;
}

.btn-flip {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
}

.btn-flip:hover {
    transform: scale(1.1);
}

.btn-unflip {
    width: 40px;
    height: 40px;
    align-self: flex-end;
}

.btn-unflip:hover {
    transform: scale(1.1);
}

.btn-flip svg,
.btn-unflip svg {
    width: 22px;
    height: 22px;
    stroke: #2A2822;
}

/* Navigation for mobile slider */
.senda-cards-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

@media (min-width: 1220px) {
    .senda-cards-nav {
        display: none;
    }
}

.nav-arrow {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background-color: #c5bdaa;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    outline: none;
}

.nav-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.nav-arrow:not(:disabled):active {
    transform: scale(0.95);
}

.nav-arrow svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.nav-dots {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #c5bdaa;
    padding: 12px 24px;
    border-radius: 24px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #e5dfd2;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    width: 32px;
    height: 12px;
    border-radius: 6px;
    background-color: #ffffff;
}

/* Responsiveness for small devices */
@media (max-width: 480px) {
    section.block-propuesta-valor {
        padding: 40px 0;
    }
    
    .block-propuesta-valor .titulo {
        font-size: 28px;
    }
    
    .block-propuesta-valor .subtitulo {
        font-size: 16px;
    }
    
    .senda-card-wrapper {
        height: 440px;
    }
    
    .senda-card-front h3,
    .senda-card-back h3 {
        font-size: 22px;
    }
}

/* Testimonial Chat Bubble in Card 1 */
.senda-card-chat-bubble {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 16px;
    margin-top: auto;
    margin-bottom: 8px;
    max-width: 250px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.08);
    z-index: 3;
}

.chat-bubble-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.chat-meta {
    display: flex;
    flex-direction: column;
}

.chat-name {
    font-size: 13px;
    font-weight: 600;
    color: #525252;
}

.chat-bubble-body p {
    font-size: 13px;
    line-height: 1.4;
    color: #2A2822;
    margin: 0;
    font-weight: 500;
}