/*
Theme Name: Atipana
Theme URI: https://abysac.com
Author: Gerco Digital
Description: Tema propio para Atipana, Barras y Servicios Integrales S.A.C. Recrea el diseño original de abysac.com sin constructor de páginas: liviano y rápido.
Version: 2.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: atipana
*/

:root {
	--blue: #006394;
	--navy: #21405f;
	--gold: #e0ad24;
	--cyan: #0098ca;
	--beige: #c2bba9;
	--gris: #625a5c;
	--gris2: #767a79;
	--topbar: #f2f2f2;
	--ink: #010003;
	--text: #4b4b4b;
	--muted: #7a7a7a;
	--light: #f4f4f4;
	--line: #e3e3e3;
	--font: "Montserrat", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--wrap: 1100px;
	--shadow: 0 10px 40px rgba(0, 0, 0, .1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: #fff; -webkit-font-smoothing: antialiased; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.1; color: var(--navy); }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap--narrow { max-width: 860px; }
.wrap--contact { max-width: var(--wrap); }
.section { padding: 90px 0; }
.section--gray { background: #eeeeee; }
.justify { text-align: justify; }

.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #fff; padding: 10px 16px; z-index: 999; }
.skip:focus { left: 10px; top: 10px; }
.ic { width: 1em; height: 1em; flex: none; }

.bg-beige { background: var(--beige); }
.bg-cyan { background: var(--cyan); }
.bg-gris { background: var(--gris); }
.bg-navy { background: var(--navy); }
.bg-gris2 { background: var(--gris2); }
.bg-gold { background: var(--gold); }

/* Botones */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: 16px 24px; border: 0; border-radius: 5px; cursor: pointer;
	font-family: var(--font); font-weight: 700; font-size: 14px; text-transform: uppercase; line-height: 1.2;
	transition: background .2s, color .2s, transform .2s;
}
.btn--navy { background: var(--navy); color: #fff; text-shadow: 0 0 10px rgba(0,0,0,.3); }
.btn--navy:hover { background: var(--cyan); color: #fff; }
.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--navy); color: #fff; }
.btn--sm { padding: 12px 20px; font-size: 12px; text-transform: none; }

/* Títulos grandes (estilo original) */
.kicker { margin: 0 0 6px; color: var(--gold); font-weight: 700; font-size: 1.4rem; line-height: 1; letter-spacing: -1px; }
.kicker--lg { font-size: 1.7rem; }
.big { margin: 0 0 24px; color: var(--blue); font-size: clamp(3rem, 7.5vw, 86px); font-weight: 900; line-height: .95; letter-spacing: -1px; }
.big__sm { display: block; font-size: .56em; font-weight: 800; line-height: 1.1; margin-bottom: -.05em; }
.head { margin-bottom: 40px; }
.head--center { text-align: center; }
.head--center .big { margin-bottom: 8px; }

/* Espacio para fotos */
.ph {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	width: 100%; padding: 16px; text-align: center;
	background: repeating-linear-gradient(135deg, #eef2f7 0 14px, #e7ecf3 14px 28px);
	border: 2px dashed #c4cfdc; color: #6c7b8c; font-size: 13px; font-weight: 600; line-height: 1.35;
}
.ph .ic { width: 34px; height: 34px; opacity: .7; }
.atp-img { width: 100%; object-fit: cover; }

/* Barra superior */
.topbar { background: var(--topbar); font-size: .9rem; }
.topbar__in { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.topbar__info { display: flex; align-items: center; }
.topbar__info a { color: #535353; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; padding-right: 15px; }
.topbar__info a + a { padding: 0 0 0 15px; border-left: 1px solid #535353; }
.topbar__info a:hover { color: var(--blue); }
.topbar__info .ic { width: 18px; height: 18px; color: #4e4e4e; }
.topbar__social { display: flex; align-items: center; gap: 8px; }
.topbar__social span { color: var(--navy); font-weight: 600; font-size: 14px; margin-right: 4px; }
.soc { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--cyan); color: #fff; transition: background .2s; }
.soc:hover { background: #a62679; color: #fff; }
.soc .ic { width: 14px; height: 14px; }

/* Cabecera */
.header { position: sticky; top: 0; z-index: 50; background: #fff; transition: box-shadow .25s; }
.header.is-stuck { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.header__in { display: flex; align-items: center; gap: 20px; min-height: 96px; max-width: 1340px; }
.brand { flex: none; }
.logo-img { width: auto; height: 74px; }
.nav { margin-left: auto; }
.nav .menu { display: flex; }
.nav .menu a { display: block; padding: 15px 22px; color: var(--gris); font-weight: 600; font-size: 13px; text-transform: uppercase; }
.nav .menu a:hover, .nav .current-menu-item > a { color: var(--gold); }
.nav__cta-mobile { display: none; }
.header__cta { margin-left: 10px; }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 8px; color: var(--navy); cursor: pointer; }
.burger .ic { width: 30px; height: 30px; }
.burger .ic-close { display: none; }

/* Portada */
.hero {
	position: relative; display: flex; align-items: flex-start; overflow: hidden;
	min-height: clamp(440px, 61vh, 620px); padding: 45px 0 60px; color: #fff;
	background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.42)), var(--hero, linear-gradient(120deg, #1d2b36, #3a4650)) center / cover no-repeat, #2a2a2a;
}
.hero__ph { position: absolute; right: 20px; bottom: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1.5px dashed rgba(255,255,255,.5); border-radius: 6px; font-size: 12px; font-weight: 600; }
.hero__ph .ic { width: 18px; height: 18px; }
.hero__in { position: relative; }
.hero__kicker { max-width: 560px; margin: 0 0 6px; font-size: 22px; color: #fff; }
.hero__title { max-width: 600px; margin: 0; color: var(--gold); font-size: clamp(2.8rem, 7vw, 5.6rem); font-weight: 900; line-height: .9; letter-spacing: -1px; }
.hero__text { max-width: 560px; margin: 4px 0 0; font-size: 22px; line-height: 1.1; color: #fff; }

/* Tarjetas de servicios */
.tiles { background: var(--blue); padding: 0 20px; }
.tiles__grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: var(--wrap); margin: 0 auto; }
.tile {
	display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
	min-height: 260px; padding: 3em; color: var(--light); transition: filter .25s;
}
.tile:hover { color: var(--light); filter: brightness(1.08); }
.tile--beige { background: var(--beige); }
.tile--cyan { background: var(--cyan); }
.tile--gris { background: var(--gris); }
.tile--navy { background: var(--navy); }
.tile--gris2 { background: var(--gris2); }
.tile--gold { background: var(--gold); }
.tile__head { display: flex; gap: 20px; align-items: flex-start; }
.tile__icon { flex: none; padding-top: 2px; }
.tile__icon .ic { width: 30px; height: 30px; color: var(--light); }
.tile__title { margin: 0 0 15px; color: var(--light); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.tile__sub { display: block; font-size: 1rem; line-height: 1.4; }
.tile__more { align-self: flex-end; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px; text-transform: uppercase; color: #fff; }
.tile__more .ic { width: 26px; height: 18px; transition: transform .25s; }
.tile:hover .tile__more .ic { transform: translateX(5px); }

/* Quiénes somos */
.about { background: var(--blue); padding: 6em 0 4em; color: #f6f4f8; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about__title { margin: 0; color: #fff; font-size: clamp(3.2rem, 7.5vw, 86px); font-weight: 900; line-height: .9; letter-spacing: -1px; }
.about__title span { display: block; font-size: .5em; font-weight: 700; }
.about__text p { text-align: justify; font-size: 15px; line-height: 1.5; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 50px; }
.stat { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px 10px; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.25); }
.stat__icon .ic { width: 36px; height: 36px; color: #fff; }
.stat__num { display: block; color: #fff; font-size: 1.7rem; font-weight: 700; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat__txt { display: block; max-width: 90px; color: var(--gold); font-weight: 700; font-size: 1rem; line-height: .95; letter-spacing: -1px; margin-top: 4px; }

/* Políticas (inicio) */
.policies { padding: 70px 0; background: #fff; }
.policies__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.policies__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 230px)); gap: 26px 30px; }
.pcard { margin: 0; display: flex; flex-direction: column; }
.pcard .atp-img, .pcard .ph { aspect-ratio: 1 / .92 !important; }
.pcard figcaption { flex: 1; display: grid; place-items: center; padding: 10px 12px; text-align: center; color: #fff; font-weight: 700; font-size: 15px; line-height: 1; letter-spacing: -.5px; }
.policies__body .big { margin-bottom: 18px; }
.policies__body p.justify { color: var(--ink); font-size: 15px; line-height: 1.4; }

/* Clientes */
.clients { position: relative; padding: 40px 0 50px; background: linear-gradient(rgba(201,201,201,.87), rgba(201,201,201,.87)), var(--bg, none) center / cover no-repeat, #eee; }
.clients .head { margin-bottom: 26px; }
.clients__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px 60px; max-width: 760px; margin: 0 auto; }
.client { display: grid; place-items: center; }
.client .ph { max-width: 180px; padding: 8px; font-size: 12px; background: rgba(255,255,255,.55); }
.client .ph .ic { width: 22px; height: 22px; }
.client__img { max-height: 90px; object-fit: contain; }

/* Blog (inicio) */
.blog-home { padding: 6em 0; }
.wrap--blog { max-width: 1110px; }
.hposts { display: grid; gap: 0; }
.hpost { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; padding: 50px; background: #fff; box-shadow: var(--shadow); border-radius: 4px; }
.hpost + .hpost { margin-top: 2px; }
.hpost__media img, .hpost__media .ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; box-shadow: 0 20px 30px rgba(0,0,0,.2); }
.hpost__title { margin: 0 0 22px; font-size: 1.9rem; font-weight: 800; line-height: 1.2; }
.hpost__title a { color: #000; }
.hpost__title a:hover { color: var(--blue); }
.hpost__body p { color: var(--muted); font-size: 14px; line-height: 1.75; }

/* Mapa */
.map { height: 422px; background: #f2f2f2; }
.map iframe { width: 100%; height: 100%; border: 0; }

/* Contacto */
.contact { padding: 6em 0; background: #fff; }
.contact .big { margin-bottom: 18px; }
.contact p.justify { color: var(--ink); font-size: 15px; line-height: 1.4; }
.cboxes { display: grid; gap: 20px; margin-top: 36px; }
.cbox { display: flex; align-items: flex-start; gap: 15px; color: var(--text); }
a.cbox:hover strong { color: var(--blue); }
.cbox__icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: #fff; flex: none; }
.cbox__icon .ic { width: 20px; height: 20px; }
.cbox strong { display: block; margin-bottom: 4px; color: var(--navy); font-size: 1.5rem; line-height: 1.1; transition: color .2s; }
.cbox b { color: #2a2a2a; font-size: 15px; }
.cbox em { font-style: normal; font-weight: 600; color: var(--muted); font-size: 14px; }

/* Pie */
.footer { background: var(--navy); color: var(--light); font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; align-items: center; padding: 6em 20px; max-width: 1340px; }
.footer__logo { display: inline-block; margin-bottom: 18px; }
.footer__logo .logo-img { height: 66px; filter: brightness(0) invert(1); }
.footer p { margin: 0; line-height: 1.3; }
.footer__copy { text-align: center; }
.footer__copy strong { font-weight: 700; }
.footer__title { color: #fff; font-size: 1.5rem; margin-bottom: 18px; }
.footer__contact li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.footer__contact .ic { width: 18px; height: 18px; color: #fff; margin-top: 1px; }
.footer a { color: var(--light); }
.footer a:hover { color: var(--gold); }

/* Cabecera de páginas internas */
.phero {
	display: flex; align-items: center; min-height: clamp(320px, 38vh, 420px); padding: 50px 0; text-align: center;
	background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.42)), var(--hero, linear-gradient(120deg, #1d2b36, #3a4650)) center / cover no-repeat, #2a2a2a;
}
.phero__title { margin: 0; color: var(--gold); font-size: clamp(2.6rem, 7vw, 5.4rem); font-weight: 900; line-height: .95; letter-spacing: -1px; }
.single .phero__title { max-width: 980px; margin: 0 auto; font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1.05; }
.phero__sub { max-width: 540px; margin: 6px auto 0; color: #fff; font-size: 20px; line-height: 1.15; }

/* Página Servicios */
.srow { padding: 90px 0; scroll-margin-top: 90px; }
.srow .wrap { max-width: 1340px; }
.srow__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 40px; align-items: center; }
.srow--rev .srow__media { order: 2; }
.srow--white { background: #fff; }
.srow--cyan { background: var(--cyan); }
.srow--gold { background: var(--gold); }
.srow__title { margin: 0 0 18px; color: var(--navy); font-size: clamp(2.6rem, 6vw, 86px); font-weight: 900; line-height: .95; letter-spacing: -1px; }
.srow__body p.justify { font-size: 14px; line-height: 1.35; color: var(--text); }
.srow--cyan .srow__title, .srow--gold .srow__title { color: #fff; }
.srow--cyan .srow__body p.justify, .srow--gold .srow__body p.justify { color: #fff; }
.srow--gold .kicker { color: var(--navy); }
.srow__body .btn { margin-top: 10px; }

/* Misión / Visión y pilares de calidad */
.mv { display: grid; grid-template-columns: 1fr 1fr; }
.mv__box { padding: 50px 15% 60px; text-align: center; color: #fff; }
.mv__box .ic { width: 30px; height: 30px; margin: 0 auto 14px; color: #fff; }
.mv__box h2 { position: relative; margin: 0 0 28px; padding-bottom: 18px; color: #fff; font-size: 1.9rem; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.mv__box h2::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 80px; height: 3px; margin-left: -40px; background: #fff; }
.mv__box p { margin: 0; text-align: justify; font-size: 14px; line-height: 1.35; }
.mv--4 .mv__box h2 { font-size: 1.35rem; }
.pintro { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; max-width: 1340px; }
.pintro__title { margin: 0; color: var(--navy); font-size: clamp(2.8rem, 6vw, 86px); font-weight: 900; line-height: .95; letter-spacing: -1px; }
.pintro > p { font-size: 14px; line-height: 1.35; margin: 0; }

/* Blog: listado */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1340px; margin: 0 auto; }
.post-card { display: flex; flex-direction: column; background: #e9e9e9; }
.post-card__media { position: relative; display: block; }
.post-card__media img, .post-card__media .ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.post-card__badge { position: absolute; right: 16px; bottom: -14px; display: flex; flex-direction: column; align-items: center; padding: 6px 10px; background: var(--gold); color: var(--navy); font-size: 11px; line-height: 1; }
.post-card__badge b { font-size: 17px; }
.post-card__body { padding: 30px 24px 26px; text-align: center; }
.post-card__meta { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.post-card__meta span { color: var(--gold); }
.post-card__title { margin: 0 0 12px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.post-card__title a { color: var(--navy); }
.post-card__body p { font-size: 13px; color: var(--muted); }
.pager { margin-top: 40px; }
.pager .nav-links { display: flex; justify-content: center; gap: 8px; }
.pager .page-numbers { padding: 8px 14px; border-radius: 5px; background: #fff; color: var(--navy); font-weight: 600; }
.pager .current { background: var(--gold); color: #fff; }

/* Artículo */
.single__media { margin-bottom: 30px; }
.single__media img { width: 100%; border-radius: 6px; }
.content { font-size: 16px; line-height: 1.75; color: var(--text); margin-bottom: 30px; }
.content h2 { margin: 1.6em 0 .6em; color: var(--navy); font-size: 1.6rem; font-weight: 800; line-height: 1.2; }

/* Animaciones de entrada (solo si hay JS) */
.js-reveal .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js-reveal .reveal--left { transform: translateX(-40px); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Escritorio mediano */
@media (max-width: 1200px) {
	.nav .menu a { padding: 15px 13px; }
}

/* Tablet */
@media (max-width: 1024px) {
	.header__cta { display: none; }
	.tiles__grid { grid-template-columns: repeat(2, 1fr); }
	.hposts .hpost { padding: 34px; }
	.posts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 920px) {
	.burger { display: block; }
	.burger[aria-expanded="true"] .ic-menu { display: none; }
	.burger[aria-expanded="true"] .ic-close { display: block; }
	.nav {
		position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); z-index: 60;
		background: #fff; padding: 96px 28px 28px;
		transform: translateX(100%); visibility: hidden; overflow-y: auto;
		transition: transform .3s ease, visibility 0s linear .3s, box-shadow .3s;
	}
	.nav-open .nav { transform: none; visibility: visible; box-shadow: -12px 0 40px rgba(0,0,0,.18); transition: transform .3s ease, box-shadow .3s; }
	.nav-open .burger { position: relative; z-index: 70; }
	.nav .menu { flex-direction: column; }
	.nav .menu a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
	.nav__cta-mobile { display: flex; margin-top: 24px; }
	.about__grid, .policies__grid, .srow__grid, .pintro { grid-template-columns: 1fr; gap: 30px; }
	.srow--rev .srow__media { order: 0; }
	.policies__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
	.hpost { grid-template-columns: 1fr; }
	.mv, .mv--4 { grid-template-columns: 1fr; }
	.footer__grid { grid-template-columns: 1fr; text-align: center; gap: 30px; padding: 4em 20px; }
	.footer__copy { order: 3; }
	.footer__contact li { justify-content: center; }
}

/* Celular */
@media (max-width: 600px) {
	.wrap { padding: 0 16px; }
	.section, .contact, .blog-home, .srow { padding: 60px 0; }
	.topbar__in { justify-content: center; }
	.topbar__info a + a, .topbar__social { display: none; }
	.topbar__info a { padding: 0; }
	.header__in { min-height: 76px; }
	.logo-img { height: 54px; }
	.hero { min-height: 420px; padding: 40px 0; }
	.hero__kicker, .hero__text { font-size: 17px; line-height: 1.3; }
	.hero__text { margin-top: 10px; }
	.tiles { padding: 0; }
	.tiles__grid { grid-template-columns: 1fr; }
	.tile { min-height: 0; padding: 2em 1.6em; }
	.about { padding: 4em 0 3em; }
	.stats { grid-template-columns: 1fr; margin-top: 30px; }
	.stat { justify-content: flex-start; padding-left: 0; }
	.stat + .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.25); }
	.stat__txt { max-width: none; }
	.policies__cards { gap: 14px; }
	.pcard figcaption { font-size: 13px; }
	.clients__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
	.hpost { padding: 22px; gap: 20px; }
	.hpost__title { font-size: 1.4rem; }
	.map { height: 320px; }
	.cbox strong { font-size: 1.25rem; }
	.mv__box { padding: 40px 24px 46px; }
	.posts { grid-template-columns: 1fr; }
	.phero__sub { font-size: 16px; }
	.justify, .about__text p, .mv__box p { text-align: left; }
}
