@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');
/**
 * @file
 * Subtheme specific CSS.
 */

/* ============================================================
   Navbar – sticky + scroll effect
   ============================================================ */
nav.navbar {
  transition: background-color 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
  background-color: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: none;
}

/**
 * State applied by JS (global.js) once the page scrolls past 50 px.
 * The navbar becomes fully opaque with a stronger shadow.
 */
nav.navbar.scrolled {}

/* Logo shrink on scroll */
.navbar-brand img {
  max-height: 70px;
  width: auto;
  transition: max-height 0.35s ease;
}

nav.navbar.scrolled .navbar-brand img {
  max-height: 40px;
}

/* ============================================================
   Research Carousel
   ============================================================ */
#researchCarousel {
  position: relative;
  overflow: hidden;
}

#researchCarousel .carousel-item {
  height: 100vh;
  min-height: 500px;
  background-color: #000;
}

#researchCarousel .carousel-item img {
  object-fit: cover;
  opacity: 0.65;
  /* Darken for text readability */
  transition: transform 10s linear;
}

#researchCarousel .carousel-item.active img {
  transform: scale(1.1);
}

#researchCarousel .carousel-caption {
  bottom: 0;
  left: 10%;
  right: 10%;
  text-align: center;
  z-index: 10;
  padding-bottom: 5rem;
}

#researchCarousel .carousel-caption h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4.5rem;
  letter-spacing: -2px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

#researchCarousel .carousel-caption p {
  font-family: 'Open Sans', sans-serif;
  max-width: 800px;
  margin: 1.5rem auto;
  opacity: 0.9;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  #researchCarousel .carousel-caption h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  #researchCarousel .carousel-caption h1 {
    font-size: 2.2rem;
  }

  #researchCarousel .carousel-caption p {
    font-size: 1.1rem;
  }
}

/* ============================================================ */

/* ============================================================
   Section Titles (Modern Style)
   ============================================================ */
.modern-title-container {
  text-align: center;
  margin-bottom: 3.5rem;
}

.modern-title {
  text-transform: uppercase;
  font-family: 'Space Grotesk', sans-serif !important;
  color: #1e293b;
  font-weight: 700;
  display: inline-block;
  position: relative;
  padding-bottom: 15px;
  letter-spacing: 0.05em;
  font-size: 1.75rem;
}

.modern-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background-color: #7fc54d;
  border-radius: 2px;
}

.modern-subtitle {
  color: #64748b;
  font-size: 1.1rem;
  margin-top: 1.25rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ============================================================ */

/* Navbar links – white text */
nav.navbar .nav-link,
nav.navbar .nav-item a {
  color: #ffffff !important;
  transition: color 0.2s ease, opacity 0.2s ease;
}

nav.navbar .nav-link:hover,
nav.navbar .nav-item a:hover {
  color: #ffffff !important;
  opacity: 0.75;
}

/* Toggler icon white */
nav.navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
}

nav.navbar .navbar-toggler-icon {
  filter: invert(1);
}

/* ============================================================ */

.chart-card-height {
  min-height: 450px;
  /* Adjust this value as needed to match the height of the other card */
}

html,
body {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  /* Apply Space Grotesk font */

}

.detalle-dump-data {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  margin: 2rem 0;
  border: 1px solid #f1f5f9;
}

.detalle-dump-data table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  padding-bottom: 10px;
}

.detalle-dump-data thead th {
  background-color: #f8fafc;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.detalle-dump-data tbody tr {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid #f1f5f9;
}

.detalle-dump-data tbody tr:last-child {
  border-bottom: none;
}

.detalle-dump-data tbody tr:hover {
  background-color: #f8fafc;
  transform: scale(1.005);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  z-index: 10;
  position: relative;
}

