/**
 * News Node Styling
 * Styles for individual news content type full page display
 */

/* Links inside news nodes - underlined */
.node--type-news .node__content a,
.node--type-news a {
  text-decoration: underline !important;
}

/* Subheading field styling */
.field--name-field-subheading {
  opacity: 1;
  color: #000;
  font-family: Metropolis;
  font-size: 1.5rem;
  font-weight: 700;
  font-style: Medium;
  letter-spacing: 1px;
  text-align: left;
  line-height: 36px;
  margin-top: 0;
  margin-bottom: 20px !important;
}

/* Float image styling */
.float-image {
  max-width: 400px;
  margin-bottom: 20px;
  position: relative;
}

.float-image.right {
  float: right;
  margin-left: 20px;
  margin-right: 0;
}

.float-image.left {
  float: left;
  margin-right: 20px;
  margin-left: 0;
}

.float-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG expand icon overlay */
.float-image .svg-inline--fa.fa-up-right-and-down-left-from-center {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 8px;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.float-image .svg-inline--fa.fa-up-right-and-down-left-from-center:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Float image caption */
.float-image .line {
  font-size: 0.875rem;
  font-style: italic;
  color: #666;
  margin-top: 8px;
  padding: 8px 0;
  text-align: center;
  line-height: 1.4;
  border-top: 1px solid #e0e0e0;
}

/* Clear float for responsive */
@media (max-width: 768px) {
  .float-image.right,
  .float-image.left {
    float: none;
    margin-left: auto;
    margin-right: auto;
    display: block;
  }
}

/* DateTime element - bold with green bar */
.node--type-news time.datetime,
.node--type-news .datetime,
.node__content time.datetime,
.node__content .news-date time.datetime,
.node__content .field--name-field-news-date time.datetime,
.news-date time.datetime,
.field--name-field-news-date time.datetime {
  font-weight: 700 !important;
  display: inline-block !important;
  margin-bottom: 1.5rem !important;
}

.node--type-news time.datetime::after,
.node--type-news .datetime::after,
.node__content time.datetime::after,
.node__content .news-date time.datetime::after,
.node__content .field--name-field-news-date time.datetime::after,
.news-date time.datetime::after,
.field--name-field-news-date time.datetime::after {
  content: " " !important;
  display: block !important;
  width: 30px !important;
  height: 4px !important;
  background-color: #00c24e !important;
  margin-top: 20px !important;
}

/* ========================================
   News Related Faculty or Staff Field
   ======================================== */

/* Container styling */
.field--name-field-news-related-faculty-or-st {
  padding: 1.5rem;
  margin: 2rem 0;
}

/* Label styling */
.field--name-field-news-related-faculty-or-st .field__label {
  color: #18453b;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #18453b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Add icon before label using CSS */
.field--name-field-news-related-faculty-or-st .field__label::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2318453b"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Items container */
.field--name-field-news-related-faculty-or-st .field__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Individual faculty/staff item */
.field--name-field-news-related-faculty-or-st .field__item {
  display: inline-flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  transition: all 0.3s ease;
  overflow: hidden;
}

/* Link styling */
.field--name-field-news-related-faculty-or-st .field__item a {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1rem;
  color: #18453b;
  text-decoration: none !important;
  font-weight: 500;
  transition: all 0.3s ease;
  gap: 0.5rem;
}

/* Add person icon before each name */
.field--name-field-news-related-faculty-or-st .field__item a::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2318453b"><circle cx="12" cy="8" r="4"/><path d="M12 14c-6.1 0-8 3.1-8 5v3h16v-3c0-1.9-1.9-5-8-5z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}

/* Hover state */
.field--name-field-news-related-faculty-or-st .field__item:hover {
  background-color: #18453b;
  border-color: #18453b;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(24, 69, 59, 0.3);
}

.field--name-field-news-related-faculty-or-st .field__item:hover a {
  color: #ffffff;
}

.field--name-field-news-related-faculty-or-st .field__item:hover a::before {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff"><circle cx="12" cy="8" r="4"/><path d="M12 14c-6.1 0-8 3.1-8 5v3h16v-3c0-1.9-1.9-5-8-5z"/></svg>');
}

/* Focus state for accessibility (WCAG 2.4.7) */
.field--name-field-news-related-faculty-or-st .field__item a:focus {
  outline: 3px solid #0d5c2e !important;
  outline-offset: 2px !important;
  background-color: #e9ecef;
}

/* Active state */
.field--name-field-news-related-faculty-or-st .field__item:active {
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 768px) {
  .field--name-field-news-related-faculty-or-st {
    padding: 1rem;
    margin: 1.5rem 0;
  }

  .field--name-field-news-related-faculty-or-st .field__label {
    font-size: 1rem;
  }

  .field--name-field-news-related-faculty-or-st .field__items {
    flex-direction: column;
    gap: 0.5rem;
  }

  .field--name-field-news-related-faculty-or-st .field__item {
    width: 100%;
  }

  .field--name-field-news-related-faculty-or-st .field__item a {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Print styles */
@media print {
  .field--name-field-news-related-faculty-or-st {
    background: none;
    border: 1px solid #000;
    box-shadow: none;
  }

  .field--name-field-news-related-faculty-or-st .field__item:hover {
    background-color: #ffffff;
    transform: none;
    box-shadow: none;
  }

  .field--name-field-news-related-faculty-or-st .field__item a {
    color: #000;
  }
}
