/* ==========================================================
   Pie de página UNGS para OJS (tema por defecto)
   SOLO en la página de inicio del portal (sitio multirevistas).
   Las revistas mantienen su pie de página original.

   Todas las reglas dependen de "body:has(.page_index_site)":
   .page_index_site es el contenedor que OJS usa únicamente en la
   portada del sitio que lista las revistas.

   El contenido se pega como texto plano: 12 párrafos (bloques
   separados por una línea en blanco). Toda la estructura,
   el logo y el mapa se generan desde este CSS.

   Orden de los párrafos:
    1  Dirección                    -> columna 1 (con logo encima)
    2  Cómo llegar                  -> columna 2 (con mapa debajo)
    3  Contactos (título)           -> columna 3
    4–12 Contactos                  -> columna 3 (1.ª línea en negrita)
   ========================================================== */

/* --- Franja azul a todo el ancho --- */
body:has(.page_index_site) .pkp_structure_footer_wrapper {
  background-color: #00759c;
}

body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content {
  max-width: 1170px;
  margin: 0 auto;
  padding: 20px 15px;
  box-sizing: border-box;
  color: #ffffff;
  font-family: 'Fira Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.5;

  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(260px, 1.2fr);
  column-gap: 30px;
  align-items: start;
}

/* --- Párrafos: base --- */
body:has(.page_index_site) .pkp_footer_content > p {
  margin: 0 0 10px;
  color: #ffffff;
  grid-column: 3;
}

/* --- Columna 1: dirección + logo --- */
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1 / span 10;
}
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(1)::before {
  content: "";
  display: block;
  width: 100%;
  max-width: 280px;
  height: 52px;
  margin-bottom: 12px;
  background: url("https://www.ungs.edu.ar/wp-content/themes/ungs/images/logo-ungs-header.svg") no-repeat left center;
  background-size: contain;
}

/* --- Columna 2: "Cómo llegar" + mapa --- */
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1 / span 10;
}
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(2)::after {
  content: "";
  display: block;
  width: 80px;
  height: 80px;
  margin-top: 10px;
  background: url("https://www.ungs.edu.ar/wp-content/themes/ungs/images/footer-map.jpg") no-repeat center;
  background-size: cover;
}

/* --- Títulos: "Cómo llegar" y "Contactos" --- */
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(2),
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(3) {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* --- Contactos: primera línea (nombre) en negrita y más grande --- */
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(n+4)::first-line {
  font-size: 12px;
  font-weight: 600;
}

/* Rectorado y Secretaría (sin datos debajo): pegados al siguiente, como en el sitio */
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(5),
body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(10) {
  margin-bottom: 0;
}

body:has(.page_index_site) .pkp_footer_content > p:last-of-type {
  margin-bottom: 0;
}

/* --- Celulares y tablets: una sola columna --- */
@media (max-width: 767px) {
  body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content {
    grid-template-columns: 1fr;
  }
  body:has(.page_index_site) .pkp_footer_content > p,
  body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(1),
  body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(2) {
    grid-column: 1;
    grid-row: auto;
  }
  body:has(.page_index_site) .pkp_footer_content > p:nth-of-type(2) {
    margin-bottom: 20px;
  }
}

/* --- Ocultar el logo "Open Journal Systems" del pie (solo en el inicio del portal) --- */
body:has(.page_index_site) .pkp_brand_footer {
  display: none;
}

/* --- Enlaces: sin subrayado, subrayado solo al pasar el mouse --- */
body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content a,
body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content a:link,
body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content a:visited {
  color: #ffffff !important;
  text-decoration: none !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content a:hover,
body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content a:focus {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* El mapa no se subraya al pasar el mouse */
body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content > p:nth-of-type(2) a:hover,
body:has(.page_index_site) .pkp_structure_footer_wrapper .pkp_footer_content > p:nth-of-type(2) a:focus {
  text-decoration: none !important;
}
