/*
 Theme Name:   Interactic
 Theme URI:    https://pimpampum.net
 Description:  Tema child de starter
 Author:       BaseTIS
 Author URI:   https://pimpampum.net
 Template:     starter
 Version:      0.1
 Text Domain:  ppp
*/

.block-header-one-column .header-subtitle {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

body {
  color: #000078;
  font-size: 1.25rem !important;
}

/* Header */

.block-header-one-column .header-title {
  text-indent: 0;
  width: auto;
  height: auto;
  background: none;
}

.header-title__link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #000078;
}

.header-title__text {
  font-size: 3.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.header-title__logo {
  height: 66px;
  width: auto;
  display: block;
}

@media (max-width: 767px) {
  .header-title__text {
    font-size: 3rem;
  }

  .header-title__logo {
    height: 54px;
  }
}

.block-header-one-column .wrap-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breadcrumb {
  text-transform: uppercase;
}

/* Contingut */

.noticias_home {
  margin-top: 40px;
}

.noticias_home h2 {
  margin-bottom: 32px;
  border-top: 4px solid #38ff90;
}

.noticias_home .col-md-6:nth-of-type(2n + 1),
.section__main .col-md-6.m-bottom-6y:nth-of-type(2n + 1) {
  clear: both;
}

a.btn--arrow-left.btn--primary:link,
a.btn--arrow-left.btn--primary:hover,
a.btn--arrow-right.btn--primary:link,
a.btn--arrow-right.btn--primary:hover {
  color: #fff;
}

.wp-block-column figure.is-type-video {
  margin: 0;
}

/* Search Widget Styles */
.interactic-search-widget {
  padding: 20px 0;
}

.search-widget-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  color: #000078;
}

.search-widget-form {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: stretch;
}

.search-widget-input {
  padding: 12px 14px;
  border: 1px solid #ccc;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  height: 20px;
}

.search-widget-button {
  padding: 0;
  background-color: #000078;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  transition: background-color 0.3s;
  white-space: nowrap;
  height: 44px;
  width: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.search-widget-button:hover {
  background-color: #73edff;
  color: #000078;
}

/* Moodle Widget Button */
.moodle-link-widget {
  margin: 20px 0;
}

.moodle-link-widget a {
  display: block;
  padding: 16px 24px;
  background-color: #000078;
  color: #fff !important;
  text-align: center;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
  border: 2px solid #000078;
}

.moodle-link-widget a:hover {
  background-color: #73edff;
  color: #000078 !important;
  border-color: #73edff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Fix content overlapping sidebar */
@media (min-width: 768px) {
  .col-md-8.section__main {
    width: 66.666667%;
    max-width: 66.666667%;
    flex: 0 0 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
  }

  .col-md-4.section__secondary {
    width: 33.333333%;
    max-width: 33.333333%;
    flex: 0 0 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
  }
}

/* Force word breaking in content to prevent overflow */
.block-content-static .wrap-content,
.block-content-static .wrap-content p,
.block-content-static .wrap-content div,
.block-content-static .wrap-content * {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  max-width: 100% !important;
}

.block-content-static {
  max-width: 100%;
  overflow: hidden;
}

.section__main {
  overflow: hidden;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

.block-content-static a:link,
article a:link {
  text-decoration: underline;
}

.block-content-static h1 a:link,
.block-content-static h2 a:link,
.block-content-static h3 a:link,
.block-content-static h4 a:link,
article h1 a:link,
article h2 a:link,
article h3 a:link,
article h4 a:link,
.block-content-static .breadcrumb a:link {
  text-decoration: none;
}

.researcher-list h1:nth-of-type(2) {
  margin-top: 1em;
}

.widget_twitter-timeline-profile .widget-title {
  border-top: 4px solid #38ff90;
}

.card__contents_info li {
  margin: 0;
}

article h2,
article h3 {
  margin-top: 0.5em;
}

.block-content-entry > .wrap-content > .uppercase-block a,
.block-content-entry > .wrap-content > .uppercase-block a:visited,
.block-content-entry > .wrap-content > .uppercase-block a:link {
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
}

/* accordion */

.c-accordion__title::after {
  color: #000078;
  top: 20px;
  font-size: 1.375rem;
  font-family: "icons";
  content: "\f105";
}

.is-open .c-accordion__title::after {
  content: "\f108";
}

.wp-block-pb-accordion-item {
  border-top: 4px solid #d0d0d0;
  padding: 5px 0 30px 0;
}

@media (min-width: 768px) {
  .researcher_graella {
    display: grid;
    grid-template-columns: 150px 1fr;
    grid-gap: 30px;
  }

  .researcher_graella img {
    margin-bottom: 15px;
  }

  /* menu */

  #menu-menu-principal.nav-menu.nav-menu--two-levels {
    display: flex;
  }

  #menu-menu-principal.nav-menu.nav-menu--two-levels > .nav-menu__item {
    display: block;
    float: none;
    width: auto;
    flex: 1;
  }
}

/* New CPT Styles */

/* Team Members */
.team-list .researcher_graella,
.team_graella {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.team-list .card {
  background: #f2f2f2;
  padding: 10px 16px 6px;
}

.team-list .card__contents_photo {
  flex: 0 0 150px;
  margin: 0;
}

.team-list .card__contents_photo img {
  display: block;
  width: 100%;
  height: auto;
}

.team-list .card__contents_info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.team-list .card__contents_info .h2 {
  margin: 0 0 8px;
}

.team-list .card__contents_info p {
  margin: 0;
}

.team-item {
  margin-bottom: 2em;
}

@media (max-width: 767px) {
  .team-list .researcher_graella,
  .team_graella {
    flex-direction: column;
    gap: 12px;
  }

  .team-list .card__contents_photo {
    width: 100%;
    max-width: 220px;
  }
}

/* Outputs */
.output-item {
  margin-bottom: 3em;
}

.output-content .category-name {
  display: inline-block;
  margin-bottom: 0.5em;
}

/* Publications */
.publication-item {
  border-left: 4px solid #38ff90;
  padding-left: 1em;
  margin-bottom: 2em;
}

.publication-year {
  color: #000078;
  font-weight: bold;
  margin-bottom: 0.5em;
}

.authors {
  font-style: italic;
  color: #666;
}

/* News */
.featured-image img {
  width: 100%;
  height: 260px;
  object-fit: cover;
}

@media (max-width: 767px) {
  .featured-image img {
    height: 200px;
  }
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 3em;
}

.news-item .block-post-img {
  flex: 0 0 280px;
}

.news-item .block-post-img img {
  display: block;
  width: 100%;
  height: auto;
}

.news-item .news-content {
  flex: 1;
}

.news-content .post-meta {
  color: #666;
  margin-bottom: 1em;
}

.news-item .btn--primary {
  background: transparent;
  border: 2px solid #000078;
  color: #000078;
}

.news-item .btn--primary:hover {
  background: transparent;
  color: #000078;
}

@media (max-width: 767px) {
  .news-item {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .news-item .block-post-img {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }

  .news-item .block-post-img img {
    height: 160px;
    object-fit: cover;
  }

  .news-item .news-content {
    width: 100%;
  }
}

/* Footer Disclaimer */
.project-disclaimer {
  margin-top: 2em;
  padding-top: 1em;
  border-top: 1px solid #d0d0d0;
  text-align: center;
  color: #666;
}

.project-disclaimer p {
  margin: 0;
  font-size: 0.85em;
}

@media (min-width: 992px) {
  .block-header-one-column .header-title {
    margin-left: 0;
  }

  .header-title__text {
    font-size: 4.5rem;
  }

  .header-title__logo {
    height: 82px;
  }
}
