/* Sistema editorial compartido por portada y paginas publicas internas. */
body.public-page {
  --nc-brand-green: #159447;
  --nc-brand-green-deep: #087a39;
  --nc-brand-red: #df2438;
  --nc-radius-xs: 3px;
  --nc-radius-sm: 5px;
  --nc-radius-md: 6px;
  --nc-radius-lg: 8px;
  --nc-shadow-sm: 0 1px 2px rgb(6 26 50 / 4%);
  --nc-shadow-md: 0 10px 28px rgb(6 26 50 / 8%);
  --nc-shadow-lg: 0 20px 52px rgb(6 26 50 / 12%);
  background: #fff;
}
.public-page * { letter-spacing: 0 !important; }

/* Navegacion editorial premium: marca compacta, secciones y acciones claras. */
.public-page .topline { border-bottom: 0; background: #071a37; }
.public-page .topline-inner { height: 32px; width: min(1360px, calc(100% - 32px)); }
.public-page .topline-action-btn { padding: 2px 5px; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #fff; font-size: 10px; }
.public-page .topline-action-btn:hover { background: transparent; box-shadow: none; color: #78c8ff; transform: none; }
.public-page .nav-bar { height: 66px; border-top: 2px solid var(--nc-brand-green); border-bottom: 1px solid #163352; background: #081d38; box-shadow: 0 10px 28px rgb(3 15 31 / 20%); }
.public-page .nav-bar::after { position: absolute; z-index: 2; top: -2px; right: 0; width: clamp(72px, 12vw, 180px); height: 2px; background: var(--nc-brand-red); content: ""; pointer-events: none; }
.public-page .portal-nav { height: 64px; width: min(1360px, calc(100% - 32px)); gap: .65rem; font-family: var(--nc-font-ui); }
.public-page .portal-nav-logo,
.public-page .nav-bar.is-condensed .portal-nav-logo { position: relative; display: flex !important; width: 94px; height: 52px; flex: 0 0 94px; align-items: center; justify-content: flex-start; margin-right: .25rem; padding-right: .8rem; border-right: 1px solid rgb(255 255 255 / 17%); }
.public-page .portal-nav-logo::after { position: absolute; right: .45rem; width: 3px; height: 24px; border-radius: 2px; background: var(--nc-brand-green); box-shadow: 5px 0 0 var(--nc-brand-red); content: ""; }
.public-page .portal-nav-logo img { width: 82px; max-width: 82px; height: 44px; max-height: 44px; object-fit: contain; filter: brightness(0) invert(1); }
.public-page .portal-nav-links { min-width: 0; gap: 0; overflow: visible; }
.public-page .portal-nav-links > li { height: 64px; }
.public-page .nav-pipe-item { display: none; }
.public-page .portal-nav-link { position: relative; height: 64px; padding: 0 .62rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #f6f8fb; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.public-page .portal-nav-link > span { display: none; }
.public-page .portal-nav-link::after { position: absolute; right: .62rem; bottom: 0; left: .62rem; height: 3px; background: var(--nc-brand-green); content: ""; transform: scaleX(0); transform-origin: center; transition: transform 160ms ease; }
.public-page .portal-nav-link::before { position: absolute; z-index: 1; right: .57rem; bottom: -1px; width: 5px; height: 5px; border: 1px solid #081d38; border-radius: 50%; background: var(--nc-brand-red); content: ""; opacity: 0; transform: scale(.5); transition: opacity 160ms ease, transform 160ms ease; }
.public-page .portal-nav-link:hover { border: 0; background: rgb(255 255 255 / 7%); box-shadow: none; color: #fff; transform: none; }
.public-page .portal-nav-link:hover::after,
.public-page .portal-nav-link.is-current::after { transform: scaleX(1); }
.public-page .portal-nav-link.is-current::before { opacity: 1; transform: scale(1); }
.public-page .portal-nav-link.is-current { border: 0; background: rgb(21 148 71 / 13%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%); color: #fff; }
.public-page .portal-nav-actions { align-self: stretch; }
.public-page .portal-nav-actions::before { width: 1px; height: 28px; margin: auto .3rem auto 0; background: rgb(255 255 255 / 17%); content: ""; }
.public-page .portal-more > button { height: 64px; padding: 0 .72rem; border: 0; border-radius: 0; background: transparent; color: #f6f8fb; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.public-page .portal-more > button:hover,
.public-page .portal-more.is-open > button { border: 0; background: rgb(21 148 71 / 13%); color: #fff; }
.public-page .portal-more-menu { top: calc(100% + 1px); min-width: 190px; padding: .4rem; border: 1px solid #d7dfe7; border-radius: 4px; background: #fff; box-shadow: var(--nc-shadow-md); }
.public-page .portal-more-menu .portal-nav-link { width: 100%; height: 38px; justify-content: flex-start; padding-inline: .7rem; color: #142132; }
.public-page .portal-more-menu .portal-nav-link:hover { border: 0; background: #edf8f1; color: var(--nc-brand-green-deep); }
.public-page .portal-search-toggle { width: 40px; height: 40px; border-color: var(--nc-brand-green); border-radius: 4px; background: rgb(21 148 71 / 9%); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 3%); }
.public-page .portal-search-toggle:hover { border-color: #35b96b; background: var(--nc-brand-green-deep); color: #fff; box-shadow: none; transform: none; }
.public-page .portal-nav-search { top: calc(100% + 1px); border-color: #d7dfe7; border-radius: 4px; background: #fff; box-shadow: var(--nc-shadow-md); }
.public-page .portal-nav-search input { border-color: #c8d2dc; border-radius: 3px; }
.public-page .portal-nav-search button { border-radius: 3px; background: var(--nc-brand-green-deep); }

.public-page .breaking { border-bottom: 1px solid #dfe5eb; background: #fff; }
.public-page .breaking-inner { height: 36px; }
.public-page .breaking strong { color: #bd1f36; }
.public-page .breaking a { color: #0756ba; }

/* Publicidad comercial mas discreta y horizontal. */
.public-page .commercial-logo-strip { padding-block: .65rem; border-bottom: 1px solid #dfe5eb; background: #f8fafc; }
.public-page .commercial-logo-strip > .shell { min-height: 82px; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding-block: 0; }
.public-page .commercial-logo-heading { margin: 0; }
.public-page .commercial-logo-heading small { display: block; font-size: .68rem; line-height: 1.3; }
.public-page .commercial-logo-list { gap: .65rem; }
.public-page .commercial-logo-list a,
.public-page .commercial-logo-list .commercial-brand-link { width: 136px; height: 68px; flex: 0 0 136px; min-height: 68px; padding: .9rem .45rem .3rem; border-radius: 4px; background: #fff; box-shadow: none; }
.public-page .commercial-logo-list img { width: 100%; height: 32px; padding: 0; object-fit: contain; }
.public-page .commercial-logo-list a > b { padding: 2px 4px; font-size: 8px; }
.public-page .commercial-logo-list .ad-card-meta { display: none; }
.public-page .commercial-logo-list a > span[aria-hidden="true"] { display: none; }
.public-page .commercial-carousel.is-overflowing { grid-template-columns: 32px minmax(0, 1fr) 32px; }
.public-page .commercial-carousel-control { width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #071a37; font-size: 18px; }

/* Encabezados internos con tono editorial comun. */
.public-page :is(.page-hero,.municipality-page-hero,.comunidad-hero-section,.forum-hero-banner,.police-hero-section,.journalists-directory-hero,.writer-profile-hero,.about-hero,.cv-builder-hero) {
  padding-block: clamp(2.4rem, 5vw, 4.25rem);
  border-block: 1px solid #dce3e9;
  background: #f7f9fb;
  color: #071a37;
}
.public-page :is(.page-hero,.municipality-page-hero,.comunidad-hero-section,.forum-hero-banner,.police-hero-section,.journalists-directory-hero,.writer-profile-hero,.about-hero,.cv-builder-hero) :is(h1,h2,p,span,a) { color: inherit; }
.public-page :is(.page-hero,.municipality-page-hero,.comunidad-hero-section,.forum-hero-banner,.police-hero-section,.journalists-directory-hero,.writer-profile-hero,.about-hero,.cv-builder-hero) h1 {
  max-width: 20ch;
  margin: .35rem 0 .7rem;
  font-family: var(--nc-font-editorial);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
}
.public-page :is(.page-hero,.municipality-page-hero,.comunidad-hero-section,.forum-hero-banner,.police-hero-section,.journalists-directory-hero,.writer-profile-hero,.about-hero,.cv-builder-hero) p { max-width: 68ch; color: #526477; }
.public-page .public-breadcrumb { min-height: 42px; border-bottom: 1px solid #e3e8ed; background: #fff; }

/* Tarjetas de contenido: imagen y tipografia primero, ornamento minimo. */
.public-page :is(.actualidad-card,.dynamic-news-card,.journalist-publication-card,.municipality-card,.prof-card,.forum-card,.comment-card,.related-news-grid article,.club-update-card,.sorteo-portada-card,.account-card,.access-gate-card,.cv-progress-card) {
  border-color: #dbe2e8;
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
}
.public-page :is(.actualidad-card,.dynamic-news-card,.journalist-publication-card,.municipality-card,.prof-card):hover { border-color: #aebdca; box-shadow: var(--nc-shadow-md); transform: translateY(-2px); }
.public-page :is(.actualidad-thumb,.publication-cover,.municipality-card-image,.prof-card-photo) { border-radius: 4px 4px 0 0; }
.public-page :is(.actualidad-body h3,.publication-content h3,.dynamic-news-card h2,.municipality-card h2,.prof-card h2,.prof-card h3,.forum-card h2,.forum-card h3) { color: #071a37; font-family: var(--nc-font-editorial); font-weight: 700; line-height: 1.18; }
.public-page :is(.actualidad-cat,.publication-category,.municipality-card-badge,.prof-badge-featured) { border-radius: 3px; background: #071a37; color: #fff; }
.public-page .dynamic-news-grid { gap: 1rem; }
.public-page .dynamic-news-card > div { padding: 1.1rem; }
.public-page .dynamic-news-card h2 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
.public-page .dynamic-news-card small { padding-top: .75rem; border-top: 1px solid #e2e7ec; }

/* Campanas administradas desde MySQL en las paginas internas. */
.public-page .section-advertisers > header { align-items: end; padding-bottom: .8rem; border-bottom-color: #dbe2e8; }
.public-page .section-advertisers > header span { color: #98631a; }
.public-page .section-ad-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.public-page .section-ad-grid > a { border-color: #dbe2e8; border-radius: 6px; box-shadow: none; transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.public-page .section-ad-grid > a:hover { border-color: #aab9c7; box-shadow: var(--nc-shadow-md); transform: translateY(-2px); }
.public-page .section-ad-grid > a > span { padding: .5rem .65rem; background: #f4f6f8; color: #7a5a27; }
.public-page .section-ad-grid picture { display: block; background: #f1f4f6; }
.public-page .section-ad-grid img { display: block; width: 100%; height: 126px; object-fit: contain; }
.public-page .section-ad-grid a > div { padding: .75rem; border-top: 1px solid #edf0f3; }
.public-page .section-ad-grid b { color: #102238; font-size: .78rem; }
.public-page .section-ad-grid small { color: #6a798b; font-size: .68rem; }

/* Lectura de noticias. */
.public-page .article-reader-container { max-width: 78rem; }
.public-page .article-header-hero { max-width: 54rem; }
.public-page .article-main-title { color: #071a37; font-size: clamp(1.75rem, 3.6vw, 2.65rem); font-weight: 700; line-height: 1.08; }
.public-page .article-main-lead { color: #526477; font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; }
.public-page .category-kicker-pill,
.public-page .locality-kicker-badge { min-height: 28px; border-radius: 3px; box-shadow: none; }
.public-page .featured-img-frame,
.public-page .nc-premium-carousel { border-radius: 5px; box-shadow: none; }
.public-page .featured-img-frame { background: linear-gradient(135deg, rgba(7, 26, 55, .96), rgba(20, 43, 64, .88)); }
.public-page .nc-premium-carousel { background: linear-gradient(135deg, rgba(7, 26, 55, .96), rgba(20, 43, 64, .88)); }
.public-page .article-content-body { max-width: 52rem; }
.public-page .article-text-render { color: #182b40; font-size: clamp(1.08rem, 2vw, 1.25rem); }
.public-page .article-text-render :is(h2,h3,h4) { color: #071a37; }
.public-page .article-source-box { border-radius: 0 4px 4px 0; }

/* Formularios, filtros y utilidades. */
.public-page :is(.page-search,.prof-toolbar,.forum-form,.ad-lead-form) { border-radius: 6px; box-shadow: none; }
.public-page :is(input,select,textarea) { border-radius: 4px; }
.public-page :is(.button,.nc-button,.forum-btn,.prof-filter-btn,.prof-card-btn) { border-radius: 4px; box-shadow: none; }
.public-page .newsletter { background: #071a37; }
.public-page .site-footer { background: #06162c; }

@media (max-width: 72rem) {
  .public-page .portal-menu-toggle { border-color: var(--nc-brand-green); border-radius: 4px; background: rgb(21 148 71 / 8%); }
  .public-page .portal-menu-toggle span { background: #fff; }
  .public-page .portal-nav-logo { display: flex !important; }
  .public-page .portal-nav-logo img { filter: brightness(0) invert(1); }
  .public-page .portal-nav-actions .portal-nav-link { display: none; }
  .public-page .portal-nav-actions::before { display: none; }
  .public-page .section-ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 42rem) {
  .public-page .commercial-logo-strip > .shell { grid-template-columns: 1fr; gap: .5rem; }
  .public-page .commercial-logo-heading small { display: none; }
  .public-page :is(.page-hero,.municipality-page-hero,.comunidad-hero-section,.forum-hero-banner,.police-hero-section,.journalists-directory-hero,.writer-profile-hero,.about-hero,.cv-builder-hero) { padding-block: 2rem; }
  .public-page :is(.page-hero,.municipality-page-hero,.comunidad-hero-section,.forum-hero-banner,.police-hero-section,.journalists-directory-hero,.writer-profile-hero,.about-hero,.cv-builder-hero) h1 { font-size: clamp(2rem, 11vw, 3.2rem); }
  .public-page .section-ad-grid { grid-template-columns: 1fr; }
}
