@import url("https://fonts.googleapis.com/css?family=Varela+Round:400,400i,700");
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    font-family: "Poppins", sans-serif; /* We use Poppins for general text */
    box-sizing: border-box;
    transition: all 0.5s linear;
}

section {
    display: grid;
    place-content: center;
    min-height: 100vh;
    background-color: rgba(85, 85, 85, 0.867);
    padding: 10px; /* Add padding to the section so the card doesn't touch the edges on mobile */
}

/* Card container */
.business-card {
    width: 640px;
    height: 360px;
    position: relative;
    perspective: 700px; /* Required for 3D flip effect */
}

/* Card faces */
.business-card .front,
.business-card .back {
    width: 100%;
    height: 100%;
    position: absolute; /* Both must be absolute for flipping */
    top: 0; /* Remove negative offset to center correctly */
    left: 0;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.6s; /* Transition for flipping */
}

/* Front face styles */
.business-card .front {
    background-color: #ffffff; /* White background for the front */
    display: flex; /* Maintain flex to center content if no overlay */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 2; /* Ensure it's on top when not flipped */
    transform: rotateX(0deg); /* Initial X rotation */
    position: relative; /* Required for positioning internal elements */
}

.business-card:hover .front {
    transform: rotateX(180deg); /* Flip 180deg on X to show the back */
}

/* Floating background image on the front */
.front-background-img {
    position: absolute;
    top: 16px;
    right: -39px;
    width: 45%; /* Adjust size to be large */
    height: 100%;
    object-fit: cover; /* Cover the area without distortion */
    z-index: 0; /* Behind the content */
    /* opacity: 0.3; */ /* Semi-transparent so it doesn't obscure text */
}

/* Main content container for the front */
.front-content-wrapper {
    position: relative;
    z-index: 1; /* On top of the background image */
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push the bottom bar to the end */
    padding: 25px; /* Consistent padding for the wrapper */
    color: #000; /* Text color for the front (assuming white background) */
}

/* Top left logo section */
.front-logo-section {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.front-logo-section img {
    width: 313px; /* Larger logo */
    height: auto;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.9); /* White background for the logo */
    padding: 10px;
    border-radius: 8px;
}

/* Colored container at the bottom of the front */
.front-bottom-bar {
    background-color: #3a519f; /* Dark semi-transparent color */
    width: calc(100% + 50px); /* Extend to cover edge to edge */
    margin-left: -25px; /* Move to the left to align */
    margin-right: -25px; /* Move to the right to align */
    padding: 15px 25px; /* Internal padding for content */
    display: flex;
    justify-content: space-between; /* Information left and right */
    align-items: center;
    border-radius: 0 0 0px 0px; /* Rounded corners only at the bottom */
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.3);
    margin-top: auto; /* Push the bar to the end */
    color: #fff; /* Ensure text on the bar is white */
}

.front-bottom-bar .info-left,
.front-bottom-bar .info-right {
    flex: 1; /* Allow both to take space */
}

.front-bottom-bar .info-left {
    text-align: left;
}

.front-bottom-bar .info-right {
    text-align: right;
}

.front-bottom-bar h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.front-bottom-bar p {
    font-size: 16px;
}


/* Back face styles */
.business-card .back {
    background-color: #242424; /* Fallback color if image doesn't load */
    transform: rotateX(-180deg); /* Initial X rotation to be hidden */
    z-index: 1; /* Will be behind the front when not flipped */
    display: flex; /* Use flex to center the content wrapper */
    justify-content: center;
    align-items: center;
}

.business-card:hover .back {
    transform: rotateX(0deg); /* Flip to 0deg on X to show */
}

/* Background image for the back */
.back-background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Adjust image to cover the entire container */
    z-index: 0; /* Ensure it's in the background */
    /* opacity: 0.7; */ /* Adjust opacity for text readability */
}

/* Content container for the back */
.back-content-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Wider left column for services */
    gap: 20px; /* Space between columns */
    width: 100%;
    height: 100%;
    padding: 25px; /* Consistent padding for the wrapper */
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* Ensure content is on top of the background image */
     /* Dark overlay for text readability */
    border-radius: 20px; /* Rounded corners for the overlay */
    padding-bottom: 90px; /* Leave space for the bottom contact box */
}

/* Left column (Services and Contact Box) */
.left-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push the contact box to the bottom */
    color: #fff;
}

.services-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #3ab8b0; /* Distinctive color for the title */
}

.services-free img{
width:180px;
}


.services-list {
    flex-grow: 1; /* Allow the services list to take available space */
    margin-bottom:-1px;
    overflow-y: auto; /* If too many services, allow scrolling */
    padding-right: 5px; /* Small padding for the scrollbar */
}

.service-item {
    display: flex;
    align-items: flex-start; /* Align items to the start so the icon doesn't vertically center with long text */
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.3;
}

.service-item i {
    color: #32a457; /* Check icon color */
    margin-right: 10px;
    font-size: 20px;
}

/* Phone and Email Container (on the back) */
.contact-box {
       background-color: #32a457;
    padding: 0px 1px 3px 1px;
    border-radius: 0px;
    color: #242424;
    margin-left: -33px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    bottom: 0;
    left: 0;
    width: 100%;
    border-radius: 0 0 0px 0px;
    box-sizing: border-box;
    /* Include padding in width */
    z-index: 2; /* Ensure it's on top of the background image */
    /* position: absolute; */ /* Ensure it's absolute to stick to the bottom */
}

