/*
Theme Name: Emaús Kadence
Theme URI: https://decaminoaemaus.com
Author: De Camino a Emaús
Description: Tema hijo de Kadence con paleta azul, rojo y blanco para De Camino a Emaús.
Template: kadence
Version: 1.0.11
Requires at least: 6.6
Tested up to: 7.1
Text Domain: emaus-kadence
License: GNU General Public License v3.0 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/

/* Paleta oficial del sitio: azul Emaús, rojo Emaús y blanco. */
:root {
	--global-palette1: #123E78;  /* Azul Emaús (primario) */
	--global-palette2: #1D4ED8;  /* Azul vivo (enlaces y hover) */
	--global-palette3: #102A54;  /* Texto principal */
	--global-palette4: #425A7A;  /* Texto secundario */
	--global-palette5: #5B6F8C;  /* Texto medio */
	--global-palette6: #6B7F9E;  /* Texto sutil */
	--global-palette7: #E8F0FA;  /* Fondo suave */
	--global-palette8: #F4F8FD;  /* Fondo general */
	--global-palette9: #FFFFFF;  /* Blanco */
	--global-palette10: #FFFFFF; /* Complemento */
	--global-palette11: #123E78; /* Aprobado / éxito (azul) */
	--global-palette12: #1D4ED8; /* Información */
	--global-palette13: #B91C1C; /* Alerta / rechazo (rojo) */
	--global-palette14: #B91C1C; /* Advertencia */
	--global-palette15: #0B2450; /* Azul profundo */

	--emaus-azul: var(--global-palette1);
	--emaus-azul-vivo: var(--global-palette2);
	--emaus-azul-profundo: var(--global-palette15);
	--emaus-rojo: var(--global-palette13);
	--emaus-rojo-claro: #FFB4B4;
	--emaus-blanco: var(--global-palette9);
	--emaus-fondo: var(--global-palette8);
	--emaus-fondo-suave: var(--global-palette7);
	--emaus-borde: #CBD8EA;
	--emaus-texto: var(--global-palette3);
	--emaus-texto-medio: var(--global-palette4);

	/* Botones aprobados: principal azul con letra dorada; secundario dorado. */
	--emaus-btn-principal-bg: linear-gradient(180deg, #013A94 0%, #2A6BEA 100%);
	--emaus-btn-principal-texto: #FFE9B8;
	--emaus-btn-principal-borde: #C9A227;
	--emaus-btn-principal-sombra: 0 6px 18px rgba(1, 58, 148, 0.30);
	--emaus-btn-secundario-bg: linear-gradient(90deg, #FFE9B8 0%, #C9A227 100%);
	--emaus-btn-secundario-texto: #1A2333;
	--emaus-btn-secundario-sombra: 0 6px 18px rgba(201, 162, 39, .28);
}

body {
	background: var(--emaus-fondo);
	color: var(--emaus-texto);
}

a {
	color: var(--emaus-azul-vivo);
}

a:hover,
a:focus {
	color: var(--emaus-rojo);
}

h1, h2, h3, h4, h5, h6 {
	color: var(--emaus-texto);
}

button,
input[type="submit"],
.wp-block-button__link {
	background: var(--emaus-azul);
	border-color: var(--emaus-azul);
	color: var(--emaus-blanco);
}

:focus-visible {
	outline: 3px solid var(--emaus-azul-vivo);
	outline-offset: 2px;
}

#masthead.site-header {
	border-top: 4px solid var(--emaus-rojo);
	background: linear-gradient(90deg, #013A94 0%, #1D4ED8 100%);
}

.site-header .site-branding a.brand .site-title,
.site-header .site-branding a.brand .site-description {
	color: #fff;
}

/* Menú principal (escritorio): claro, compacto y con acentos propios. */
#site-navigation .primary-menu-container > ul.menu {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: clamp(4px, .7vw, 12px);
}

#site-navigation .menu > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 46px;
	padding: 6px 4px;
	border: 0;
	border-bottom: 2px solid transparent;
	color: #fff;
	font-size: .88rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

#site-navigation .menu > li > a:hover,
#site-navigation .menu > li > a:focus,
#site-navigation .menu > li.current-menu-item > a,
#site-navigation .menu > li.current-menu-ancestor > a {
	color: #fff;
	border-bottom-color: var(--emaus-rojo);
}

#site-navigation .menu > li.menu-item-object-page.current-menu-item > a {
	color: #fff;
}

