/*
Theme Name: Chic & Decó
Theme URI: https://www.chicanddeco.com/
Author: Chic & Decó
Description: Tema ligero para guías de reformas, energía y decoración. Pensado para cargar rápido, leerse bien en el móvil y convivir con Google AdSense.
Version: 1.2.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: chicanddeco
*/


:root {
	--radius: 4px;
	--patron: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%22169.706%22 height=%22169.706%22%3E%3Cdefs%3E%3Cpattern id=%22p%22 width=%22120%22 height=%22120%22 patternUnits=%22userSpaceOnUse%22 patternTransform=%22rotate%2845%29%22%3E%3Crect width=%22120%22 height=%22120%22 fill=%22%23CAE3FC%22/%3E%3Crect x=%225%22 y=%225%22 width=%2250%22 height=%2220%22 fill=%22%23fff%22/%3E%3Crect x=%225%22 y=%2235%22 width=%2250%22 height=%2220%22 fill=%22%23fff%22/%3E%3Crect x=%2265%22 y=%225%22 width=%2220%22 height=%2250%22 fill=%22%23fff%22/%3E%3Crect x=%2295%22 y=%225%22 width=%2220%22 height=%2250%22 fill=%22%23fff%22/%3E%3Crect x=%225%22 y=%2265%22 width=%2220%22 height=%2250%22 fill=%22%23fff%22/%3E%3Crect x=%2235%22 y=%2265%22 width=%2220%22 height=%2250%22 fill=%22%23fff%22/%3E%3Crect x=%2265%22 y=%2265%22 width=%2250%22 height=%2220%22 fill=%22%23fff%22/%3E%3Crect x=%2265%22 y=%2295%22 width=%2250%22 height=%2220%22 fill=%22%23fff%22/%3E%3C/pattern%3E%3C/defs%3E%3Crect width=%22100%25%22 height=%22100%25%22 fill=%22url%28%23p%29%22/%3E%3C/svg%3E");
}

/* ---------- Cabecera ---------- */
.site-header {
	background: var(--wp--preset--color--base);
	padding-top: clamp(1.5rem, 4vw, 2.5rem);
}
.header-brand {
	gap: 0.1rem !important;
}
.site-header .wp-block-site-title {
	margin: 0;
}
.site-header .wp-block-site-tagline {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var(--wp--preset--color--muted);
}
.header-nav {
	margin-top: 1.25rem !important;
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	background: #F8FBFE;
	padding: 0.35rem 1rem;
	gap: 1.5rem;
	position: relative;
}
.header-nav .wp-block-navigation {
	gap: 0.25rem 2rem;
}
.header-nav .wp-block-navigation a {
	padding: 0.55rem 0;
	display: inline-block;
	border-bottom: 2px solid transparent;
}
.header-nav .wp-block-navigation a:hover,
.header-nav .wp-block-navigation a:focus-visible {
	color: var(--wp--preset--color--primary);
	border-bottom-color: var(--wp--preset--color--accent);
}
.site-header .nav-calc a {
	color: var(--wp--preset--color--primary);
}
.header-search {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
}
.header-search .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 0;
	padding: 0.4rem;
}
.header-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.35rem 0.8rem;
	font-family: inherit;
}
@media (max-width: 781px) {
	.header-nav { justify-content: flex-end !important; }
	.header-search { position: static; transform: none; }
}

/* ---------- Portada ---------- */
.hero {
	background-color: var(--wp--preset--color--base);
	background-image: var(--patron);
	background-size: 135.76px 135.76px;
	padding-top: clamp(3rem, 8vw, 6rem);
	padding-bottom: clamp(3rem, 8vw, 6rem);
	margin-top: 0 !important;
}
.hero-card {
	background: var(--wp--preset--color--base);
	max-width: 44rem !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: clamp(1.75rem, 5vw, 3.25rem) clamp(1.25rem, 5vw, 3.5rem);
	text-align: center;
	box-shadow: 0 10px 40px rgba(27, 58, 99, 0.10);
}
.eyebrow {
	margin: 0 0 0.75rem !important;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.22em;
	color: var(--wp--preset--color--primary);
}
.hero h1 {
	margin: 0 auto;
	max-width: 18ch;
	font-weight: 400;
	letter-spacing: -0.01em;
}
.hero .hero__text {
	max-width: 32rem;
	margin: 1rem auto 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 300;
	color: var(--wp--preset--color--muted);
	line-height: 1.55;
}
.hero__search {
	max-width: 32rem;
	margin: 1.75rem auto 0;
}
.hero__search .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--powder);
	border-radius: var(--radius);
	padding: 0.3rem;
	background: var(--wp--preset--color--base);
}
.hero__search .wp-block-search__input {
	border: 0;
	padding: 0.7rem 0.9rem;
	font-family: inherit;
	font-size: 1rem;
	background: transparent;
}
.hero__search .wp-block-search__button {
	background: var(--wp--preset--color--primary);
	color: #FFFFFF;
	border: 0;
	border-radius: 2px;
	padding: 0.7rem 1.4rem;
	font-family: inherit;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8125rem;
	margin-left: 0.3rem;
}
.hero__search .wp-block-search__button:hover {
	background: var(--wp--preset--color--primary-dark);
}

