/* ==========================================
   1. GENERAL Y CONFIGURACIÓN BASE
   ========================================== */
body {
  background: #f5f8fc;
}

main {
  margin-bottom: 0;
}

img {
  max-width: 100%;
  width: auto;
  height: auto;
}

a {
  color: #004884;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.img-rounded img {
  border-radius: .3rem;
}

.bg-primary {
  background-color: var(--PRINCIPAL) !important;
}

#block-govco-content.container {
  padding-right: 0;
  padding-left: 0;
}


/* ==========================================
   2. ENCABEZADOS Y TÍTULOS
   ========================================== */
.field--name-node-title h1 {
  padding-left: 0;
}

.TituloCentrado h1,
.TituloCentrado h2,
.TituloCentrado h3,
.TituloCentrado h4 {
  text-align: center;
}

#block-govco-content .field--name-node-title h1 {
  color: #ee6c2b;
  font-size: 3rem;
  font-weight: 700;
  font-family: "Work Sans", sans-serif;
}


/* ==========================================
   3. VISUALIZADORES PDF Y MODALES
   ========================================== */
.pdf-responsive {
  width: 100%;
}

.pdf-responsive iframe {
  width: 100%;
  height: 80vh;
  border: 0;
}

#pdfViewer {
  width: 100%;
  height: 85vh;
  border: 0;
}

#modalRecurso .modal-body {
  padding: 0;
  overflow: hidden;
}

#modalRecurso iframe,
#modalRecurso video {
  width: 100%;
}

.modal-video {
  display: block;
  max-width: 100%;
  height: auto;
}

.modal-video iframe,
.modal-video video {
  width: 100%;
  height: auto;
}


/* ==========================================
   4. BOTONES Y ESTADOS
   ========================================== */
.region-content .btn-info:disabled,
.region-content .btn-info.disabled,
.region-content btn.disabled {
  color: #000;
  background-color: #0dcaf0;
  border-color: #c7c9c9;
  box-shadow: 0px 3px 0px #e8e8e8;
}

.region-content a.btn {
  font-family: 'museo-sans-condensed';
  transition: all 0.2s ease-in-out;
}

.feature-card a.feature-link span,
.region-content .btn-primary {
  font-weight: 500;
}

.feature-card a.feature-link span {
  font-family: 'museo-sans-condensed';
}

.region-content a.btn.dark {
  background: #0c2a43;
}

.region-content a.btn.dark:hover {
  background: #11263a;
}

.region-content a.btn-light {
  background: #e8ebfd;
  border-color: #dee0ef;
  color: #004884;
}

.region-content a.btn-light:hover {
  color: #e8ebfd;
  background: #004884;
}


/* ==========================================
   5. FECHAS Y CRONOGRAMAS
   ========================================== */
.content-dates .field__label {
  font-weight: inherit !important;
}

.cronograma-2025 a img,
.banner-block a img,
.region-content .field--name-body p a img {
  transition: filter 0.25s ease;
}

.cronograma-2025 a:hover img,
.banner-block a:hover img,
.region-content .field--name-body p a:hover img {
  filter: brightness(0.80);
}


/* ==========================================
   6. BLOQUE POSMEDIA & CTEI (CARDS / OVERLAYS)
   ========================================== */
.feature-card {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.feature-card .feature-media a.feature-link {
  height: 300px;
  display: block;
}

.feature-card a.feature-link {
  display: inline-block;
  position: relative;
  text-decoration: none;
  color: #fff;
  height: 100%;
  background: none;
  border: none;
}

.feature-media img {
  transition: transform .6s ease;
  position: absolute;
  top: -45%;
}

.feature-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.75) 0%,
    rgba(0,0,0,.4) 40%,
    rgba(0,0,0,.1) 70%,
    rgba(0,0,0,0) 100%
  );
}

.feature-overlay-warm {
  background: linear-gradient(
    to top,
    rgba(0,0,0,.8) 0%,
    rgba(255, 120, 0, .35) 50%,
    rgba(255, 120, 0, .1) 100%
  );
}

.feature-overlay-cool {
  background: linear-gradient(
    to top,
    rgba(0,0,0,.8) 0%,
    rgba(0, 180, 200, .35) 50%,
    rgba(0, 180, 200, .1) 100%
  );
}

.feature-content {
  max-width: 85%;
  position: relative;
}

.feature-title {
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .5rem;
}

.feature-subtitle {
  font-size: 1.2rem;
  font-weight: 600;
  opacity: .9;
  margin-bottom: 0;
}

.feature-title,
.feature-subtitle,
.feature-title a:hover,
.feature-subtitle a:hover {
  color: #fff;
}

