/**
 * rodriguez-graham.css
 * Custom overrides for xarapro theme
 * Rodriguez-Graham / Acervo site
 * -----------------------------------------------------------------------
 */

/* =====================================================================
   TYPOGRAPHY — Roboto
   ===================================================================== */
body,
.menu-item a,
.views-field a,
.block-title,
.page-title,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Roboto', 'Helvetica Neue', sans-serif !important;
}

.page-title {
  text-transform: uppercase !important;
  font-size: 1.2em !important;
}

.menu-item a,
.menu-item a:hover,
.menu-item a:focus,
.menu-item a:visited,
.header-top a,
.header-top a:hover {
  text-decoration: none !important;
  border-bottom: none !important;
}

.page-title-wrap {
  border-bottom: none !important;
  padding-bottom: 0.5rem !important;
}

/* =====================================================================
   HEADER — logo left aligned, top aligned
   ===================================================================== */


.site-branding {
  height: 60px !important;
}

.site-logo {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  height: 60px !important;
  transform: scale(0.7) !important;
  transform-origin: left bottom !important;
}

.site-logo img {
  height: 60px !important;
  width: auto !important;
}



/* Prevent the sticky JS from expanding the fixed header via padding */
.sticky-header-height {
  padding-top: 0 !important;
}

header.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  min-height: 0 !important;
  z-index: 1000 !important;
}

.header-main,
.header-main.header-sticky,
.header-main.sticky-header,
.sticky-header-height {
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}


/* =====================================================================
   HEADER MAIN — container width
   ===================================================================== */
.header-main .container {
  max-width: 100% !important;
  width: 100% !important;
  /*padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;*/
}

.header-container .site-brand {
  width: 100% !important;
  margin-right: 0 !important;
  flex: 1 !important;
}



/* =====================================================================
   HEADER TOP — logo align top, full width
   ===================================================================== */
.header-top .container {
  max-width: 80% !important;
  width: 80% !important;
  /*padding-bottom: 100px;*/
   /*padding-left: 2.5rem !important;
  padding-right: 2.5rem !important;*/
}


.header-top-container {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-end !important;
}


/* =====================================================================
   PRIMARY MENU — region padding
   ===================================================================== */
.block-region.region-primary-menu,
.region-primary-menu {
  padding: 2px !important;
  gap: 0.1rem !important;
}

.primary-menu-wrapper,
.menu-wrap {
  gap: 0.1rem !important;
  
}

/* =====================================================================
   PUBLIC MENU — horizontal, all caps, bold, no bullets
   ===================================================================== */
.menu-public-menu .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
}

.menu-public-menu .menu-item {
  list-style: none !important;
}

.menu-public-menu .menu-item a {
  text-transform: uppercase !important;
  font-weight: bold !important;
  letter-spacing: 0.1em !important;
}

/* =====================================================================
   TEAM MENU — horizontal, all caps, right aligned, no bullets
   ===================================================================== */
.menu-team-menu .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
  justify-content: flex-end !important;
}

.menu-team-menu .menu-item {
  list-style: none !important;
}

.menu-team-menu .menu-item a {
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
}

#block-xarapro-teammenu {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
}

/* =====================================================================
   OBRA SUB MENU — same as team menu, smaller
   ===================================================================== */
.menu-obra-sub-menu,
#block-xarapro-obrasubmenu {
  margin-top: 0 !important;
  padding-top: 0 !important;
  align-self: flex-start !important;
}

.menu-obra-sub-menu .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  /*ap: 1.5rem !important;*/
  justify-content: flex-end !important;
}

.menu-obra-sub-menu .menu-item {
  list-style: none !important;
}

.menu-obra-sub-menu .menu-item a {
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.8em !important;
  color: #6b6b65 !important;
}

#block-xarapro-obrasubmenu {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
}

/* =====================================================================
   USER ACCOUNT MENU — same as obra sub menu
   ===================================================================== */
#block-xarapro-useraccountmenu,
#block-xarapro-userlogout-menu {
  margin-top: 0 !important;
  padding-top: 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
}

#block-xarapro-useraccountmenu .menu,
#block-xarapro-userlogout-menu .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
  justify-content: flex-end !important;
}