.section-title {
	margin-top: clamp(3rem, 6vw, 4.5rem) !important;
	margin-bottom: 2rem !important;
	text-align: center;
	font-size: var(--wp--preset--font-size--x-large) !important;
	font-weight: 400 !important;
}
.section-title::after {
	content: "";
	display: block;
	width: 3rem;
	height: 2px;
	margin: 0.9rem auto 0;
	background: var(--wp--preset--color--accent);
}

/* Bloque de la calculadora */
.calc-promo {
	background: var(--wp--preset--color--accent-soft);
	border: 1px solid var(--wp--preset--color--powder);
	border-radius: var(--radius);
	padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.25rem, 4vw, 2.75rem);
	margin-top: clamp(2.5rem, 5vw, 3.5rem) !important;
	gap: 1.25rem 2rem;
}
.calc-promo__text {
	flex: 1 1 22rem;
}
.calc-promo h2 {
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: 400;
	margin: 0;
}
.calc-promo p {
	margin: 0.5rem 0 0;
	color: var(--wp--preset--color--muted);
	max-width: 38rem;
}
.calc-promo .wp-block-button__link {
	background: var(--wp--preset--color--primary);
	color: #FFFFFF;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8125rem;
	border-radius: 2px;
	padding: 1rem 1.6rem;
	white-space: nowrap;
}
.calc-promo .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary-dark);
}

/* Temas */
.cat-grid {
	gap: 1.25rem;
}
.cat-tile {
	position: relative;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 3px solid var(--wp--preset--color--accent);
	padding: 1.4rem 1.4rem 1.25rem;
	text-align: center;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.cat-tile:hover {
	border-color: var(--wp--preset--color--powder);
	border-top-color: var(--wp--preset--color--primary);
	box-shadow: 0 8px 24px rgba(27, 58, 99, 0.08);
}
.cat-tile h3 {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 500;
}
.cat-tile h3 a {
	color: var(--wp--preset--color--primary-dark);
}
.cat-tile h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
}
.cat-tile p {
	margin: 0.45rem 0 0;
	font-size: 0.9375rem;
	color: var(--wp--preset--color--muted);
	line-height: 1.55;
}

/* ---------- Tarjetas de artículos ---------- */
.post-grid .wp-block-post-template {
	gap: 2.5rem 1.75rem;
}
.post-grid .wp-block-post {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	text-align: center;
}
.post-grid .wp-block-post-featured-image {
	margin: 0 0 0.6rem;
	padding: 6px;
	border: 1px solid var(--wp--preset--color--line);
	background: var(--wp--preset--color--base);
}
.post-grid .wp-block-post-title {
	font-size: 1.25rem;
	font-weight: 500;
	line-height: 1.35;
	margin: 0;
}
.post-grid .wp-block-post-title a {
	color: var(--wp--preset--color--primary-dark);
}
.post-grid .wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary);
}
.post-grid .wp-block-post-excerpt {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.6;
}
.post-grid .wp-block-post-excerpt__excerpt {
	margin: 0;
}
.wp-block-query-pagination {
	margin-top: 3rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8125rem;
}

/* ---------- Cabecera de páginas y secciones ---------- */
.page-intro {
	padding-top: clamp(2.5rem, 5vw, 4rem);
	padding-bottom: 0.5rem;
	text-align: center;
}
.page-intro .page-intro__text {
	max-width: 40rem;
	margin-left: auto;
	margin-right: auto;
	color: var(--wp--preset--color--muted);
}

/* ---------- Artículo ---------- */
.entry-header {
	padding-top: clamp(2.25rem, 5vw, 4rem);
	text-align: center;
}
.entry-header .wp-block-post-title {
	margin-top: 0.6rem;
	font-weight: 400;
}
.entry-meta {
	justify-content: center;
	gap: 0.35rem;
	font-size: 0.75rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--wp--preset--color--muted);
}
.entry-meta p,
.entry-meta .wp-block-post-date {
	margin: 0;
	font-size: inherit;
}
.single .wp-block-post-featured-image {
	padding: 8px;
	border: 1px solid var(--wp--preset--color--line);
}
.entry-content {
	padding-bottom: 3rem;
}
.entry-content > h2 {
	margin-top: 3rem;
	font-weight: 500;
}
.entry-content > h3 {
	margin-top: 2rem;
}
.entry-content a {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--accent);
	text-underline-offset: 3px;
}
.entry-content li + li {
	margin-top: 0.4rem;
}
.entry-content strong {
	font-weight: 600;
	color: var(--wp--preset--color--primary-dark);
}

