/* Landing pública del profesional */

:root {
	--prof-bg: #f8fafc;
	--prof-surface: #ffffff;
	--prof-text: #0f172a;
	--prof-muted: #64748b;
	--prof-accent: #2563eb;
	--prof-border: #e2e8f0;
	--prof-radius: 16px;
	--prof-max: 960px;
	--prof-font-display: "Outfit", system-ui, sans-serif;
	--prof-font-body: "Source Sans 3", system-ui, sans-serif;
}

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

body.prof-page {
	margin: 0;
	font-family: var(--prof-font-body);
	color: var(--prof-text);
	background: var(--prof-bg);
	line-height: 1.65;
}

.prof-container {
	width: min(100% - 2rem, var(--prof-max));
	margin-inline: auto;
}

.prof-header {
	background: var(--prof-surface);
	border-bottom: 1px solid var(--prof-border);
	padding: 14px 0;
}

.prof-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

.prof-brand-org {
	font-family: var(--prof-font-display);
	font-weight: 600;
	color: var(--prof-text);
}

.prof-login-link {
	color: var(--prof-accent);
	font-weight: 500;
	text-decoration: none;
}

.prof-login-link:hover {
	text-decoration: underline;
}

.prof-hero {
	padding: 2.5rem 0 1.5rem;
}

.prof-hero-card {
	background: var(--prof-surface);
	border: 1px solid var(--prof-border);
	border-radius: var(--prof-radius);
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.prof-hero-photo img {
	width: 100%;
	max-height: 320px;
	object-fit: cover;
}

.prof-hero-body {
	padding: 1.75rem;
}

.prof-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--prof-muted);
}

.prof-hero-body h1 {
	margin: 0 0 0.35rem;
	font-family: var(--prof-font-display);
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	line-height: 1.2;
}

.prof-specialty {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	color: var(--prof-accent);
	font-weight: 600;
}

.prof-bio {
	margin-bottom: 1rem;
	color: var(--prof-text);
}

.prof-contact {
	margin: 0;
	color: var(--prof-muted);
}

.prof-section {
	padding: 2rem 0;
}

.prof-section-alt {
	background: var(--prof-surface);
	border-block: 1px solid var(--prof-border);
}

.prof-section h2 {
	margin: 0 0 1.25rem;
	font-family: var(--prof-font-display);
	font-size: 1.35rem;
}

.prof-grid {
	display: grid;
	gap: 1rem;
}

