/* IMESMA Blank Shell — estilos SOLO del marco y de las vistas editoriales WP.
   No hay reglas para elementos del lienzo (h1, h2, .elementor, botones, etc.). */
body { margin: 0; }
.imesma-header, .imesma-footer, .imesma-skip-link, .imesma-editorial-layout { box-sizing: border-box; }
.imesma-header *, .imesma-header *::before, .imesma-header *::after,
.imesma-footer *, .imesma-footer *::before, .imesma-footer *::after { box-sizing: border-box; }
.imesma-skip-link { position: absolute; z-index: 100000; left: 12px; top: -150px; padding: 12px 16px; background: #fff; color: #111; border: 2px solid #111; }
.imesma-skip-link:focus { top: 12px; }
.imesma-header { background: var(--ims-header-bg); color: var(--ims-header-text); border-bottom: 1px solid var(--ims-header-line); font-family: var(--ims-shell-font); position: relative; z-index: 100; }
.imesma-header.is-sticky { position: sticky; top: 0; }
body.admin-bar .imesma-header.is-sticky { top: 32px; }
.imesma-header-inner { max-width: var(--ims-shell-width); margin-inline: auto; padding: var(--ims-header-pad) 22px; display: flex; align-items: center; gap: 24px; }
.imesma-brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.imesma-brand .custom-logo-link { display: inline-flex; align-items: center; }
.imesma-brand .custom-logo { display: block; width: auto; height: auto; max-width: 260px; max-height: var(--ims-logo-height); }
.imesma-site-name { color: inherit; font-size: 18px; font-weight: 700; line-height: 1.3; text-decoration: none; }
.imesma-primary-nav { margin-inline-start: auto; }
.imesma-primary-menu, .imesma-footer-menu { display: flex; align-items: center; gap: 6px; list-style: none; padding: 0; margin: 0; }
.imesma-primary-menu li { position: relative; list-style: none; margin: 0; }
.imesma-primary-menu a { display: block; padding: 10px 12px; color: inherit; text-decoration: none; font-size: 14px; font-weight: 500; line-height: 1.5; border-radius: 5px; }
.imesma-primary-menu a:hover, .imesma-primary-menu a:focus-visible, .imesma-primary-menu .current-menu-item > a, .imesma-primary-menu .current-menu-ancestor > a { color: var(--ims-header-accent); }
.imesma-primary-menu .sub-menu { display: none; position: absolute; left: 0; top: 100%; min-width: 205px; list-style: none; padding: 7px; margin: 0; background: var(--ims-header-bg); color: var(--ims-header-text); border: 1px solid var(--ims-header-line); box-shadow: 0 10px 22px rgb(0 0 0 / 10%); border-radius: 8px; z-index: 101; }
.imesma-primary-menu .sub-menu .sub-menu { left: 100%; top: 0; }
.imesma-primary-menu li:hover > .sub-menu, .imesma-primary-menu li:focus-within > .sub-menu { display: block; }
.imesma-header-cta { flex: 0 0 auto; display: inline-flex; justify-content: center; align-items: center; padding: 10px 16px; border-radius: 6px; background: var(--ims-header-accent); color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.5; }
.imesma-header-cta:hover, .imesma-header-cta:focus-visible { filter: brightness(.93); color: #fff; }
.imesma-menu-toggle { display: none; border: 1px solid var(--ims-header-line); border-radius: 6px; background: transparent; padding: 10px; color: inherit; cursor: pointer; font: inherit; }
.imesma-menu-toggle-icon { font-size: 20px; line-height: 1; }
.imesma-footer { background: var(--ims-footer-bg); color: var(--ims-footer-text); font-family: var(--ims-shell-font); }
.imesma-footer-inner { max-width: var(--ims-shell-width); margin-inline: auto; padding: 34px 22px; }
.imesma-footer-widgets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 20px; }
.imesma-footer-widgets > .imesma-footer-column:only-child { grid-column: 1 / -1; }
.imesma-footer-widget { margin: 0 0 18px; }
.imesma-footer-widget-title { font-size: 16px; margin: 0 0 10px; }
.imesma-footer a { color: inherit; text-decoration: none; }
.imesma-footer a:hover, .imesma-footer a:focus-visible { text-decoration: underline; }
.imesma-footer-nav { margin-bottom: 18px; }
.imesma-footer-menu { flex-wrap: wrap; gap: 20px; }
.imesma-footer-caption { font-size: 13px; line-height: 1.6; opacity: .86; }
/* These rules apply ONLY to WordPress posts/archives, never to page body canvas. */
.imesma-editorial-layout { max-width: 980px; margin: 0 auto; padding: 30px 22px 55px; }
.imesma-editorial-post { margin-bottom: 32px; }
@media (max-width: 900px) {
  .imesma-header-inner { flex-wrap: wrap; gap: 12px; }
  .imesma-menu-toggle { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
  .imesma-primary-nav { display: none; flex-basis: 100%; order: 9; width: 100%; margin: 0; }
  .imesma-header.is-menu-open .imesma-primary-nav { display: block; }
  .imesma-primary-menu { display: block; }
  .imesma-primary-menu a { padding: 12px 10px; }
  .imesma-primary-menu .sub-menu { display: block; position: static; box-shadow: none; border: 0; border-left: 1px solid var(--ims-header-line); border-radius: 0; margin-left: 16px; padding: 0 0 0 10px; min-width: 0; }
  .imesma-header-cta { order: 10; }
  .imesma-footer-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  body.admin-bar .imesma-header.is-sticky { top: 46px; }
  .imesma-header-inner { padding: var(--ims-header-pad) 16px; }
  .imesma-brand .custom-logo { max-width: 190px; }
  .imesma-footer-inner { padding: 26px 16px; }
  .imesma-footer-widgets { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .imesma-header *, .imesma-footer * { scroll-behavior: auto; transition-duration: 0.01ms; } }