#block-xarapro-useraccountmenu .menu-item,
#block-xarapro-userlogout-menu .menu-item,
#block-xarapro-userlogout-menu li {
  list-style: none !important;
  display: inline !important;
}

#block-xarapro-useraccountmenu .menu-item a,
#block-xarapro-userlogout-menu .menu-item a,
#block-xarapro-userlogout-menu a {
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.6em !important;
  color: #6b6b65 !important;
}

#block-xarapro-userlogout-menu ul,
#block-xarapro-userlogout-menu ol {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  list-style-type: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
  justify-content: flex-end !important;
}

#block-xarapro-userlogout-menu li,
#block-xarapro-userlogout-menu li::before,
#block-xarapro-userlogout-menu li::marker {
  list-style: none !important;
  list-style-type: none !important;
  display: inline-flex !important;
}

/* =====================================================================
   USER LOGIN FORM BLOCK — same as user account menu
   ===================================================================== */
#block-xarapro-userloginform {
  margin-top: 0 !important;
  padding-top: 0 !important;
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
}

#block-xarapro-userloginform .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
  justify-content: flex-end !important;
}

#block-xarapro-userloginform .menu-item {
  list-style: none !important;
  display: inline !important;
}

#block-xarapro-userloginform .menu-item a {
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.6em !important;
  color: #6b6b65 !important;
}

/* =====================================================================
   CONTENIDO NUEVO MENU — same as obra sub menu
   ===================================================================== */
.menu-contenido-nuevo .menu {
  display: flex !important;
  flex-direction: row !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 1.5rem !important;
  justify-content: flex-end !important;
}

.menu-contenido-nuevo .menu-item {
  list-style: none !important;
}

.menu-contenido-nuevo .menu-item a {
  text-transform: uppercase !important;
  letter-spacing: 0.1em !important;
  font-size: 0.8em !important;
  color: #6b6b65 !important;
}

#block-xarapro-contenidonuevo {
  width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
}

/* =====================================================================
   SLIDING SIDEBAR ICON — force visible
   ===================================================================== */
.sliding-sidebar-menu,
.sliding-sidebar-icon {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* =====================================================================
   LAYOUT — sidebar + main
   ===================================================================== */

/* Base (fallback) */
.main-wrapper {
  padding-top: 70px !important;
}

/* Anonymous / guest — header has logo + 1 menu row only */
body.user-guest .main-wrapper {
  padding-top: 110px !important;
}

/* Logged-in — header has logo + 3 menu rows (public, team, contenido) */
body.user-logged-in .main-wrapper {
  padding-top: 75px !important;
}

/* toolbar-fixed: Drupal adds its own body padding, so same value holds */
body.toolbar-fixed .main-wrapper {
  padding-top: 75px !important;
}

.main-wrapper .container,
.main-wrapper > .container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.main-container {
  width: 100%;
  padding-top: 0 !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}
  .main-container .node-content{
  align-items: center;
}

/* =====================================================================
   SIDEBAR LEFT — fixed, calc(15% - 30px) width, left justified
   ===================================================================== */
#sidebar-left {
  position: fixed !important;
  left: 0 !important;
  top: 75px !important;
  width: calc(15% - 30px) !important;
  min-width: calc(15% - 30px) !important;
  z-index: 10 !important;
  padding-top: 35px !important;
  padding-right: 0 !important;
  padding-left: 10px !important;
  text-align: left !important;
}

#sidebar-left .views-field-field-year-finished {
  text-align: right !important;
  padding-right: 5px;
}

#sidebar-left .views-field a,
#sidebar-left .views-field-field-year-finished a {
  font-family: 'Roboto', 'Helvetica Neue', sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  color: #6b6b65 !important;
  display: block !important;
  padding: 2px 0 !important;
  text-decoration: none !important;
  padding-top: 15px;
}

#sidebar-left .views-field a:hover {
  color: #1c1c1a !important;
}

#sidebar-left .block-title { display: none !important; }

#sidebar-left .block,
#sidebar-left .block-content,
#sidebar-left .views-element-container {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

.block-views-blockworks-block-1 {
  padding-top: 40px !important;
}

/* =====================================================================
   WORKS GALLERY — 4-column grid, hover image swap per cell
   ===================================================================== */