.feature-link:hover .feature-media img,
.feature-link:focus .feature-media img {
  transform: scale(1.05);
}

.feature-link:focus-visible {
  outline: 1px solid #ffffff;
  outline-offset: 1px;
  border-radius: 1rem;
}

.feature-card .btn {
  white-space: normal;
}

.feature-description {
  font-size: 1rem;
  line-height: 1.5;
  margin-top: .75rem;
  margin-bottom: 0;
  max-width: 95%;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
  color: #fff;
  position: absolute;
}

.feature-card:hover .feature-description,
.feature-card:focus .feature-description,
.feature-card:focus-visible .feature-description {
  opacity: 1;
  transform: translateY(0);
  position: relative;
}

.feature-card:hover .feature-overlay,
.feature-card:focus .feature-overlay {
  background: linear-gradient(to top, rgb(0 0 0 / 35%) 0%, rgb(0 0 0 / 52%) 50%, rgb(0 0 0 / 7%) 100%);
}

.feature-card:hover .feature-title a,
.feature-card:focus .feature-title a,
.feature-card:hover .feature-subtitle a,
.feature-card:focus .feature-subtitle a {
  text-decoration: underline;
}


/* ==========================================
   7. TOOLTIPS Y NAVEGACIÓN LATERAL
   ========================================== */
.bs-tooltip-top .tooltip-arrow::before,
.bs-tooltip-auto[data-popper-placement^=top] .tooltip-arrow::before {
  border-top-color: #fff;
}

.tooltip-inner {
  background-color: #fff;
  color: #333;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  text-align: left;
  max-width: 300px;
}

.bs-tooltip-top .tooltip-arrow {
  left: 50% !important;
  transform: translateX(-50%);
}

.region-content .block-local-tasks-block .nav-tabs .nav-item {
  list-style: none;
}

.region-content .block-local-tasks-block .nav-tabs .nav-link.active .nav-link.active {
  border: none;
}

.region-sidebar-first nav li {
  font-size: 1.3rem;
  font-weight: 400;
  line-height: normal;
}

.region-sidebar-first a.is-active {
  background-color: #5869eb1f;
  color: #004884;
  font-weight: 500;
}

.region-sidebar-first .MenusAtenea a {
  padding: 1rem;
  height: auto;
}

.region-sidebar-first .navbar-nav .nav-link {
  padding: 1.5rem .5rem;
}


/* ==========================================
   8. VIEWS GENERAL Y EXPOSED FORMS
   ========================================== */
.views-exposed-form .form-submit.btn.btn-primary {
  margin-top: 0.8rem;
}

.views-exposed-form .form-item label {
  font-weight: bold;
}


/* ==========================================
   9. NOTICIAS HOME
   ========================================== */
.page-node-type-article .view-ultimas- .view-header h2 {
  text-transform: uppercase;
  padding: 0 1rem 1rem;
  border-bottom: 1px dotted #014884;
  color: inherit;
  font-weight: normal;
}

#block-homenoticias {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

#block-homenoticias > h2 {
  grid-column: 1 / 3;
}

#block-homenoticias > .views-element-container {
  width: 100%;
}


/* ==========================================
   10. CONVOCATORIAS
   ========================================== */
.node .accordion-content .field--name-field-info {
  overflow-x: auto;
}

.archivos-list {
  padding-bottom: 0.5rem;
}

.node--type-convocatorias .field--name-field-image img {
  width: 100%;
  margin: auto;
  box-shadow: -1px 0rem 2rem 0px rgb(107 107 107 / 46%);
}

.node__content .ckeditor-accordion-toggler {
  text-transform: uppercase;
}

.node--type-convocatorias .group-header,
.node--type-convocatorias .group-footer {
  margin: auto;
}

.ckeditor-accordion-container .field--name-field-enlace a::before {
  content: "\F470";
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: 400 !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
}

.ckeditor-accordion-container .file {
  background-position: left top;
  display: inline-block;
}

.node--type-convocatorias .views-field-nothing time.datetime {
  word-break: break-word;
}

.estado_Próximamente {
  background-color: #bf94292b;
  padding: 5px 10px;
  border-radius: 10px;
}

.views-bootstrap-convocatorias-list .views-field.views-field-nothing,
.views-bootstrap-convocatorias-list .view-content .col-12,
.views-bootstrap-convocatorias-list .views-field.views-field-nothing span.field-content {
  display: flex;
}


/* ==========================================
   11. TABLAS FORMATTED
   ========================================== */
.region-relevante .field--name-body .img-fluid {
  width: 100%;
}

