/* Portfolio Template - Collapsible Content Styles */
/* This file handles the expandable project/content sections */

.collapsible {
  background-color: #444444;
  color: var(--text-color);
  cursor: pointer;
  text-align: left;
  font-size: clamp(1rem, 1.2rem, 1.4rem);
  margin: 20px 22px 0px 20px; 
  padding: clamp(1rem, 1.5vw, 2rem) clamp(1rem, 2vw, 2.5rem);
  min-height: 120px;
  height: auto;
  border-radius: 12px 12px 0 0;
  transition: all 0.3s ease;
}

.collapsible:hover, 
.collapsible.active {
  background-color: #555555;
  transform: scale(1.01);
}

/* Content Container */
.content {
  max-height: 0;
  overflow: hidden;
  background-color: #222222;
  color: var(--text-color);
  margin: 0px 22px 30px 20px;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.4s ease;
  border-radius: 0 0 12px 12px;
}

.content.show {
  max-height: 2000px; /* Large enough to accommodate content */
  padding: 2% 2% 2% 2%;
}

/* Content Elements Animation */
.content p,
.content a,
.content img,
.content h2,
.content h3,
.content h4,
.content div {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.content.show p,
.content.show a,
.content.show img,
.content.show h2,
.content.show h3,
.content.show h4,
.content.show div {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Animation for Multiple Elements */
.content.show p:nth-child(1) { transition-delay: 0.3s; }
.content.show p:nth-child(2) { transition-delay: 0.4s; }
.content.show p:nth-child(3) { transition-delay: 0.5s; }
.content.show p:nth-child(4) { transition-delay: 0.6s; }
.content.show img:nth-child(1) { transition-delay: 0.35s; }
.content.show img:nth-child(2) { transition-delay: 0.45s; }
.content.show div:nth-child(1) { transition-delay: 0.4s; }
.content.show div:nth-child(2) { transition-delay: 0.5s; }

/* Button-like Behavior */
.button-like { 
  transition: transform 0.15s ease-out;
}

.button-like:hover {
  transform: scale(1.01);
}

/* Content Styling */
.content p {
  line-height: 1.7;
  margin-bottom: 15px;
}

.content a {
  color: #4a9eff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.content a:hover {
  color: #66b3ff;
  text-decoration: underline;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.content h2 {
  color: #fff;
  margin: 20px 0 10px 0;
  font-size: 1.3rem;
}

.content h3 {
  color: #ccc;
  margin: 15px 0 10px 0;
  font-size: 1.1rem;
}

.content h4 {
  color: #bbb;
  margin: 10px 0 5px 0;
  font-size: 1rem;
}

/* Special Content Containers */
.content .flex-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 20px 0;
}

.content .flex-container > div {
  flex: 1;
  min-width: 250px;
}

/* Project Links Styling */
.content .project-links {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 4px solid #4a9eff;
}

.content .project-links a {
  display: inline-block;
  margin-right: 15px;
  padding: 8px 16px;
  background: rgba(74, 158, 255, 0.1);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.content .project-links a:hover {
  background: rgba(74, 158, 255, 0.2);
  border-color: rgba(74, 158, 255, 0.5);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .collapsible {
    margin: 15px 15px 0px 15px;
    padding: 1rem;
    min-height: 80px;
  }
  
  .content {
    margin: 0px 15px 20px 15px;
  }
  
  .content .flex-container {
    flex-direction: column;
    gap: 15px;
  }
  
  .content .flex-container > div {
    min-width: unset;
  }
  
  .content .project-links a {
    display: block;
    margin: 5px 0;
    text-align: center;
  }
}

