/* ==========================================================================
   AFEMPES Salud Mental — Páginas Interiores, Formularios, Noticias y Tienda
   ========================================================================== */

body.af-body:not(.home) {
	background-color: #F5F6F3;
	color: #132A24;
}

/* ---------- 1. Hero Interior Editorial ---------- */
.af-inner-hero {
	background:
		radial-gradient(circle at 86% 18%, rgba(166, 110, 126, 0.22) 0%, transparent 40%),
		radial-gradient(circle at 10% 88%, rgba(137, 165, 153, 0.18) 0%, transparent 44%),
		linear-gradient(135deg, #103B31 0%, #154E40 62%, #113C32 100%) !important;
	color: #FFFFFF;
}

.af-inner-hero--template {
	padding-block: clamp(2.5rem, 5vw, 4rem);
	border-bottom: 1px solid rgba(19, 42, 36, 0.1);
}

.af-inner-hero h1,
.af-inner-hero .elementor-heading-title {
	font-family: "Lora", Georgia, serif;
	color: #FFFFFF;
	margin: 0;
}

.af-inner-hero p {
	color: #DCECE5;
}

.af-breadcrumb-trail {
	font-size: 0.84rem;
	font-weight: 600;
	color: #CBE2D8;
	margin-bottom: 0.6rem;
}

.af-breadcrumb-trail a {
	color: #FFFFFF;
	text-decoration: none;
}

.af-breadcrumb-trail a:hover {
	text-decoration: underline;
}

.af-hero-anchor-btn .elementor-button {
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.af-hero-anchor-btn .elementor-button:hover,
.af-hero-anchor-btn .elementor-button:focus-visible {
	background-color: rgba(255, 255, 255, 0.2) !important;
	color: #FFFFFF !important;
	transform: translateY(-1px);
}

/* ---------- 2. Insignia Horario Sedes y Textos Prosa ---------- */
.af-sede-badge-hours .elementor-heading-title,
.af-hours-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.34rem 0.78rem;
	border-radius: 9999px;
	background: #F6E9ED;
	border: 1px solid rgba(110, 62, 76, 0.28);
	color: #562E3A !important;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.35;
}

.af-prose {
	color: #243F38;
	font-size: 1.02rem;
	line-height: 1.75;
}

.af-prose h2,
.af-prose h3,
.af-prose h4 {
	font-family: "Lora", Georgia, serif;
	color: #132A24;
	margin-top: 1.75rem;
	margin-bottom: 0.75rem;
}

.af-prose h2:first-child,
.af-prose h3:first-child,
.af-prose p:first-child {
	margin-top: 0;
}

.af-prose p {
	margin-top: 0;
	margin-bottom: 1.05rem;
}

.af-prose ul,
.af-prose ol {
	margin: 0.75rem 0 1.25rem;
	padding-left: 1.4rem;
}

.af-prose li {
	margin-bottom: 0.45rem;
}

.af-prose figure {
	margin: 1.5rem 0;
}

.af-prose figure img,
.af-prose img {
	border-radius: 14px;
	max-width: 100%;
	height: auto;
}

.af-prose figcaption {
	margin-top: 0.5rem;
	font-size: 0.86rem;
	color: #425A53;
	text-align: center;
}

/* ---------- 3. Tarjetas de Personas, Socios, Documentos y Programas ---------- */
.af-el-card {
	transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.af-el-card:hover {
	border-color: rgba(22, 91, 74, 0.28) !important;
	box-shadow: 0 18px 36px -22px rgba(16, 59, 49, 0.28) !important;
}

.af-person-photo {
	background-color: #F5F6F3;
	border-radius: 14px;
	padding: 0.65rem;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 224px;
}

.af-person-photo .elementor-widget-container {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.af-person-photo img {
	width: auto !important;
	max-width: 100% !important;
	height: 204px !important;
	object-fit: contain !important;
	object-position: center center !important;
	border-radius: 10px !important;
	display: block;
	margin-inline: auto;
}

.af-person-photo--square img {
	width: 148px;
	height: 148px;
	object-fit: cover;
	object-position: center 20%;
	border-radius: 9999px;
	margin-inline: auto;
	border: 3px solid #EBF2EE;
}

.af-person-avatar-fallback {
	width: 148px;
	height: 148px;
	margin-inline: auto;
	border-radius: 9999px;
	background: #EBF2EE;
	border: 3px solid rgba(22, 91, 74, 0.16);
	color: #103B31;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Lora", Georgia, serif;
	font-size: 2rem;
	font-weight: 600;
}

.af-partner-logo img {
	height: 88px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	margin-inline: auto;
	display: block;
}

.af-doc-cover img {
	max-height: 210px;
	width: auto;
	margin-inline: auto;
	object-fit: contain;
	border-radius: 10px;
	border: 1px solid rgba(19, 42, 36, 0.1);
}

.af-gallery-photo img {
	width: 100%;
	height: 250px;
	object-fit: cover;
	border-radius: 14px;
	display: block;
}

.af-calidad-img img {
	max-width: 720px;
	width: 100%;
	margin-inline: auto;
	display: block;
	border-radius: 14px;
	border: 1px solid rgba(19, 42, 36, 0.12);
	box-shadow: var(--af-shadow-md);
}

/* Tablas Responsivas dentro de widgets text-editor */
.af-table-wrap,
.af-prose table {
	width: 100%;
}

.af-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid rgba(19, 42, 36, 0.12);
	border-radius: 16px;
	background: #FFFFFF;
}

.af-table-wrap table,
.af-prose table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.93rem;
}

.af-table-wrap th,
.af-prose th {
	background: #103B31;
	color: #FFFFFF;
	font-weight: 700;
	text-align: left;
	padding: 0.9rem 1rem;
	white-space: nowrap;
}

.af-table-wrap td,
.af-prose td {
	padding: 0.85rem 1rem;
	border-top: 1px solid rgba(19, 42, 36, 0.09);
	vertical-align: top;
}

.af-table-wrap tbody tr:nth-child(even) td {
	background: #F9FBFA;
}

/* ---------- 4. Archivo de Noticias y Filtros ---------- */
.af-archive-block {
	display: grid;
	gap: 2rem;
}

.af-archive-toolbar {
	display: grid;
	gap: 1rem;
	background: #FFFFFF;
	border: 1px solid rgba(19, 42, 36, 0.1);
	border-radius: 18px;
	padding: 1.25rem 1.35rem;
}

.af-archive-search {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.af-archive-search .af-news-search-input {
	flex: 1 1 260px;
}

.af-cat-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.af-cat-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.42rem 0.9rem;
	border-radius: 9999px;
	border: 1px solid rgba(19, 42, 36, 0.14);
	background: #F5F6F3;
	color: #132A24;
	font-size: 0.84rem;
	font-weight: 600;
	text-decoration: none;
}

.af-cat-pill:hover,
.af-cat-pill.is-active {
	background: #165B4A;
	border-color: #165B4A;
	color: #FFFFFF;
}

.af-pagination--center {
	justify-content: center;
	margin-top: 0.75rem;
}

.af-empty-state {
	background: #FFFFFF;
	border: 1px solid rgba(19, 42, 36, 0.1);
	border-radius: 18px;
	padding: 2.5rem 1.5rem;
	text-align: center;
}

/* ---------- 5. Escaparate Tienda Solidaria ---------- */
.af-tienda-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.5rem;
}

