/* =========================================================================
 * PORTADA · abogadosdegranada (1.20.1, 5 oct 2026)
 *
 * Valores medidos en maqueta-portada_v1.html (aprobada el 4 oct). Solo se
 * carga en la portada. Sin !important.
 *
 * Solo el aspecto de lo que pinta el plugin (Divi no llega dentro de un
 * shortcode): buscador, tarjetas Premium, especialidades, mapa y enlaces de
 * localidades, botón «Ver más». Todo lo demás (secciones, fondos, rellenos,
 * decoración de la cabecera, textos y tipografía de títulos, cifras, blog)
 * va en el panel de Divi (regla del proyecto, reparto aprobado el 5 oct).
 *
 * Clases que se escriben en Divi (Avanzado → Atributos de cada elemento):
 *   · sección del blog ..... adg-seccion-blog (se esconde sin entradas)
 *   · texto de portada ..... adg-vermas        (+ [adg_vermas] debajo)
 * ========================================================================= */

[class*="adg-pt-"],
.adg-vermas,
.adg-pt-vm-b {
	--pt-ink: #1c1d24;
	--pt-indigo: #26314a;
	--pt-indigo-2: #374663;
	--pt-granate: #8c2733;
	--pt-granate-hi: #a5344a;
	--pt-granate-ink: #6d1c2a;
	--pt-brass: #a97e42;
	--pt-brass-lite: #c99b5e;
	--pt-stone: #ede7dc;
	--pt-paper: #faf7f2;
	--pt-paper-2: #f4eee6;
	--pt-line: #dbd2c4;
	--pt-muted: #6e6555;
	--pt-shadow: 0 1px 2px rgba(26, 31, 43, .05), 0 8px 28px rgba(26, 31, 43, .08);
	--pt-shadow-lg: 0 12px 48px rgba(26, 31, 43, .16);
	--pt-serif: Georgia, "Times New Roman", serif;
}

/* ---- 1 · Buscador ---- */

.adg-pt-finder {
	background: #fff;
	border-radius: 18px;
	padding: 16px;
	display: grid;
	grid-template-columns: 1.25fr 1fr auto;
	gap: 12px;
	box-shadow: 0 24px 60px rgba(8, 12, 24, .45);
	color: var(--pt-ink);
	margin: 0;
}

.adg-pt-fld {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.adg-pt-fld label {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var(--pt-granate);
	padding-left: 3px;
	line-height: 1.3;
}

.adg-pt-sel {
	position: relative;
}

.adg-pt-sel svg {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	fill: none;
	stroke-width: 2;
	pointer-events: none;
}

.adg-pt-sel .adg-pt-i {
	left: 13px;
	width: 17px;
	height: 17px;
	stroke: var(--pt-granate);
}

.adg-pt-sel .adg-pt-c {
	right: 12px;
	width: 16px;
	height: 16px;
	stroke: #8a8069;
}

.adg-pt-sel select {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	font: inherit;
	font-size: 15.5px;
	line-height: 1.4;
	color: var(--pt-ink);
	background: var(--pt-paper-2);
	border: 1px solid var(--pt-line);
	border-radius: 11px;
	padding: 13px 38px 13px 40px;
	margin: 0;
	cursor: pointer;
	height: auto;
}

.adg-pt-sel select:focus {
	outline: 2px solid var(--pt-brass-lite);
	outline-offset: 1px;
	background: #fff;
}

.adg-pt-go {
	align-self: end;
	height: 50px;
	border: 0;
	border-radius: 11px;
	background: var(--pt-granate);
	color: #fff;
	font: inherit;
	font-size: 15.5px;
	font-weight: 700;
	padding: 0 26px;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(140, 39, 51, .42);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	white-space: nowrap;
}

.adg-pt-go:hover,
.adg-pt-go:focus-visible {
	background: var(--pt-granate-hi);
}

.adg-pt-go svg {
	width: 17px;
	height: 17px;
	stroke: #fff;
	fill: none;
	stroke-width: 2.2;
}

.adg-pt-aviso {
	font-size: 12.5px;
	color: #eef1f7;
	margin: 10px 0 0 4px;
	padding: 0;
	min-height: 0;
}

.adg-pt-aviso:empty {
	display: none;
}

@media (max-width: 820px) {
	.adg-pt-finder {
		grid-template-columns: 1fr;
	}

	.adg-pt-go {
		width: 100%;
	}
}

/* 1.26.0 · Buscar por nombre, bajo el buscador (sobre la cabecera oscura). */
.adg-pt-nombre {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin: 14px 0 0 4px;
	color: #eef1f7;
}

.adg-pt-nombre label {
	font-size: 13.5px;
	font-weight: 600;
	color: #eef1f7;
	margin: 0;
	line-height: 1.3;
}

.adg-pt-nombre-c {
	display: flex;
	gap: 8px;
	flex: 1 1 300px;
	max-width: 440px;
}

.adg-pt-nombre input {
	flex: 1 1 auto;
	min-width: 0;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--pt-ink);
	background: #fff;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 9px;
	padding: 8px 12px;
	margin: 0;
	height: auto;
	-webkit-appearance: none;
	appearance: none;
}