.text-formatted table {
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-color: #212529;
  --bs-table-striped-bg: #f9f9f9;
  --bs-table-active-color: #212529;
  --bs-table-active-bg: rgba(0, 0, 0, 0.1);
  --bs-table-hover-color: #212529;
  --bs-table-hover-bg: rgba(0, 0, 0, 0.075);
  width: 100%;
  margin-bottom: 1rem;
  vertical-align: top;
  border: 1px solid #dee2e6;
}

.text-formatted table > :not(caption) > * > * {
  padding: 0.5rem 0.75rem;
}

.text-formatted table > :not(caption) > *,
.text-formatted table thead,
.text-formatted table tbody,
.text-formatted table tfoot,
.text-formatted table tr,
.text-formatted table td,
.text-formatted table th {
  border: 1px solid #dee2e6;
}

.text-formatted table thead {
  background: #f0f0f0;
  text-transform: uppercase;
  vertical-align: middle;
  font-weight: bold;
  text-align: center;
}

.table p {
  color: inherit;
  margin-bottom: auto;
}

.table > tbody > tr > td,
.table > thead > tr > th {
  vertical-align: middle;
}

.text-formatted table a::before {
  content: "\f470";
  display: inline-block;
  font-family: bootstrap-icons !important;
  font-style: normal;
  font-weight: 400 !important;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  vertical-align: -.125em;
  -webkit-font-smoothing: antialiased;
}


/* ==========================================
   12. TRANSPARENCIA
   ========================================== */
.path-transparencia-acceso-informacion-publica .TituloCentrado {
  margin-top: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

.path-transparencia-acceso-informacion-publica .TituloCentrado > h1 {
  text-align: left !important;
}

.path-transparencia-acceso-informacion-publica .region-sidebar-first h5 {
  font-size: 1.3rem;
}

.path-transparencia-acceso-informacion-publica .region-content .view-content table .views-field-field-archivo-asociado {
  white-space: nowrap;
  min-width: 120px;
}

.path-transparencia-acceso-informacion-publica .region-content .view-grouping-header {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  background: var(--ColorTextos);
  padding: 0.5rem;
  text-align: center;
  font-family: 'museo-sans-condensed';
}

.path-transparencia-acceso-informacion-publica .region-content .view-grouping caption {
  font-size: 1.2rem;
  font-weight: bold;
  padding: 1rem 0 2rem;
}

.path-transparencia-acceso-informacion-publica .region-content .view-grouping {
  padding: 0;
  margin: 1rem;
  border: 1px solid #ededed;
}

.path-transparencia-acceso-informacion-publica .region-content .view-grouping-content {
  padding: 1rem 2rem;
}


/* ==========================================
   13. FOOTER 2025
   ========================================== */
.logomarcapais {
  background: #3366cc;
}

.logomarcapais .bg-info .img-fluid {
  max-width: 100%;
  height: auto;
}

footer {
  padding: 2rem 0 0;
  background: var(--bs-primary-text-emphasis);
  margin-top: 3rem;
}

#block-govco-footeratenea20 {
  background: var(--bs-primary-text-emphasis);
}

footer .accordion-button:not(.collapsed) {
  color: #004884;
}

footer .accordion-body,
footer .accordion-button:not(.collapsed),
footer .accordion-item:last-of-type > .accordion-header .accordion-button.collapsed {
  background: var(--bs-gray-200);
}

footer .accordion-button:not(.collapsed) {
  background: var(--bs-gray-200) !important;
  color: var(--bs-primary-text-emphasis);
}

.accordion-button .bi-chevron-down {
  transition: transform .2s ease;
}

.accordion-button[aria-expanded="true"] .bi-chevron-down {
  transform: rotate(180deg);
}

.atn-footer a.link-primary::before {
  content: none !important;
  display: none !important;
}

footer .social-links i {
  font-size: 1.1rem;
}

footer .social-links i,
footer .list-inline .list-inline-item a {
  color: var(--bs-primary-text-emphasis);
}

footer .social-links a:hover i,
footer .list-inline .list-inline-item a:hover {
  color: var(--bs-orange);
}

.region-footer .govco {
  width: auto;
  max-width: 100px;
  height: auto;
}


/* ==========================================
   14. BOOTSTRAP CAROUSEL
   ========================================== */
.bootstrap-carousel .carousel-item .row {
  justify-content: flex-start;
}

.bootstrap-carousel .carousel-item:last-child .row {
  justify-content: center;
}

