/* Fordesco Mapa Andalucía — los valores se cambian desde el panel de Elementor */
.andalucia-map-widget{
	--am-fill:#7CB342;
	--am-fill-hover:#0066B3;
	--am-fill-off:#D5DBE1;
	--am-stroke:#FFFFFF;
	--am-stroke-width:2.5;
	--am-zoom:1.08;
	--am-shadow:none;
	--am-speed:250ms;
	--am-label:#14284B;
	--am-label-hover:#FFFFFF;
	--am-tip-bg:#0B3B60;
	--am-tip-text:#FFFFFF;
	--am-label-outline:rgba(255,255,255,.75);
	--am-cols:3;
	--am-cell:280;
	--am-ratio:4/3;
	--am-pop-overlay:rgba(11,59,96,.72);
	--am-pop-bg:#FFFFFF;
	--am-pop-radius:16px;
	--am-pop-pad:28;
	--am-pop-gap:12;
	--am-img-radius:10px;
	--am-pop-title:#14284B;
	--am-pop-text:#1F2A37;
	--am-pop-title-size:26px;
	--am-btn-bg:#0066B3;
	--am-btn-text:#FFFFFF;
	--am-car-view:1;
	--am-car-cell:640;
	--am-arrow-bg:rgba(255,255,255,.92);
	--am-arrow-color:#14284B;
	--am-dot:#C5CDD6;
	--am-dot-active:#0066B3;
	--am-line:#14284B;
	--am-line-w:2.5;
	position:relative;width:100%;max-width:900px;margin:0 auto;
	font-family:inherit;line-height:1.2;
}
.andalucia-map-widget *{box-sizing:border-box}
.andalucia-map-widget svg{display:block;width:100%;height:auto;overflow:visible}