.adg-pt-nombre input:focus {
	outline: 2px solid var(--pt-brass-lite);
	outline-offset: 1px;
}

.adg-pt-nombre button {
	flex: 0 0 auto;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	color: #fff;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 9px;
	padding: 0 16px;
	cursor: pointer;
}

.adg-pt-nombre button:hover,
.adg-pt-nombre button:focus-visible {
	background: rgba(255, 255, 255, .14);
}

@media (max-width: 820px) {
	.adg-pt-nombre-c {
		max-width: none;
		flex-basis: 100%;
	}
}

/* ---- 2 · Premium ---- */

.adg-pt-prem {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.adg-pt-pc {
	position: relative;
	background: #fff;
	border: 1px solid var(--pt-line);
	border-radius: 14px;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	box-shadow: var(--pt-shadow);
	text-decoration: none;
	color: var(--pt-ink);
	transition: transform .18s, box-shadow .18s, border-color .18s;
}

.adg-pt-pc:hover,
.adg-pt-pc:focus-visible {
	transform: translateY(-3px);
	box-shadow: var(--pt-shadow-lg);
	border-color: var(--pt-brass-lite);
}

.adg-pt-pc::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 3px;
	border-radius: 14px 14px 0 0;
	background: linear-gradient(90deg, var(--pt-brass), var(--pt-brass-lite));
}

.adg-pt-lg {
	height: 84px;
	border-radius: 10px;
	background: var(--pt-paper);
	border: 1px solid #efe8dc;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 10px;
}

.adg-pt-lg img {
	max-width: 78%;
	max-height: 64px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.adg-pt-lgtx {
	font-family: var(--pt-serif);
	font-weight: 700;
	color: var(--pt-indigo);
	font-size: 19px;
	text-align: center;
	line-height: 1.1;
	text-transform: uppercase;
}

.adg-pt-lgtx small {
	display: block;
	font-family: inherit;
	font-size: 9.5px;
	letter-spacing: 2px;
	color: var(--pt-brass);
	font-weight: 700;
	margin-top: 4px;
}

.adg-pt-pl {
	align-self: flex-start;
	font-size: 10px;
	line-height: 1.4;
	font-weight: 800;
	letter-spacing: .8px;
	text-transform: uppercase;
	color: var(--pt-brass);
	background: #fbf3e4;
	border: 1px solid #e6cfa3;
	padding: 3px 8px;
	border-radius: 5px;
}

.adg-pt-nm {
	font-family: var(--pt-serif);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.22;
}

.adg-pt-lo {
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--pt-muted);
	display: flex;
	gap: 6px;
	align-items: flex-start;
}

.adg-pt-lo svg {
	width: 14px;
	height: 14px;
	flex: none;
	stroke: var(--pt-granate);
	fill: none;
	stroke-width: 2;
	margin-top: 2px;
}

.adg-pt-ar {
	font-size: 12.5px;
	line-height: 1.45;
	color: #5c5343;
}

