/*
 * Complementos de estilo de la Asociación de Empresarios de El Puerto.
 * (Se carga desde el plugin AEP Core, no es un tema hijo.)
 */

/* ---- Ajustes de convivencia con GeneratePress ---- */
.site {
	display: block;
	margin-bottom: 0;
	padding-bottom: 0;
}

.site-header,
#masthead {
	background: none !important;
	padding: 0 !important;
	box-shadow: none !important;
	position: static;
}

.site-main {
	background: transparent;
}

.separate-containers .site-main {
	margin: 0;
}

/* ---- Barra del pie con redes sociales ---- */
.menuRedesSocialesFooter .container {
	padding-top: 0.35rem;
	padding-bottom: 0.35rem;
}

.menuRedesSocialesFooter ul li i {
	font-size: 1.35rem;
}

.menuRedesSocialesFooter a {
	color: #fff;
	text-decoration: none;
}

/* ---- Columnas del pie ---- */
.contenidosFooter {
	color: #fff;
	font-family: var(--fuentePrincipal);
}

.contenidosFooter .logoFooter {
	display: block;
	max-width: 320px;
	height: auto;
	margin: 0 auto 1.5rem;
}

.contenidosFooter h4,
.contenidosFooter .tituloFooter {
	color: #fff;
	font-family: var(--fuenteTitulos);
	font-size: 1.35rem;
	font-weight: 700;
	margin: 0 0 1.4rem;
}

.contenidosFooter ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.contenidosFooter li {
	margin: 0.4rem 0;
	font-size: 1.15rem;
}

.contenidosFooter a,
.contenidosFooter a:visited,
.contenidosFooter a:focus,
.contenidosFooter a:hover {
	color: #fff;
	text-decoration: none;
}

.contenidosFooter .contactoFooter p {
	color: #fff;
	font-family: var(--fuentePrincipal);
	font-size: 1.15rem;
	line-height: 1.2;
	margin: 0 0 0.35rem;
}

/* ---- Pie inferior ---- */
.site-info {
	display: block;
	padding: 1.4rem 1rem 1.6rem;
	color: #fff;
	background-color: transparent;
	font-size: 1.1rem;
}

/* ---- Página con Elementor a ancho completo ---- */
.elementor-page .site-main {
	padding: 0;
}

/* ---- Buscador (widget de bloque) en la barra lateral ---- */
#secondary .wp-block-search__inside-wrapper {
	display: flex;
}

#secondary .wp-block-search__input {
	flex: 1 1 auto;
	width: auto;
}

#secondary .wp-block-search__button {
	margin-left: 0.5rem;
}

/* ---- GeneratePress: sin contenedor propio en páginas Elementor ---- */
.elementor-page .site {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.elementor-page .site-content,
.elementor-page .site-main {
	width: 100%;
	max-width: none;
}

/* ---- Plantillas propias: mismo ancho que el tema original ---- */
body.aep-plantilla .site,
body.aep-plantilla .site-content {
	width: 100%;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

body.aep-plantilla #primary.content-area,
body.aep-plantilla #primary.site-main,
body.aep-plantilla #main.site-main {
	width: 100%;
	max-width: none;
	float: none;
	margin: 0;
}

/* El main original es un container-fluid: el banner ocupa todo el ancho. */
body.aep-plantilla #main.site-main {
	padding: 0 12px;
}

/* Elementor fuerza height:auto en las imágenes; recuperamos la altura del banner. */
body.aep-plantilla .elementor .imagen-cabecera {
	width: 100vw;
	height: 375px;
}

@media (max-width: 991px) {
	body.aep-plantilla .elementor .imagen-cabecera {
		height: 260px;
	}
}

/* Elementor resetea los bordes de las imágenes: recuperamos el marco del tema. */
body.aep-plantilla .elementor .imagen-presidente {
	border-radius: 1.5rem;
	border: 1px double var(--colorPrincipal);
	padding: 0.2rem;
}

/* ---- Páginas sin plantilla propia (blog, boletín, 404, búsqueda…):
        mismo esquema que el tema original: contenido y barra a ancho completo,
        con los widgets apilados debajo. ---- */
body:not(.elementor-page) .site {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

body:not(.elementor-page) .site-content {
	display: block;
	width: 100%;
	max-width: none;
	padding: 0;
}

body:not(.elementor-page) #primary.content-area,
body:not(.elementor-page) #main.site-main {
	width: 100%;
	max-width: none;
	float: none;
}