#site-navigation .menu > li > a[href$="/me-ayudas/"] {
	padding: 7px 18px;
	border: 2px solid var(--emaus-btn-principal-borde, #C9A227);
	border-radius: 999px;
	background: var(--emaus-btn-principal-bg, linear-gradient(180deg, #013A94 0%, #2A6BEA 100%));
	box-shadow: var(--emaus-btn-principal-sombra, 0 6px 18px rgba(1, 58, 148, 0.30));
	color: var(--emaus-btn-principal-texto, #FFE9B8);
	font-size: 14px;
	line-height: 1.2;
	font-weight: 700;
	transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

#site-navigation .menu > li > a[href$="/me-ayudas/"]:hover,
#site-navigation .menu > li > a[href$="/me-ayudas/"]:focus {
	background: var(--emaus-btn-principal-bg, linear-gradient(180deg, #013A94 0%, #2A6BEA 100%));
	color: var(--emaus-btn-principal-texto, #FFE9B8);
	filter: brightness(1.08) saturate(1.05);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(1, 58, 148, .38);
}

#site-navigation .menu > li > a[href$="/iniciar-sesion/"] {
	padding: .6rem 1rem;
	border: 2px solid rgba(255, 255, 255, .8);
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

#site-navigation .menu > li > a[href$="/iniciar-sesion/"]:hover,
#site-navigation .menu > li > a[href$="/iniciar-sesion/"]:focus {
	background: #fff;
	color: #013A94;
}

#site-navigation .sub-menu {
	min-width: 210px;
	margin: 0;
	padding: 8px;
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 14px;
	background: #013A94;
	box-shadow: 0 14px 30px rgba(11, 36, 80, .35);
	z-index: 20;
}

#site-navigation .sub-menu a {
	display: block;
	padding: 10px 12px;
	border: 0;
	border-radius: 9px;
	color: #fff;
	font-size: .88rem;
	font-weight: 600;
}

#site-navigation .sub-menu a:hover,
#site-navigation .sub-menu a:focus {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

/* Menú móvil: mismo recorrido, botones grandes y submenús legibles. */
.site-header .menu-toggle-open {
	border: 2px solid #fff;
	border-radius: 12px;
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

#mobile-drawer .drawer-inner {
	background: linear-gradient(180deg, #013A94 0%, #0B2450 100%);
}

#mobile-drawer .drawer-header {
	border-bottom: 1px solid rgba(255, 255, 255, .28);
}

#mobile-drawer .drawer-header .menu-toggle-close {
	color: #fff;
}

#mobile-drawer #mobile-menu {
	display: grid;
	gap: 3px;
	margin: 0;
	padding: 14px 16px 32px;
	list-style: none;
}

#mobile-drawer #mobile-menu > li > a,
#mobile-drawer #mobile-menu .drawer-nav-drop-wrap > a {
	display: flex;
	align-items: center;
	min-height: 50px;
	padding: 10px 14px;
	border-radius: 12px;
	background: transparent;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}

#mobile-drawer #mobile-menu > li > a:hover,
#mobile-drawer #mobile-menu > li > a:focus,
#mobile-drawer #mobile-menu > li.current-menu-item > a,
#mobile-drawer #mobile-menu .drawer-nav-drop-wrap > a:hover,
#mobile-drawer #mobile-menu .drawer-nav-drop-wrap > a:focus {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

#mobile-drawer #mobile-menu .drawer-sub-toggle {
	width: 46px;
	height: 46px;
	border: 1px solid rgba(255, 255, 255, .35);
	border-radius: 10px;
	background: rgba(255, 255, 255, .10);
	color: #fff;
}

#mobile-drawer #mobile-menu .drawer-sub-toggle[aria-expanded="true"] svg {
	transform: rotate(180deg);
}

#mobile-drawer #mobile-menu .sub-menu {
	margin: 0;
	padding: 4px 0 8px 16px;
	border-left: 2px solid rgba(255, 255, 255, .28);
	list-style: none;
}

#mobile-drawer #mobile-menu .sub-menu a {
	display: block;
	min-height: 42px;
	padding: 9px 12px;
	border-radius: 10px;
	background: transparent;
	color: #fff;
	font-size: .93rem;
}

#mobile-drawer #mobile-menu .sub-menu a:hover,
#mobile-drawer #mobile-menu .sub-menu a:focus {
	background: rgba(255, 255, 255, .14);
	color: #fff;
}

#mobile-drawer #mobile-menu > li > a[href$="/me-ayudas/"],
#mobile-drawer #mobile-menu > li > a[href$="/iniciar-sesion/"] {
	justify-content: center;
	margin-top: 8px;
	border-radius: 999px;
	color: #fff;
	text-align: center;
}