/* Tablas de precios */
.entry-content .wp-block-table {
	margin: 2rem 0;
	overflow-x: auto;
}
.entry-content .wp-block-table table {
	width: 100%;
	table-layout: auto;
	border-collapse: collapse;
	border: 1px solid var(--wp--preset--color--line);
	font-size: 0.9375rem;
	font-variant-numeric: tabular-nums;
}
.entry-content .wp-block-table thead {
	border-bottom: 0;
}
.entry-content .wp-block-table th,
.entry-content .wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.8rem 1rem;
	text-align: left;
	vertical-align: top;
}
.entry-content .wp-block-table thead th {
	background: var(--wp--preset--color--powder);
	color: var(--wp--preset--color--primary-dark);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
}
.entry-content .wp-block-table tbody tr:nth-child(even) td {
	background: var(--wp--preset--color--surface);
}
.entry-content .wp-block-table td:nth-child(2) {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}
.entry-content .wp-block-table figcaption {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
	text-align: left;
	margin-top: 0.6rem;
}
@media (max-width: 600px) {
	.entry-content .wp-block-table th,
	.entry-content .wp-block-table td {
		padding: 0.6rem 0.55rem;
		font-size: 0.875rem;
	}
	.entry-content .wp-block-table thead th { font-size: 0.6875rem; }
}

/* Recuadros */
.entry-content .nota,
.entry-content .resumen {
	background: var(--wp--preset--color--accent-soft);
	border: 1px solid var(--wp--preset--color--powder);
	border-left: 3px solid var(--wp--preset--color--accent);
	padding: 1.1rem 1.35rem;
}

/* ---------- Pie ---------- */
.archive-strip {
	background-color: var(--wp--preset--color--base);
	background-image: var(--patron);
	background-size: 135.76px 135.76px;
	padding-top: clamp(2.5rem, 6vw, 4rem);
	padding-bottom: clamp(2.5rem, 6vw, 4rem);
	margin-top: 4.5rem;
}
.archive-strip > .alignwide {
	background: var(--wp--preset--color--base);
	max-width: 40rem !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 2rem clamp(1.25rem, 4vw, 2.5rem);
	text-align: center;
	box-shadow: 0 10px 40px rgba(27, 58, 99, 0.10);
}
.archive-strip h2 {
	font-family: var(--wp--preset--font-family--script);
	font-weight: 400;
	font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
	color: #6FAEEF;
	margin: 0;
	line-height: 1.1;
}
.archive-strip p {
	color: var(--wp--preset--color--muted);
}
.archive-strip a {
	color: var(--wp--preset--color--primary);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 0.8125rem;
	text-decoration: none;
	border-bottom: 1px solid var(--wp--preset--color--accent);
	padding-bottom: 2px;
}
.site-footer {
	background: var(--wp--preset--color--base);
	border-top: 1px solid var(--wp--preset--color--line);
	margin-top: 0 !important;
	padding-top: 1.5rem;
	padding-bottom: 1.75rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}
.site-footer p {
	margin: 0;
}
.site-footer a {
	color: var(--wp--preset--color--muted);
	text-decoration: none;
}
.site-footer a:hover {
	color: var(--wp--preset--color--primary);
}

/* ---------- General ---------- */
.wp-site-blocks > main {
	margin-block-start: 0;
}
:where(a, button, input):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; transition: none !important; }
}

/* ---------- Ilustraciones ---------- */
.cat-tile {
	padding-top: 0;
	overflow: hidden;
}
.cat-tile::before {
	content: "";
	display: block;
	aspect-ratio: 3 / 2;
	margin: 0 -1.4rem 1.1rem;
	background: var(--wp--preset--color--accent-soft) center / cover no-repeat;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.cat-tile--reformas::before { background-image: url("assets/ilustraciones/reformas.svg"); }
.cat-tile--energia::before { background-image: url("assets/ilustraciones/energia.svg"); }
.cat-tile--equipar::before { background-image: url("assets/ilustraciones/equipar.svg"); }
.cat-tile--decoracion::before { background-image: url("assets/ilustraciones/decoracion.svg"); }

/* Cabecera ilustrada en cada sección */
.category .page-intro::before {
	content: "";
	display: block;
	width: min(100%, 26rem);
	aspect-ratio: 3 / 2;
	margin: 0 auto 1.5rem;
	background: center / cover no-repeat;
	border: 6px solid var(--wp--preset--color--base);
	box-shadow: 0 8px 30px rgba(27, 58, 99, 0.10);
}
.category-reformas .page-intro::before { background-image: url("assets/ilustraciones/reformas.svg"); }
.category-energia-y-climatizacion .page-intro::before { background-image: url("assets/ilustraciones/energia.svg"); }
.category-equipar-la-casa .page-intro::before { background-image: url("assets/ilustraciones/equipar.svg"); }
.category-decoracion .page-intro::before { background-image: url("assets/ilustraciones/decoracion.svg"); }

.no-results {
	text-align: center;
	color: var(--wp--preset--color--muted);
}

/* Tablas con varias columnas de precio */
.entry-content .tabla-precios td:not(:first-child) {
	font-weight: 600;
	color: var(--wp--preset--color--primary-dark);
}
/* Índice de contenidos del artículo */
.entry-content .indice {
	font-size: 0.9375rem;
	line-height: 1.9;
	border-top: 1px solid var(--wp--preset--color--line);
	border-bottom: 1px solid var(--wp--preset--color--line);
	padding: 0.75rem 0;
}