.works-gallery {
  max-width: 100% !important;
}

/* Outer grid — 4 equal columns */
.works-gallery .view-content {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  grid-auto-flow: dense !important;
  gap: 10px !important;
  padding-top: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Each cell is also a grid so both image fields share the same area */
.works-gallery .views-row {
  grid-column: span 1;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: 1fr auto !important;
  border: 1px solid #e0e0e0 !important;
  overflow: hidden !important;
  position: relative !important;
}

/* Wide images span 2 outer columns */
.works-gallery .views-row.is-wide {
  grid-column: span 2 !important;
}

/* Primary image: normal grid placement, sets the row height */
.works-gallery .views-field-field-imagen-a-muro {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
}

/* Hover image: absolutely positioned over the primary — does NOT affect row height */
.works-gallery .views-field-field-work-image-1 {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
  pointer-events: none !important;
  z-index: 2 !important;
  overflow: hidden !important;
}

/* Title sits in the row below the primary image */
.works-gallery .views-field-title {
  grid-column: 1 !important;
  grid-row: 2 !important;
  position: relative !important;
  z-index: 3 !important;
}

/* ---- Primary image (visible by default, fades out on hover) ---- */
.works-gallery .views-field-field-imagen-a-muro {
  transition: opacity 0.25s ease !important;
  z-index: 1 !important;
  align-self: end !important;
}

.works-gallery .views-row.has-hover-image:hover .views-field-field-imagen-a-muro {
  opacity: 0 !important;
}

.works-gallery .views-field-field-imagen-a-muro .field-content {
  width: 100% !important;
  height: auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: block !important;
}

.works-gallery .views-field-field-imagen-a-muro .field-content a {
  display: block !important;
  width: 100% !important;
  line-height: 0 !important;
}

.works-gallery .views-field-field-imagen-a-muro img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  display: block !important;
  border: none !important;
}

/* ---- Hover image wrappers fill the absolute container ---- */
.works-gallery .views-field-field-work-image-1 .field-content {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  display: block !important;
}

.works-gallery .views-field-field-work-image-1 .field-content a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  line-height: 0 !important;
}

.works-gallery .views-field-field-work-image-1 img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  max-width: 100% !important;
  display: block !important;
  border: none !important;
}