.af-tienda-card {
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
	border: 1px solid rgba(19, 42, 36, 0.1);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: var(--af-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.af-tienda-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--af-shadow-md);
}

.af-tienda-media {
	position: relative;
	display: block;
	background: #EBF2EE;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.af-tienda-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.af-tienda-price {
	position: absolute;
	top: 14px;
	right: 14px;
	padding: 0.4rem 0.9rem;
	border-radius: 9999px;
	background: #103B31;
	color: #FFFFFF;
	font-weight: 700;
	font-size: 0.9rem;
	box-shadow: 0 8px 18px -6px rgba(16, 59, 49, 0.5);
}

.af-tienda-body {
	padding: 1.45rem 1.6rem 1.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	flex: 1;
}

.af-tienda-title {
	margin: 0;
	font-family: "Lora", Georgia, serif;
	font-size: 1.4rem;
}

.af-tienda-title a {
	color: #132A24;
	text-decoration: none;
}

.af-tienda-title a:hover {
	color: #165B4A;
}

.af-tienda-desc {
	margin: 0;
	color: #364E47;
	font-size: 0.95rem;
	flex: 1;
}

.af-tienda-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 0.5rem;
}

@media (max-width: 767px) {
	.af-tienda-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- 6. Formularios Contacto, Cita Previa y Trabaja con Nosotros ---------- */
.af-form-card {
	background: #FFFFFF;
	border: 1px solid rgba(19, 42, 36, 0.12);
	border-radius: 22px;
	padding: clamp(1.5rem, 3.5vw, 2.5rem);
	box-shadow: var(--af-shadow-sm);
}

.af-form-card--accent {
	border-color: rgba(22, 91, 74, 0.25);
	background: linear-gradient(180deg, #FFFFFF 0%, #F8FBF9 100%);
}

.af-form-card-head {
	margin-bottom: 1.5rem;
}

.af-form-card-title {
	font-family: "Lora", Georgia, serif;
	font-size: clamp(1.45rem, 2.4vw, 1.9rem);
	line-height: 1.24;
	color: #132A24;
	margin: 0.2rem 0 0.5rem;
}

.af-form-card-desc {
	margin: 0;
	color: #425A53;
	font-size: 0.96rem;
	max-width: 72ch;
}

.af-app-form {
	display: grid;
	gap: 1.15rem;
}

.af-form-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
	.af-form-grid--3 {
		grid-template-columns: 1fr;
	}
}

.af-select {
	appearance: auto;
	background-color: #FFFFFF;
}

.af-textarea {
	resize: vertical;
	min-height: 112px;
}

.af-file-input {
	padding: 0.55rem 0.75rem;
	background: #F5F6F3;
	cursor: pointer;
}

.af-field-hint {
	font-size: 0.8125rem;
	color: #425A53;
}

.af-rgpd-box--stack {
	display: grid;
	gap: 0.75rem;
}

.af-opt-badge {
	font-style: normal;
	font-size: 0.78rem;
	font-weight: 700;
	color: #5C746D;
	margin-left: 0.25rem;
}

/* Multiselección de puestos Trabaja con Nosotros */
.af-jobs-fieldset {
	margin: 0;
	padding: 1.15rem 1.25rem;
	border: 1px solid rgba(19, 42, 36, 0.14);
	border-radius: 16px;
	background: #F9FBFA;
}

.af-jobs-legend {
	padding: 0 0.45rem;
	margin-bottom: 0.75rem;
}

.af-jobs-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.65rem 1rem;
}

