/* ==========================================
   ESTILOS VENTANA EMERGENTE VILANOVA PINTURAS
   ========================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
}

.vilanova-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 10px;
    overflow-x: hidden !important;
}

.vilanova-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.vilanova-modal-container {
    background: #ffffff;
    width: 100%;
    max-width: 850px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 5px solid #f0e41f;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden !important;
}

.vilanova-modal-overlay.active .vilanova-modal-container {
    transform: scale(1) translateY(0);
}

.vilanova-modal-close {
    position: absolute;
    top: 12px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    color: #1b2624;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: background 0.2s, transform 0.2s;
}

.vilanova-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.vilanova-modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #faf8f5;
    overflow-y: auto;
    overflow-x: hidden !important;
    width: 100%;
}

/* En dispositivos móviles se muestra la imagen apilada arriba o abajo, sin barra lateral */
@media (max-width: 768px) {
    .vilanova-modal-overlay {
        padding: 5px;
    }
    .vilanova-modal-container {
        max-width: 100%;
        max-height: 96vh;
        border-radius: 15px;
    }
    .vilanova-modal-content {
        grid-template-columns: 1fr; /* Una sola columna apilada */
        max-height: calc(96vh - 50px);
        overflow-y: auto;
        overflow-x: hidden !important;
    }
    /* La imagen se mantiene visible, colocada en bloque con altura adaptable */
    .vilanova-modal-right {
        display: flex !important;
        min-height: 320px !important;
        max-height: 320px !important;
        width: 100% !important;
    }
    .vilanova-modal-left {
        padding: 20px 18px !important;
    }
    .vm-hero-graphic h2 {
        font-size: 1.4rem !important;
    }
}

/* Columna Izquierda */
.vilanova-modal-left {
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    overflow-x: hidden;
}

.vm-badge-header {
    margin-bottom: 12px;
}

.vm-logo {
    max-height: 40px;
    width: auto;
}

.vm-hero-graphic {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.vm-calendar-badge {
    width: 42px;
    height: 42px;
    background-color: #145e28;
    color: #f0e41f;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 6px 15px rgba(20, 94, 40, 0.25);
}

.vm-hero-graphic h2 {
    font-family: 'Anton', sans-serif;
    font-size: 1.6rem;
    line-height: 1.1;
    color: #1b2624;
    letter-spacing: 0.5px;
    margin: 0;
}

.vm-hero-graphic h2 span {
    color: #145e28;
}

.vm-highlight-box {
    background: #e8f5ec;
    border-left: 4px solid #145e28;
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 15px;
}

.vm-highlight-box p {
    font-size: 0.85rem;
    color: #232d29;
    margin: 0;
    line-height: 1.4;
}

.vm-highlight-box strong {
    color: #145e28;
}

.vm-cta-button {
    background: #145e28;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(20, 94, 40, 0.3);
    transition: all 0.3s ease;
    width: 100%;
}

.vm-cta-button:hover {
    background: #0f471e;
    transform: translateY(-2px);
}

.vm-cta-icon {
    width: 36px;
    height: 36px;
    background: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.vm-cta-text {
    display: flex;
    flex-direction: column;
}

.vm-cta-title {
    font-family: 'Anton', sans-serif;
    font-size: 1rem;
    color: #f0e41f;
    letter-spacing: 0.5px;
}

.vm-cta-subtitle {
    font-size: 0.75rem;
    color: #e2e8f0;
}

/* Columna Derecha: Imagen Estilizada */
.vilanova-modal-right {
    position: relative;
    background: #145e28;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vm-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.vm-image-container {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    z-index: 2;
}

.vm-image-badge {
    background: rgba(27, 38, 36, 0.85);
    backdrop-filter: blur(5px);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,0.2);
}

.vm-image-badge i {
    color: #f0e41f;
}

/* Footer del Modal */
.vilanova-modal-footer {
    background: #f1f5f9;
    padding: 10px 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    width: 100%;
}

.vm-checkbox-label {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.vm-checkbox-label input {
    cursor: pointer;
    accent-color: #145e28;
    width: 14px;
    height: 14px;
}
