/* Infovaticana v2 - estilos mínimos y modernos */
:root {
  --iv2-font: system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --iv2-max: 1100px;
  --iv2-text: #222;
  --iv2-muted: #666;
  --iv2-bg: #fff;
  --iv2-accent: #b80000;
  --iv2-link: #490c0c;
  /* rojo discreto */
  --iv2-border: #e6e6e6;
  /* relación de aspecto por defecto para miniaturas/hero (editable) */
  --iv2-single-image-ratio: 3/2;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  margin: 0;
  color: var(--iv2-text);
  background: var(--iv2-bg);
  font-family: var(--iv2-font);
  line-height: 1.1;
}

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

a:hover {
  color: var(--iv2-accent);
}

/* Headings: Montserrat 600, black, no underline in links */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', var(--iv2-font);
  font-weight: 600;
  color: #000;
}

h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
  color: inherit;
  text-decoration: none;
}

h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover {
  text-decoration: none;
}

/* Medios fluidos: evita que las imágenes desborden y empujen el sidebar */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  body {
    padding-bottom: 56px;
  }
}

.container {
  width: 100%;
  max-width: var(--iv2-max);
  padding: 0 1rem;
  margin: 0 auto;
}

.header-inner {
  position: relative;
}

.site-branding {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  height: 6em;
}

@media (max-width: 900px) {
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 1em;
    gap: 2em;
    margin: 1em 0 0;
  }

  .site-branding {
    height: 3em;
  }
}

.site-title {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
}

.site-description {
  color: var(--iv2-muted);
  margin: 0;
  font-size: .95rem;
}

.site-description {
  color: var(--iv2-muted);
  margin: 0;
  font-size: .9rem;
  text-align: center;
}

.site-navigation.nav-primary {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-primary .menu {
  list-style: none;
  display: flex;
  gap: .25rem;
  padding: 0;
  margin: 0;
  align-items: center;
}

.nav-primary .menu>li {
  position: relative;
  text-align: center;
  white-space: nowrap;
}

.nav-primary a {
  color: inherit;
  text-decoration: none;
  padding: .65rem .6rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .02em;
  font-family: 'Montserrat', var(--iv2-font);
  text-align: center;
  display: inline-block;
  white-space: normal;
}

.nav-primary .current-menu-item>a,
.nav-primary a:hover {
  color: var(--iv2-accent);
}

/* Submenús (desktop hover) */
.nav-primary .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  background: #fff;
  border: 1px solid var(--iv2-border);
  min-width: 220px;
  padding: .25rem 0;
  display: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  z-index: 10;
}

.nav-primary .sub-menu li {
  list-style: none;
}

.nav-primary .sub-menu a {
  display: block;
  padding: .5rem .75rem;
}

.nav-primary .menu>li:hover>.sub-menu {
  display: block;
}

.submenu-toggle {
  margin-left: .15rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  color: var(--iv2-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: .25rem;
}

.submenu-open>.sub-menu {
  display: block;
}

/* Rotate chevron when open */
li.submenu-open>.submenu-toggle i {
  transform: rotate(180deg);
}

/* Screen reader only text utility */
.screen-reader-text {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* Contenedor de menú + icono de búsqueda */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 4em;
  border-top: solid 1px #eee;
  border-bottom: solid 1px #eee;
}

/* Estado activo con fondo rojo */
.nav-primary .menu>li.current-menu-item>a {
  background: var(--iv2-accent);
  color: #fff;
}

.header-search input[type="search"] {
  padding: .4rem .6rem;
  border: 1px solid #ddd;
}

/* Icono de búsqueda en el header */
.search-toggle {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #000;
}

.search-overlay {
  position: absolute;
  left: 0;
  right: 0;
  height: 100%;
  background: var(--iv2-accent);
  color: #fff;
  z-index: 1001;
}

.search-overlay[hidden] {
  display: none !important;
}

.search-overlay-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  position: relative;
  max-width: var(--iv2-max);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
}

.search-overlay form {
  width: 80%;
}

.search-overlay .search-field {
  outline: none;
  box-shadow: none;
  width: 100%;
  background: transparent;
  color: #fff;
  border: 0;
  padding: .5rem 0;
}

.search-overlay .search-field:focus {
  outline: none;
  box-shadow: none;
}


.search-overlay .search-field::placeholder {
  color: rgba(255, 255, 255, .85);
}

.search-overlay .search-submit {
  display: none;
}

