/* ==========================================================================
   ESTRUCTURA GENERAL DEL CATÁLOGO
   ========================================================================== */
h2, h2 span, h3, h4, .doctor-specialty-label, .code-item, .schedule-text, label, .cjp-breadcrumbs a, .cjp-breadcrumbs span, .staff-filters input, .badge-teleconsulta, .badge-staff-cjp, .btn-toggle-view-more, .cjp-mobile-filter-trigger, .doctor-schedule-box .schedule-text strong, .staff-filters .staff-filter-buttons button, .badge-count, .btn-toggle-schedules, .schedule-cloud h6, .cloud-spec-name, .cloud-spec-date, .cjp-empty{
	font-family: 'Montserrat';
}
.staff-main-wrapper{
	max-width: 1270px;
	margin: 0 auto;
	padding: 50px 20px;
}
.staff-container {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 44px;
}

.hide{
	display: none !important;
}
/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.cjp-breadcrumbs {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}
.cjp-breadcrumbs a {
    color: #395CAF;
    text-decoration: none;
    font-weight: 500;
}
.cjp-breadcrumbs a:hover {
    text-decoration: underline;
}
.cjp-breadcrumbs .separator {
    margin: 0 8px;
    color: #ccc;
}
.cjp-breadcrumbs .current {
    color: #232C5A;
    font-weight: 600;
}

/* ==========================================================================
   SECCIÓN DE FILTROS (ASIDE)
   ========================================================================== */
.staff-filters {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
}

.staff-filters h4 {
    font-size: 18px;
    font-weight: bold;
    color: #203166;
    letter-spacing: 0.01em;
    margin-top: 0;
    margin-bottom: 0;
}

.staff-filters input, 
.staff-filters select, 
.staff-filters .staff-filter-buttons button {
    border-radius: 50px;
    padding: 13px 20px;
    font-size: 14px;
    color: #203166;
    font-weight: 500;
    width: 100%;
    border: 1px solid #395CAF;
    background-color: #fff;
    box-sizing: border-box;
}

.staff-filters input::placeholder {
    font-weight: 300;
    color: #232C5A;
}

.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.filter-input-group label {
    font-size: 14px;
    font-weight: bold;
    color: #203166;
}

/* Encabezados de grupo con soporte para Badges dinámicos */
.filter-group-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-group-wrapper label {
    font-size: 14px;
    font-weight: bold;
    color: #203166;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Badge de elementos seleccionados */
.badge-count {
    color: #203166 !important;
    font-size: 12px;
    font-weight: 500;
	letter-spacing: 1%;
}
.badge-count b{
	font-weight: 700;
}
/* Contenedores de Scroll Internos */
.filter-scroll-container {
    padding: 20px;
    border-radius: 12px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    row-gap: 7px;
    position: relative;
	max-height: 800px;
}

.filter-scroll-inner {
    max-height: 205px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    row-gap: 15px;
    padding-right: 5px;
}

.filter-scroll-container.rm-mh .filter-scroll-inner {
    max-height: initial;
    overflow-y: visible;
}

.filter-scroll-inner::-webkit-scrollbar {
    width: 5px;
}
.filter-scroll-inner::-webkit-scrollbar-track {
    background: #F4F9FF;
    border-radius: 10px;
}
.filter-scroll-inner::-webkit-scrollbar-thumb {
    background: #395CAF;
    border-radius: 10px;
}
.checkbox-item.hidden-item-cjp {
    opacity: 0.4; 
    transition: opacity 0.2s ease;
}

/* Cuando el contenedor NO está expandido, ocultamos el desbordamiento físico mediante el max-height del inner */
.filter-scroll-container:not(.rm-mh) .checkbox-item.hidden-item-cjp {
    /* El max-height de .filter-scroll-inner se encarga de recortarlos limpiamente */
}

/* Checkboxes e Ítems Colapsables */
.checkbox-item {
    display: flex;
    align-items: center;
    column-gap: 14px;
    transition: opacity 0.2s ease;
	position: relative;
}

.checkbox-item.hidden-item-cjp {
    display: none !important;
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #395CAF;
    cursor: pointer;
    margin: 0;
}

.checkbox-item label {
	font-size: 13px;
    font-weight: 500;
    color: #203166;
    cursor: pointer;
    user-select: none;
	line-height: 130%;
}
.overlay-mobile{
	display:none;
}
/* Botón Ver Más / Ver Menos */
.btn-toggle-view-more {
    background: transparent;
    border: none;
    color: #203166;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    padding: 4px 0 0 0;
    display: inline-block;
    align-self: flex-start;
    transition: color 0.2s ease;
    text-decoration: underline;
}
.btn-toggle-view-more:hover {
    color: #203166;
    text-decoration: underline;
}

/* Botones de Acción de Filtros */
.staff-filter-buttons {
    display: flex;
    justify-content: space-between;
    column-gap: 12px;
    margin-top: 5px;
}

.staff-filters .staff-filter-buttons button {
    font-weight: bold;
    width: auto;
	padding: 18px;
    font-size: 13px;
    border-color: #395CAF;
    color: #232C5A;
    background-color: #F4F9FF;
    border-width: 1px;
    border-style: solid;
    cursor: pointer;
    transition: all 0.2s ease;
}

.staff-filters .staff-filter-buttons button:hover {
    opacity: 0.9;
    background-color: #EBF8FF;
}

.staff-filters #btn-aplicar-filtros {
    background-color: #CEF2FF;
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 10px;
}

