/*
Theme Name: SURELEC
Theme URI: https://www.surelec.es/
Author: SURELEC
Description: Tema corporativo ligero y responsive para SURELEC Instalaciones Eléctricas. Diseñado para funcionar con SURELEC Site Installer en WordPress 7.1, sin constructores visuales ni fuentes externas.
Version: 1.1.0
Requires at least: 7.1
Requires PHP: 7.4
Text Domain: surelec-theme
Tags: custom-logo, custom-menu, full-width-template, responsive-layout, accessibility-ready
*/

:root{
	--surelec-blue:#243165;
	--surelec-blue-dark:#18234f;
	--surelec-orange:#E76213;
	--surelec-grey:#888687;
	--surelec-soft:#F7F8FA;
	--surelec-line:#E5E8EE;
	--surelec-text:#252A35;
	--surelec-muted:#6B7180;
	--surelec-white:#FFFFFF;
	--surelec-max:1220px;
}

html{
	scroll-behavior:smooth;
}

body{
	margin:0;
	background:#fff;
	color:var(--surelec-text);
	font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
	line-height:1.6;
	-webkit-font-smoothing:antialiased;
}

body,
button,
input,
select,
textarea{
	font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}

*,
*::before,
*::after{
	box-sizing:border-box;
}

img{
	max-width:100%;
	height:auto;
}

a{
	color:var(--surelec-blue);
}

.screen-reader-text{
	position:absolute!important;
	width:1px;
	height:1px;
	padding:0;
	margin:-1px;
	overflow:hidden;
	clip:rect(0,0,0,0);
	white-space:nowrap;
	border:0;
}

.screen-reader-text:focus{
	position:fixed!important;
	top:10px;
	left:10px;
	z-index:100000;
	width:auto;
	height:auto;
	padding:12px 16px;
	margin:0;
	clip:auto;
	background:#fff;
	color:#000;
	border-radius:6px;
	box-shadow:0 4px 18px rgba(0,0,0,.2);
}

.site-shell{
	min-height:100vh;
	display:flex;
	flex-direction:column;
}

.site-main{
	flex:1 0 auto;
	width:100%;
	margin:0;
	padding:0;
}

/* HEADER */
.surelec-site-header{
	position:sticky;
	top:0;
	z-index:999;
	background:rgba(36,49,101,.98);
	backdrop-filter:blur(12px);
	border-bottom:1px solid rgba(255,255,255,.10);
	box-shadow:0 8px 26px rgba(15,24,58,.14);
}

.admin-bar .surelec-site-header{
	top:32px;
}

.surelec-header-inner{
	width:min(var(--surelec-max),calc(100% - 40px));
	min-height:78px;
	margin-inline:auto;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:26px;
}

.surelec-brand{
	display:flex;
	align-items:center;
	flex:0 0 auto;
	min-width:0;
}

.surelec-brand img,
.surelec-brand .custom-logo{
	display:block;
	width:auto;
	max-width:235px;
	height:56px;
	object-fit:contain;
}

.surelec-fallback-logo{
	display:block;
	width:auto;
	max-width:235px;
	height:56px;
	object-fit:contain;
}

.surelec-nav-wrap{
	display:flex;
	align-items:center;
	gap:22px;
}

.surelec-primary-menu{
	margin:0;
	padding:0;
	list-style:none;
	display:flex;
	align-items:center;
	gap:24px;
}

.surelec-primary-menu li{
	margin:0;
}

.surelec-primary-menu a{
	position:relative;
	display:block;
	padding:27px 0 25px;
	color:rgba(255,255,255,.82);
	text-decoration:none;
	font-size:.91rem;
	font-weight:700;
}

.surelec-primary-menu a:hover,
.surelec-primary-menu .current-menu-item > a,
.surelec-primary-menu .current_page_item > a{
	color:#fff;
}

.surelec-primary-menu .current-menu-item > a::after,
.surelec-primary-menu .current_page_item > a::after{
	content:"";
	position:absolute;
	left:0;
	right:0;
	bottom:16px;
	height:3px;
	border-radius:3px;
	background:var(--surelec-orange);
}

.surelec-header-cta{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:44px;
	padding:0 17px;
	border-radius:9px;
	background:var(--surelec-orange);
	color:#fff;
	text-decoration:none;
	font-size:.82rem;
	font-weight:800;
	white-space:nowrap;
}

.surelec-header-cta:hover{
	color:#fff;
	filter:brightness(1.04);
}

.surelec-menu-toggle{
	display:none;
	width:46px;
	height:42px;
	padding:0;
	border:0;
	border-radius:8px;
	background:var(--surelec-blue);
	color:#fff;
	cursor:pointer;
	align-items:center;
	justify-content:center;
}

.surelec-menu-toggle span,
.surelec-menu-toggle::before,
.surelec-menu-toggle::after{
	content:"";
	display:block;
	width:21px;
	height:2px;
	background:currentColor;
	border-radius:2px;
	transition:.2s ease;
}

.surelec-menu-toggle span{
	margin:5px 0;
}

/* Plugin/full-width compatibility */
body.surelec-managed-page .site-main{
	max-width:none;
	width:100%;
}

body.surelec-managed-page .site-main > article,
body.surelec-managed-page .site-main > .page,
body.surelec-managed-page article.page{
	width:100%;
	max-width:none;
	margin:0;
	padding:0;
}