@media (max-width: 680px) {
	.af-jobs-grid {
		grid-template-columns: 1fr;
	}
}

.af-job-option {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.68rem 0.85rem;
	background: #FFFFFF;
	border: 1px solid rgba(19, 42, 36, 0.13);
	border-radius: 10px;
	font-size: 0.91rem;
	font-weight: 600;
	color: #132A24;
	cursor: pointer;
	transition: border-color 0.18s ease, background-color 0.18s ease;
}

.af-job-option:hover {
	border-color: #165B4A;
	background: #EBF2EE;
}

.af-job-option input:checked + span {
	color: #103B31;
}

.af-other-job-wrap {
	margin-top: 0.95rem;
}

.af-other-job-wrap[hidden] {
	display: none;
}

/* Activador y consentimientos condicionales Cita Previa */
.af-cita-trigger-box {
	padding: 1rem 1.15rem;
	background: #EBF2EE;
	border: 1.5px solid rgba(22, 91, 74, 0.35);
	border-radius: 14px;
}

.af-checkbox-label--strong {
	font-weight: 700;
	font-size: 0.97rem;
	color: #103B31;
}

.af-cita-consents-panel {
	padding: 1.25rem 1.35rem;
	background: #FBF6F7;
	border: 1.5px solid rgba(110, 62, 76, 0.35);
	border-radius: 16px;
	animation: afFadeSlideDown 0.25s ease-out;
}

.af-cita-consents-panel[hidden] {
	display: none;
}

.af-cita-consents-title {
	margin: 0 0 0.35rem;
	font-family: "Lora", Georgia, serif;
	font-size: 1.08rem;
	font-weight: 600;
	color: #562E3A;
}

.af-cita-consents-note {
	margin: 0 0 0.9rem;
	font-size: 0.85rem;
	line-height: 1.5;
	color: #5C3D46;
}

.af-cita-consents-list {
	display: grid;
	gap: 0.75rem;
}

