/*
 * LeyREP Suite · Refinamiento visual (1.5)
 *
 * Sobre el diseño de Elementor (y su copia en el plugin): menos sombra, menos relleno de color,
 * tipo oración en vez de MAYÚSCULAS, foco visible y botones flotantes discretos.
 * Criterio: superficies planas con un borde fino, una sola sombra suave para lo que flota
 * (menús, botones fijos) y el color reservado para la acción principal.
 */

:root {
	--lrs-hair: rgba(16, 24, 40, .08);
	--lrs-hair-strong: rgba(16, 24, 40, .12);
	--lrs-sh-1: 0 1px 2px rgba(16, 24, 40, .05);
	--lrs-sh-2: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .06);
	--lrs-sh-pop: 0 0 0 1px rgba(16, 24, 40, .05), 0 12px 32px -8px rgba(16, 24, 40, .16);
	--lrs-ease: cubic-bezier(.32, .72, 0, 1);
	--lrs-ink-2: #4a5560;
}

/* ───────── Cabecera ───────── */
html body .rep-master-canopy { box-shadow: none !important; }
html body .rep-navbar-floating { box-shadow: 0 0 0 1px var(--lrs-hair), var(--lrs-sh-1) !important; }

/* Menú: el elemento activo se marca con peso y color, sin cápsula de fondo. */
html body .rep-navbar-floating .rep-nav-link {
	background: transparent !important; color: var(--lrs-ink-2) !important; font-weight: 500 !important;
	letter-spacing: -.005em; transition: color .15s var(--lrs-ease), background-color .15s var(--lrs-ease) !important;
}
@media (hover: hover) {
	html body .rep-navbar-floating .rep-nav-link:hover { color: var(--lrs-ink, #1a1c1e) !important; background: rgba(16, 24, 40, .04) !important; }
}
html body .rep-navbar-floating .rep-nav-link.active,
html body .rep-navbar-floating .rep-nav-link[aria-current="page"],
html body .rep-navbar-floating .rep-nav-link.has-dropdown[aria-expanded="true"] { color: var(--lrs-ink, #1a1c1e) !important; font-weight: 650 !important; }
/* Contacto: la única acción con color. */
html body .rep-navbar-floating .rep-nav-link.rep-btn-cta-blue {
	background: var(--lrs-blue, #3b6890) !important; color: #fff !important; font-weight: 600 !important; box-shadow: none !important; border: 0 !important;
}
@media (hover: hover) {
	html body .rep-navbar-floating .rep-nav-link.rep-btn-cta-blue:hover { background: var(--lrs-blue-700, #2f5577) !important; color: #fff !important; }
}
html body .rep-navbar-floating .rep-nav-link:active { transform: scale(.97); }
html body .rep-navbar-floating .rep-nav-link:focus-visible { outline: 2px solid var(--lrs-blue, #3b6890); outline-offset: 2px; }

/* Menús desplegables: una sombra suave y un borde fino. */
html body .rep-mega-dropdown,
html body .rep-more-dropdown { box-shadow: var(--lrs-sh-pop) !important; border: 0 !important; }
html body .rep-dropdown-title { text-transform: none !important; letter-spacing: 0 !important; font-size: .75rem !important; font-weight: 600 !important; color: #6b7680 !important; }

/* Redes: íconos blancos sobre el azul, sin baldosas de colores. */
html body .rep-social-btn {
	background: rgba(255, 255, 255, .12) !important; box-shadow: none !important; border: 0 !important;
	transition: background-color .15s var(--lrs-ease) !important;
}
html body .rep-social-btn svg,
html body .rep-social-btn svg path { fill: #fff !important; }
@media (hover: hover) { html body .rep-social-btn:hover { background: rgba(255, 255, 255, .22) !important; transform: none !important; } }
html body .rep-social-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Teléfono: el menú es una lista limpia, no una grilla de botones con relleno. */
@media (max-width: 768px) {
	html body .rep-navbar-floating .rep-nav-link { background: transparent !important; }
	html body .rep-navbar-floating .rep-nav-link.active { color: var(--lrs-green-700, #3f7a24) !important; }
	html body .rep-navbar-floating .rep-nav-link.rep-btn-cta-blue { background: var(--lrs-blue, #3b6890) !important; color: #fff !important; }
}

/* Buscador bajo la cabecera. */
html body .wpr-search-form-input { box-shadow: none !important; }

/* ───────── Portada ───────── */
html body .rep-hero-compact,
html body .rep-hero-compact .cta-button,
html body .cta-button { box-shadow: none !important; }
html body .bento-card { box-shadow: none !important; }

/* Hero «Responsabilidad extendida del productor»: tipo oración. */
html body #bento-rep-container .is-law-rep h1.lrs-h1-card,
html body #bento-rep-container .is-law-rep h1,
html body #bento-rep-container .is-law-rep h2 { text-transform: none !important; letter-spacing: -.02em !important; }

/* Carril de noticias: sin antetítulo en mayúsculas (el título ya dice qué es). */
html body #leyrep-news-design-rail .rep-rail-kicker { display: none !important; }
html body #leyrep-news-design-rail .rep-rail-link { box-shadow: none !important; }

/* Órbita de productos prioritarios. */
html body #repOrbitalWidget .orbital-node { box-shadow: 0 0 0 1px var(--lrs-hair), var(--lrs-sh-1) !important; }
html body #repOrbitalWidget .orbital-node.active,
html body #repOrbitalWidget .orbital-node.is-active { box-shadow: none !important; }
html body #repOrbitalWidget .center-hub { box-shadow: 0 0 0 1px var(--lrs-hair), var(--lrs-sh-2) !important; }
html body #repOrbitalWidget .hub-badge { text-transform: none !important; letter-spacing: 0 !important; font-weight: 600 !important; font-size: .75rem !important; }

/* Actores: sin sombras sobre el fondo oscuro y con íconos de un solo tono (no un arcoíris). */
html body #wrapper-actores-ley-rep-full .rep-title { text-transform: none !important; letter-spacing: -.025em !important; line-height: 1.1 !important; }
html body #wrapper-actores-ley-rep-full .rep-card { box-shadow: none !important; }
html body #wrapper-actores-ley-rep-full .rep-icon-pill {
	background: rgba(255, 255, 255, .16) !important; color: #fff !important; box-shadow: none !important;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
html body #wrapper-actores-ley-rep-full .rep-card:hover .rep-icon-pill { transform: none !important; box-shadow: none !important; }

/* Pódcast: tipo oración. */
html body .rep-pod-kicker,
html body .rep-pod-title { text-transform: none !important; }
html body .rep-pod-title { letter-spacing: -.03em !important; line-height: 1.05 !important; }
html body .rep-pod-kicker { font-size: 1rem !important; line-height: 1.4 !important; font-weight: 600 !important; }

/* Títulos de Elementor que venían en mayúsculas por estilo. */
html body .elementor-heading-title,
html body .elementor-heading-title a { text-transform: none !important; }
html body .rep-news__title { text-transform: none !important; letter-spacing: -.03em !important; }

/* ───────── Pie ───────── */
html body .rep-foot-title,
html body .rep-foot-menu a,
html body [data-elementor-type="footer"] .elementor-heading-title,
html body [data-elementor-type="footer"] .elementor-nav-menu a,
html body [data-elementor-type="footer"] .elementor-icon-list-text,
html body [data-elementor-type="footer"] a { text-transform: none !important; letter-spacing: 0 !important; }
html body [data-elementor-type="footer"] .elementor-heading-title { letter-spacing: -.01em !important; }

/* ───────── Botones flotantes ───────── */
/* Ayuda urgente: botón blanco con un brillo rojo degradado que respira (solo opacidad y escala). */
html body .urgent-card-container { bottom: 20px; left: 20px; isolation: isolate; }
html body .urgent-card-container::before {
	content: ""; position: absolute; inset: 2px 6px; z-index: -1; border-radius: 999px; pointer-events: none;
	background: linear-gradient(100deg, #ff5a4a 0%, #e0352b 35%, #ff8a6b 65%, #e0352b 100%);
	filter: blur(14px); opacity: .45; transform: scale(.96);
	animation: lrs-urgent-glow 3.2s ease-in-out infinite alternate;
}
@keyframes lrs-urgent-glow {
	0%   { opacity: .32; transform: scale(.94); }
	100% { opacity: .62; transform: scale(1.04); }
}
html body .urgent-card,
html body .urgent-card.urgent-card-active-anim {
	position: relative; animation: none !important; gap: 10px !important; padding: 10px 18px 10px 14px !important; min-height: 48px;
	background: #fff !important; color: var(--lrs-ink, #1a1c1e) !important;
	border-radius: 999px !important; border: 0 !important;
	box-shadow: 0 0 0 1px rgba(224, 53, 43, .14), 0 6px 18px -6px rgba(180, 35, 24, .28) !important;
	transition: transform .2s var(--lrs-ease), box-shadow .2s var(--lrs-ease) !important;
	-webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
html body .urgent-card .lrs-sym-wrap,
html body .urgent-card .urgent-card__icon,
html body .urgent-card .material-symbols-rounded { display: none !important; }
html body .urgent-card::before {
	content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #ff7a6b, #e0352b 70%);
	box-shadow: 0 0 0 3px rgba(224, 53, 43, .14);
}
html body .urgent-card .title { color: var(--lrs-ink, #1a1c1e) !important; font-weight: 650 !important; font-size: .875rem !important; letter-spacing: -.01em !important; }
html body .urgent-card .subtitle { color: #5f6b76 !important; font-weight: 500 !important; font-size: .75rem !important; }
@media (hover: hover) {
	html body .urgent-card:hover { transform: translateY(-1px) !important; box-shadow: 0 0 0 1px rgba(224, 53, 43, .22), 0 10px 24px -8px rgba(180, 35, 24, .36) !important; }
}
html body .urgent-card:active { transform: scale(.97) !important; transition-duration: .1s !important; }
html body .urgent-card:focus-visible { outline: 2px solid #e0352b; outline-offset: 3px; }

/* WhatsApp: el logo oficial, en el verde de la marca, con una sombra neutra y corta. */
html body #wa-leyrep-button { bottom: 20px; right: 20px; }
html body #wa-leyrep-button .wa-icon-button {
	width: 56px !important; height: 56px !important; background: #25d366 !important; color: #fff !important;
	box-shadow: 0 4px 14px rgba(16, 24, 40, .16) !important; transition: transform .15s var(--lrs-ease) !important;
}
html body #wa-leyrep-button .wa-icon-button:hover { transform: scale(1.04) !important; box-shadow: 0 4px 14px rgba(16, 24, 40, .16) !important; }
html body #wa-leyrep-button .wa-icon-button:active { transform: scale(.96) !important; }
html body #wa-leyrep-button .wa-icon-button svg { width: 30px !important; height: 30px !important; fill: #fff; color: #fff; }
html body #wa-leyrep-button .wa-icon-button img { display: none; }
@media (max-width: 480px) {
	html body .urgent-card-container { bottom: 16px; left: 16px; }
	html body #wa-leyrep-button { bottom: 16px; right: 16px; }
	html body #wa-leyrep-button .wa-icon-button { width: 52px !important; height: 52px !important; }
	html body #wa-leyrep-button .wa-icon-button svg { width: 28px !important; height: 28px !important; }
}

/* ───────── Menú que acompaña el scroll (assets/js/refine.js) ───────── */
.lrs-nav-ph { display: block; }
html.lrs-nav-floating body .rep-navbar-floating {
	position: fixed !important; top: var(--lrs-nav-top, 10px); left: 50%; z-index: 9990;
	width: var(--lrs-nav-w, calc(100vw - 20px)) !important; max-width: calc(100vw - 20px) !important; margin: 0 !important;
	transform: translate3d(-50%, calc(-100% - var(--lrs-nav-top, 10px) - 16px), 0);
	transition: transform .45s var(--lrs-ease), box-shadow .3s var(--lrs-ease) !important;
	background: rgba(255, 255, 255, .82) !important;
	-webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
	border: 0 !important;
	box-shadow: 0 0 0 1px rgba(16, 24, 40, .07), 0 12px 32px -14px rgba(16, 24, 40, .28) !important;
	will-change: transform;
}
html.lrs-nav-floating.lrs-nav-shown body .rep-navbar-floating { transform: translate3d(-50%, 0, 0); }
html.lrs-nav-instant body .rep-navbar-floating { transition: none !important; }
@media (prefers-reduced-transparency: reduce) { html.lrs-nav-floating body .rep-navbar-floating { background: #fff !important; -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* Teléfono: flotando, el menú es una sola fila que se desliza con el dedo (no la grilla de 3 filas). */
@media (max-width: 768px) {
	html.lrs-nav-floating body .rep-navbar-floating { padding: 5px !important; border-radius: 16px !important; }
	html.lrs-nav-floating body .rep-navbar-floating .rep-nav-menu {
		display: flex !important; flex-wrap: nowrap !important; justify-content: flex-start !important; gap: 4px !important; overflow-x: auto; overscroll-behavior-x: contain;
		scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-padding-inline: 8px;
		-webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent);
	}
	html.lrs-nav-floating body .rep-navbar-floating .rep-nav-menu::-webkit-scrollbar { display: none; }
	html.lrs-nav-floating body .rep-navbar-floating .rep-nav-item { flex: none !important; width: auto !important; }
	html.lrs-nav-floating body .rep-navbar-floating .rep-nav-item.item-secondary { display: block !important; }
	html.lrs-nav-floating body .rep-navbar-floating .rep-nav-item.item-more { display: none !important; }
	html.lrs-nav-floating body .rep-navbar-floating .rep-nav-link { width: auto !important; min-height: 40px !important; padding: 8px 12px !important; white-space: nowrap; border-radius: 12px !important; }
}

/* ───────── Bordes: una sola escala (--lrs-r-*), un poco más redondeada ───────── */
html body .rep-master-canopy { border-bottom-left-radius: var(--lrs-r-xl, 30px) !important; border-bottom-right-radius: var(--lrs-r-xl, 30px) !important; }
html body .rep-navbar-floating { border-radius: var(--lrs-r-pill, 999px) !important; }
html body :is(.rep-mega-dropdown, .rep-more-dropdown) { border-radius: var(--lrs-r-lg, 24px) !important; }
html body :is(.rep-dropdown-card, .rep-more-link, .rep-sector-item) { border-radius: var(--lrs-r-sm, 14px) !important; }
html body #leyrep-news-design-rail .rep-rail-link { border-radius: var(--lrs-r-lg, 24px) !important; }
html body #leyrep-news-design-rail .rep-rail-image-frame { border-radius: calc(var(--lrs-r-lg, 24px) - 1px) calc(var(--lrs-r-lg, 24px) - 1px) 0 0 !important; }
html body #wrapper-actores-ley-rep-full .rep-card { border-radius: var(--lrs-r-lg, 24px) !important; }
html body #wrapper-actores-ley-rep-full .rep-icon-pill { border-radius: var(--lrs-r-sm, 14px) !important; }
html body .bento-card .bento-icon, html body .bento-card [class*="icon"]:not(svg):not(path) { border-radius: var(--lrs-r-sm, 14px); }
html body .wpr-search-form-input, html body .wpr-search-form { border-radius: var(--lrs-r-pill, 999px) !important; }
html body :is(.elementor-button, .cta-button, .rep-hero-compact .cta-button) { border-radius: var(--lrs-r-pill, 999px) !important; }
@media (max-width: 768px) {
	html body .rep-master-canopy { border-bottom-left-radius: var(--lrs-r-lg, 24px) !important; border-bottom-right-radius: var(--lrs-r-lg, 24px) !important; }
	html body .rep-navbar-floating { border-radius: var(--lrs-r-md, 18px) !important; }
	html body .rep-navbar-floating .rep-nav-link { border-radius: var(--lrs-r-xs, 10px) !important; }
}

/* ───────── Degradados sutiles (sobre los colores de marca, sin cambiarlos) ───────── */
/* Cabecera: luz suave arriba a la izquierda y un leve oscurecido hacia abajo. */
html body .rep-master-canopy {
	background-image:
		radial-gradient(120% 160% at 12% -20%, rgba(255, 255, 255, .16), transparent 55%),
		radial-gradient(80% 120% at 100% 120%, rgba(115, 188, 75, .16), transparent 60%),
		linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .06)) !important;
}
/* Tarjetas claras de la portada: blanco arriba que se funde con su gris. */
html body .bento-card.is-light { background-image: linear-gradient(180deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, 0) 70%) !important; }
/* Tarjeta azul: un destello verde en la esquina. */
html body .bento-card.is-blue {
	background-image:
		radial-gradient(90% 140% at 100% 0%, rgba(115, 188, 75, .28), transparent 55%),
		linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .08)) !important;
}
/* Ley REP: un velo verde y azul muy tenue abajo. */
html body .bento-card.is-law-rep {
	background-image:
		radial-gradient(120% 70% at 50% 120%, rgba(115, 188, 75, .12), transparent 70%),
		radial-gradient(90% 60% at 100% 100%, rgba(62, 99, 129, .08), transparent 70%) !important;
}
/* Actores: profundidad con dos luces de marca. */
html body #wrapper-actores-ley-rep-full {
	background-image:
		radial-gradient(60% 80% at 0% 0%, rgba(115, 188, 75, .16), transparent 60%),
		radial-gradient(70% 90% at 100% 100%, rgba(120, 170, 220, .14), transparent 60%),
		linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .10)) !important;
}
html body #wrapper-actores-ley-rep-full .rep-title { margin-inline: auto !important; text-align: center !important; text-wrap: balance; }
/* Pie: luz tenue arriba. */
html body [data-elementor-id="168"] .elementor-element-fa9e740,
html body .rep-footer .rep-foot-main {
	background-image:
		radial-gradient(80% 60% at 20% 0%, rgba(115, 188, 75, .10), transparent 60%),
		radial-gradient(70% 60% at 100% 0%, rgba(120, 170, 220, .10), transparent 60%) !important;
}
/* Mientras carga una imagen de noticia, un degradado de marca en vez de un hueco. */
html body #leyrep-news-design-rail .rep-rail-image-frame { background: linear-gradient(135deg, #eef3f8, #f1f7ec) !important; }
/* Botones verdes de acción: brillo superior sutil. */
html body :is(.cta-button, .rep-hero-compact .cta-button) { background-image: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0)) !important; }

/* ───────── Microinteracciones (solo transform y opacidad) ───────── */
html body :is(.bento-card, .rep-card, .rep-rail-link, .rep-dropdown-card, .rep-sector-item, .rep-more-link, .cta-button, .elementor-button, .rep-social-btn, .rep-nav-link, .lrs-btn, .orbital-node, #wa-leyrep-button .wa-icon-button) {
	-webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
html body :is(.bento-card, .rep-card, .rep-rail-link, .rep-dropdown-card, .rep-sector-item, .cta-button, .elementor-button, .lrs-btn) {
	transition: transform .22s var(--lrs-ease), box-shadow .22s var(--lrs-ease), border-color .22s var(--lrs-ease), background-color .22s var(--lrs-ease) !important;
}
/* Al presionar: se hunde un poco (respuesta inmediata en el toque). */
html body :is(.bento-card, .rep-card, .rep-rail-link):active { transform: scale(.985) !important; transition-duration: .1s !important; }
html body :is(.rep-dropdown-card, .rep-sector-item, .rep-more-link, .cta-button, .elementor-button, .lrs-btn, .rep-social-btn):active { transform: scale(.96) !important; transition-duration: .1s !important; }
@media (hover: hover) {
	/* Las imágenes se acercan apenas dentro de su marco; las flechas avanzan. */
	html body #leyrep-news-design-rail .rep-rail-image,
	html body #wrapper-actores-ley-rep-full .rep-card img { transition: transform .6s var(--lrs-ease) !important; }
	html body #leyrep-news-design-rail .rep-rail-link:hover .rep-rail-image,
	html body #wrapper-actores-ley-rep-full .rep-card:hover img { transform: scale(1.04); }
	html body #leyrep-news-design-rail .rep-rail-link:hover { transform: none !important; box-shadow: 0 12px 28px -16px rgba(16, 24, 40, .3) !important; }
	html body :is(.rep-rail-read span, .rep-rail-all span, .cta-button svg, .rep-card .rep-arrow, .rep-card [class*="arrow"]) { display: inline-block; transition: transform .25s var(--lrs-ease); }
	html body :is(.rep-rail-link:hover .rep-rail-read span, .rep-rail-all:hover span, .cta-button:hover svg) { transform: translateX(3px); }
	html body .rep-card:hover :is(.rep-arrow, [class*="arrow"]) { transform: translate(2px, -2px); }
	html body .bento-card.is-light:hover { border-color: rgba(62, 99, 129, .22) !important; }
	html body .rep-dropdown-card:hover, html body .rep-sector-item:hover { transform: translateY(-1px); }
}
/* Submenús: aparecen desde su botón (escala + opacidad), con la curva de Apple. */
html body :is(.rep-mega-dropdown, .rep-more-dropdown) {
	transform-origin: top center;
	transition: opacity .22s var(--lrs-ease), transform .28s var(--lrs-ease), visibility 0s linear .28s !important;
}
html body .rep-nav-item.is-open :is(.rep-mega-dropdown, .rep-more-dropdown) { transition: opacity .18s var(--lrs-ease), transform .28s var(--lrs-ease), visibility 0s !important; }
@media (min-width: 1081px) {
	html body .rep-nav-item:is(:hover, :focus-within) .rep-mega-dropdown { transition: opacity .18s var(--lrs-ease), transform .28s var(--lrs-ease), visibility 0s !important; }
}
html body .rep-nav-link.has-dropdown svg { transition: transform .25s var(--lrs-ease); }
html body .rep-nav-link.has-dropdown[aria-expanded="true"] svg,
html body .rep-nav-item.is-open > .rep-nav-link svg { transform: rotate(180deg); }
/* Cinta: se pausa al tocarla o al pasar el cursor, y al enfocar un enlace con el teclado. */
html body .rep-ticker-viewport:is(:hover, :focus-within) .rep-ticker-track { animation-play-state: paused !important; }

/* ───────── Usabilidad ───────── */
html { scroll-padding-top: calc(var(--lrs-nav-top, 10px) + 72px); }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
html body :is(a, button, [role="button"], input, select, textarea, summary):focus-visible { outline: 2px solid var(--lrs-blue, #3e6381); outline-offset: 2px; }
html body #wrapper-actores-ley-rep-full :is(a, button):focus-visible,
html body .rep-master-canopy .rep-ticker-top-bar :is(a, button):focus-visible { outline-color: #fff; }
::selection { background: rgba(115, 188, 75, .28); }

/* ───────── Movimiento ───────── */
@media (prefers-reduced-motion: reduce) {
	html body .urgent-card, html body #wa-leyrep-button .wa-icon-button, html body .rep-navbar-floating .rep-nav-link { transition: none !important; }
	html body .urgent-card-container::before { animation: none; opacity: .45; transform: none; }
	html.lrs-nav-floating body .rep-navbar-floating { transition: none !important; }
	html body :is(.bento-card, .rep-card, .rep-rail-link, .rep-dropdown-card, .rep-sector-item, .rep-more-link, .cta-button, .elementor-button, .lrs-btn, .rep-rail-image, .rep-card img) { transition: none !important; transform: none !important; }
	html body :is(.rep-mega-dropdown, .rep-more-dropdown) { transition: opacity .15s linear, visibility 0s !important; }
}