/* Reveal hover image on rollover */
.works-gallery .views-row:hover .views-field-field-work-image-1 {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Hide the empty field-content div when there is no primary image */
.works-gallery .views-field-field-imagen-a-muro .field-content:empty {
  display: none !important;
}

/* Rows where the primary image is missing: hover becomes layout source (back in flow) */
.works-gallery .views-row:has(.views-field-field-imagen-a-muro .field-content:empty) .views-field-field-work-image-1 {
  position: relative !important;
  inset: auto !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.works-gallery .views-row:has(.views-field-field-imagen-a-muro .field-content:empty) .views-field-field-work-image-1 .field-content,
.works-gallery .views-row:has(.views-field-field-imagen-a-muro .field-content:empty) .views-field-field-work-image-1 .field-content a {
  height: auto !important;
}

.works-gallery .views-row:has(.views-field-field-imagen-a-muro .field-content:empty) .views-field-field-work-image-1 img {
  height: auto !important;
  object-fit: initial !important;
}

/* Hide rows only when BOTH image fields are empty */
.works-gallery .views-row:has(.views-field-field-imagen-a-muro .field-content:empty):has(.views-field-field-work-image-1 .field-content:empty) {
  display: none !important;
}

/* =====================================================================
   OBRA TABLE
   ===================================================================== */
.obra-table {
  display: block !important;
  width: fit-content !important;
  margin-left: 0 !important;
  margin-right: auto !important;
}

table.cols-7 {
  table-layout: auto !important;
  width: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

/* All cells: shrink to content, 5px padding */
table.cols-7 td,
table.cols-7 th {
  padding: 5px !important;
  vertical-align: middle !important;
  width: 1% !important;
  white-space: nowrap !important;
}

/* Header row — all caps, bold, tight height */
table.cols-7 thead tr th {
  text-transform: uppercase !important;
  font-weight: bold !important;
  font-size: 0.8em !important;
  padding: 0 5px !important;
  line-height: 1 !important;
  height: 20px !important;
  max-height: 20px !important;
  overflow: hidden !important;
  border-bottom: 1px dashed #1c1c1a !important;
}

/* Row bottom padding */
table.cols-7 tbody tr td {
  padding-top: 5px !important;
  padding-bottom: 15px !important;
}

/* Dotted line between body rows only, not after last */
table.cols-7 tbody tr:not(:last-child) td {
  border-bottom: 1px dashed #afafaf !important;
}

/* Image cell — dictates row height */
table.cols-7 .views-field-field-work-image {
  width: 1% !important;
  white-space: nowrap !important;
}

table.cols-7 .views-field-field-work-image img {
  height: 120px !important;
  width: auto !important;
  max-width: none !important;
  display: block !important;
}

/* Title — wrap, bold */
table.cols-7 .views-field-title {
  white-space: normal !important;
  width: auto !important;
  min-width: 150px !important;
  font-weight: bold !important;
  font-size: 0.9em;
}

/* Support — wrap, small */
table.cols-7 .views-field-field-support {
  white-space: normal !important;
  width: auto !important;
  font-size: 0.8em !important;
}

/* Small text fields */
table.cols-7 .views-field-field-width,
table.cols-7 .views-field-field-year-finished {
  font-size: 0.8em !important;
}

/* Catalog number — rotated, fixed width */
table.cols-7 tbody .views-field-field-numero-de-catalogo {
  width: 50px !important;
  max-width: 50px !important;
  height: 120px !important;
  text-align: center !important;
  vertical-align: middle !important;
  overflow: visible !important;
  position: relative !important;
  font-size: 0.9em !important;
  font-weight: bold !important;
}

table.cols-7 .views-field-field-numero-de-catalogo a {
  display: inline-block !important;
  white-space: nowrap !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translateX(-50%) translateY(-50%) rotate(270deg) !important;
}

/* Edit cell — unfilled cell, filled link with padding */
table.cols-7 td.views-field-edit-node,
table.cols-7 th.views-field-edit-node {
  text-align: center !important;
  vertical-align: middle !important;
}

table.cols-7 td.views-field-edit-node a {
  color: #000000 !important;
  background-color: #dddddd !important;
  border-radius: 4px !important;
  display: block !important;
  margin: 0 auto !important;
  width: fit-content !important;
  padding: 0 20px !important;
  transform: rotate(270deg) !important;
  white-space: nowrap !important;
}

/* =====================================================================
   HORIZONTAL CHECKBOX GROUPS — materials, tipo de documento, pendientes
   ===================================================================== */
div#edit-field-materials.form-checkboxes,
div#edit-field-tipo-de-documento,
div#edit-field-pendientes-obra.form-checkboxes {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.4rem 1rem !important;
  padding: 0 !important;
  margin: 0 !important;
}

div#edit-field-materials.form-checkboxes > div,
div#edit-field-tipo-de-documento > div,
div#edit-field-pendientes-obra.form-checkboxes > div {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  max-width: fit-content !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  margin: 0 !important;
  flex: 0 0 auto !important;
}

div#edit-field-materials.form-checkboxes > div.form-item,
div#edit-field-materials.form-checkboxes > div.js-form-item,
div#edit-field-tipo-de-documento > div.form-item,
div#edit-field-tipo-de-documento > div.js-form-item,
div#edit-field-pendientes-obra.form-checkboxes > div.form-item,
div#edit-field-pendientes-obra.form-checkboxes > div.js-form-item {
  width: fit-content !important;
  max-width: fit-content !important;
}

/* =====================================================================
   DIMENSION FIELDS & YEAR FIELDS — inline layout in obra form
   ===================================================================== */
#edit-field-depth-wrapper,
#edit-field-width-wrapper,
#edit-field-height-wrapper {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 0.4rem 1rem !important;
  width: fit-content !important;
}

/* Form as flex container so year fields can sit side by side */
.node-obra-form {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
}

.node-obra-form > .form-wrapper,
.node-obra-form > .js-form-wrapper {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
}

#edit-field-year-commenced-wrapper,
#edit-field-year-finished-wrapper {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin-right: 1rem !important;
}

