/* ==========================================================================
   MODERN CONTACT SUMMARY - DOLCE VITA (Flip Cards Edition)
   ========================================================================== */

.modern-contact-section {
    padding: 60px 0;
    background: #fff;
    text-align: center;
    overflow: hidden;
}

.modern-contact-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #26155E;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.modern-contact-section p.sub-text {
    font-size: 1.1rem;
    color: #888;
    margin-bottom: 60px;
}

/* FLIP CARDS CONTAINER */
.contact-cards-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap; /* Forces one row on desktop */
    perspective: 1500px;
}

/* FLIP CARD BASE */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 260px;
    perspective: 1000px;
    flex: 1;
    min-width: 200px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* FRONT & BACK STYLING */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    border: 2px solid #5B41FF;
    background: #fff;
    box-shadow: 0 10px 30px rgba(38, 21, 94, 0.05);
}

.flip-card-front span {
    font-size: 48px;
    color: #5B41FF;
    margin-bottom: 25px;
}

.flip-card-front h4 {
    font-size: 20px;
    font-weight: 700;
    color: #26155E;
    margin: 0;
}

/* BACK STYLING (Dark Theme) */
.flip-card-back {
    transform: rotateY(180deg);
    background: #26155E;
    color: #fff;
    border-color: #26155E;
    text-decoration: none !important;
}

.flip-card-back p {
    font-size: 14px;
    color: #A49BFF;
    margin-bottom: 12px;
    font-weight: 500;
}

.flip-card-back h4 {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* VARIATION: Trabaja con nosotros */
.flip-card-front.card-green {
    background: #F0F4FF;
    border-color: #5B41FF;
}

/* MODERN MODAL STYLES */
.modern-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    background: rgba(18, 10, 48, 0.9); /* Darker and more opaque */
    backdrop-filter: blur(10px);
    padding: 20px;
}

.modern-modal.active {
    display: flex;
}

.modal-overlay-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 650px; /* Increased for 2 columns */
    max-height: 95vh; /* Ensure it fits height */
    overflow-y: auto; /* Internal scroll if too tall */
    padding: 35px 35px;
    border-radius: 30px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.5);
    z-index: 10;
    margin: 0;
}

.modal-header {
    display: block !important;
    text-align: left;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-size: 24px;
    line-height: 1.2;
    font-weight: 700;
    color: #26155E;
    margin-bottom: 5px;
    display: block !important;
    width: 100%;
}

.modal-header p {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
    display: block !important;
    width: 100%;
}

.modal-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    font-size: 32px;
    color: #888;
    cursor: pointer;
    line-height: 1;
}

.modal-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #26155E;
    margin-bottom: 10px;
}

.form-group-modern {
    margin-bottom: 20px;
    text-align: left;
}

.modal-form select, 
.modal-form input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: 2px solid #E6EBFF;
    outline: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.modal-form input:focus {
    border-color: #5B41FF;
}

/* RESPONSIVE */
@media (max-width: 991px) {
    .modern-contact-section {
        padding: 60px 20px;
    }
    .flip-card {
        flex: 1 0 100%;
        max-width: 100%;
    }
    .modal-content {
        padding: 25px 20px;
        border-radius: 20px;
        margin: 20px auto;
    }
    .modal-header h3 {
        font-size: 1.2rem;
    }
    .modal-header p {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }
}

/* BOOKING MODAL SPECIFIC & COMPACT */
#booking-modal .btn--theme {
    background-color: #5B41FF !important;
    border-color: #5B41FF !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 12px;
    padding: 14px;
}

#booking-modal .btn--theme:hover {
    background-color: #4831d4 !important;
}

@media (max-width: 575px) {
    #booking-modal .modal-content {
        padding: 25px 20px;
        margin: 10px auto;
    }
    .modal-header h3 {
        font-size: 20px;
    }
    .modal-header p {
        font-size: 13px;
    }
    .modal-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
    }
}