.search-close {
  position: absolute;
  right: 0;
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}


@media (max-width: 900px) {
  .header-bar {
    height: 0;
    border: 0 none;
  }

  .search-overlay {
    position: fixed;
    top: 0;
    height: 4em;
  }

  .search-close {
    right: 1em;
  }
}

main {
  padding: 1.25rem 0 2rem;
}

.post-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .post-list {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }

  /* Archive sin sidebar: contenido ocupa todo el ancho */
  .post-list:has(.archive-content):not(:has(.sidebar)) {
    grid-template-columns: 1fr;
  }

  /* Permite que el contenido se comprima dentro de la columna sin forzar ancho */
  .post-list>* {
    min-width: 0;
  }
}

.article-card {
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

.article-card h2 {
  margin: .25rem 0 .5rem;
  font-size: 1.3rem;
}

.article-card img.wp-post-image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}


.featured-article {
  margin-bottom: 2rem;
}

.featured-article h2 {
  font-size: 1.9rem;
  text-align: center;
}

@media (min-width: 900px) {
  .featured-article h2 {
    font-size: 1.9rem;
  }
}

/* Grid for posts from 2 onwards */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 600px) {
  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Full-width widget slot that spans both columns inside posts-grid */
.posts-grid .home-widget-slot {
  grid-column: 1 / -1;
}

.posts-grid .article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

@supports (aspect-ratio: 16/9) {
  .posts-grid .article-card img {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* Widget: último post autor multisite fondo grande */
.iv2-author-last-post-widget {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  padding: 2.5rem 2rem 2rem;
  background-size: cover;
  background-position: center;
  color: #fff;
  isolation: isolate;
}

.iv2-author-last-post-widget::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), rgba(0, 0, 0, .25));
  z-index: -1;
}

.iv2-author-last-post-link {
  text-decoration: none;
  color: inherit;
  display: block;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
}

.iv2-author-last-post-title {
  margin: 0;
  font-family: 'Montserrat', var(--iv2-font);
  line-height: 1.15;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .7);
  color: #fff;
}

.iv2-author-last-post-meta {
  font-size: .9rem;
  color: rgba(255, 255, 255, .9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.iv2-author-last-post-excerpt {
  margin: .15rem 0 0 0;
  font-size: .95rem;
  line-height: 1.35;
  max-width: 70ch;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}

.iv2-author-last-post-more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: 1em;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, .35);
  padding: .35rem .6rem;
  border-radius: 4px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
  align-self: flex-end;
}

/* Widget autor multisite con banner lateral */
.iv2-author-last-post-wrapper {
  display: flex;
  align-items: stretch;
}

.iv2-author-last-post-wrapper.iv2-has-banner .iv2-author-last-post-widget {
  flex: 1 1 50%;
  min-width: 0;
}

.iv2-author-last-post-banner {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iv2-banner-img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .iv2-author-last-post-wrapper {
    flex-direction: column;
  }

  .iv2-author-last-post-banner {
    flex: none;
    width: 100%;
    margin: 1rem auto 0;
  }

  .iv2-banner-img {
    max-height: 200px;
  }
}

.article-card .entry-meta {
  color: var(--iv2-muted);
  font-size: .9rem;
}

/* Single post title centered and larger */
.single .single-title {
  text-align: center;
  font-size: 1.6rem;
  line-height: 1.2;
  margin: .25rem 0 1rem;
}

@media (min-width: 900px) {
  .single .single-title {
    font-size: 2.4rem;
  }
}

/* Meta under featured image with red separator */
.entry-meta {
  color: var(--iv2-muted);
  margin: .5rem 0 2rem;
}

.entry-meta .sep {
  color: var(--iv2-accent);
  padding: 0 .35rem;
}

/* Post content: Noto Serif and drop cap */
.single .entry-content {
  font-family: 'Noto Serif', Georgia, 'Times New Roman', serif;
  line-height: 1.5em;
}

.single .entry-content p:first-of-type::first-letter {
  font-size: 3rem;
  font-weight: 700;
}

.pagination {
  margin: 2rem 0;
}

.pagination .nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.pagination .nav-previous,
.pagination .nav-next {
  flex: 1;
}

.pagination .nav-previous {
  text-align: left;
}

.pagination .nav-next {
  text-align: right;
}