.adg-pt-ar b {
	color: var(--pt-indigo);
	font-weight: 600;
}

.adg-pt-pcg {
	font-size: 11.5px;
	color: #2f6b4f;
	font-weight: 700;
}

.adg-pt-ver {
	margin-top: auto;
	font-size: 13px;
	font-weight: 700;
	color: var(--pt-indigo);
}

.adg-pt-pc:hover .adg-pt-ver {
	color: var(--pt-granate);
}

.adg-pt-pc.adg-pt-libre {
	background: repeating-linear-gradient(135deg, #fcf9f3 0 10px, #f8f2e8 10px 20px);
	border: 1.5px dashed var(--pt-brass-lite);
	box-shadow: none;
	align-items: flex-start;
	justify-content: center;
}

.adg-pt-pc.adg-pt-libre::before {
	display: none;
}

.adg-pt-ic {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e6cfa3;
	display: grid;
	place-items: center;
}

.adg-pt-ic svg {
	width: 22px;
	height: 22px;
	stroke: var(--pt-brass);
	fill: none;
	stroke-width: 1.8;
}

.adg-pt-tx {
	font-size: 13px;
	line-height: 1.5;
	color: #6b5a3e;
}

.adg-pt-libre .adg-pt-ver {
	color: var(--pt-granate);
}

@media (max-width: 980px) {
	.adg-pt-prem {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.adg-pt-prem {
		grid-template-columns: 1fr;
	}
}

/* ---- 4 · Especialidades ---- */

.adg-pt-esp {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.adg-pt-ec {
	background: #fff;
	border: 1px solid var(--pt-line);
	border-radius: 14px;
	padding: 18px 18px 15px;
	box-shadow: var(--pt-shadow);
	display: flex;
	flex-direction: column;
}

.adg-pt-ec h3 {
	margin: 0 0 12px;
	padding: 0 0 11px;
	border-bottom: 1px solid var(--pt-line);
	display: flex;
	align-items: center;
	gap: 11px;
	font-family: var(--pt-serif);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--pt-ink);
}

.adg-pt-ec h3 a {
	color: inherit;
	text-decoration: none;
}

.adg-pt-ec h3 a:hover {
	color: var(--pt-granate);
}

.adg-pt-ico {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	background: #efe8dc;
	display: grid;
	place-items: center;
	flex: none;
}

.adg-pt-ico svg {
	width: 20px;
	height: 20px;
	stroke: var(--pt-granate);
	stroke-width: 1.6;
}

/* 1.20.2: con la sección de Divi delante, para ganar a la regla del tema
   «.et-l--body ul { list-style-type: disc; padding: 0 0 23px 1em }», que pesa
   lo mismo que «.adg-pt-ec ul» y se carga después. Sin !important. */
.et_pb_section .adg-pt-ec ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.adg-pt-ec li {
	margin: 0;
	padding: 0;
	line-height: 1;
}

.adg-pt-ec li::before {
	display: none;
}

.adg-pt-ec li a {
	display: inline-block;
	font-size: 12.8px;
	line-height: 1.4;
	color: #4a4335;
	text-decoration: none;
	background: var(--pt-paper-2);
	border: 1px solid var(--pt-line);
	border-radius: 7px;
	padding: 5px 10px;
}

.adg-pt-ec li a:hover,
.adg-pt-ec li a:focus-visible {
	border-color: var(--pt-granate);
	color: var(--pt-granate-ink);
	background: var(--pt-stone);
}

.adg-pt-all {
	margin-top: 12px;
	font-size: 12.8px;
	font-weight: 700;
	color: var(--pt-granate);
	text-decoration: none;
}

.adg-pt-all:hover {
	text-decoration: underline;
}

@media (max-width: 920px) {
	.adg-pt-esp {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.adg-pt-esp {
		grid-template-columns: 1fr;
	}
}

/* ---- 5 · Localidades y mapa ---- */

.adg-pt-loc {
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	gap: 34px;
	align-items: start;
}

.adg-pt-mapbox {
	position: relative;
	background: linear-gradient(180deg, #fbf8f2, #f2ebdf);
	border: 1px solid var(--pt-line);
	border-radius: 16px;
	padding: 14px;
	box-shadow: var(--pt-shadow);
}

.adg-pt-svg {
	display: block;
	width: 100%;
	height: auto;
}

.adg-pt-pj {
	stroke: #fff;
	stroke-width: 1.6;
	stroke-linejoin: round;
	transition: fill .18s;
}

.adg-pt-pj.on {
	cursor: pointer;
}

.adg-pt-pj.on:hover,
.adg-pt-pj.hl {
	fill: var(--pt-granate);
}

.adg-pt-mun {
	fill: none;
	stroke: #fff;
	stroke-opacity: .55;
	stroke-width: .5;
	pointer-events: none;
}

.adg-pt-prov {
	fill: none;
	stroke: #b9a98b;
	stroke-width: 1.2;
	pointer-events: none;
}

.adg-pt-pjl {
	font: 700 10.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	fill: #6b5d45;
	pointer-events: none;
}

.adg-pt-pjl.off {
	fill: #b3a68f;
}

.adg-pt-dot {
	fill: var(--pt-indigo);
	stroke: #fff;
	stroke-width: 1.6;
	cursor: pointer;
}

.adg-pt-dot:hover,
.adg-pt-dot.hl {
	fill: var(--pt-granate);
}

.adg-pt-dlab {
	font: 700 11.5px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	fill: var(--pt-ink);
	paint-order: stroke;
	stroke: #faf7f2;
	stroke-width: 3.5px;
	stroke-linejoin: round;
	pointer-events: none;
}

.adg-pt-tip {
	position: absolute;
	pointer-events: none;
	background: var(--pt-ink);
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	padding: 6px 10px;
	border-radius: 7px;
	white-space: nowrap;
	opacity: 0;
	transform: translate(-50%, -120%);
	transition: opacity .12s;
	z-index: 5;
}

.adg-pt-tip b {
	color: var(--pt-brass-lite);
}

.adg-pt-cap {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	font-size: 11.5px;
	line-height: 1.4;
	color: #9a8c70;
	margin: 6px 4px 0;
}

.adg-pt-ley {
	display: flex;
	gap: 14px;
	align-items: center;
	flex-wrap: wrap;
}

.adg-pt-ley i {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--pt-indigo);
	margin-right: 5px;
	vertical-align: -1px;
}

.adg-pt-ley i.sq2 {
	border-radius: 2px;
	background: #f3eee5;
	border: 1px solid #ddd2bf;
}

.adg-pt-grp {
	margin-bottom: 18px;
}

.adg-pt-grp h3 {
	font-family: inherit;
	font-size: 11px;
	line-height: 1.4;
	font-weight: 800;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	color: var(--pt-granate);
	margin: 0 0 10px;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.adg-pt-grp h3::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--pt-line);
}

.adg-pt-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.adg-pt-tw {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--pt-ink);
	background: #fff;
	border: 1px solid var(--pt-line);
	border-radius: 10px;
	padding: 8px 13px;
	transition: border-color .15s, background .15s, color .15s;
}

.adg-pt-tw:hover,
.adg-pt-tw:focus-visible,
.adg-pt-tw.hl {
	border-color: var(--pt-granate);
	background: var(--pt-paper-2);
	color: var(--pt-granate-ink);
}

.adg-pt-tw .adg-pt-n {
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: var(--pt-indigo);
	border-radius: 99px;
	padding: 1px 7px;
}

.adg-pt-tw.cap {
	background: var(--pt-indigo);
	color: #fff;
	border-color: var(--pt-indigo);
}

.adg-pt-tw.cap .adg-pt-n {
	background: var(--pt-brass-lite);
	color: var(--pt-ink);
}

.adg-pt-tw.cap:hover,
.adg-pt-tw.cap:focus-visible,
.adg-pt-tw.cap.hl {
	background: var(--pt-indigo-2);
	color: #fff;
}

.adg-pt-todos {
	display: inline-block;
	margin-top: 4px;
	font-size: 13px;
	font-weight: 700;
	color: var(--pt-granate);
	text-decoration: none;
}

.adg-pt-todos:hover {
	text-decoration: underline;
}

@media (max-width: 920px) {
	.adg-pt-loc {
		grid-template-columns: 1fr;
	}
}

/* En móvil el mapa se dibuja a la mitad: los rótulos de partido se quitan
   (no se leerían) y los de las poblaciones crecen para quedar en ~9 px. */
@media (max-width: 600px) {
	.adg-pt-pjl {
		display: none;
	}

	.adg-pt-dlab {
		font-size: 18px;
		stroke-width: 5px;
	}
}

/* ---- 6 · Blog (Grupo con Bucle de Divi 5) ----
 * 1.20.3: el blog ya no usa el módulo Blog (cargaba unos 215 KB de scripts:
 * mediaelement, slider, pagination…), sino un Grupo con Bucle sobre las
 * últimas entradas, con la clase `adg-blog-tarjeta`. El Bucle no pinta
 * <article>, así que la sección se esconde cuando no hay ninguna tarjeta.
 * Divi no puede condicionar una sección a que haya entradas: misma
 * excepción que D90.
 * 1.20.4: medido con cero entradas (7 oct 2026): el Bucle SÍ pinta el Grupo
 * `adg-blog-tarjeta` y mete dentro el aviso de Divi «No se han encontrado
 * resultados» (`.entry` con `h2.not-found-title`). Se esconde también en
 * ese caso. */

.et_pb_section.adg-seccion-blog:not(:has(.adg-blog-tarjeta)),
.et_pb_section.adg-seccion-blog:has(.adg-blog-tarjeta .not-found-title) {
	display: none;
}

/* Icono del área en la tarjeta del blog ([adg_blog_icono], 1.20.5).
 * Maqueta `.bc .ph svg`: 44 × 44, trazo 1,2, latón claro, opacidad .85.
 * Solo el aspecto del SVG; dónde va lo decide Divi. */

.adg-pt-bc-ic {
	display: block;
	width: 44px;
	height: 44px;
	line-height: 0;
	color: var(--pt-brass-lite);
	opacity: .85;
}

.adg-pt-bc-ic svg {
	display: block;
	width: 44px;
	height: 44px;
	stroke-width: 1.2;
}

/* ---- 7 · Texto de portada: «Ver más» sin JavaScript ----
 * Módulo Texto con clase `adg-vermas` y, en la misma columna, un módulo
 * Código con [adg_vermas]. Plegado mientras la casilla no esté marcada. */

.et_pb_column:has(.adg-pt-vm-t:not(:checked)) .et_pb_module.adg-vermas {
	position: relative;
	max-height: 150px;
	overflow: hidden;
}

.et_pb_column:has(.adg-pt-vm-t:not(:checked)) .et_pb_module.adg-vermas::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 60px;
	background: linear-gradient(rgba(255, 255, 255, 0), var(--adg-vm-fondo, #fff));
	pointer-events: none;
}

.adg-pt-vm-t {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 1px;
	height: 1px;
}

.adg-pt-vm-b {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-top: 12px;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 700;
	color: var(--pt-granate);
	background: var(--pt-paper-2);
	border: 1px solid var(--pt-line);
	border-radius: 10px;
	padding: 10px 18px;
	cursor: pointer;
}

.adg-pt-vm-b:hover {
	border-color: var(--pt-granate);
}

.adg-pt-vm-t:focus-visible + .adg-pt-vm-b {
	outline: 2px solid var(--pt-brass-lite);
	outline-offset: 2px;
}

.adg-pt-vm-b svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	transition: transform .2s;
}

.adg-pt-vm-b .m2 {
	display: none;
}

.adg-pt-vm-t:checked + .adg-pt-vm-b .m1 {
	display: none;
}

.adg-pt-vm-t:checked + .adg-pt-vm-b .m2 {
	display: inline;
}

.adg-pt-vm-t:checked + .adg-pt-vm-b svg {
	transform: rotate(180deg);
}
