/* ==========================================
   MODAL DE ORGANIZACIONES - RESCOP
   Estilo elegante con más tracking y aire
   ========================================== */

/* === OVERLAY Y CONTENEDOR PRINCIPAL === */
.rescop-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* === CONTENEDOR DEL MODAL === */
.rescop-modal-container {
    background: white;
    border-radius: 16px;
    
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.rescop-modal-overlay.active .rescop-modal-container {
    transform: scale(1);
}

/* === HEADER CON BOTÓN CERRAR === */
.rescop-modal-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.rescop-modal-close {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rescop-modal-close:hover {
    background: white;
    transform: scale(1.05);
}

.rescop-modal-close svg {
    color: #666;
    transition: color 0.2s ease;
}

.rescop-modal-close:hover svg {
    color: #BE252D;
}

/* === CONTENIDO DEL MODAL === */
.rescop-modal-content {
    padding: 40px;
    padding-top: 50px;
    position: relative;
}

/* === LOGO === */
.rescop-org-modal-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.rescop-org-modal-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
}

.rescop-org-modal-logo-placeholder {
    width: 80px;
    height: 80px;
    background: #F5F5F5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-family: 'Merriweather Sans', sans-serif;
    font-weight: 400;
}

.rescop-org-modal-logo-placeholder::after {
    content: 'Logo';
}

/* === REGIÓN/TAG === */
.rescop-org-modal-region {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.rescop-org-modal-region span {
    background: linear-gradient(0deg, #BE252D 0%, #BE252D 100%);
    color: white;
    font-size: 11px;
    font-family: 'Merriweather Sans', sans-serif;
    font-weight: 500;
    letter-spacing: 0.5px; /* MÁS TRACKING */
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 8px;
}

/* === TÍTULO === */
.rescop-org-modal-title {
    color: black;
    font-size: 18px;
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    line-height: 22px;
    letter-spacing: 0.3px; /* MÁS TRACKING */
    text-align: center;
    margin: 0 0 30px 0;
    word-wrap: break-word;
    padding: 0 10px;
}

/* === CONTACTOS === */
.rescop-org-modal-contacts {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.rescop-org-modal-contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(0, 0, 0, 0.8);
    font-size: 13px;
    font-family: 'Merriweather Sans', sans-serif;
    font-weight: 400;
    letter-spacing: 0.2px; /* MÁS TRACKING */
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    min-width: 200px;
    justify-content: flex-start;
}

.rescop-org-modal-contact-link:hover {
    color: #BE252D;
    background: rgba(190, 37, 45, 0.05);
    border-color: rgba(190, 37, 45, 0.1);
    transform: translateY(-1px);
}

.rescop-org-modal-contact-link svg {
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.rescop-org-modal-contact-link:hover svg {
    color: #BE252D;
}

.rescop-org-modal-contact-link span {
    flex: 1;
    word-break: break-all;
}

/* === DESCRIPCIÓN === */
.rescop-org-modal-description {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.rescop-org-modal-description p {
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
    font-family: 'Merriweather', serif;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.1px; /* MÁS TRACKING */
    margin: 0;
    padding: 0 10px;
}

.rescop-org-modal-description p em {
    font-style: italic;
    color: rgba(0, 0, 0, 0.5);
}

/* === PREVENIR SCROLL DEL BODY === */
body.modal-open {
    overflow: hidden;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .rescop-modal-container {
        width: 95%;
        max-width: none;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
    
    .rescop-modal-content {
        padding: 30px 25px;
        padding-top: 50px;
    }
    
    .rescop-org-modal-title {
        font-size: 16px;
        line-height: 20px;
        padding: 0 5px;
    }
    
    .rescop-org-modal-contact-link {
        min-width: auto;
        width: 100%;
        font-size: 12px;
        padding: 10px 16px;
    }
    
    .rescop-org-modal-region span {
        font-size: 10px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .rescop-modal-content {
        padding: 25px 20px;
        padding-top: 45px;
    }
    
    .rescop-org-modal-logo img,
    .rescop-org-modal-logo-placeholder {
        width: 60px;
        height: 60px;
    }
    
    .rescop-org-modal-title {
        font-size: 15px;
        line-height: 18px;
        margin-bottom: 25px;
    }
    
    .rescop-org-modal-contacts {
        gap: 12px;
        margin-bottom: 25px;
    }
    
    .rescop-modal-header {
        top: 15px;
        right: 15px;
    }
    
    .rescop-modal-close {
        width: 35px;
        height: 35px;
    }
}