/* ==============================================================
   PRUEBAS DEPORTIVAS - LISTADO MODERNO Y FIX DE IMÁGENES
   ============================================================== */

.pd-pruebas-page {
	padding: 10px 0 40px;
	background: #f8fafc;
	min-height: calc(100vh - 200px);
}

.pd-header-banner {
	text-align: center;
	margin: 15px 0 25px;
}

.pd-page-title {
	font-size: 30px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 8px;
	letter-spacing: -0.5px;
}

.pd-page-subtitle {
	font-size: 15px;
	color: #64748b;
	margin: 0;
	font-weight: 400;
}

/* --------------------------------------------------------------
   BUSCADOR Y FILTROS (.pd-finder)
   -------------------------------------------------------------- */
.pd-finder {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 18px 20px;
	margin: 0 0 16px;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.pd-finder-search {
	display: flex;
	gap: 10px;
}

.pd-search-input-wrap {
	position: relative;
	flex: 1;
}

.pd-search-icon {
	position: absolute;
	left: 14px;
	top: 14px;
	color: #94a3b8;
	font-size: 15px;
	pointer-events: none;
}

.pd-search-input-wrap input[type="text"] {
	width: 100%;
	height: 44px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 0 14px 0 38px;
	font-size: 14px;
	background: #ffffff;
	color: #1e293b;
	transition: border-color 0.2s, box-shadow 0.2s;
	box-sizing: border-box;
}

.pd-search-input-wrap input[type="text"]:focus {
	outline: none;
	border-color: #0284c7;
	box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.pd-btn-buscar {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	color: #ffffff;
	border: 0;
	border-radius: 8px;
	padding: 0 24px;
	font-weight: 700;
	font-size: 14px;
	height: 44px;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
	transition: opacity 0.2s, transform 0.1s;
}

.pd-btn-buscar:hover {
	opacity: 0.95;
	transform: translateY(-1px);
}

.pd-finder-filters {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid #f1f5f9;
}

.pd-filter-group label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #475569;
	margin-bottom: 5px;
}

.pd-filter-group label i {
	color: #0284c7;
	margin-right: 4px;
}

.pd-filter-group select,
.pd-filter-group input[type="date"] {
	width: 100%;
	height: 38px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0 10px;
	background: #ffffff;
	font-size: 13px;
	color: #334155;
	box-sizing: border-box;
	transition: border-color 0.2s;
}

.pd-filter-group select:focus,
.pd-filter-group input[type="date"]:focus {
	outline: none;
	border-color: #0284c7;
}

.pd-finder-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 8px 0 20px;
	font-size: 14px;
	color: #64748b;
}

.pd-count-badge {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	color: #334155;
	box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.pd-count-badge strong {
	color: #0f172a;
}

.pd-clear-filters {
	color: #dc2626;
	background: #fef2f2;
	border: 1px solid #fee2e2;
	border-radius: 20px;
	padding: 5px 14px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background 0.2s;
}

.pd-clear-filters:hover {
	background: #fee2e2;
	color: #b91c1c;
}

/* --------------------------------------------------------------
   GRID DE TARJETAS (.pd-cards-grid)
   -------------------------------------------------------------- */
.pd-cards-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 16px 0 32px;
}

/* --------------------------------------------------------------
   TARJETA MODERNA (.pd-card)
   -------------------------------------------------------------- */
.pd-card {
	background: #ffffff;
	border-radius: 14px;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
	display: flex;
	flex-direction: column;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.pd-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.14);
	border-color: #cbd5e1;
}

.pd-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none !important;
	color: inherit;
}

/* --------------------------------------------------------------
   POSTER AMBIENT BACKDROP (CERO CORTE DE IMÁGENES RECTANGULARES)
   -------------------------------------------------------------- */
.pd-card-poster {
	position: relative;
	height: 250px;
	background: #0f172a;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pd-poster-backdrop {
	position: absolute;
	top: -15%;
	left: -15%;
	width: 130%;
	height: 130%;
	background-size: cover;
	background-position: center;
	filter: blur(16px) brightness(0.55) saturate(1.3);
	opacity: 0.88;
	transform: scale(1.15);
	pointer-events: none;
}