.prof-grid-espacios {
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.prof-card {
	background: var(--prof-surface);
	border: 1px solid var(--prof-border);
	border-radius: 12px;
	padding: 1.1rem 1.25rem;
}

.prof-section-alt .prof-card {
	background: var(--prof-bg);
}

.prof-card h3 {
	margin: 0 0 0.35rem;
	font-size: 1.05rem;
}

.prof-meta {
	color: var(--prof-muted);
	font-size: 0.9rem;
}

.prof-servicios {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.prof-servicio-item {
	background: var(--prof-bg);
	border: 1px solid var(--prof-border);
	border-radius: 12px;
	padding: 1rem 1.15rem;
}

.prof-section-alt .prof-servicio-item {
	background: var(--prof-surface);
}

.prof-servicio-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.prof-badge {
	background: rgba(37, 99, 235, 0.1);
	color: var(--prof-accent);
	font-size: 0.8rem;
	font-weight: 600;
	padding: 0.2rem 0.55rem;
	border-radius: 999px;
}

.prof-servicio-meta {
	margin-top: 0.35rem;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	color: var(--prof-muted);
	font-size: 0.92rem;
}

.prof-calendario-lead {
	margin: -0.5rem 0 1.25rem;
	color: var(--prof-muted);
	font-size: 0.95rem;
}

.prof-calendario {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 0.75rem;
}

.prof-calendario-dia {
	background: var(--prof-surface);
	border: 1px solid var(--prof-border);
	border-radius: 12px;
	padding: 0.75rem;
	min-height: 140px;
	display: flex;
	flex-direction: column;
}

.prof-section-alt + .prof-section .prof-calendario-dia,
.prof-section .prof-calendario-dia {
	background: var(--prof-surface);
}

.prof-calendario-dia.is-manana {
	border-color: var(--prof-accent);
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.prof-calendario-dia-head {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	margin-bottom: 0.65rem;
	padding-bottom: 0.55rem;
	border-bottom: 1px solid var(--prof-border);
}

.prof-calendario-dia-nombre {
	font-weight: 600;
	font-size: 0.88rem;
	line-height: 1.2;
}

.prof-calendario-dia-fecha {
	font-size: 0.8rem;
	color: var(--prof-muted);
}

.prof-calendario-badge {
	display: inline-block;
	margin-top: 0.35rem;
	align-self: flex-start;
	background: rgba(37, 99, 235, 0.1);
	color: var(--prof-accent);
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
}

.prof-calendario-slots {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1;
}

.prof-slot {
	display: block;
	background: rgba(37, 99, 235, 0.08);
	color: var(--prof-accent);
	font-size: 0.82rem;
	font-weight: 600;
	padding: 0.35rem 0.45rem;
	border-radius: 8px;
	text-align: center;
	line-height: 1.25;
	border: 1px solid transparent;
}

.prof-slot-reservable {
	cursor: pointer;
	font-family: inherit;
	width: 100%;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.prof-slot-reservable:hover,
.prof-slot-reservable:focus {
	background: rgba(37, 99, 235, 0.14);
	border-color: var(--prof-accent);
	transform: translateY(-1px);
	outline: none;
}

.prof-slot small {
	display: block;
	font-weight: 400;
	font-size: 0.68rem;
	color: var(--prof-muted);
	margin-top: 0.15rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.prof-calendario-vacio {
	margin: auto 0;
	font-size: 0.82rem;
	color: var(--prof-muted);
	text-align: center;
	padding: 0.35rem 0;
}

.prof-horarios {
	display: grid;
	gap: 0.5rem;
}

.prof-horario-row {
	display: grid;
	grid-template-columns: 110px 1fr 1fr;
	gap: 0.75rem;
	padding: 0.65rem 0;
	border-bottom: 1px solid var(--prof-border);
	font-size: 0.95rem;
}

.prof-horario-dia {
	font-weight: 600;
}

.prof-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}

.prof-gallery-item {
	margin: 0;
	background: var(--prof-bg);
	border: 1px solid var(--prof-border);
	border-radius: 12px;
	overflow: hidden;
}

.prof-section-alt .prof-gallery-item {
	background: var(--prof-surface);
}

.prof-gallery-item img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.prof-gallery-item figcaption {
	padding: 0.75rem 0.9rem;
	font-size: 0.9rem;
	color: var(--prof-muted);
}

.prof-footer {
	padding: 1.5rem 0 2rem;
	text-align: center;
	color: var(--prof-muted);
	font-size: 0.88rem;
}

.prof-footer p {
	margin: 0;
}

@media (max-width: 900px) {
	.prof-calendario {
		grid-template-columns: repeat(7, minmax(118px, 1fr));
		overflow-x: auto;
		padding-bottom: 0.35rem;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
	}

	.prof-calendario-dia {
		scroll-snap-align: start;
	}
}

@media (max-width: 640px) {
	.prof-horario-row {
	 grid-template-columns: 1fr;
	 gap: 0.15rem;
	}
}

/* Admin — galería en Mi perfil */
.perfil-galeria-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.perfil-galeria-item {
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	position: relative;
}

.perfil-galeria-item.is-portada {
	border-color: #2563eb;
	box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

.perfil-portada-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	background: #2563eb;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 999px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.perfil-galeria-item img {
	width: 100%;
	height: 140px;
	object-fit: cover;
	display: block;
}

.perfil-galeria-item .perfil-galeria-body {
	padding: 10px;
}

.perfil-galeria-item textarea {
	resize: vertical;
	min-height: 54px;
}

/* Horarios reservables en calendario */
.prof-reserva-resumen {
	background: rgba(37, 99, 235, 0.06);
	border: 1px solid rgba(37, 99, 235, 0.15);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	margin-bottom: 1rem;
	font-size: 0.92rem;
	line-height: 1.5;
}

.prof-reserva-resumen p {
	margin: 0 0 0.35rem;
}

.prof-reserva-resumen p:last-child {
	margin-bottom: 0;
}

/* Modal reserva */
body.prof-modal-open {
	overflow: hidden;
}

.prof-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.prof-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.prof-modal.is-open {
	display: flex;
}

.prof-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.prof-modal-dialog {
	position: relative;
	z-index: 1;
	width: min(100%, 520px);
	max-height: min(92vh, 780px);
	overflow: auto;
	background: var(--prof-surface);
	border-radius: var(--prof-radius);
	box-shadow: var(--prof-shadow, 0 20px 50px rgba(15, 23, 42, 0.18));
	padding: 1.5rem 1.5rem 1.25rem;
}

.prof-modal-dialog h2 {
	margin: 0 0 0.25rem;
	font-family: var(--prof-font-display);
	font-size: 1.35rem;
}

.prof-modal-subtitle {
	margin: 0 0 1rem;
	color: var(--prof-muted);
	font-size: 0.95rem;
}

.prof-modal-close {
	position: absolute;
	top: 0.75rem;
	right: 0.85rem;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--prof-muted);
	cursor: pointer;
}

.prof-form-group {
	margin-bottom: 0.9rem;
}

.prof-form-group label,
.prof-fieldset legend {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	margin-bottom: 0.35rem;
}

.prof-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}

.prof-input {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--prof-border);
	border-radius: 8px;
	font: inherit;
	color: var(--prof-text);
	background: #fff;
}

.prof-input:focus {
	outline: 2px solid rgba(37, 99, 235, 0.25);
	border-color: var(--prof-accent);
}

.prof-fieldset {
	border: 1px solid var(--prof-border);
	border-radius: 10px;
	padding: 0.85rem 0.9rem 0.2rem;
	margin: 0 0 1rem;
}

.prof-modalidad-opciones {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

.prof-radio {
	font-weight: 400;
	font-size: 0.92rem;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.prof-help {
	font-size: 0.88rem;
	margin: 0 0 0.75rem;
}

.prof-help-ok {
	color: var(--prof-success, #059669);
}

.prof-help-error {
	color: #dc2626;
}

.prof-alert {
	padding: 0.65rem 0.8rem;
	border-radius: 8px;
	font-size: 0.92rem;
	margin-bottom: 0.85rem;
}

.prof-alert-success {
	background: rgba(5, 150, 105, 0.1);
	color: #047857;
}

.prof-alert-danger {
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
}

.prof-modal-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.65rem;
	margin-top: 0.5rem;
}

.prof-btn {
	border: 0;
	border-radius: 8px;
	padding: 0.6rem 1rem;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.prof-btn-primary {
	background: var(--prof-accent);
	color: #fff;
}

.prof-btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.prof-btn-muted {
	background: var(--prof-bg);
	color: var(--prof-text);
	border: 1px solid var(--prof-border);
}

@media (max-width: 560px) {
	.prof-form-row {
		grid-template-columns: 1fr;
	}
}