/* ==========================================================================
   CONTENIDO DE RESULTADOS (GRID)
   ========================================================================== */
.staff-results-content {
    display: flex;
    flex-direction: column;
}

.staff-results-header {
    margin: 0 0 20px;
}

.staff-results-header h2 {
    color: #033E8C;
    font-weight: bold;
    font-size: 22px;
    margin: 0;
}

.staff-results-header h2 #staff-total {
    font-weight: 400;
    font-size: 18px;
    color: #4A5568;
    margin-left: 5px;
}

.doctors-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

#cjp-related-grid {
	display:grid;
	grid-template-columns:repeat(3,minmax(290px,1fr));
	gap:20px;
	justify-items:center;
}
.elementor-shortcode #cjp-related-grid {
	grid-template-columns:repeat(4,minmax(290px,1fr));
}
/* ==========================================================================
   TARJETA MÉDICA (DOCTOR CARD)
   ========================================================================== */
/* ESPECIALIDADES PHP */ 
#specialists-container-3 .doctor-card{
	margin: 0 auto;
}

.doctor-card {
	max-width: 290px;
	width: 100%;
    background: #fff;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(35, 44, 90, 0.08);
}

/* Contenedor de imagen y badge absoluto */
.doctor-image-wrapper {
    height: 190px;
    overflow: hidden;
    background-color: #f4f9ff;
    position: relative;
	border-radius: 10px 10px 0 0;
}

.doctor-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: top;
/* 	filter: blur(0.25px); */
}

/* Badge Flotante de Teleconsulta */
.badge-teleconsulta {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #00CB21;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 6px 2px;
    border-radius: 6px;
    text-align: center;
    max-width: 80px;
    line-height: 12px;
}

/* Cuerpo de la tarjeta */
.doctor-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
	line-height: normal;
    row-gap: 6px;
}

.doctor-specialty-label {
	color: #25AEEC;
	font-size: 12px;
	font-weight: 500;
	margin-bottom: 7px;
	letter-spacing: 1%;
}

.doctor-body h3 {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    color: #232C5A;
    line-height: 120%;
}

/* Códigos Médicos (CMP, RNE, RNSE) */
.doctor-metadata-codes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.doctor-metadata-codes .code-item {
    background-color: #F4F9FF;
    font-size: 10px;
    font-weight: 600;
    color: #232C5A;
    border-radius: 2px;
	padding: 8px 10px;
}

/* Caja de Próxima Cita */
.doctor-schedule-box {
	margin-bottom: 9px;
	position: relative;
}
.schedule-main-line{
	font-size: 12px;
    font-weight: 500;
    display: flex;
    column-gap: 8px;
    align-items: flex-start;
    color: #232C5A;
}
.doctor-schedule-box .calendar-icon {
    font-size: 13px;
}
.doctor-schedule-box .schedule-text strong {
    font-weight: 600;
}
.btn-toggle-schedules{
	background-color: transparent;
    border: none;
    min-width: 16px;
    min-height: 16px;
    padding: 0;
    position: relative;
    top: 4px;
	cursor: pointer;
	flex-shrink: 0;
}
.schedule-container {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	flex: 1; 
	width: 100%;
}
.schedule-container:has(.schedule-long) img {
	margin-top: 3px;
}
.schedule-main-line.no-schedule-line {
    opacity: .5;
}