.pd-poster-img {
	position: relative;
	z-index: 2;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain !important;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
	border-radius: 3px;
	transition: transform 0.3s ease;
	display: block;
}

.pd-card:hover .pd-poster-img {
	transform: scale(1.02);
}

/* Tile de fecha flotante */
.pd-date-tile {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	background: #ffffff;
	border-radius: 10px;
	width: 50px;
	height: 52px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.9);
}

.pd-date-day {
	font-size: 19px;
	font-weight: 800;
	line-height: 1.05;
	color: #0f172a;
}

.pd-date-month {
	font-size: 11px;
	font-weight: 800;
	line-height: 1;
	color: #e11d48;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-top: 1px;
}

/* Badge de deporte flotante */
.pd-sport-badge {
	position: absolute;
	bottom: 12px;
	left: 12px;
	z-index: 3;
	background: rgba(15, 23, 42, 0.85);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 14px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pd-sport-badge i {
	color: #38bdf8;
}

/* --------------------------------------------------------------
   CUERPO DE LA TARJETA (.pd-card-body)
   -------------------------------------------------------------- */
.pd-card-body {
	padding: 16px 18px 12px;
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #ffffff;
}

.pd-card-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
	margin: 0 0 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 43px;
	transition: color 0.2s ease;
}

.pd-card:hover .pd-card-title {
	color: #0284c7;
}

.pd-card-location {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #64748b;
	margin-bottom: 10px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pd-card-location i {
	color: #e11d48;
	font-size: 13px;
	flex-shrink: 0;
}

.pd-card-meta-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.pd-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 12px;
	color: #475569;
	font-weight: 500;
}

.pd-meta-item i {
	color: #64748b;
}

.pd-meta-hora {
	background: #f8fafc;
	border-color: #e2e8f0;
	color: #334155;
}

.pd-meta-hora i {
	color: #0284c7;
}

.pd-meta-dist {
	background: #eef2ff;
	border-color: #c7d2fe;
	color: #3730a3;
	font-weight: 700;
}

.pd-meta-dist i {
	color: #6366f1;
}

.pd-meta-insc {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #166534;
	font-weight: 600;
}

.pd-meta-insc i {
	color: #16a34a;
}

.pd-meta-price {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #065f46;
	font-weight: 700;
}

.pd-meta-price i {
	color: #059669;
}

.pd-card-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding-top: 6px;
}

.rating-stars {
	color: #f59e0b;
	font-size: 13px;
	margin: 0;
}

.pd-rating-count {
	font-size: 12px;
	color: #94a3b8;
}

/* --------------------------------------------------------------
   PIE DE LA TARJETA (.pd-card-footer)
   -------------------------------------------------------------- */
.pd-card-footer {
	padding: 10px 18px 14px;
	border-top: 1px solid #f1f5f9;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	background: #ffffff;
}

.pd-card-btn {
	font-size: 13px;
	font-weight: 700;
	color: #0284c7;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: gap 0.2s ease, color 0.2s ease;
}

.pd-card:hover .pd-card-btn {
	gap: 10px;
	color: #0369a1;
}

/* --------------------------------------------------------------
   ESTADO VACÍO (.pd-finder-empty)
   -------------------------------------------------------------- */
.pd-finder-empty {
	text-align: center;
	padding: 48px 24px;
	background: #ffffff;
	border: 2px dashed #cbd5e1;
	border-radius: 14px;
	margin: 24px 0;
}

.pd-empty-icon {
	font-size: 48px;
	color: #94a3b8;
	margin-bottom: 12px;
}

.pd-finder-empty h3 {
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 6px;
}

.pd-finder-empty p {
	font-size: 15px;
	color: #64748b;
	margin: 0 0 16px;
}

/* --------------------------------------------------------------
   PAGINACIÓN
   -------------------------------------------------------------- */
.pd-pagination-wrap {
	margin: 20px 0;
}