#edit-field-depth-wrapper > div,
#edit-field-width-wrapper > div,
#edit-field-height-wrapper > div,
#edit-field-year-commenced-wrapper > div,
#edit-field-year-finished-wrapper > div {
  display: inline-flex !important;
  align-items: center !important;
  width: fit-content !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}

/* =====================================================================
   FORM LAYOUT — labels left, inputs right
   ===================================================================== */
.js-form-item.form-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

.js-form-item.form-item > label {
  flex-shrink: 0 !important;
  min-width: 120px !important;
  text-align: right !important;
}

.js-form-item.form-item > input,
.js-form-item.form-item > select,
.js-form-item.form-item > textarea {
  flex: 1 !important;
}

.js-form-item.form-item:has(textarea) {
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.js-form-item.form-item:has(textarea) > label {
  text-align: left !important;
  min-width: 0 !important;
}

.js-form-item.form-item:has(textarea) > textarea,
textarea.form-textarea,
.form-textarea-wrapper textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  flex: none !important;
}

.form-textarea-wrapper,
.form-type-textarea,
.js-form-type-textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.js-form-item.form-item > .description {
  flex-basis: 100% !important;
  width: 100% !important;
  padding-left: 120px !important;
  font-size: 0.8em !important;
  color: #6b6b65 !important;
}

/* Checkboxes — label after input, no min-width */
.js-form-item.form-type-checkbox {
  flex-direction: row !important;
  align-items: center !important;
}

.js-form-item.form-type-checkbox > label {
  min-width: 0 !important;
  text-align: left !important;
}

/* Comentarios textarea — label on its own line, textarea full width below */
#edit-field-comentarios-0-value,
.js-form-item-field-comentarios-0-value {
  flex-direction: column !important;
  align-items: flex-start !important;
}

.js-form-item-field-comentarios-0-value > label {
  text-align: left !important;
  min-width: 0 !important;
}

.js-form-item-field-comentarios-0-value > textarea {
  width: 100% !important;
  flex: none !important;
}

/* =====================================================================
   FORM INPUTS — visible border
   ===================================================================== */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea {
  border: 1px solid #afafaf !important;
  outline: none !important;
  padding: 4px 6px !important;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
  border-color: #1c1c1a !important;
}

/* =====================================================================
   LOGGED-IN STATE
   ===================================================================== */
body.user-guest #sidebar-left {
  top: 110px !important;
}

body.user-logged-in #sidebar-left {
  top: 75px !important;
}

.node-submitted-details {
  display: none !important;
}

/* Prevent node edit form fields from scrolling under fixed header */
#edit-field-work-image-wrapper,
.node-form #edit-field-work-image-wrapper {
  scroll-margin-top: 160px !important;
  padding-top: 20px !important;
}

/* =====================================================================
   PATH-SPECIFIC — /works
   ===================================================================== */


/* Align works gallery top with sidebar */
.path-works .main-wrapper {
  margin-top: 0px !important;
}

.path-works .highlighted {
  display: none !important;
}

/* Works page — remove highlighted gap, align content with sidebar top */
body.homepage .highlighted,
body.homepage .dialog-off-canvas-main-canvas > .highlighted {
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}



/* =====================================================================
   REGION CONTENT — fills space right of fixed sidebar
   ===================================================================== */
.block-region.region.region-content {
  display: block !important;
  margin-left: 15% !important;
  margin-right: 40px !important;
  width: auto !important;
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* =====================================================================
   BLOCK XARAPRO CONTENT — max width
   ===================================================================== */
#block-xarapro-content {
  max-width: 90% !important;
  text-align: justify;
  align-items: center !important;
}

#sidebar-left:empty,
#sidebar-left:not(:has(> *)) {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
}

/* =====================================================================
   PATH-USER — login page fixes
   ===================================================================== */
body.path-user .main-container {
  padding-top: 100px !important;
}

body.path-user .block-region.region.region-content {
  margin-left: 0 !important;
  text-align: left !important;
}

/* =====================================================================
   PATH-NODE — node add/edit pages
   ===================================================================== */
body.path-node .main-wrapper {
  padding-top: 95px !important;
}

body.toolbar-fixed.path-node .main-wrapper {
  padding-top: 170px !important;
}