.pagination a {
  display: inline-block;
  padding: .75rem 1.25rem;
  background: var(--iv2-primary, #8B0000);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background .2s ease;
}

.pagination a:hover {
  background: var(--iv2-primary-dark, #6B0000);
}

footer.site-footer {
  border-top: 1px solid #eee;
  padding: 1em 0 5em 0;
  color: var(--iv2-muted);
}

@media (min-width: 900px) {
  .sidebar {
    border-left: 1px solid #f0f0f0;
    padding-left: 1rem;
  }
}

.widget {
  margin-bottom: 1.25rem;
}

.widget-title {
  font-size: 1rem;
  margin: 0 0 .5rem;
}

.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Barra móvil inferior */
.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--iv2-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, .05);
  z-index: 999;
  padding: .35rem .75rem;
  padding-bottom: calc(.35rem + env(safe-area-inset-bottom));
}

.flex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.social-mobile-bar {
  list-style: none;
  margin: 0;
  padding: 0;
}

.social-mobile-bar li {
  flex: 1 1 0;
  text-align: center;
}

.social-mobile-bar li a,
.social-mobile-bar li button {
  font-size: 1.25rem;
  line-height: 1;
  background: none;
  border: none;
  text-decoration: none;
  color: inherit;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .25rem 0;
}

.whatsapp-desktop {
  display: none;
}

@media (min-width: 700px) {
  .whatsapp-desktop {
    display: list-item;
  }

  .whatsapp-mobile {
    display: none;
  }
}

/* Cajón menú móvil */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1000;
}

.mobile-menu[hidden] {
  display: none !important;
}

.mobile-menu-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(50px + env(safe-area-inset-bottom));
  top: 0;
  background: #fff;
  padding: 1rem;
  overflow: auto;
  border-top: 3px solid var(--iv2-accent);
}

.mobile-menu-close {
  position: absolute;
  top: .5rem;
  right: .75rem;
  font-size: 1.5rem;
  background: none;
  border: none;
}

.mobile-menu-list {
  list-style: none;
  padding: 2.25rem 0 1rem;
  margin: 0;
}

.mobile-menu-list li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-list a {
  display: block;
  padding: .75rem .25rem;
  text-decoration: none;
  color: inherit;
}

.mobile-menu-list .sub-menu {
  list-style: none;
  padding-left: 1rem;
}

/* Responsive: el menú del header se oculta en móvil (usamos cajón + barra) */
@media (max-width: 900px) {
  .site-navigation.nav-primary {
    display: none;
  }
}

.sidebar-items {
  font-family: Montserrat, sans-serif;
  margin-bottom: 2em;
}

.sidebar-items h4 {
  margin: 0;
}

.sidebar-items .widget-title {
  text-transform: uppercase;
  font-size: .9rem;
  padding: .5rem;
  text-align: center;
  border: 1px solid #9D0600;
  letter-spacing: 1px;
  max-width: 75%;
  margin: 1rem auto;
  font-weight: 600;
  color: #999;
}

.sidebar-items a:hover h4 {
  color: var(--iv2-accent);
}

.sidebar-items .top-tabs {
  border-bottom: solid 1px #9D0600;
  display: flex;
  margin-bottom: 1em;
}

.sidebar-items .top-tabs .tab {
  font-family: Montserrat;
  padding: 4px 10px;
  cursor: pointer;
  user-select: none;
  width: 50%;
  box-sizing: border-box;
  text-align: center;
}

.sidebar-items .top-tabs .tab.active {
  background-color: #9D0600;
  color: #fff;
}

.sidebar-items .tab-pane:not(.active) {
  display: none;
}

.sidebar-items .item {
  display: flex;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid lightgrey;
  font-family: Montserrat;
  font-weight: 600;
  font-size: 16px;
  align-items: center;
}

.sidebar-items .item:last-child {
  border-bottom: none;
}

.sidebar-items .item picture,
.sidebar-items .item img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  margin-right: 8px;
}

@supports (aspect-ratio: 1/1) {

  .sidebar-items .item picture,
  .sidebar-items .item img {
    height: auto;
    aspect-ratio: 1 / 1;
  }
}


blockquote {
  margin: 4em;
  font-style: italic;
  font-size: 1.2em;
}

@media (max-width: 900px) {
  blockquote {
    margin: 2em;
    font-size: 1em;
  }
}

blockquote span.quote-open {
  font-size: 5em;
  color: var(--iv2-accent);
  position: absolute;
  margin-left: -0.6em;
}

blockquote span.quote-close {
  font-size: 1.5em;
  font-weight: bold;
  margin: 0 0.2em;
}


