/* ======================================
   BrainHack Marseille 2026 - Projects Section
   Full-Width Dropdown Details
   ====================================== */

/* Projects Section */
.projects {
  padding: 60px 0;
}

.projects .section-title {
  margin-bottom: 30px;
}

/* Projects Container */
#projects-container {
  margin-top: 40px;
  position: relative;
}

/* Project Card Column - Default State */
.project-card-column {
  transition: all 0.4s ease;
}

/* Project Card Column - Full Width State */
.project-card-column.fullwidth-active {
  flex: 0 0 100%;
  max-width: 100%;
  order: -1; /* Move to top of grid */
}

/* Project Card 2026 Style */
.project-card-2026 {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card-2026:hover {
  box-shadow: 0 8px 30px rgba(231, 111, 81, 0.15);
  transform: translateY(-5px);
}

/* When card is expanded, highlight it */
.fullwidth-active .project-card-2026 {
  box-shadow: 0 5px 25px rgba(231, 111, 81, 0.2);
  border: 2px solid #e9c46a;
}

/* Project Preview (Compact View) */
.project-preview {
  position: relative;
}

/* Project Image */
.project-image-wrapper {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #e9c46a 0%, #e76f51 100%);
  position: relative;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card-2026:hover .project-image {
  transform: scale(1.05);
}

/* Project Header */
.project-header {
  padding: 20px;
  background: #fff;
}

.project-title {
  font-size: 18px;
  font-weight: 600;
  color: #37517e;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 50px;
}

.project-leaders,
.project-collaborators {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.project-leaders i,
.project-collaborators i {
  color: #e76f51;
  margin-top: 2px;
  flex-shrink: 0;
}

.project-leaders strong,
.project-collaborators strong {
  color: #37517e;
  margin-right: 5px;
}

/* Project Actions */
.project-actions {
  padding: 0 20px 20px;
  background: #fff;
}

/* Toggle Button */
.btn-project-toggle {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #e9c46a 0%, #e76f51 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(231, 111, 81, 0.2);
  position: relative;
}

.btn-project-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(231, 111, 81, 0.3);
}

.btn-project-toggle:active {
  transform: translateY(0);
}

/* Toggle button states */
.btn-project-toggle .toggle-text-hide {
  display: none;
}

.btn-project-toggle.expanded .toggle-text-show {
  display: none;
}

.btn-project-toggle.expanded .toggle-text-hide {
  display: inline;
}

.btn-project-toggle i {
  font-size: 16px;
  margin-right: 5px;
  transition: transform 0.3s ease;
}

.btn-project-toggle.expanded {
  background: linear-gradient(135deg, #e76f51 0%, #d85f41 100%);
}

/* ============================================
   FULL-WIDTH PROJECT DETAILS
   ============================================ */

/* Full-Width Details Container */
.project-details-fullwidth {
  width: 100%;
  margin-top: 20px;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 2px solid #e9c46a;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.project-details-content-fullwidth {
  padding: 40px;
}

/* Details Image Section (Left Column) */
.details-image-section {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 100px;
}

.details-image-section img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.details-image-section h3 {
  font-size: 22px;
  font-weight: 700;
  color: #37517e;
  margin-top: 20px;
  margin-bottom: 15px;
  line-height: 1.3;
}

.detail-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.6;
}

.detail-meta i {
  color: #e76f51;
  margin-right: 5px;
  font-size: 16px;
}

.detail-meta strong {
  color: #37517e;
  display: block;
  margin-bottom: 5px;
}

/* Detail Metadata List */
.detail-metadata-list {
  border-top: 1px solid #e0e0e0;
  padding-top: 15px;
  margin-top: 15px;
}

.detail-metadata-list .detail-meta {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.detail-metadata-list .detail-meta:last-child {
  border-bottom: none;
}

/* Detail Links */
.detail-links .btn {
  font-size: 14px;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.detail-links .btn i {
  margin-right: 8px;
  font-size: 16px;
}

.detail-links .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.detail-links .btn-primary {
  background: linear-gradient(135deg, #37517e 0%, #2a3f5f 100%);
  border: none;
}

.detail-links .btn-secondary {
  background: linear-gradient(135deg, #e76f51 0%, #d85f41 100%);
  border: none;
}

.detail-links .btn-info {
  background: linear-gradient(135deg, #47b2e4 0%, #3498db 100%);
  border: none;
}

.detail-links .btn-success {
  background: linear-gradient(135deg, #2a9d8f 0%, #238276 100%);
  border: none;
}

/* Details Text Section (Right Column) */
.details-text-section {
  padding-left: 30px;
}

/* Detail Sections in Full Width */
.detail-section-fullwidth {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid #e0e0e0;
}

.detail-section-fullwidth:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.detail-section-fullwidth h5 {
  font-size: 18px;
  font-weight: 700;
  color: #37517e;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9c46a;
}

.detail-section-fullwidth h5 i {
  color: #e76f51;
  font-size: 22px;
}

.detail-content {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
}

.detail-content p {
  margin-bottom: 15px;
}

.detail-content strong {
  color: #37517e;
  font-weight: 600;
}

.detail-content a {
  color: #e76f51;
  text-decoration: none;
  border-bottom: 1px solid #e76f51;
  transition: all 0.3s ease;
}

.detail-content a:hover {
  color: #d85f41;
  border-bottom-color: #d85f41;
}

/* Close Button */
.btn-close-details {
  padding: 12px 40px;
  background: linear-gradient(135deg, #e76f51 0%, #d85f41 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(231, 111, 81, 0.3);
}

.btn-close-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(231, 111, 81, 0.4);
}

.btn-close-details i {
  margin-right: 8px;
  font-size: 18px;
}

/* Loading Indicator */
#projects-loading {
  padding: 60px 20px;
  text-center;
}

#projects-loading .spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
  color: #e76f51;
}

#projects-loading p {
  margin-top: 20px;
  color: #666;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 992px) {
  .project-image-wrapper {
    height: 200px;
  }
  
  .project-title {
    font-size: 17px;
    min-height: auto;
  }
  
  .project-details-content-fullwidth {
    padding: 30px 20px;
  }
  
  .details-text-section {
    padding-left: 0;
    margin-top: 30px;
  }
  
  .details-image-section {
    position: static;
  }
  
  .detail-section-fullwidth h5 {
    font-size: 16px;
  }
  
  .detail-content {
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .project-image-wrapper {
    height: 180px;
  }
  
  .project-header {
    padding: 15px;
  }
  
  .project-actions {
    padding: 0 15px 15px;
  }
  
  .project-title {
    font-size: 16px;
  }
  
  .project-details-content-fullwidth {
    padding: 20px 15px;
  }
  
  .details-image-section {
    padding: 20px;
  }
  
  .details-image-section h3 {
    font-size: 20px;
  }
  
  .btn-close-details {
    padding: 10px 30px;
    font-size: 14px;
  }
}

/* Animation for collapse */
.project-details-fullwidth.collapsing {
  transition: height 0.4s ease;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Ensure smooth animations */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override Bootstrap collapse defaults */
.collapse {
  transition: height 0.4s ease;
}

.collapse.show {
  height: auto;
}

/* Empty/Error state styling */
.alert {
  border-radius: 10px;
}

.alert i {
  opacity: 0.8;
}

/* Print styles */
@media print {
  .project-details-fullwidth {
    display: block !important;
    height: auto !important;
  }
  
  .btn-project-toggle,
  .btn-close-details {
    display: none;
  }
}