.pagination {
	margin: 20px 0;
	display: inline-flex;
	border-radius: 8px;
	gap: 4px;
}

.pagination > li {
	display: inline;
}

.pagination > li > a,
.pagination > li > span {
	position: relative;
	float: none;
	padding: 8px 14px;
	line-height: 1.42857143;
	text-decoration: none !important;
	color: #334155;
	background-color: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px !important;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.15s, border-color 0.15s;
}

.pagination > .active > a,
.pagination > .active > span {
	z-index: 2;
	color: #ffffff !important;
	background-color: #0284c7 !important;
	border-color: #0284c7 !important;
	cursor: default;
}

.pagination > li > a:hover {
	background-color: #f1f5f9;
	border-color: #94a3b8;
	color: #0f172a;
}

/* --------------------------------------------------------------
   COMPATIBILIDAD CON VISTAS LEGADAS (.prueba-list)
   (Corrige recorte de imágenes también en home y otras secciones)
   -------------------------------------------------------------- */
.prueba-list {
	background: #fff;
	padding: 12px;
	margin-bottom: 20px;
	border-radius: 10px;
	border: 1px solid #e2e8f0;
	transition: all .3s ease;
	box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

.prueba-list:hover {
	box-shadow: 0 10px 22px rgba(0,0,0,.09);
	transform: translateY(-3px);
}

.prueba-list img {
	max-height: 220px;
	object-fit: contain !important;
	width: 100%;
	background: #0f172a;
	border-radius: 6px;
	display: block;
	margin: 0 auto;
}

.prueba-list h3 {
	font-size: 16px;
	margin: 10px 0 6px;
	line-height: 1.35;
	height: 44px;
	overflow: hidden;
	color: #0f172a;
}

.prueba-list .location {
	color: #64748b;
	font-size: 13px;
	margin-bottom: 6px;
}

.prueba-list .meta {
	list-style: none;
	padding: 0;
	margin: 8px 0 0;
	font-size: 13px;
	color: #64748b;
}

/* --------------------------------------------------------------
   RESPONSIVE DESIGN (Móviles y Tablets)
   -------------------------------------------------------------- */
@media (max-width: 991px) {
	.pd-cards-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 18px;
	}
	.pd-finder-filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.pd-card-poster {
		height: 230px;
	}
}

@media (max-width: 600px) {
	.pd-cards-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.pd-finder-search {
		flex-direction: column;
	}
	.pd-btn-buscar {
		width: 100%;
		justify-content: center;
	}
	.pd-finder-filters {
		grid-template-columns: 1fr;
	}
	.pd-finder-meta {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}
	.pd-page-title {
		font-size: 24px;
	}
	.pd-card-poster {
		height: 240px;
	}
}

/* ==============================================================
   UNIVERSAL TEXTAREA FIX & ENHANCEMENT (Legibilidad y Usabilidad)
   ============================================================== */
textarea, textarea.form-control, .form-group textarea, .form-control textarea, .table textarea {
	display: block !important;
	width: 100% !important;
	min-height: 100px !important;
	height: auto !important;
	color: #2b3a4a !important;
	background-color: #ffffff !important;
	font-size: 14px !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
	font-weight: 400 !important;
	line-height: 1.6 !important;
	border: 1px solid #ccd0d5 !important;
	border-radius: 6px !important;
	padding: 10px 14px !important;
	resize: vertical !important;
	box-sizing: border-box !important;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05) !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
	-webkit-appearance: none !important;
}

textarea:focus, textarea.form-control:focus, .form-group textarea:focus {
	color: #111827 !important;
	background-color: #ffffff !important;
	border-color: #4caf50 !important;
	outline: 0 !important;
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

textarea::placeholder, textarea.form-control::placeholder {
	color: #9ca3af !important;
	opacity: 1 !important;
	font-style: normal !important;
}

textarea:disabled, textarea[readonly] {
	background-color: #f3f4f6 !important;
	color: #6b7280 !important;
	cursor: not-allowed;
}