.detalle-dump-data tbody td {
  padding: 1.5rem;
  color: #334155 !important;
  font-size: 0.95rem;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.detalle-dump-data tbody tr:last-child td {
  border-bottom: none;
}

/* Styling for the 'Ver detalle' link if it exists in the table */
.detalle-dump-data tbody td a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  background-color: #f0f9ff;
  color: #0284c7;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.detalle-dump-data tbody td a:hover {
  background-color: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.detalle-dump-data .views-exposed-form {
  /*display: none;*/
}

.detalle-dump-data .view-header p,
.caja-herramientas .view-header p {
  margin-top: 10px;
  text-align: center;
}

.detalle-dump-data .data-dump-actions {
  margin-top: 10px;
  margin-left: 10px;
}

.detalle-dump-data-single .data-dump-actions-single {
  margin-bottom: 10px;
}

/* Detalle Dump Data Single Styles */
.detalle-dump-data-single {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  padding: 2.5rem;
  margin: 2rem auto;
  border: 1px solid #f1f5f9;
  max-width: 100%;
}

.detalle-dump-data-single .views-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.detalle-dump-data-single .views-field {
  background-color: #f8fafc;
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detalle-dump-data-single .views-field:hover {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  transform: translateY(-4px);
}

.detalle-dump-data-single .views-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.75rem;
  display: block;
}

.detalle-dump-data-single .field-content {
  font-size: 1.125rem;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

/* Special styling for ID field */
.detalle-dump-data-single .views-field-id {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.detalle-dump-data-single .views-field-id .views-label {
  margin-bottom: 0;
  margin-right: 1rem;
}

.detalle-dump-data-single .views-field-id .field-content {
  font-family: 'Space Grotesk', monospace;
  color: #0284c7;
  background: #e0f2fe;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .detalle-dump-data-single {
    padding: 1.5rem;
    margin: 1rem 0;
  }

  .detalle-dump-data-single .views-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .detalle-dump-data-single .views-field-id {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}


/* Estilos para la lista de herramientas (Grid Moderno) */
.caja-herramientas-list {
  padding: 1rem 0;
}

.caja-herramientas-list .views-view-grid .views-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

.caja-herramientas-list .views-col {
  width: auto !important;
  /* Override inline styles from Views */
  display: flex;
  flex-direction: column;
  /* Stack children vertically */
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  height: 100%;
  /* Ensure full height for equal cards */
}

.caja-herramientas-list .views-col:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border-color: #e2e8f0;
  background: #f8fafc;
}

.caja-herramientas-list .views-field {
  padding: 1rem 1.5rem;
  width: 100%;
  text-align: center;
}

/* Title field */
.caja-herramientas-list .views-field-title {
  padding-top: 2rem;
  padding-bottom: 0.5rem;
}

.caja-herramientas-list .views-field-title .field-content {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

/* Description field */
.caja-herramientas-list .views-field-field-descripcion-detallada {
  flex-grow: 1;
  /* Allow description to take available space */
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Link field (Ver herramienta) */
.caja-herramientas-list .views-field-view-node,
.views-field.views-field-nid {
  margin-top: auto;
  /* Push to bottom */
  padding-bottom: 2rem;
}

.caja-herramientas-list .views-field-view-node a,
.views-field.views-field-nid a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #f0f9ff;
  color: #0284c7;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.caja-herramientas-list .views-field-view-node a:hover,
.views-field.views-field-nid a:hover {
  background-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .caja-herramientas-list .views-view-grid .views-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .caja-herramientas-list .views-view-grid .views-row {
    grid-template-columns: 1fr;
  }
}

/* Estilos para la lista de Convocatorias */
.convocatorias {
  padding: 2rem 0;
}

.convocatorias .views-view-grid .views-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* 3 columns for convocatorias looks better usually */
  gap: 2rem;
  align-items: stretch;
}

.convocatorias .views-col {
  width: auto !important;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.convocatorias .views-col:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

/* Top border accent */
.convocatorias .views-col::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #7fc54d, #5a9331);
}

.convocatorias .views-field {
  padding: 0.75rem 1.5rem;
  width: 100%;
}

/* Title */
.convocatorias .views-field-title {
  padding-top: 2rem;
  margin-bottom: 0.5rem;
}

.convocatorias .views-field-title a {
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.3;
  display: block;
}

.convocatorias .views-field-title a:hover {
  color: #0284c7;
}

/* Dates */
.convocatorias .views-field-field-fecha-de-apertura,
.convocatorias .views-field-field-fecha-de-cierre {
  display: flex;
  align-items: baseline;
  font-size: 0.875rem;
  color: #64748b;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.convocatorias .views-label {
  font-weight: 600;
  margin-right: 0.5rem;
  color: #475569;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 60px;
}

.convocatorias .field-content time {
  color: #334155;
  font-weight: 500;
}

/* Target Audience */
.convocatorias .views-field-field-publico-objetivo {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.convocatorias .views-field-field-publico-objetivo .views-label {
  display: block;
  margin-bottom: 0.25rem;
}

.convocatorias .views-field-field-publico-objetivo .field-content {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
}

/* Button */
.convocatorias .views-field-view-node {
  margin-top: auto;
  padding: 1.5rem;
  background-color: #f8fafc;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}

.convocatorias .views-field-view-node a {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s;
  text-align: center;
}

.convocatorias .views-field-view-node a:hover {
  background-color: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Responsive */
@media (max-width: 1024px) {
  .convocatorias .views-view-grid .views-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .convocatorias .views-view-grid .views-row {
    grid-template-columns: 1fr;
  }
}


/* Modern Styling for Exposed Filters Form */
.views-exposed-form {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
}

.views-exposed-form .form-item {
  margin-bottom: 0 !important;
  /* Override mb-3 from bootstrap wrapper if needed, or rely on flex gap */
  flex-grow: 1;
  min-width: 200px;
  /* Ensure inputs don't get too squashed */
}

/* Adjust the flex container provided by the theme */
.views-exposed-form .d-flex {
  gap: 1.5rem;
  align-items: flex-end;
  /* Align inputs and button at the bottom */
}

/* Label styling */
.views-exposed-form label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Select/Input styling */
.views-exposed-form .form-select,
.views-exposed-form .form-control {
  width: 100%;
  padding: 0.625rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1e293b;
  background-color: #f8fafc;
  background-clip: padding-box;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.views-exposed-form .form-select:focus,
.views-exposed-form .form-control:focus {
  border-color: #0284c7;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
  background-color: #ffffff;
}

/* Submit button container/placement */
.views-exposed-form .form-actions {
  margin-top: auto;
}

/* Submit button styling */
.views-exposed-form .form-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 2rem;
  /* Match input vertical padding */
  font-size: 0.95rem;
  line-height: 1.5;
  /* Match input line-height */
  font-weight: 600;
  color: #ffffff;
  background-color: #0f172a;
  border: 1px solid #0f172a;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: auto;
  /* Let padding define height to match inputs exactly */
  min-height: 48px;
  /* Force a minimum height if needed to match inputs visually */
}

.views-exposed-form .form-submit:hover {
  background-color: #1e293b;
  border-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .views-exposed-form .d-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .views-exposed-form .form-item,
  .views-exposed-form .form-actions {
    width: 100%;
    min-width: 0;
  }

  .views-exposed-form .form-submit {
    width: 100%;
  }
}

.top_header {
  background-color: rgb(127, 197, 77);
  height: 70px;
  padding: 10px;
}

.table h4.label {
  color: #000000 !important;
}

/* Custom spacing utilities */
.mt-7 {
  margin-top: 5rem !important;
}

.mt-9 {
  margin-top: 7rem !important;
}

/* Datetime field */
.datetime {
  font-style: italic;
  font-size: 0.82rem;
}

#content {
  margin-top: 100px;
}

#researchCarousel {
  margin-top: -100px;
}

article>header em {
  display: none;
}

.views-field-field-imagen-destacada {
  padding: 0 !important;
}

.views-field-field-imagen-destacada img {
  width: 100%;
  height: 240px;
  display: block;
  object-fit: cover;
}

/* Button style for views-field-nid elements */
.views-field.views-field-nid .field-content a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #7fc54d;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.views-field.views-field-nid .field-content a:hover {
  background-color: #5a9331;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Navbar Shadow and Loading Animation */
.navbar {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
  position: relative;
  z-index: 1030;
}

.navbar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 0;
  background: linear-gradient(90deg, #28a745, #99ff99);
  animation: navbarLoadLine 1.5s ease-in-out forwards;
  z-index: 1031;
}

@keyframes navbarLoadLine {
  0% {
    width: 0;
  }

  100% {
    width: 100%;
  }
}

/* Page Title Block Adjustments */
#block-bootstrap-barrio-subtheme-page-title {
  text-align: center;
  margin-top: 2.5rem;
  margin-bottom: 3.5rem;
}

#block-bootstrap-barrio-subtheme-page-title h1 {
  font-family: 'Open Sans', sans-serif;
  /* Matching the clean sans-serif in the image */
  font-weight: 700;
  /* fw-bold */
  color: #343a40;
  /* Dark grey */
  font-size: 3.5rem;
  /* display-4 */
  letter-spacing: -0.01em;
  margin-bottom: 0;
  display: block;
  line-height: 1.2;
}

/* Dashboard Tabs Styling */
#zincoDashboardTabs.nav-tabs {
  border-bottom: 3px solid #ffc107;
  gap: 8px;
  margin-top: 2rem;
}

#zincoDashboardTabs .nav-link {
  background-color: #7fc54d;
  color: #ffffff !important;
  border: 3px solid #ffc107;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  font-weight: 700;
  padding: 12px 24px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

#zincoDashboardTabs .nav-link:hover {
  background-color: #5a9331;
  opacity: 1;
  transform: translateY(-3px);
  color: #ffffff !important;
}

#zincoDashboardTabs .nav-link.active {
  background-color: #5a9331;
  opacity: 1;
  border-bottom: 3px solid #5a9331;
  margin-bottom: -3px;
  box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}