#mobile-drawer #mobile-menu > li > a[href$="/iniciar-sesion/"] {
	background: linear-gradient(90deg, #013A94 0%, #1D4ED8 100%);
}

/* Separadores ámbar entre enlaces y botón ¿Me ayudas? con el degradado aprobado. */
#mobile-drawer .mobile-navigation ul li.menu-item-has-children .drawer-nav-drop-wrap,
#mobile-drawer .mobile-navigation ul li:not(.menu-item-has-children) a {
	border-bottom: 1px solid #FFE9B8;
}

#mobile-drawer #mobile-menu > li > a[href$="/me-ayudas/"] {
	min-height: 56px;
	padding: 16px 40px;
	border: 2px solid var(--emaus-btn-principal-borde, #C9A227);
	border-radius: 999px;
	background: var(--emaus-btn-principal-bg, linear-gradient(180deg, #013A94 0%, #2A6BEA 100%));
	box-shadow: var(--emaus-btn-principal-sombra, 0 6px 18px rgba(1, 58, 148, 0.30));
	color: var(--emaus-btn-principal-texto, #FFE9B8);
	font-size: 18px;
	font-weight: 700;
	transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}

#mobile-drawer #mobile-menu > li > a[href$="/me-ayudas/"]:hover,
#mobile-drawer #mobile-menu > li > a[href$="/me-ayudas/"]:focus {
	background: var(--emaus-btn-principal-bg, linear-gradient(180deg, #013A94 0%, #2A6BEA 100%));
	color: var(--emaus-btn-principal-texto, #FFE9B8);
	filter: brightness(1.08) saturate(1.05);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(1, 58, 148, .38);
}

/* Kadence tiñe los enlaces del contenido con su color de acento; los botones Emaús mantienen su paleta aprobada. */
.entry-content a.emaus-btn,
.entry-content button.emaus-btn,
.entry-content a.emaus-tienda-btn { background: var(--emaus-btn-principal-bg, linear-gradient(180deg, #013A94 0%, #2A6BEA 100%)) !important; }
.entry-content a.emaus-btn.emaus-btn--secundario,
.entry-content button.emaus-btn.emaus-btn--secundario,
.entry-content a.emaus-tienda-btn:not(.emaus-btn--principal) { background: var(--emaus-btn-secundario-bg, linear-gradient(90deg, #FFE9B8 0%, #C9A227 100%)) !important; }
.entry-content a.emaus-btn.emaus-btn--principal,
.entry-content button.emaus-btn.emaus-btn--principal,
.entry-content a.emaus-tienda-btn.emaus-btn--principal { background: var(--emaus-btn-principal-bg, linear-gradient(180deg, #013A94 0%, #2A6BEA 100%)) !important; }
/* El producto agotado no compra: su botón es gris aunque Kadence tiña el contenido. */
.entry-content button.emaus-btn.emaus-btn--agotado { background: linear-gradient(180deg, #B4BCC7 0%, #7E8B99 100%) !important; color: #fff !important; border-color: #CCD5DF !important; }
.entry-content a.emaus-btn.emaus-btn--peligro,
.entry-content button.emaus-btn.emaus-btn--peligro { background: #E60012 !important; }

/* Páginas legales: lectura cómoda, sin perder el estilo Emaús. */
body.page-id-17 .entry-content,
body.page-id-18 .entry-content,
body.page-id-19 .entry-content {
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
	font-size: 16px;
	line-height: 1.75;
}
body.page-id-17 .entry-content > p:first-child,
body.page-id-18 .entry-content > p:first-child,
body.page-id-19 .entry-content > p:first-child {
	color: var(--emaus-texto-medio);
	font-size: 15px;
	font-style: italic;
	margin-bottom: 1.6rem;
}
body.page-id-17 .entry-content h2,
body.page-id-18 .entry-content h2,
body.page-id-19 .entry-content h2 {
	margin: 2rem 0 .6rem;
	padding-left: 12px;
	border-left: 4px solid #C9A227;
	color: #013A94;
	font-size: 21px;
	line-height: 1.3;
}
body.page-id-17 .entry-content p,
body.page-id-18 .entry-content p,
body.page-id-19 .entry-content p {
	margin: 0 0 1rem;
}
@media (max-width: 760px) {
	body.page-id-17 .entry-content,
	body.page-id-18 .entry-content,
	body.page-id-19 .entry-content {
		font-size: 15px;
		line-height: 1.65;
	}
	body.page-id-17 .entry-content h2,
	body.page-id-18 .entry-content h2,
	body.page-id-19 .entry-content h2 {
		margin-top: 1.6rem;
		font-size: 19px;
	}
}