.contact-box h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff; /* "Phone" title color */
    text-align: center; /* Center the title */
}

.contact-box .phone-number {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center; /* Center number */
}

.contact-box .corporate-email {
    color: #ffffff;
    font-size: 16px;
    word-break: break-all; /* Break long words to prevent overflow */
    text-align: center; /* Center email */
}

/* Right column (Stars and Website) */
.right-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to the bottom */
    align-items: center; /* Center horizontally */
    color: #fff;
    padding-bottom: 10px; /* Small padding at the bottom */
}

.stars-image-container {
    margin-bottom: 20px; /* Space between stars and website */
}

.stars-image {
    width: 167px; /* Adjust stars image size */
    height: auto;
    object-fit: contain;
}

.website-info .website-url {
    font-size: 18px;
    font-weight: 600;
    color: #f3e547; /* Website URL color */
    text-decoration: none; /* Remove underline if it's a link */
}

/* QR Code */
.qr-code-container {
    position: absolute;
    bottom: 141px;
    right: 74px;
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 3; /* Ensure QR is on top of everything */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    border: 2.5px solid #ffffff;
}

.qr-code-container:hover {
    transform: scale(1.05);
}

.qr-code-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border: 4px solid #ffffff
}

/* Responsiveness (adjustments for smaller screens) */
@media (max-width: 480px) { /* Targeting phone widths like 374px */
    section {
        padding: 5px; /* Smaller padding for the section on mobile */
    }
    .business-card {
  
        width: 100%;
        max-width: 382px;
        margin: auto;
        height: 211px;
        aspect-ratio: 635 / 360; /* Maintain original PC aspect ratio */
    }

    /* Adjustments for both faces (front and back) */
    .business-card .front,
    .business-card .back {
        top: 0;
        left: 0;
        border-radius: 10px; /* Smaller borders for mobile */
    }

    /* Front on mobile */
    .front-background-img {
              width: 41%;
        height: 102%;
        top: 2px;
        right: -24px;
        object-position: center;
        /* opacity: 0.1; */ /* More subtle on mobile */
    }
    .front-content-wrapper {
        padding: 10px; /* More adjusted padding */
        padding-bottom: 60px; /* Space for the bottom bar, adjusted for mobile */
    }
    .front-logo-section {
        justify-content: center;
        margin-bottom: 5px; /* Smaller space */
    }
    .front-logo-section img {
     width: 178px;
        height: 124px;
        padding: 3px;
        margin-right: 177px;
    }
    .front-content-wrapper .company-name-slogan {
        text-align: center;
    }
    .front-left-main .company-name-slogan h3 {
        font-size: 1.3rem; /* Smaller font */
    }
    .front-left-main .company-name-slogan p {
        font-size: 0.8rem;
    }
    .front-left-main .company-name-slogan div {
        font-size: 0.65rem;
    }

    .front-bottom-bar {
       /*  flex-direction: column;  *//* Stack */
        padding: 6px 8px; /* More adjusted padding */
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0 0 0px 0px; /* Adjust borders */
    }
    .front-bottom-bar .info-left,
    .front-bottom-bar .info-right {
        width: 100%;
        padding: 0;
    }
    .front-bottom-bar .info-left {
        margin-bottom: 3px; /* Smaller space */
    }
    .front-bottom-bar h3 {
        font-size: 15px;
    }
    .front-bottom-bar p {
        font-size: 10px;
    }


    /* Back on mobile */
    .back-content-wrapper {
        grid-template-columns: 1fr 1fr; /* Single column */
        gap: 6px; /* Smaller space */
        padding: 10px; /* More adjusted padding */
        padding-bottom: 70px; /* Space for the contact-box, adjusted for mobile */
        border-radius: 10px; /* Adjust borders */
    }

    .services-title {
        font-size: 16px; /* Smaller font */
        text-align: center;
        margin-bottom: 6px;
    }
.services-free img{
width:104px;
}
    .services-list {
        margin-bottom: 8px; /* Smaller margin */
    }
    .service-item {
        font-size: 11px;
        margin-bottom: 3px;
        justify-content: left
    }
    .service-item i {
        font-size: 15px; /* Smaller icon */
        margin-right: 5px;
    }

    .contact-box {
           position: absolute;
        bottom: 0;
        left: 0;
        width: 75%;
        padding: 2px 3px; /* More adjusted padding */
        border-radius: 0 0 0px 0px; /* Adjust borders */
    }

    .contact-box h4 {
     font-size: 10px;
        margin-bottom: 0px;
    }
    .contact-box .phone-number {
        font-size: 12px;
    }
    .contact-box .corporate-email {
        font-size: 10px;
    }

    .right-column {
        justify-content: center;
        padding-bottom: 0;
     margin-top: 147px;
        margin-right: -157px;
    }
    .stars-image-container {
        margin-bottom: 6px;
    }
    .stars-image {
        width: 90px; /* Smaller stars */
    }
    .website-info .website-url {
        font-size: 11px;
    }

    .qr-code-container {
               position: relative;
        bottom: auto;
        right: auto;
        margin-top: 8px;
        left: 0%;
        transform: translateX(-50%);
        width: 74px;
        height: 66px;
        border: 1px solid #ffffff;
    }
}
