/**
 * Project Node Styling
 * Place this file in: themes/cif_theme/css/
 */

/* ----------------------- Banner ----------------------- */

/* Remove padding/margin from banner's parent container */
.project-detail {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0; /* Changed from 20px */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

.project-banner {
  background-color: #004080; /* Dark blue, you can change to your brand color */
  color: #ffffff; /* White text */
  padding: 1rem 2rem; /* Vertical and horizontal padding */
  text-align: center; /* Centered text */
  font-size: 1.5rem; /* Banner font size */
  font-weight: 600;
  border-radius: 0; /* Changed from 0 0 8px 8px - removes rounded corners */
  margin: 0 0 1.5rem 0; /* Remove left/right margins, keep bottom spacing */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); /* Optional subtle shadow */
  
  /* Make it full width */
  width: 100vw; /* Full viewport width */
  margin-left: calc(-50vw + 50%); /* Pull it to screen edges */
  margin-right: calc(-50vw + 50%);
}

/* Add padding back to other sections */
.project-header-top,
.project-header,
.project-section {
  padding-left: 20px;
  padding-right: 20px;
}

/* ----------------------- Header Top (Title + ID + Export) ----------------------- */
.project-header-top {
  display: flex;
  justify-content: space-between; /* Title left, button right */
  align-items: center; /* Vertically center the content */
  margin-bottom: 2rem; /* Space below header top */
  padding: 0 1rem; /* Optional horizontal padding */
  gap: 1rem; /* Space between title/id and button */
}

.project-title-id .project-title {
  font-size: 2rem; /* Title size */
  font-weight: 700;
  margin: 0;
}

.project-title-id .project-id {
  display: block;
  font-size: 0.9rem; /* Smaller ID text */
  color: #555; /* Greyish color for ID */
  margin-top: 0.3rem;
}

.project-export .export-button {
  background-color: #0073e6; /* Button blue */
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.project-export .export-button:hover {
  background-color: #005bb5; /* Darker on hover */
}


.project-detail {
  max-width: 1200px;
  margin: 0 auto;
  //padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #333;
}

/* Header Section */
.project-header {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 8px;
  //border-left: 4px solid #007bff;
}

.header-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.header-label {
  font-size: 12px;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.header-value {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
}

/* Section Styling */
.project-section {
  margin-bottom: 50px;
  padding: 30px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  color: #212529;
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 25px;
  font-style: italic;
}

.project-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: #212529;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9ecef;
}

/* Project Description */
.project-description {
  margin-top: 20px;
}

.project-description h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Two Column Layout */
.two-column-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 20px;
}

.details-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.details-list li {
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
}

.details-list li:last-child {
  border-bottom: none;
}

.details-list li strong {
  font-weight: 600;
  color: #495057;
  min-width: 140px;
  flex-shrink: 0;
}

.details-list li span {
  flex: 1;
  text-align: right;
}

/* Timeline Section */
.timeline-container {
  position: relative;
  padding: 30px 0;
}

.timeline-item {
  display: flex;
  gap: 20px;
  margin-bottom: 40px;
  position: relative;
  padding-left: 40px;
  transition: all 0.3s ease;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 40px;
  bottom: -40px;
  width: 2px;
  background: #dee2e6;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.timeline-item.active .timeline-marker {
  background: #007bff;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.2);
}

.timeline-item.clicked .timeline-marker {
  transform: scale(1.1);
}

.timeline-content {
  flex: 1;
  padding-top: 5px;
}

.timeline-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: #212529;
  margin: 0 0 8px 0;
}

.timeline-date {
  font-size: 14px;
  color: #007bff;
  font-weight: 500;
  margin: 5px 0;
}

.timeline-description {
  font-size: 14px;
  color: #6c757d;
  margin: 8px 0 0 0;
  line-height: 1.6;
}

/* Attachments Section */
.attachments-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.attachments-list .field--item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.attachments-list .field--item:hover {
  background: #e9ecef;
  border-color: #007bff;
}

.attachments-list .file {
  display: flex;
  align-items: center;
  width: 100%;
}

.attachments-list .file a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.attachments-list .file a:hover {
  text-decoration: underline;
}

.attachments-list .file a::before {
  content: "📎";
  font-size: 18px;
}

/* Discussion Section */
.comments-wrapper {
  margin-top: 20px;
}

.comment {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 15px;
  border-left: 3px solid #007bff;
}

.comment__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: #6c757d;
}

.comment__author {
  font-weight: 600;
  color: #212529;
}

.comment__time {
  font-size: 13px;
}

.comment__content {
  line-height: 1.6;
  color: #495057;
}

/* Form Elements */
.comment-form {
  margin-top: 30px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 8px;
}

.comment-form .form-textarea-wrapper {
  margin-bottom: 15px;
}

.comment-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-form textarea:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.comment-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.comment-form button[type="submit"],
.comment-form input[type="submit"] {
  background: #007bff;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-form button[type="submit"]:hover,
.comment-form input[type="submit"]:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Character counter */
.character-counter {
  text-align: right;
  font-size: 12px;
  color: #6c757d;
  margin-top: 5px;
  transition: color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
  .project-header {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .two-column-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .timeline-item {
    padding-left: 30px;
  }
  
  .project-section {
    padding: 20px;
  }
  
  .details-list li {
    flex-direction: column;
    gap: 5px;
  }
  
  .details-list li span {
    text-align: left;
  }
}

/* Field Label Hiding (since we're using custom markup) */
.project-detail .field__label {
  display: none !important;
}

/* Clean up default Drupal field styling */
.project-detail .field {
  margin: 0;
}

.project-detail .field__items {
  margin: 0;
}

.project-detail .field__item {
  margin: 0;
}

/* ============================================
   HIDE DRUPAL FIELD LABELS IN PROJECT NODE
   ============================================ */

/* Hide the label div that's the first child of field wrapper */
.project-detail .field > div:first-child {
  display: none !important;
}

/* Also hide any standalone field__label elements */
.project-detail .field__label {
  display: none !important;
}

/* Make sure field values display properly inline */
.project-detail .field {
  display: inline;
  margin: 0;
}

.project-detail .field > div:last-child {
  display: inline;
}

/* Specific overrides for different sections */
.project-header .field,
.project-header .field > div {
  display: inline;
}

.details-list .field,
.details-list .field > div {
  display: inline;
}

.timeline-section .field,
.timeline-section .field > div {
  display: inline;
}

/* Make sure links in fields work properly */
.project-detail .field a {
  color: inherit;
  text-decoration: none;
}

.details-list .field a:hover {
  text-decoration: underline;
}

/* Fix for description field - should be block level */
.project-description .field,
.project-description .field > div {
  display: block !important;
}

/* Fix for attachments */
.attachments-list .field,
.attachments-list .field > div {
  display: block !important;
}