.cloud-schedules-container {
    display: flex;
    flex-wrap: wrap;
    row-gap: 8px;
}

.schedule-cloud h6{
	font-size:12px;
	line-height: 18px;
	font-weight: 400;
	color: #232C5A;
}

/* Badge Institucional CJP Staff */
.badge-staff-cjp {
    display: flex;
    align-items: center;
    column-gap: 15px;
    font-size: 11px;
    font-weight: 400;
    color: #fff;
    border-radius: 8px 8px 0 0;
    position: absolute;
    bottom: 0;
    background-color: #395CAF;
    left: 50%;
    transform: translateX(-50%);
    max-width: 185px;
    width: 100%;
}
.container-ico-staff {
    padding: 7px;
    background-color: #203166;
    border-radius: 8px 0 0 0;
}
.badge-staff-cjp img{
	max-width: 15px;
	width: 100%;
}
.badge-staff-cjp span {
    background-color: #033E8C;
    color: #fff;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

/* Acciones Inferiores (Alineadas abajo) */
.doctor-card-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.doctor-card-actions a {
    font-size: 13px;
    border: 1.5px solid #395CAF;
    color: #232C5A;
    background-color: #F4F9FF;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.2s ease;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 0;
    font-weight: 500;
	max-width: 120px;
    margin: 0 auto;
}

.doctor-card-actions .btn-view-profile:hover {
    background-color: #E2E8F0;
}

.doctor-card-actions .btn-book-appointment {
    background-color: #CEF2FF;
}
.doctor-card-actions .btn-book-appointment:hover {
    background-color: #B4E8FC;
}

/* ==========================================================================
   PAGINACIÓN
   ========================================================================== */
.staff-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.staff-pagination .page-item-btn {
    border: none;
    background: transparent;
    color: #1b4e8a;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 14px;
    border-radius: 50px;
    transition: all 0.2s;
    font-size: 14px;
}

.staff-pagination .page-item-btn.active {
    background: #1b4e8a;
    color: #fff;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.staff-pagination .page-item-btn:hover:not(.active) {
    background-color: #f4f9ff;
}

/* ==========================================================================
   ESTADOS DE CARGA Y ERRORES
   ========================================================================== */
.catalog-loading, .catalog-empty, .catalog-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    font-size: 14px;
    color: #232C5A;
    background: #F4F9FF;
    border-radius: 14px;
    border: 1px dashed #395CAF;
}

.cjp-mobile-filter-trigger {
    display: none; /* Oculto en Desktop por defecto */
    background-color: #232C5A;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cjp-mobile-filter-trigger:hover {
    background-color: #395CAF;
}

/* Encabezado del filtro dentro del Drawer Mobile (Oculto en Desktop) */
.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.mobile-drawer-header .close-drawer-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #203166;
    cursor: pointer;
    line-height: 1;
}
.close-modal{
	display:none;
}
.checkbox-item input {
    box-shadow: none;
    opacity: 0;
}


.checkbox-item label:after,
.checkbox-item label:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 2px;
    left: 0px;
    font-size: 0px;
    z-index: 1;
    transition: all .3s linear;
    -webkit-transition: all .3s linear;
}