.af-cita-consent-item {
	padding: 0.7rem 0.85rem;
	background: #FFFFFF;
	border: 1px solid rgba(110, 62, 76, 0.18);
	border-radius: 10px;
}

@keyframes afFadeSlideDown {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- 7. Contact Form 7 Estilizado (Canal de Denuncias Ley 2/2023) ---------- */
.af-cf7-card .wpcf7-form {
	display: grid;
	gap: 1rem;
}

.af-cf7-card .wpcf7-form h3 {
	font-family: "Lora", Georgia, serif;
	font-size: 1.28rem;
	color: #103B31;
	margin: 1rem 0 0.25rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid rgba(19, 42, 36, 0.12);
}

.af-cf7-card .cf7-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem 1.25rem;
}

@media (max-width: 720px) {
	.af-cf7-card .cf7-grid-2 {
		grid-template-columns: 1fr;
	}
}

.af-cf7-card label {
	font-size: 0.9rem;
	font-weight: 600;
	color: #132A24;
	display: block;
}

.af-cf7-card input[type="text"],
.af-cf7-card input[type="email"],
.af-cf7-card input[type="tel"],
.af-cf7-card input[type="file"],
.af-cf7-card select,
.af-cf7-card textarea {
	width: 100%;
	margin-top: 0.35rem;
	padding: 0.72rem 0.95rem;
	border: 1.5px solid #A8BEB3;
	border-radius: 10px;
	background: #FFFFFF;
	color: #132A24;
	font-family: var(--af-font-body);
	font-size: 0.95rem;
}

.af-cf7-card .conducta-grid .wpcf7-checkbox {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.55rem 1rem;
	margin-top: 0.5rem;
}

@media (max-width: 680px) {
	.af-cf7-card .conducta-grid .wpcf7-checkbox {
		grid-template-columns: 1fr;
	}
}

.af-cf7-card .wpcf7-list-item {
	margin: 0;
}

.af-cf7-card .wpcf7-list-item label {
	display: flex;
	align-items: flex-start;
	gap: 0.55rem;
	font-weight: 500;
	padding: 0.5rem 0.65rem;
	border: 1px solid rgba(19, 42, 36, 0.11);
	border-radius: 9px;
	background: #F9FBFA;
	cursor: pointer;
}

.af-cf7-card input[type="checkbox"],
.af-cf7-card input[type="radio"] {
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: #165B4A;
	flex-shrink: 0;
}

.af-body .af-cf7-card input.wpcf7-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.9rem 1.8rem;
	border-radius: 9999px;
	border: 0;
	background-color: #165B4A;
	color: #FFFFFF;
	font-family: var(--af-font-body);
	font-weight: 700;
	font-size: 0.96rem;
	cursor: pointer;
	box-shadow: 0 8px 20px -6px rgba(22, 91, 74, 0.38);
}

.af-body .af-cf7-card input.wpcf7-submit:hover,
.af-body .af-cf7-card input.wpcf7-submit:focus-visible {
	background-color: #0F4336;
	color: #FFFFFF;
}

.af-cf7-card .campo-ayuda {
	font-size: 0.82rem;
	color: #425A53;
	margin-top: 0.25rem;
}

/* ---------- 8. Single Post, Archive y Search Templates ---------- */
.af-single-shell {
	padding-block: clamp(2rem, 4vw, 3.25rem);
}

.af-single-article {
	background: #FFFFFF;
	border: 1px solid rgba(19, 42, 36, 0.1);
	border-radius: 22px;
	padding: clamp(1.5rem, 4vw, 3rem);
	max-width: 920px;
	margin-inline: auto;
	box-shadow: var(--af-shadow-sm);
}

.af-single-featured {
	margin: 1.5rem 0 1.75rem;
	background: #F5F6F3;
	border-radius: 16px;
	overflow: hidden;
	text-align: center;
	border: 1px solid rgba(19, 42, 36, 0.08);
}

.af-single-featured img {
	max-height: 620px;
	width: auto;
	max-width: 100%;
	margin-inline: auto;
	display: block;
	object-fit: contain;
}

.af-single-tags {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(19, 42, 36, 0.1);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.af-single-nav {
	max-width: 920px;
	margin: 1.5rem auto 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 1rem;
}

.af-archive-shell {
	padding-block: clamp(2rem, 4vw, 3.25rem);
}
