/*
Theme Name: Conpesmar
Theme URI: https://www.conpesmar.com.mx/
Author: Hermes Agent
Description: Tema de bloques para Conpesmar, reconstruido a partir del diseño original de 2014: cabecera con fondo header-bg.png, slider héroe de 569px con miniaturas circulares, sección Misión/Visión sobre background-body.jpg con la cenefa de semicírculos, cintillo institucional y galería de producto. Compatible con PHP 8.3+.
Version: 2.0.0
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: conpesmar
Tags: block-theme, full-site-editing, custom-colors
*/

/* ============================================================
   Tokens tomados de las opciones reales del tema anterior:
   navy #284494 · navy oscuro #042386 · acento #2a83ed
   gris #8d9095 · línea #dadee1
   Open Sans Light en titulares · Arial 14/22 en el cuerpo
   ============================================================ */

:root {
	--cp-navy: #284494;
	--cp-navy-2: #042386;
	--cp-accent: #2a83ed;
	--cp-gray: #8d9095;
	--cp-line: #dadee1;
	--cp-off: #f7f7f8;
	--cp-max: 1140px;
	--cp-heading: "Open Sans", Arial, Helvetica, sans-serif;
	--cp-body: Arial, Helvetica, sans-serif;
	--cp-hero-h: 569px;
}

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

body {
	margin: 0;
	background: #94c2e3;
	color: var(--cp-navy);
	font: 400 14px/22px var(--cp-body);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--cp-accent); text-decoration: none; }
a:hover { color: var(--cp-navy-2); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cp-heading);
	font-weight: 300;
	color: var(--cp-navy);
	line-height: 1.2;
	margin: 0 0 .6em;
}
h1 { font-size: 51px; }
h2 { font-size: 38px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
p { margin: 0 0 1.1em; }

.cp-inner { max-width: var(--cp-max); margin: 0 auto; padding: 0 20px; }

/* ---------- barra superior ---------- */
.cp-topbar {
	background: #fafbfc;
	border-bottom: 1px solid var(--cp-line);
	font-size: 12px;
	color: var(--cp-gray);
}
.cp-topbar .cp-inner {
	display: flex;
	align-items: center;
	gap: 26px;
	padding-top: 11px;
	padding-bottom: 11px;
}
.cp-topbar p { margin: 0; display: flex; gap: 26px; flex-wrap: wrap; }
.cp-contacts { display: inline-flex; align-items: center; gap: 7px; }
.cp-contacts svg { width: 13px; height: 13px; flex: 0 0 auto; fill: var(--cp-navy); opacity: .75; }
.cp-topbar a { color: var(--cp-gray); }
.cp-topbar a:hover { color: var(--cp-accent); text-decoration: none; }

/* ---------- cabecera ---------- */
.cp-header {
	background: #fff url("/wp-content/uploads/2014/05/header-bg.png") no-repeat center center;
	background-size: cover;
	border-bottom: 1px solid rgba(218, 222, 225, .8);
}
.cp-header .cp-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 88px;
	padding-top: 8px;
	padding-bottom: 8px;
}
.cp-brand { display: flex; align-items: center; gap: 12px; }
.cp-brand img { max-height: 57px; width: auto; }
.wp-block-site-title {
	font-family: var(--cp-heading);
	font-size: 21px;
	font-weight: 400;
	color: var(--cp-navy-2);
	letter-spacing: .1em;
	text-transform: uppercase;
	margin: 0;
	text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
}
.wp-block-site-title a { color: inherit; text-decoration: none; }

.cp-nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0; padding: 0; }
.cp-nav a,
.cp-nav .wp-block-navigation-item__content {
	display: inline-block;
	padding: 9px 15px;
	border-radius: 3px;
	font-size: 13px;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--cp-navy-2);
	text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
}
.cp-nav a:hover,
.cp-nav .wp-block-navigation-item__content:hover,
.cp-nav [aria-current="page"] {
	background: var(--cp-accent);
	color: #fff;
	text-decoration: none;
	text-shadow: none;
}
.cp-nav .wp-block-navigation__responsive-container-open,
.cp-nav .wp-block-navigation__responsive-container-close { color: var(--cp-navy-2); }