.checkbox-item label:after, .checkbox-item label:before {
    border: 1px solid #395CAF !important;
    background-color: #fff;
/* 	background-color: transparent; */
}
.checkbox-item input[type="checkbox"]:checked + label:after {
    background-color: #395CAF; /* Fondo morado */
    border-color: #395CAF;
    background-image: url('/wp-content/plugins/jb-cjp-medical-catalog/assets/img/icon-checkbox-cjp.svg');
    background-size: 12px; 
    background-repeat: no-repeat;
    background-position: center;
}
/* .checkbox-item label:before {
    background-color: #743DBC !important;
    background-image: url('/wp-content/uploads/2025/02/check.png');
} */
.swiper-wrapper.cjp-related-slider{
	padding:10px 0;
}
.swiper-wrapper.cjp-related-slider .doctor-card{
	border: 1px solid #232c5a14;
}
.cjp-empty{
    text-align: center;
    padding: 10px 0 30px;
    font-family: 'Montserrat';
    font-weight: 500;

}
@media (min-width:768px){
	.schedule-cloud{
		padding: 20px 14px;
		background-color: #F4F9FF;
		border: 1.5px solid #232C5A4D;
		border-radius:8px;
		position: absolute;
		top: -110px;
		left: -2px;
		min-width: 280px;
		display:none;
	}
	.doctor-schedule-box:has(.btn-toggle-schedules:hover) .schedule-cloud,
	.schedule-cloud:hover {
		display: block;
	}
	.schedule-cloud:before, .schedule-cloud:after {
		content: "";
		position: absolute;
		top: 100%;
		right: 24px;
		border-width: 10px;
		border-style: solid;
		display: block;
		width: 0;
	}
	.schedule-cloud:before{
		border-color: #232C5A4D transparent transparent transparent;
	}
	.schedule-cloud:after {
		border-color: #F4F9FF transparent transparent transparent;
		margin-top: -1.5px;
	}
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .staff-container {
        grid-template-columns: 270px 1fr;
        gap: 20px;
    }
	.filter-group-wrapper {
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.staff-main-wrapper, .filter-scroll-container  {
		padding: 0px;
	}
	.overlay-mobile.show-overlay{
		position:fixed;
		background-color:#00000099;
		top:0;
		right:0;
		width: 100%;
        height: 100%;
	}
	.overlay-mobile.show-overlay{
		display:block;
	}
	.zi3{
		z-index:3;
	}
	.cjp-breadcrumbs, .staff-results-header-container{
		padding:5px 20px;
		position: relative;
		margin: 0;
		background-color: #fff;
	}
	#staff-total{
		display: block;
		margin-top: 10px;
	}
	
	.filter-scroll-inner {
        max-height: calc(100dvh - 332px);
    }
    .cjp-mobile-filter-trigger {
        display: block;
        position: absolute;
        right: 20px;
        bottom: 25px;
		font-size:13px;
		display: flex;
		align-items:center;
		column-gap:10px;
    }
	.cjp-mobile-filter-trigger svg{
		max-width: 18px;
	}

    .staff-container {
        grid-template-columns: 1fr; 
        gap: 20px;
		background-color: #F4F9FF;
		padding: 35px 0;
    }
    .staff-filters {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: 85vw;
        height: 100vh;
        background-color: #ffffff;
        z-index: 99999;
        padding: 24px;
        box-sizing: border-box;
        overflow-y: auto;
        transition: left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -6px 0 25px rgba(0,0,0,0.15);
		justify-content: space-between;
    }
	.close-modal {
		display:block;
		max-width: 14px !important;
		position: absolute;
		right: 20px;
		width: 100%;
		cursor: pointer;
	}
	.btn-toggle-schedules{
		display:none;
	}
	.schedule-cloud {
		position: relative;
		top: 0;
		left: 0;
		min-width: auto;
		padding: 0;
		background: transparent;
		border: none;
	}
	.schedule-main-line:not(:last-child){
		margin-bottom: 10px;
	}
	.schedule-cloud h6{
		display:none;
	}
    .staff-filters.drawer-open {
        left: 0;
		padding:14px 0 0;
    }
	.staff-filters.drawer-open > h4, .staff-filters.drawer-open > div {
        padding-left:20px;
		padding-right: 20px;
    }
	.staff-filter-buttons {
		box-shadow: 2px -10px 25px 0 #2031661C;
		padding-top: 15px;
		padding-bottom: 15px;
		margin: 0;
	}

    .mobile-drawer-header .close-drawer-btn {
        display: block; 
    }
	#cjp-related-grid, .elementor-shortcode #cjp-related-grid  {
		grid-template-columns:repeat(2,minmax(200px,1fr));
	}

    .doctors-grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
		justify-items: center;
    }
	.staff-results-content {
		max-width: 320px;
		margin: 0 auto;
		width: 100%;
	}
	.staff-results-header h2 {
		line-height: 30px;
		font-size: 20px;
	}
/* 	.staff-pagination{
		justify-content: space-between;
	} */
	.staff-pagination .page-item-btn.prev-next-btn {
		padding: 0px;
		font-size: 0px;
		background: url('/wp-content/uploads/2026/05/arrow-cjp.svg')no-repeat;
		width: 8px;
		height: 14px;
		background-color: transparent;
		padding: 0;
	}
	.staff-pagination .page-item-btn.prev-next-btn:last-child{
		transform: scaleX(-1);
	}
}

@media (max-width: 576px) {
	#cjp-related-grid, .elementor-shortcode #cjp-related-grid {
		grid-template-columns:repeat(1,minmax(290px,1fr));
	}
}