.andalucia-map-widget .am-prov{
	fill:var(--am-p-fill,var(--am-fill));
	stroke:var(--am-stroke);stroke-width:var(--am-stroke-width);stroke-linejoin:round;
	cursor:pointer;outline:none;
	transform-box:fill-box;transform-origin:center;
	transition:transform var(--am-speed) ease,fill var(--am-speed) ease,filter var(--am-speed) ease;
}
/* Resalte y zoom por CSS: funcionan aunque el JavaScript tarde en cargar */
.andalucia-map-widget .am-prov:not(.is-off):hover,
.andalucia-map-widget .am-prov.is-active{
	fill:var(--am-p-hover,var(--am-fill-hover)) !important;
	transform:scale(var(--am-zoom)) !important;
	filter:var(--am-shadow);
}
.andalucia-map-widget .am-prov.is-off{fill:var(--am-fill-off);cursor:default}
.andalucia-map-widget .am-prov:focus-visible{stroke:#FBC02D;stroke-width:4}

.andalucia-map-widget .am-labels text{
	fill:var(--am-label);font-size:17px;font-weight:600;text-anchor:middle;dominant-baseline:middle;
	pointer-events:none;stroke:none;
	transition:fill var(--am-speed) ease;
}
.andalucia-map-widget .am-labels text.is-active{fill:var(--am-label-hover)}

.andalucia-map-widget .am-tip{
	position:absolute;left:0;top:0;z-index:10;pointer-events:none;
	padding:8px 14px;border-radius:10px;background:var(--am-tip-bg);color:var(--am-tip-text);
	box-shadow:0 8px 20px rgba(0,0,0,.25);text-align:center;white-space:nowrap;
	opacity:0;transform:translate(-50%,calc(-100% - 14px)) scale(.92);
	transition:opacity .15s ease,transform .15s ease;
}
.andalucia-map-widget .am-tip.is-visible{opacity:1;transform:translate(-50%,calc(-100% - 14px)) scale(1)}
.andalucia-map-widget .am-tip strong{display:block;font-size:17px;font-weight:700;color:inherit}
.andalucia-map-widget .am-tip span{display:block;font-size:13px;opacity:.85;margin-top:2px;color:inherit}
.andalucia-map-widget .am-tip::after{
	content:"";position:absolute;left:50%;bottom:-6px;width:12px;height:12px;margin-left:-6px;
	background:var(--am-tip-bg);transform:rotate(45deg);
}
@media (max-width:767px){
	.andalucia-map-widget .am-labels text{font-size:30px}
}
/* ---------- Animación de entrada (las clases las pone el script; sin JS el mapa se ve estático) ---------- */
.andalucia-map-widget .am-outline{
	fill:none;stroke:var(--am-line);stroke-width:var(--am-line-w);stroke-linejoin:round;stroke-linecap:round;
	stroke-dasharray:1;stroke-dashoffset:0;opacity:0;pointer-events:none;transition:opacity .6s ease;
}
.andalucia-map-widget.am-line-kept .am-outline{opacity:1;transition:none}
.andalucia-map-widget.am-intro-wait .am-prov,
.andalucia-map-widget.am-intro-wait .am-labels text{opacity:0}
.andalucia-map-widget.am-intro svg{pointer-events:none}
.andalucia-map-widget.am-intro .am-outline{opacity:1;transition:none;animation:am-draw var(--am-t-line,1600ms) cubic-bezier(.45,.05,.35,1) both}
@keyframes am-draw{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
.andalucia-map-widget.am-intro .am-prov{opacity:0;transform:scale(.2);transition:none}
.andalucia-map-widget.am-intro .am-prov.am-in{animation:am-zoom var(--am-t-prov,700ms) cubic-bezier(.2,1.4,.4,1) forwards}
.andalucia-map-widget.am-intro.am-fx-pop .am-prov.am-in{animation-name:am-zoom-pop}
.andalucia-map-widget.am-intro.am-fx-drop .am-prov.am-in{animation-name:am-zoom-drop}
@keyframes am-zoom{0%{opacity:0;transform:scale(.2)}55%{opacity:1}100%{opacity:1;transform:scale(1)}}
@keyframes am-zoom-pop{0%{opacity:0;transform:scale(.2)}60%{opacity:1;transform:scale(1.18);fill:var(--am-p-hover,var(--am-fill-hover))}100%{opacity:1;transform:scale(1)}}
@keyframes am-zoom-drop{0%{opacity:0;transform:scale(1.8)}100%{opacity:1;transform:scale(1)}}
.andalucia-map-widget.am-intro .am-labels text{opacity:0}
.andalucia-map-widget.am-intro.am-labels-in .am-labels text{animation:am-fade .5s ease forwards;animation-delay:calc(var(--i,0) * 60ms)}
@keyframes am-fade{from{opacity:0}to{opacity:1}}

.andalucia-map-widget template{display:none}
/* Columnas por defecto en tablet y móvil (Elementor las sobrescribe con sus controles) */
@media (max-width:1024px){.andalucia-map-widget{--am-cols:2}}
@media (max-width:767px){.andalucia-map-widget{--am-cols:1}}

/* ---------- Popup (se mueve a <body> al abrirse; hereda las variables del widget) ---------- */
.am-pop{
	position:fixed;inset:0;z-index:9990;display:flex;align-items:center;justify-content:center;
	padding:16px;background:var(--am-pop-overlay,rgba(11,59,96,.72));
	opacity:0;visibility:hidden;transition:opacity .25s ease,visibility .25s ease;
	font-family:inherit;line-height:1.45;
}
.am-pop.is-open{opacity:1;visibility:visible}
.am-pop *{box-sizing:border-box}
.am-pop__box{
	position:relative;width:var(--am-pop-w,600px);max-width:100%;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);
	overflow:auto;overscroll-behavior:contain;
	padding:calc(var(--am-pop-pad,28) * 1px);border-radius:var(--am-pop-radius,16px);
	background:var(--am-pop-bg,#fff);color:var(--am-pop-text,#1F2A37);
	box-shadow:0 24px 60px rgba(0,0,0,.35);
	transform:translateY(16px) scale(.97);transition:transform .3s cubic-bezier(.2,.9,.25,1);
}
.am-pop.is-open .am-pop__box{transform:none}
.am-pop__close{
	position:absolute;top:10px;right:10px;width:38px;height:38px;margin:0;padding:0;
	border:0;border-radius:50%;background:rgba(0,0,0,.06);color:var(--am-pop-title,#14284B);
	font:400 26px/38px sans-serif;text-align:center;cursor:pointer;box-shadow:none;
}
.am-pop__close:hover,.am-pop__close:focus-visible{background:rgba(0,0,0,.14);color:var(--am-pop-title,#14284B)}
.am-pop__title{
	margin:0 44px .5em 0;padding:0;font-family:inherit;font-size:var(--am-pop-title-size,26px);
	font-weight:700;line-height:1.2;color:var(--am-pop-title,#14284B);text-transform:none;letter-spacing:0;
}
.am-pop__text{margin:0 0 1em}
.am-pop__text > :last-child{margin-bottom:0}
.am-pop__grid{display:grid;grid-template-columns:repeat(var(--am-pop-cols,3),minmax(0,1fr));gap:calc(var(--am-pop-gap,12) * 1px)}
.am-pop__item{margin:0;padding:0;min-width:0}
.am-pop__item a{display:block;border:0;box-shadow:none;outline-offset:3px}
.am-pop__item img{
	display:block;width:100%;height:auto;max-width:none;margin:0;border:0;box-shadow:none;
	aspect-ratio:var(--am-ratio,4/3);object-fit:cover;border-radius:var(--am-img-radius,10px);
	transition:transform .25s ease,filter .25s ease;
}
.am-pop__item a:hover img{transform:scale(1.03);filter:brightness(1.05)}
.am-pop__item figcaption{margin-top:.4em;font-size:.9em;opacity:.8}
.am-pop__actions{margin:1.2em 0 0;text-align:center}
.am-pop__btn{
	display:inline-block;padding:.75em 1.6em;border-radius:999px;
	background:var(--am-btn-bg,#0066B3);color:var(--am-btn-text,#fff) !important;
	font-weight:600;text-decoration:none !important;transition:filter .2s ease;
}
.am-pop__btn:hover{filter:brightness(1.12)}
html.am-pop-lock,html.am-pop-lock body{overflow:hidden}

/* ---------- Carrusel ---------- */
.am-car,.am-car__stage{position:relative}
.am-car__track{
	position:relative;display:flex;gap:calc(var(--am-pop-gap,12) * 1px);
	overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scroll-behavior:smooth;
	-webkit-overflow-scrolling:touch;scrollbar-width:none;overscroll-behavior-x:contain;
}
.am-car__track::-webkit-scrollbar{display:none}
.am-car__track > .am-pop__item{
	flex:0 0 calc((100% - (var(--am-car-n,1) - 1) * var(--am-pop-gap,12) * 1px) / var(--am-car-n,1));
	scroll-snap-align:start;
}
.am-car__btn{
	position:absolute;top:50%;z-index:2;width:44px;height:44px;margin:-22px 0 0;padding:0;
	border:0;border-radius:50%;background:var(--am-arrow-bg,rgba(255,255,255,.92));color:var(--am-arrow-color,#14284B);
	box-shadow:0 4px 14px rgba(0,0,0,.22);cursor:pointer;display:grid;place-items:center;
	transition:opacity .2s ease,transform .2s ease;
}
.am-car__btn:hover{transform:scale(1.08)}
.am-car__btn:focus-visible{outline:3px solid var(--am-dot-active,#0066B3);outline-offset:2px}
.am-car__btn[disabled]{opacity:.35;cursor:default;transform:none}
.am-car__btn svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.am-car__btn--prev{left:10px}
.am-car__btn--next{right:10px}
.am-car__dots{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:14px 0 0;padding:0;list-style:none}
.am-car__dots button{
	width:10px;height:10px;margin:0;padding:0;border:0;border-radius:50%;
	background:var(--am-dot,#C5CDD6);cursor:pointer;box-shadow:none;transition:background .2s ease,transform .2s ease;
}
.am-car__dots button[aria-current="true"]{background:var(--am-dot-active,#0066B3);transform:scale(1.3)}
.am-pop__item figcaption{min-height:0}
@media (prefers-reduced-motion:reduce){
	.andalucia-map-widget .am-prov,.andalucia-map-widget .am-tip,.am-pop,.am-pop__box{transition:none}
	.am-car__track{scroll-behavior:auto}
}