/* ---------- slider héroe ---------- */
.cp-hero {
	position: relative;
	height: var(--cp-hero-h);
	overflow: hidden;
	background: #0b0b0c;
}
.cp-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .9s ease;
}
.cp-slide.is-active { opacity: 1; }
.cp-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-slide figcaption {
	position: absolute;
	left: 0; right: 0; bottom: 40px;
	text-align: center;
	color: #fff;
	font-family: var(--cp-heading);
	font-size: 40px;
	font-weight: 300;
	letter-spacing: .05em;
	text-shadow: 0 2px 16px rgba(0, 0, 0, .6);
	padding: 0 90px;
}
.cp-slide figcaption span {
	display: block;
	font-family: var(--cp-body);
	font-size: 13px;
	letter-spacing: .18em;
	text-transform: uppercase;
	margin-top: 8px;
	opacity: .92;
}
.cp-thumbs {
	position: absolute;
	right: 36px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: 14px;
	z-index: 4;
}
.cp-thumb {
	width: 58px; height: 58px;
	border-radius: 50%;
	overflow: hidden;
	padding: 0;
	border: 2px solid rgba(255, 255, 255, .5);
	background: none;
	cursor: pointer;
	transition: border-color .25s, box-shadow .25s;
}
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-thumb.is-active { border-color: #fff; box-shadow: 0 0 0 4px rgba(42, 131, 237, .45); }

/* ---------- MISIÓN / VISIÓN sobre background-body.jpg ---------- */
.cp-benefits {
	background: #eef5fb url("/wp-content/uploads/2014/06/background-body.jpg") no-repeat center bottom;
	background-size: cover;
	padding: 52px 0 74px;
}
.cp-benefits .cp-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 46px;
	max-width: 960px;
	margin: 0 auto;
}
.cp-benefit { text-align: center; }
.cp-benefit h5 {
	margin-bottom: 12px;
	color: var(--cp-navy-2);
	font-weight: 600;
	letter-spacing: .16em;
}
.cp-benefit p { margin: 0 auto; max-width: 46ch; color: var(--cp-navy); }
.cp-ico {
	width: 56px; height: 56px;
	margin: 0 auto 14px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}
.cp-ico--mision { background-image: url("/wp-content/uploads/2014/06/product-icon-02.png"); }
.cp-ico--vision { background-image: url("/wp-content/uploads/2014/06/product-icon-03.png"); }

/* ---------- sello + escaparate ---------- */
.cp-badge { padding: 34px 0 10px; text-align: center; background: #fff; }
.cp-badge img { max-width: 300px; margin: 0 auto; }

/* ---------- cintillo institucional ---------- */
.cp-cintillo { background: #fff; padding: 26px 0 30px; text-align: center; }
.cp-cintillo img { max-width: 980px; width: 100%; height: auto; margin: 0 auto; }

/* ---------- pie ---------- */
.cp-footer { background: var(--cp-navy-2); color: #dbe3f2; padding: 24px 0; font-size: 13px; }
.cp-footer .cp-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}
.cp-footer a { color: #fff; }
.cp-footer p { margin: 0; }
.cp-footer img { max-height: 34px; width: auto; }

/* ---------- páginas ---------- */
.cp-page { padding: 48px 0 70px; background: #fff; }
.cp-page .cp-inner { max-width: 1000px; }
.cp-page-title { border-bottom: 1px solid var(--cp-line); padding-bottom: 16px; margin-bottom: 30px; }

/* ---------- galería de producto ---------- */
.cp-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	margin-top: 8px;
}
.cp-gallery figure {
	position: relative;
	overflow: hidden;
	background: #0b0b0c;
	margin: 0;
}
.cp-gallery img { display: block; width: 100%; height: 220px; object-fit: cover; transition: transform .4s ease; }
.cp-gallery figure:hover img { transform: scale(1.05); }
.cp-gallery figcaption {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	padding: 12px 16px;
	background: linear-gradient(to top, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
	color: #fff;
	font-family: var(--cp-heading);
	font-size: 17px;
	letter-spacing: .05em;
	text-align: left;
}

.cp-gallery-note {
	margin: 26px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--cp-line);
	color: var(--cp-gray);
	font-size: 14px;
	text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	:root { --cp-hero-h: 380px; }
	.cp-slide figcaption { font-size: 28px; bottom: 24px; padding: 0 70px; }
	.cp-thumbs { right: 14px; gap: 10px; }
	.cp-thumb { width: 42px; height: 42px; }
	.cp-gallery { grid-template-columns: repeat(2, 1fr); }
	.cp-gallery img { height: 190px; }
}
@media (max-width: 880px) {
	.cp-header .cp-inner { flex-wrap: wrap; min-height: 0; padding: 12px 20px; gap: 8px; }
	.cp-benefits .cp-grid { grid-template-columns: 1fr; gap: 34px; }
	.cp-benefits { padding: 36px 0 54px; }
	.cp-topbar .cp-inner { justify-content: flex-start; }
}
@media (max-width: 620px) {
	:root { --cp-hero-h: 260px; }
	.cp-slide figcaption { font-size: 22px; bottom: 16px; padding: 0 60px; }
	.cp-gallery { grid-template-columns: 1fr; }
	.cp-gallery img { height: 200px; }
}

/* ---------- accesibilidad ---------- */
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 2px; }
