.tc-card {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    perspective: 1000px;
}

/* Flip card structure */
.tc-card--flip {
    height: 100%;
}

.tc-card__inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.tc-card--flipped .tc-card__inner {
    transform: rotateY(180deg);
}

.tc-card__front,
.tc-card__back {
    position: relative;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.tc-card__front {
    position: relative;
}

.tc-card__back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
}

/* Ensure all children also have backface-visibility */
.tc-card__front *,
.tc-card__back * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Ensure proper stacking */
.tc-card__front {
    z-index: 2;
}

.tc-card__back {
    z-index: 1;
}

/* Ensure back side has same styles as front side */
.tc-card__back .tc-card__icon {
    position: relative;
    z-index: 2;
    margin-bottom: -45px;
    margin-left: 1.9rem;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.tc-card__back .tc-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tc-card__back .tc-card__content {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.07);
}

.tc-card__back .tc-card__title {
    margin: 15px 0 0 0;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.3;
    color: #0D0C0C;
}

.tc-card__back .tc-card__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #0D0C0C;
    flex: 1;
}

.tc-card__icon {
    position: relative;
    z-index: 2;
    margin-bottom: -45px;
    margin-left: 1.9rem;
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.tc-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.tc-card__content {
    background: #ffffff;
    border-radius: 12px;
    padding: 50px 30px 30px; /* Default padding - can be overridden by inline styles */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.07);
    width: 100%;
    /* height: 100%; */
    /* text-align: left; */
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.tc-card__title {
    margin: 15px 0 0 0;
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.3;
    color: #0D0C0C;
}

.tc-card__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #0D0C0C;
    flex: 1;
}

.tc-card__text p {
    margin: 0 0 10px;
}

.tc-card__text p:last-child {
    margin-bottom: 0;
}

.tc-card__text strong {
    font-weight: 700;
}

.tc-card__text em {
    font-style: italic;
}

.tc-card__text ul,
.tc-card__text ol {
    margin: 10px 0;
    padding-left: 20px;
    text-align: left;
}

.tc-card__text ul li,
.tc-card__text ol li {
    margin: 5px 0;
}

.tc-card__text a {
    color: inherit;
    text-decoration: underline;
}

.tc-card__text a:hover {
    opacity: 0.8;
}

/* Image alignment styles */
.tc-card__text img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