body.path-node .block-region.region.region-content {
  width: fit-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: left !important;
}

/* Page title sits flush with the left edge of the image */
body.path-node .page-title-wrap {
  padding-top: 50px !important;
  text-align: left !important;
  width: 100% !important;
}

body.path-node .page-title {
  text-align: left !important;
  width: 100% !important;
  padding-bottom: 10px !important;
  border-bottom: 5px solid var(--ink) !important;
  margin-bottom: 0 !important;
}

/* Image field defines the column width — let it size naturally */
body.path-node .views-field-field-imagen-a-muro,
body.path-node .field--name-field-imagen-a-muro {
  display: block !important;
  border: 1px solid var(--border) !important;
}

/* Work title in gallery and node views */
.works-gallery .views-field-title,
body.path-node .views-field-title {
  font-size: 1.3em !important;
  font-weight: 700 !important;
}

/* =====================================================================
   EXHIBITIONS GALLERY — view-website-exhibitions
   ===================================================================== */
/* Drupal wraps the grid in .views-view-responsive-grid--horizontal — target that directly */
.view-website-exhibitions .views-view-responsive-grid--horizontal {
  grid-template-columns: repeat(3, 1fr) !important;
}

@media (max-width: 900px) {
  .view-website-exhibitions .views-view-responsive-grid--horizontal {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 560px) {
  .view-website-exhibitions .views-view-responsive-grid--horizontal {
    grid-template-columns: 1fr !important;
  }
}

.view-website-exhibitions {

  font-size: .9em;
  line-height: 105%;
}

   .view-website-exhibitions .views-field-title {
  text-transform: uppercase !important;
    padding-top: 20px;
  font-size: 1em !important;
  font-weight: 700 !important;

}

.view-website-exhibitions .views-field-field-type {
  font-size: 0.8em !important;
  font-weight: 300 !important;
}

/* =====================================================================
   PATH-EXHIBITIONS — full-width content, 3-column grid
   ===================================================================== */

/* No sidebar on exhibitions: align with header's 80% container (10% each side) */
body.path-exhibitions .block-region.region.region-content {
  margin-left: 10% !important;
  margin-right: 10% !important;
}

body.path-exhibitions #block-xarapro-content {
  max-width: 100% !important;
  width: 100% !important;
}

/* Override Drupal's responsive grid to 3 equal columns, tighter gap */
body.path-exhibitions .views-view-responsive-grid--horizontal {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 13px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Images fill their column width */
.view-website-exhibitions img.image-field {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.field-content.Titulo-Obra {
  text-transform: uppercase !important;
}

.node-content .page-title-wrap {
  display: none !important;
}

/* =====================================================================
   WORK PAGE — image left, text wraps right
   ===================================================================== */
body.path-node .block-region.region.region-content:has(.view-id-work) {
  width: 80% !important;
  max-width: 80% !important;
}

.view-id-work {
  width: 100% !important;
  max-width: 100% !important;
}

.view-id-work .views-row {
  display: grid !important;
  grid-template-columns: auto auto !important;
  grid-template-rows: repeat(4, auto) 1fr !important;
  column-gap: 30px !important;
  row-gap: 0 !important;
  align-items: start !important;
  align-content: start !important;
  width: fit-content !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.view-id-work .views-field-field-work-image {
  grid-column: 1 !important;
  grid-row: 1 / -1 !important;
  margin-top: 2px !important;
  border: 1px solid #e0e0e0 !important;
}

.view-id-work .views-field-title,
.view-id-work .views-field-field-support,
.view-id-work .views-field-field-width,
.view-id-work .views-field-field-year-finished {
  grid-column: 2 !important;
  align-self: start !important;
  font-size: 0.9em !important;
  max-width: none !important;
  white-space: normal !important;
}

.view-id-work .views-field-title {
  padding-top: 40px !important;
  line-height: 1.1em;
}

/* Works year menu — non-active */
#sidebar-left .works-year-menu .year-menu-button a {
  font-weight: 500 !important;
  color: #555555 !important;
}

/* Works year menu — active year */
#sidebar-left .works-year-menu .year-menu-button.active-year a {
  font-weight: 900 !important;
  font-size: 1em !important;
  color: #000000 !important;
  
}