.bootstrap-carousel .carousel-item .carousel-caption {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bootstrap-carousel .carousel-item .col-md-3:hover .carousel-caption,
.bootstrap-carousel .carousel-item [class*="col-"]:hover .carousel-caption {
  opacity: 1;
}

.bootstrap-carousel .carousel-caption {
  height: 100%;
  width: 92%;
  position: absolute;
  top: 0;
  left: 4%;
  background: #062c65bd;
  overflow: hidden;
}

.bootstrap-carousel .carousel-item h3 {
  color: #fff;
  border-bottom: none;
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  width: 90%;
  margin: auto;
}

.bootstrap-carousel .carousel-item h3 a {
  color: #fff;
  word-wrap: break-word;
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-shadow: 0px 4px 9px #0c395fe3;
}


/* ==========================================
   15. MEDIA QUERIES (RESPONSIVE)
   ========================================== */

/* Pantallas medianas (min-width: 768px) */
@media (min-width: 768px) {
  .path-transparencia-acceso-informacion-publica .region-content .view-content table .views-field-field-archivo-asociado {
    text-align: right;
  }

  .content-dates > div {
    display: flex;
  }

  .content-dates .field--name-node-post-date::before {
    content: " \F292";
    display: flex;
    font-family: bootstrap-icons !important;
    font-style: normal;
    font-weight: normal !important;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    vertical-align: -.125em;
    -webkit-font-smoothing: antialiased;
    align-items: center;
    padding-right: 5px;
  }

  .node--type-convocatorias .content-dates .field--name-node-post-date::after {
    content: " | ";
    padding: 0 10px;
  }

  .views-exposed-form .form--inline {
    display: flex;
    justify-content: space-between;
    border: none;
  }

  .views-exposed-form .form--inline > .form-item {
    flex: auto;
    border: none;
  }

  .views-exposed-form .form--inline > .form-item .form-select {
    max-width: 100% !important;
  }

  .page-node-type-article .region-content .container .ds-2col-fluid {
    display: flex;
    flex-wrap: wrap;
  }

  .page-node-type-article .col-lg-4.group-right {
    padding: 0 0 0 3rem;
  }
}

/* Pantallas menores a 991px */
@media (max-width: 991px) {
  .feature-overlay {
    background: linear-gradient(
      to top,
      rgba(0,0,0,.9) 0%,
      rgba(0,0,0,.4) 60%,
      rgba(0,0,0,.3) 100%
    );
  }

  .feature-media img {
    min-height: 480px;
  }
}

/* Pantallas menores a 768px (Móviles / Tablets) */
@media (max-width: 768px) {
  .region-content {
    padding: 0 2rem;
  }

  .pdf-responsive iframe {
    height: 85vh;
  }

  #block-govco-content .field--name-node-title {
    padding-bottom: 15px;
  }

  #block-govco-content .field--name-node-title h1 {
    font-size: 24px;
    text-align: center;
  }

  .content-dates > div {
    display: flex;
  }

  .node--type-convocatorias .content-dates > div {
    justify-content: center;
  }

  .feature-content {
    max-width: 100%;
    font-size: small;
  }

  #search-block-form,
  #search-form {
    width: auto;
  }

  .page-node-type-article .view-ultimas- .view-header h2 {
    border-top: 1px dotted #014884;
    padding: 1rem;
  }

  #block-homenoticias {
    grid-template-columns: 1fr;
  }

  #block-homenoticias > h2,
  #block-homenoticias > .views-element-container {
    grid-column: auto;
  }

  .node--type-convocatorias .group-header,
  .node--type-convocatorias .group-footer {
    width: 95% !important;
  }

  #pdfViewer {
    height: 92vh;
  }

  #modalRecurso .modal-dialog {
    margin: 0;
  }

  #modalRecurso .modal-content {
    border-radius: 0;
  }

  .social-icon {
    font-size: small;
  }

  .path-transparencia-acceso-informacion-publica main .container .row .col-lg-9 .region-content {
    padding-left: 3rem;
  }

  #views-bootstrap-2024-programas-gerencia-ctei-block-2 .carousel-item .row {
    display: flex;
    overflow: hidden;
  }

  #views-bootstrap-2024-programas-gerencia-ctei-block-2 .carousel-item .row > div {
    flex: 0 0 85%;
    max-width: 85%;
  }
}

/* Pantallas pequeñas móviles (max-width: 575.98px / 576px) */
@media (max-width: 575.98px) {
  .atn-footer .logos img {
    width: 80%;
    height: auto;
    margin: auto;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    max-width: 100%;
    margin: 0;
  }

  .modal-body-content {
    padding: 10px;
  }

  .modal-text h2,
  .modal-text h4,
  .modal-text p {
    font-size: 16px;
    text-align: justify;
  }

  .modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
  }

  .modal-video {
    display: block;
    max-width: 100%;
    height: auto;
  }

  .modal-video iframe,
  .modal-video video {
    width: 100%;
    height: auto;
  }
}