/*
Theme Name: ClientesExpress Blog
Theme URI: https://clientesexpress.com
Author: ClientesExpress
Description: Tema a medida para blog.clientesexpress.com. Usa la paleta y tipografia (Inter) del sitio principal de ClientesExpress, con tarjetas de miniatura 16:9 para los articulos.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: clientesexpress-blog
*/

:root {
  --bg: #f3eee7;
  --paper: #fffdf9;
  --cream: #fff3d6;
  --ink: #11100f;
  --muted: #706b63;
  --line: #e6ded2;
  --fire: #ff4a16;
  --fire-2: #ff6b3a;
  --green: #36a31d;
  --yellow: #b88700;
  --red: #d83b27;
  --orange-soft: #ffe2d8;
  --shadow: 0 18px 46px rgba(49, 38, 23, 0.08);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--fire);
  text-decoration: none;
}

a:hover {
  color: var(--fire-2);
}

.ce-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.ce-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.ce-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.ce-brand,
.ce-brand__link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ce-brand {
  margin-right: auto;
}

.ce-brand__link {
  color: var(--ink);
}

.ce-brand__link:hover {
  color: var(--ink);
}

.ce-brand__logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}

@media (max-width: 620px) {
  .ce-brand__logo {
    height: 32px;
    width: 32px;
  }
}

.ce-brand__name {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}

.ce-brand__name:hover {
  color: var(--ink);
}

.ce-brand__name strong {
  color: var(--fire);
}

.ce-brand__name em {
  font-style: normal;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.ce-nav-wrap {
  overflow-x: auto;
}

.ce-nav {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.ce-nav li a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
}

.ce-nav li a:hover,
.ce-nav li.current-menu-item a {
  background: var(--cream);
  color: var(--ink);
}

.ce-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

.ce-back-link:hover {
  background: var(--fire);
  color: #fff;
}

.ce-back-link--inline {
  display: inline-flex;
  background: none;
  color: var(--muted);
  padding: 0 0 18px;
  font-weight: 600;
}

.ce-back-link--inline:hover {
  color: var(--fire);
  background: none;
}

/* Main */
.ce-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.ce-hero-blog {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.ce-hero-blog h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}

.ce-hero-blog p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

.ce-hero-blog--sub {
  margin-bottom: 32px;
}

.ce-hero-blog__desc {
  color: var(--muted);
  font-size: 1rem;
  margin: -4px 0 0;
}

/* Hero de portada (con ilustración) */
.ce-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 48px;
  margin: 0 0 64px;
}

.ce-hero__text h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.ce-hero__text p {
  color: var(--muted);
  font-size: 1.1rem;
  margin: 0 0 24px;
}

.ce-hero__art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 820px) {
  .ce-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .ce-hero__art {
    max-width: 420px;
    margin: 0 auto;
  }
}

/* Grid + cards */
.ce-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .ce-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .ce-grid {
    grid-template-columns: 1fr;
  }
}

.ce-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ce-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(49, 38, 23, 0.12);
}

.ce-card__thumb-link {
  display: block;
}

.ce-card__thumb {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: var(--cream);
}

.ce-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ce-card__thumb--placeholder {
  background: linear-gradient(135deg, var(--cream) 0%, var(--orange-soft) 60%, var(--cream) 100%);
  position: relative;
}

.ce-card__thumb--placeholder::after {
  content: "ClientesExpress";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: rgba(17, 16, 15, 0.28);
  letter-spacing: 0.02em;
}

.ce-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.ce-pill {
  display: inline-block;
  align-self: flex-start;
  background: var(--orange-soft);
  color: var(--fire);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.ce-card__title {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1.35;
}

.ce-card__title a {
  color: var(--ink);
}

.ce-card__title a:hover {
  color: var(--fire);
}

.ce-card__excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}

.ce-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

.ce-card__more {
  font-weight: 600;
}

/* Pagination */
.ce-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.ce-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  background: var(--paper);
}

.ce-pagination .page-numbers.current {
  background: var(--fire);
  border-color: var(--fire);
  color: #fff;
}

.ce-pagination .page-numbers:hover {
  border-color: var(--fire);
  color: var(--fire);
}

.ce-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

/* Single post + pages */
.ce-single {
  max-width: 760px;
}

.ce-post__title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.25;
  margin: 10px 0 14px;
  letter-spacing: -0.01em;
}

.ce-post__meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.ce-post__thumb {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.ce-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ce-post__content {
  font-size: 1.05rem;
}

.ce-post__content h2 {
  font-size: 1.5rem;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.ce-post__content h3 {
  font-size: 1.2rem;
  margin: 30px 0 12px;
}

.ce-post__content p {
  margin: 0 0 18px;
  color: var(--ink);
}

.ce-post__content ul,
.ce-post__content ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.ce-post__content li {
  margin-bottom: 8px;
}

.ce-post__content strong {
  color: var(--ink);
}

.ce-post__content a {
  text-decoration: underline;
  text-decoration-color: var(--orange-soft);
  text-underline-offset: 3px;
}

.ce-post__content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--cream);
  border-left: 4px solid var(--fire);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

.ce-post__content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}

.ce-post__content th,
.ce-post__content td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}

.ce-post__content th {
  background: var(--cream);
}

.ce-post__content img {
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.ce-post__cta {
  margin-top: 48px;
  padding: 28px;
  background: var(--ink);
  border-radius: var(--radius);
  text-align: center;
  color: var(--paper);
}

.ce-post__cta p {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.ce-button {
  display: inline-block;
  background: var(--fire);
  color: #fff;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 999px;
}

.ce-button:hover {
  background: var(--fire-2);
  color: #fff;
}

/* Footer */
.ce-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 40px 24px 24px;
}

.ce-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.ce-footer__brand span:first-child {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.ce-footer__brand span:last-child {
  color: var(--muted);
  font-size: 0.9rem;
}

.ce-footer__nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.ce-footer__nav a {
  color: var(--muted);
  font-size: 0.9rem;
}

.ce-footer__nav a:hover {
  color: var(--fire);
}

.ce-footer__copy {
  max-width: var(--max);
  margin: 32px auto 0;
  color: var(--muted);
  font-size: 0.8rem;
}