.tc-card__text img.aligncenter,
.tc-card__text img.alignnone {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.tc-card__text img.alignleft {
    float: left;
    margin: 1rem 1rem 1rem 0;
}

.tc-card__text img.alignright {
    float: right;
    margin: 1rem 0 1rem 1rem;
}

.tc-card__text figure {
    margin: 1rem 0;
    text-align: center;
}

.tc-card__text figure.aligncenter,
.tc-card__text figure.alignnone {
    margin-left: auto;
    margin-right: auto;
}

.tc-card__text figure.alignleft {
    float: left;
    margin: 1rem 1rem 1rem 0;
}

.tc-card__text figure.alignright {
    float: right;
    margin: 1rem 0 1rem 1rem;
}

.tc-card__text figure img {
    margin: 0;
}

/* Flip button wrapper - same position for both front and back buttons */
.tc-card__button-wrapper {
    position: absolute;
    bottom: 15%;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 30px;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure button wrapper works the same in both front and back */
.tc-card__front .tc-card__button-wrapper,
.tc-card__back .tc-card__button-wrapper {
    position: absolute;
    bottom: 15%;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 30px;
}

@media screen and (max-width: 1024px) {
    .tc-card__icon,
    .tc-card__back .tc-card__icon {
        width: 70px;
        height: 70px;
        margin-bottom: -35px;
    }
    .tc-card--flip .tc-card__content{
        min-height: 610px;
    }
}


@media screen and (max-width: 768px) {
    .tc-card__icon,
    .tc-card__back .tc-card__icon {
        width: 50px;
        height: 50px;
        margin-bottom: -25px;
    }
    
    .tc-card__content,
    .tc-card__back .tc-card__content {
        padding: 45px 20px 25px; /* Default mobile padding - can be overridden by inline styles */
        border-radius: 10px;
    }
    
    .tc-card__title,
    .tc-card__back .tc-card__title {
        font-size: 1.25rem;
    }
    
    .tc-card__text,
    .tc-card__back .tc-card__text {
        font-size: 0.9rem;
    }
    
    .tc-card__button-wrapper,
    .tc-card__front .tc-card__button-wrapper,
    .tc-card__back .tc-card__button-wrapper {
        padding: 0 20px; /* Adjust padding on mobile */
        bottom: 13%; /* Same position on mobile */
    }
    
    /* Reset float on mobile for better layout */
    .tc-card__text img.alignleft,
    .tc-card__text img.alignright,
    .tc-card__text figure.alignleft,
    .tc-card__text figure.alignright {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Ensure flip cards work on mobile */
    .tc-card--flip {
        min-height: 300px;
    }
    .tc-card--flip .tc-card__content{
        min-height: 510px;
    }
}

/* Feature Cards Styles */
.tc-card-feature {
    display: flex;
    flex-direction: row;
    gap: 0;
    align-items: stretch;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.07);
    overflow: hidden;
    width: 100%;
    margin-bottom: 1.5rem;
}

.tc-card-feature__content {
    flex: 0 0 50%;
    width: 50%;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tc-card-feature__image {
    flex: 0 0 50%;
    width: 50%;
    min-height: 200px;
    overflow: hidden;
}

.tc-card-feature__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.tc-card-feature__title {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    /* font-weight: 900;
    line-height: 1.3; */
    color: #0D0C0C;
    position: relative;
    z-index: 2;
}

.tc-card-feature__text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #0D0C0C;
    position: relative;
    z-index: 2;
}

.tc-card-feature__text p {
    margin: 0 0 1rem;
}

.tc-card-feature__text p:last-child {
    margin-bottom: 0;
}

/* Color Versions - Background at 10% opacity with curved border */
.tc-card-feature--green .tc-card-feature__content {
    background-color: rgba(76, 175, 136, 0.1);
    border-left: none;
}

.tc-card-feature--green .tc-card-feature__content::before {
    content: "";
    position: absolute;
    left: -3px;
    top: 0;
    width: 100%;
    height: 100%;
    border-bottom-left-radius: 15px;
    border-top-left-radius: 15px;
    border-left-width: 10px;
    border-left-style: solid;
    border-left-color: #4CAF88;
    z-index: 1;
}

.tc-card-feature--yellow .tc-card-feature__content {
    background-color: rgba(233, 196, 106, 0.1);
    border-left: none;
}

.tc-card-feature--yellow .tc-card-feature__content::before {
    content: "";
    position: absolute;
    left: -3px;
    top: 0;
    width: 100%;
    height: 100%;
    border-bottom-left-radius: 15px;
    border-top-left-radius: 15px;
    border-left-width: 10px;
    border-left-style: solid;
    border-left-color: #E9C46A;
    z-index: 1;
}

.tc-card-feature--red .tc-card-feature__content {
    background-color: rgba(231, 111, 81, 0.1);
    border-left: none;
}

.tc-card-feature--red .tc-card-feature__content::before {
    content: "";
    position: absolute;
    left: -3px;
    top: 0;
    width: 100%;
    height: 100%;
    border-bottom-left-radius: 15px;
    border-top-left-radius: 15px;
    border-left-width: 10px;
    border-left-style: solid;
    border-left-color: #E76F51;
    z-index: 1;
}

/* Show/Hide based on data-show attribute */
.tc-card-feature[data-show="text"] .tc-card-feature__image {
    display: none !important;
}

.tc-card-feature[data-show="text"] {
    flex-direction: column;
}

.tc-card-feature[data-show="text"] .tc-card-feature__content {
    width: 100%;
}
/* Responsive */

@media screen and (max-width: 1250px) {
    .tc-card-feature__image {
        width: 100%;
        min-height: 100%;
    }
    .tc-card-feature__image img {
        height: 100%;
    }
}
@media screen and (max-width: 768px) {
    .tc-card-feature {
        /* flex-direction: column; */
    }
    
    /* .tc-card-feature__image {
        width: 100%;
        min-height: 200px;
    } */
    
    
    .tc-card-feature__content {
        width: 100%;
        padding: .5rem 1.2rem;
    }
    
    .tc-card-feature__title {
        /* font-size: 1.25rem; */
    }
    
    .tc-card-feature__text p{
        font-size: 0.7rem;
    }
}
@media screen and (max-width: 510px) {
    .tc-card-feature__image {
        width: 100%;
        min-height: 200px;
    }
    .tc-card-feature__image img {
        height: 200px;
    }
    .tc-card-feature__text p{
        font-size: 0.6rem;
    }
}
