/*
Theme Name: ElectroHuila
Theme URI: https://electrohuila.com.co
Author: Sistemas ElectroHuila
Description: Plantilla del blog de ElectroHuila, con el mismo estilo de la página principal (colores, tipografía, tarjetas y botones).
Version: 1.4.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: electrohuila
*/

:root {
  --eh-blue: #0098db;
  --eh-navy: #0b3d91;
  --eh-ink: #0b2436;
  --eh-green: #3cb878;
  --eh-lime: #7cc142;
  --eh-muted: #5a7385;
  --eh-line: #e4ecf1;
  --eh-soft: #f7fafc;
  --eh-top: #1a6192;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }
body { background: #fff; color: var(--eh-ink); font-family: 'Inter', sans-serif; line-height: 1.6; }
h1, h2, h3, h4, h5, h6 { font-family: 'Sora', sans-serif; line-height: 1.2; }
a { color: var(--eh-blue); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--eh-blue); outline-offset: 2px; }
.eh-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.eh-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 14px rgba(7,26,44,.08); }

/* Barra azul superior */
.eh-topbar { background: var(--eh-top); color: #fff; }
.eh-topbar-in { max-width: 1600px; margin: 0 auto; padding: 7px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eh-phone { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
.eh-phone:hover { text-decoration: underline; }
.eh-topsocial { display: flex; align-items: center; gap: 6px; }
.eh-topsocial a { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: rgba(255,255,255,.8); transition: color .2s ease, background .2s ease; }
.eh-topsocial a:hover { color: #fff; background: rgba(255,255,255,.18); }

/* Fila principal */
.eh-header-in { max-width: 1600px; margin: 0 auto; padding: 10px 32px; display: flex; align-items: center; gap: 24px; }
.eh-brand { display: flex; align-items: center; text-decoration: none; }
.eh-brand img { height: 52px; width: auto; display: block; }
.eh-nav { flex: 1; }
.eh-nav-list { list-style: none; display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.eh-nav-list > li { position: relative; }
.eh-nav-list > li > a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--eh-ink); text-decoration: none; font-size: 14.5px; font-weight: 600; transition: all .2s ease; }
.eh-nav-list > li > a:hover, .eh-nav-list > li:focus-within > a { background: #eef6fb; color: var(--eh-blue); }
.eh-caret { font-size: 11px; margin-left: 2px; }

/* Submenú escritorio */
.eh-sub { list-style: none; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 12px 28px rgba(7,26,44,.16); opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease; }
.eh-has-sub:hover .eh-sub, .eh-has-sub:focus-within .eh-sub { opacity: 1; visibility: visible; transform: none; }
.eh-sub a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--eh-ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.eh-sub a:hover { background: #eef6fb; color: var(--eh-blue); }

/* Buscador */
.eh-search { display: flex; align-items: center; flex-direction: row-reverse; gap: 6px; }
.eh-search-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--eh-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease; flex-shrink: 0; }
.eh-search-btn:hover { background: var(--eh-navy); }
.eh-search-form { width: 0; overflow: hidden; transition: width .25s ease; }
.eh-search.is-open .eh-search-form { width: 230px; }
.eh-search-form input, .eh-mobile-search input { width: 100%; height: 42px; border: 1.5px solid #d8e2e8; border-radius: 999px; padding: 0 16px; font: inherit; font-size: 14px; color: var(--eh-ink); background: #fff; }
.eh-search-form input:focus, .eh-mobile-search input:focus { outline: none; border-color: var(--eh-blue); }

/* Botón hamburguesa */
.eh-burger { display: none; background: none; border: 1.5px solid #d8e2e8; border-radius: 10px; width: 42px; height: 42px; cursor: pointer; color: var(--eh-ink); align-items: center; justify-content: center; }

/* Menú móvil (pantalla completa) */
.eh-mobile { position: fixed; inset: 0; z-index: 200; background: #fff; overflow-y: auto; padding: 14px 20px 24px; display: none; flex-direction: column; gap: 18px; }
.eh-menu-open { overflow: hidden; }
.eh-menu-open .eh-mobile { display: flex; }
.eh-mobile-top { display: flex; align-items: center; justify-content: space-between; }
.eh-burger-close { display: inline-flex; }
.eh-mobile-list { list-style: none; }
.eh-mobile-list > li { border-bottom: 1px solid var(--eh-line); }
.eh-mobile-list a, .eh-mobile-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 16px 4px; background: none; border: 0; font: inherit; font-size: 17px; font-weight: 700; color: var(--eh-ink); text-decoration: none; text-align: left; cursor: pointer; }
.eh-mobile-sub { list-style: none; display: none; padding: 0 0 10px 14px; }
.eh-mobile-list li.is-open > .eh-mobile-sub { display: block; }
.eh-mobile-list li.is-open > .eh-mobile-toggle .eh-caret { transform: rotate(180deg); }
.eh-mobile-sub a { font-size: 15px; font-weight: 600; padding: 11px 4px; color: var(--eh-muted); }
.eh-mobile-foot { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.eh-mobile-foot .eh-phone { color: var(--eh-top); font-size: 15px; }
.eh-mobile-foot .eh-topsocial a { color: var(--eh-top); background: #eef6fb; width: 38px; height: 38px; }
.eh-mobile-foot .eh-topsocial { gap: 10px; }

/* Vista previa en video del menú */
.eh-preview { position: fixed; z-index: 150; width: 280px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0b2436; box-shadow: 0 14px 32px rgba(7,26,44,.28); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease; }
.eh-preview.is-on { opacity: 1; visibility: visible; }
.eh-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Banda de título */
.eh-band { background: linear-gradient(90deg, #0b2436, #0b3d91 60%, #0098db); color: #fff; padding: 56px 0 60px; }
.eh-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #8be3b5; margin-bottom: 12px; }
.eh-kicker::before { content: ''; width: 18px; height: 3px; background: #8be3b5; border-radius: 2px; }
.eh-band h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; margin-bottom: 10px; }
.eh-band p { color: #cfe0f7; max-width: 640px; }

/* Listado */
.eh-main { padding-top: 48px; padding-bottom: 72px; }
.eh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.eh-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.eh-card-img { height: 220px; border-radius: 14px; background: #e4ecf1 center / cover no-repeat; margin-bottom: 14px; transition: transform .25s ease, box-shadow .25s ease; }
.eh-card:hover .eh-card-img { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(7,26,44,.14); }
.eh-card-body { padding: 0 6px; text-align: center; }
.eh-meta { display: block; font-size: 13px; color: #8a97a1; font-weight: 600; margin-bottom: 8px; }
.eh-card h2 { font-size: 17px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.eh-card:hover h2 { color: var(--eh-blue); }
.eh-empty { text-align: center; color: var(--eh-muted); padding: 48px 0; }

.eh-pagination { margin-top: 40px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.eh-pagination .page-numbers { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid #d8e2e8; border-radius: 999px; text-decoration: none; color: var(--eh-ink); font-weight: 700; font-size: 14px; }
.eh-pagination .page-numbers:hover { border-color: var(--eh-blue); color: var(--eh-blue); }
.eh-pagination .current { background: var(--eh-ink); border-color: var(--eh-ink); color: #fff; }

/* Entrada / página */
.eh-article { max-width: 820px; margin: 0 auto; padding: 48px 24px 72px; }
.eh-back { display: inline-block; margin-bottom: 20px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--eh-blue); }
.eh-article h1 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; margin-bottom: 12px; }
.eh-article .eh-meta { font-size: 14px; margin-bottom: 24px; }
.eh-cat { display: inline-block; background: #e8f7ef; color: #2fae66; font-weight: 700; border-radius: 999px; padding: 2px 12px; margin-right: 8px; }
.eh-hero-img { width: 100%; border-radius: 16px; margin-bottom: 28px; display: block; }
.eh-content { font-size: 17px; color: #1d3347; }
.eh-content > * + * { margin-top: 1.1em; }
.eh-content h2, .eh-content h3 { margin-top: 1.6em; color: var(--eh-navy); }
.eh-content ul, .eh-content ol { padding-left: 1.4em; }
.eh-content img { border-radius: 12px; }
.eh-content blockquote { border-left: 4px solid var(--eh-green); background: var(--eh-soft); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.eh-content table { width: 100%; border-collapse: collapse; }
.eh-content th, .eh-content td { border: 1px solid var(--eh-line); padding: 8px 12px; text-align: left; }
.alignleft { float: left; margin: 0 20px 12px 0; }
.alignright { float: right; margin: 0 0 12px 20px; }
.aligncenter { display: block; margin: 0 auto; }

/* Responsive */
@media (max-width: 1000px) {
  .eh-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .eh-topbar-in { padding: 6px 16px; }
  .eh-header-in { padding: 8px 16px; gap: 12px; }
  .eh-brand { flex: 1; }
  .eh-brand img { height: 44px; }
  .eh-nav, .eh-search { display: none; }
  .eh-header .eh-burger { display: inline-flex; }
}
@media (max-width: 820px) {
  .eh-wrap { padding: 0 16px; }
  .eh-band { padding: 40px 0 44px; }
}
@media (max-width: 600px) {
  .eh-grid { grid-template-columns: 1fr; }
  .eh-card-img { height: 200px; }
  .eh-phone span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ===== Footer ===== */
.eh-footer { position: relative; color: #fff; padding: 52px 0 0; background: #0a56c4 linear-gradient(135deg, #0b3d91 0%, #0a5bd0 60%, #0098db 100%) center / cover no-repeat; overflow: hidden; }
.eh-footer::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,70,170,.55), rgba(6,50,130,.35)); pointer-events: none; }
.eh-footer > * { position: relative; z-index: 1; }
.eh-footer a { color: #fff; text-decoration: none; }
.eh-footer a:hover { text-decoration: underline; }
.eh-foot-in { max-width: 1170px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.eh-footer h3 { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 400; padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1.5px solid rgba(255,255,255,.35); }
.eh-footer h3.eh-foot-sub { margin-top: 30px; }
.eh-foot-list, .eh-foot-links { list-style: none; }
.eh-foot-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.25; margin-bottom: 12px; }
.eh-foot-list li svg { flex-shrink: 0; margin-top: 1px; opacity: .9; }
.eh-foot-list.eh-small li { font-size: 13px; line-height: 1.2; }
.eh-foot-list li.eh-noicon { padding-left: 10px; word-break: break-word; }
.eh-foot-links li { font-size: 15px; line-height: 1.2; margin-bottom: 11px; }
.eh-foot-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 9px 16px; background: #3cb878; color: #fff !important; font-weight: 700; font-size: 13.5px; border-radius: 6px; box-shadow: 0 6px 14px rgba(0,0,0,.2); }
.eh-foot-btn:hover { background: #2fae66; text-decoration: none !important; }
.eh-social { display: flex; gap: 14px; margin-bottom: 26px; }
.eh-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.eh-social a:hover { background: rgba(255,255,255,.35); text-decoration: none; }
.eh-foot-brand img { max-width: 190px; height: auto; display: block; margin-bottom: 14px; }
.eh-foot-brand-text { display: block; font-family: 'Sora', sans-serif; font-weight: 800; font-size: 28px; margin-bottom: 10px; }
.eh-foot-brand p { font-size: 14px; }

/* Barra blanca con logos */
.eh-foot-bar { max-width: 1170px; margin: 44px auto 0; background: rgba(255,255,255,.97); color: #0b2436; border-radius: 10px; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eh-foot-logos { display: flex; align-items: center; gap: 34px; }
.eh-foot-logos img { height: 40px; width: auto; max-width: 130px; object-fit: contain; display: block; }
.eh-foot-copy { font-size: 16px; text-align: center; }
.eh-foot-legal { text-align: center; font-size: 13.5px; color: #dbe7f7; padding: 22px 16px 26px; }

@media (max-width: 1000px) {
  .eh-foot-in { grid-template-columns: repeat(2, 1fr); }
}
/* Tablet: logos y texto en varias filas */
@media (max-width: 1000px) and (min-width: 721px) {
  .eh-foot-bar { flex-wrap: wrap; justify-content: center; margin-left: 24px; margin-right: 24px; }
  .eh-foot-logos { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .eh-foot-logos img { height: 34px; }
}
/* Celular */
@media (max-width: 720px) {
  .eh-foot-in { grid-template-columns: 1fr; gap: 26px; }
  .eh-foot-bar { flex-direction: column; margin-left: 16px; margin-right: 16px; padding: 16px; }
  .eh-foot-logos { flex-wrap: wrap; justify-content: center; gap: 20px; }
}