p {
  margin-bottom: 1.25rem;
}


.footer-container {
  display: flex;
  gap: 2rem;
}

.footer-center {
  flex-grow: 1;
}

.footer-links {
  padding: 0 3em;
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 0.5em;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 1em;
  }
}


/* Featured image: make inner <img> behave like a centered sizing canvas */
figure.post-thumbnail {
  position: relative;
  display: grid;
  /* lets children overlap cleanly */
  overflow: hidden;
  aspect-ratio: var(--iv2-single-image-ratio);
  background: #f7f7f7;
  /* subtle fallback while loading */
}

/* Ensure full overlay area whether the img is wrapped by <a> or not */
figure.post-thumbnail>a,
figure.post-thumbnail>img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
}

figure.post-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* like background-size: cover */
  object-position: center;
  /* centered crop */
}

/* Video embed container - responsive 16:9 */
.video-embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 aspect ratio */
  margin: 1rem 0 1.5rem;
  background: #000;
}

.video-embed-container iframe,
.video-embed-container embed,
.video-embed-container object,
.video-embed-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Video single page */
.video-single .entry-content {
  font-family: 'Noto Serif', Georgia, 'Times New Roman', serif;
  line-height: 1.5em;
  margin-top: 1.5rem;
}

/* Widget: Últimos Videos */
.iv2-latest-videos-list {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

@media (max-width: 600px) {
  .iv2-latest-videos-list {
    flex-direction: column;
  }
}

.iv2-latest-video-item {
  display: block;
  text-decoration: none;
  color: inherit;
}

.iv2-latest-video-item:hover {
  color: var(--iv2-accent);
}

.iv2-latest-video-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 4px;
  background: #f0f0f0;
}

@supports (aspect-ratio: 16/9) {
  .iv2-latest-video-thumb {
    padding-bottom: 0;
    aspect-ratio: 16/9;
  }
}

.iv2-latest-video-thumb img {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: cover;
  transition: transform 0.2s ease;
}

@supports (aspect-ratio: 16/9) {
  .iv2-latest-video-thumb img {
    position: static;
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

.iv2-latest-video-item:hover .iv2-latest-video-thumb img {
  transform: scale(1.03);
}

.iv2-latest-video-thumb.iv2-has-play-icon .iv2-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  transition: transform 0.2s ease, color 0.2s ease;
}

.iv2-latest-video-item:hover .iv2-play-icon {
  color: #fff;
  transform: translate(-50%, -50%) scale(1.1);
}

.iv2-latest-video-title {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.iv2-video-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

#infovat_latest_videos-3 {
  padding: 1em;
  background-color: #fffbd1;
}

/* ========================================
   ARCHIVE / CATEGORY PAGE STYLES
   ======================================== */

.archive-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--iv2-accent);
}

.archive-header h1 {
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

@media (min-width: 900px) {
  .archive-header h1 {
    font-size: 2.2rem;
  }
}

.archive-description {
  color: var(--iv2-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.archive-content .featured-article {
  margin-bottom: 1.5rem;
}

.archive-content .featured-article img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 4px;
}

@supports (aspect-ratio: 16/9) {
  .archive-content .featured-article img {
    height: auto;
    aspect-ratio: 16/9;
  }
}

.archive-content .featured-article h2 {
  font-size: 1.5rem;
  margin: 0.75rem 0 0.5rem;
  text-align: left;
}

@media (min-width: 900px) {
  .archive-content .featured-article h2 {
    font-size: 1.7rem;
  }
}

.archive-content .featured-article .entry-summary {
  color: var(--iv2-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Grid articles (from 3rd post onwards) */
.archive-content .grid-article {
  display: flex;
  flex-direction: column;
  border-bottom: none;
  padding-bottom: 0;
}

.archive-content .grid-article .grid-thumbnail {
  display: block;
  overflow: hidden;
  border-radius: 4px;
}

.archive-content .grid-article .grid-thumbnail img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.2s ease;
}

@supports (aspect-ratio: 16/9) {
  .archive-content .grid-article .grid-thumbnail img {
    height: auto;
    aspect-ratio: 16/9;
  }
}

.archive-content .grid-article:hover .grid-thumbnail img {
  transform: scale(1.03);
}

.archive-content .grid-article h2 {
  font-size: 1.05rem;
  margin: 0.5rem 0 0.25rem;
  line-height: 1.3;
}

.archive-content .grid-article .entry-meta {
  font-size: 0.8rem;
  margin: 0;
}