body:not(.elementor-page) #right-sidebar,
body:not(.elementor-page) #secondary {
	width: 100%;
	max-width: none;
	float: none;
	margin-top: 1.5rem;
	padding: 0;
}

/* El 404 original no muestra la barra lateral. */
body.error404 #right-sidebar {
	display: none;
}

/* ---- Foro bbPress: alineado con la identidad visual AEP ---- */
.page-id-309 .bbp-forums,
.page-id-309 .bbp-topics {
	border: 1px solid #d9e2e7;
	border-collapse: collapse;
	font-family: var(--fuentePrincipal, "Roboto Condensed", sans-serif);
}

.page-id-309 .bbp-forums th,
.page-id-309 .bbp-topics th {
	background: #007099;
	color: #fff;
	padding: 0.8rem 1rem;
	text-align: left;
}

.page-id-309 #bbpress-forums .bbp-header,
.page-id-309 #bbpress-forums .bbp-footer {
	background: #007099;
	color: #fff;
}

.page-id-309 #bbpress-forums .forum-titles li {
	color: #fff;
	font-weight: 700;
}

.page-id-309 #bbpress-forums .bbp-body > ul {
	border-bottom: 1px solid #d9e2e7;
	padding-top: 0.65rem;
	padding-bottom: 0.65rem;
}

.page-id-309 #bbpress-forums li.bbp-forum-info,
.page-id-309 #bbpress-forums li.bbp-forum-topic-count,
.page-id-309 #bbpress-forums li.bbp-forum-reply-count,
.page-id-309 #bbpress-forums li.bbp-forum-freshness {
	padding-top: 0.55rem;
	padding-bottom: 0.55rem;
}

.page-id-309 .bbp-forums td,
.page-id-309 .bbp-topics td {
	border-color: #d9e2e7;
	padding: 0.85rem 1rem;
}

.page-id-309 .bbp-forums .bbp-forum-title a,
.page-id-309 .bbp-topics .bbp-topic-title a {
	color: #007099;
	font-weight: 700;
}

.page-id-309 .bbp-forums .bbp-forum-title a:hover,
.page-id-309 .bbp-topics .bbp-topic-title a:hover {
	color: #5593b4;
}

.page-id-309 .bbp-search-form input[type="text"] {
	min-height: 42px;
	max-width: 320px;
	border: 1px solid #b0b0b0;
	padding: 0.45rem 0.7rem;
}

.page-id-309 .bbp-search-form input[type="submit"],
.page-id-309 .bbp-submit-wrapper button {
	min-height: 42px;
	border: 0;
	background: #007099;
	color: #fff;
	padding: 0.55rem 1rem;
	cursor: pointer;
}

.page-id-309 #bbpress-forums .bbp-search-form .button {
	background: #007099;
	border: 0;
	border-radius: 2px;
	color: #fff;
	font-weight: 600;
	padding: 0.65rem 1rem;
}

.page-id-309 .bbp-search-form input[type="submit"]:hover,
.page-id-309 .bbp-submit-wrapper button:hover {
	background: #5593b4;
}

.page-id-309 .bbp-search-form input:focus-visible,
.page-id-309 .bbp-search-form input[type="submit"]:focus-visible,
.page-id-309 .bbp-forums a:focus-visible {
	outline: 3px solid #f2bd3d;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.page-id-309 .bbp-forums th,
	.page-id-309 .bbp-forums td {
		padding: 0.65rem 0.45rem;
		font-size: 0.9rem;
	}

	.page-id-309 .bbp-forums .bbp-forum-topic-count,
	.page-id-309 .bbp-forums .bbp-forum-reply-count {
		white-space: nowrap;
	}

	.page-id-309 #bbpress-forums ul.bbp-forums {
		font-size: 0.9rem;
	}

	.page-id-309 #bbpress-forums .bbp-forum-topic-count,
	.page-id-309 #bbpress-forums .bbp-forum-reply-count {
		display: none !important;
	}

	.page-id-309 #bbpress-forums .bbp-forum-info {
		width: 60% !important;
	}

	.page-id-309 #bbpress-forums .bbp-forum-freshness {
		width: 40% !important;
	}
}