body.surelec-managed-page .entry-content{
	width:100%;
	max-width:none!important;
	margin:0!important;
	padding:0!important;
}

body.surelec-managed-page .surelec-page{
	position:relative!important;
	left:auto!important;
	width:100%!important;
	max-width:none!important;
	margin-left:0!important;
	margin-right:0!important;
}

/* Generic pages not managed by installer */
.surelec-standard-page{
	width:min(920px,calc(100% - 40px));
	margin:0 auto;
	padding:70px 0;
}

.surelec-standard-page h1,
.surelec-standard-page h2,
.surelec-standard-page h3,
.surelec-404 h1{
	font-family:"Arial Narrow","Aptos Narrow","Bahnschrift Condensed","Segoe UI",system-ui,sans-serif;
	color:var(--surelec-blue);
}

.surelec-standard-page h1{
	font-size:clamp(2.6rem,6vw,4.7rem);
	line-height:.95;
}

.surelec-standard-page .entry-content{
	font-size:1.02rem;
}

.surelec-standard-page .entry-content a{
	color:var(--surelec-blue);
	text-decoration-color:var(--surelec-orange);
	text-underline-offset:3px;
}

/* FOOTER */
.surelec-site-footer{
	flex:0 0 auto;
	background:#131d43;
	color:#fff;
}

.surelec-footer-inner{
	width:min(var(--surelec-max),calc(100% - 40px));
	margin-inline:auto;
	padding:50px 0 24px;
}

.surelec-footer-grid{
	display:grid;
	grid-template-columns:1.2fr 1fr 1fr;
	gap:45px;
	padding-bottom:34px;
}

.surelec-footer-brand img{
	width:auto;
	max-width:260px;
	max-height:110px;
	object-fit:contain;
}

.surelec-footer-brand p{
	max-width:430px;
	margin:17px 0 0;
	color:rgba(255,255,255,.61);
	font-size:.9rem;
}

.surelec-site-footer h2{
	margin:4px 0 15px;
	color:#fff;
	font-size:.76rem;
	letter-spacing:.1em;
	text-transform:uppercase;
}

.surelec-footer-links,
.surelec-legal-menu{
	list-style:none;
	margin:0;
	padding:0;
}

.surelec-footer-links li,
.surelec-legal-menu li{
	margin:0 0 8px;
}

.surelec-site-footer a{
	color:rgba(255,255,255,.69);
	text-decoration:none;
	font-size:.88rem;
}

.surelec-site-footer a:hover{
	color:#fff;
}

.surelec-footer-bottom{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:20px;
	padding-top:20px;
	border-top:1px solid rgba(255,255,255,.09);
	color:rgba(255,255,255,.43);
	font-size:.76rem;
}

.surelec-social{
	display:flex;
	flex-wrap:wrap;
	gap:14px;
}

/* 404 */
.surelec-404{
	width:min(760px,calc(100% - 40px));
	margin:0 auto;
	padding:100px 0;
	text-align:center;
}

.surelec-404 h1{
	margin:0;
	font-size:clamp(3rem,9vw,6rem);
	line-height:.9;
}

.surelec-404 p{
	color:var(--surelec-muted);
}

.surelec-404 a{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:48px;
	padding:0 20px;
	border-radius:9px;
	background:var(--surelec-orange);
	color:#fff;
	text-decoration:none;
	font-weight:800;
}

/* WordPress core blocks */
.wp-block-image img{
	border-radius:12px;
}

.wp-element-button,
.wp-block-button__link{
	background:var(--surelec-orange);
	border-radius:9px;
	font-weight:700;
}

@media(max-width:900px){
	.admin-bar .surelec-site-header{
		top:46px;
	}

	.surelec-header-inner{
		min-height:70px;
	}

	.surelec-menu-toggle{
		display:flex;
		flex-direction:column;
	}

	.surelec-nav-wrap{
		position:absolute;
		left:0;
		right:0;
		top:100%;
		display:none;
		padding:12px 20px 22px;
		background:var(--surelec-blue);
		border-bottom:1px solid rgba(255,255,255,.10);
		box-shadow:0 16px 35px rgba(15,24,58,.22);
	}

	.surelec-nav-wrap.is-open{
		display:block;
	}

	.surelec-primary-menu{
		display:block;
	}

	.surelec-primary-menu a{
		padding:12px 2px;
		border-bottom:1px solid rgba(255,255,255,.10);
	}

	.surelec-primary-menu .current-menu-item > a::after,
	.surelec-primary-menu .current_page_item > a::after{
		display:none;
	}

	.surelec-header-cta{
		margin-top:14px;
		width:100%;
	}

	.surelec-footer-grid{
		grid-template-columns:1fr 1fr;
	}

	.surelec-footer-brand{
		grid-column:1/-1;
	}
}

@media(max-width:620px){
	.surelec-header-inner,
	.surelec-footer-inner{
		width:calc(100% - 28px);
	}

	.surelec-brand img,
	.surelec-brand .custom-logo,
	.surelec-fallback-logo{
		max-width:175px;
		height:46px;
	}

	.surelec-footer-grid{
		grid-template-columns:1fr;
		gap:28px;
	}

	.surelec-footer-brand{
		grid-column:auto;
	}

	.surelec-footer-bottom{
		align-items:flex-start;
		flex-direction:column;
	}

	.surelec-standard-page{
		width:calc(100% - 28px);
		padding:55px 0;
	}
}
