/* VidyaNex Projects Page Styles */

/* Hero Section */
.projects-hero {
  padding: 100px 0 40px;
  text-align: center;
}

.projects-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: block;
  width: 100%;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.projects-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Domain Projects Section */
.domain-projects-section {
  padding-bottom: 80px;
}

/* Grid Layout for Side-by-Side */
.domain-projects-container {
  display: grid;
  /* Force 3 columns using repeat(3, 1fr) for desktop */
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Domain Card */
.domain-card {
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.domain-card:hover {
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.domain-header-content {
  display: flex;
  flex-direction: column;
  padding: 0;
  height: 100%;
}

.domain-img-container {
  width: 100%;
  height: 220px;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  position: relative;
}

.domain-img-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  z-index: 1;
}

.domain-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.domain-card:hover .domain-img-container img {
  transform: scale(1.08);
}

.domain-details {
  padding: 24px 30px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.domain-details h2 {
  font-size: 1.6rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 700;
}

.domain-details p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Buttons Container - Side by Side Fix */
.domain-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  /* Force single row */
  margin-top: auto;
  align-items: center;
  justify-content: space-between;
}

/* Buttons */
.btn-view-projects {
  /* Gradient from uploaded image */
  background: linear-gradient(to right, #FF7A00, #E84393, #7B2CBF);
  color: white;
  padding: 10px 14px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  flex: 1;
  white-space: nowrap;
  height: 42px;
  background-size: 200% auto;
}

.btn-view-projects:hover {
  background-position: right center;
  /* Animate gradient */
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(232, 67, 147, 0.3);
  color: white;
}

.btn-request-project {
  background: transparent;
  color: var(--brand-purple);
  /* Purple text */
  border: 2px solid var(--brand-purple);
  /* Purple border */
  padding: 8px 14px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.85rem;
  flex: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  box-sizing: border-box;
}

.btn-request-project:hover {
  background: rgba(123, 44, 191, 0.05);
  /* Very light purple bg on hover */
  transform: translateY(-2px);
  border-color: var(--brand-pink);
  /* Switch to pink on hover */
  color: var(--brand-pink);
}

/* Projects List Inside Card */
.domain-projects-list {
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 0 30px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
}

.domain-projects-list:not(.hidden) {
  padding: 10px 30px 30px;
  max-height: 2000px;
  opacity: 1;
}

/* Mini Project Card Style */
.mini-project-card {
  background: transparent;
  padding: 16px 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.mini-project-card:last-child {
  border-bottom: none;
}

.mini-project-card:hover {
  transform: translateX(5px);
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.1);
}

.mini-project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.mini-project-card h4 {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
  font-weight: 600;
}

.mini-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(123, 44, 191, 0.08);
  color: var(--brand-purple);
  font-weight: 700;
  white-space: nowrap;
}

.mini-project-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: block;
  line-height: 1.5;
}

.mini-project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.mini-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

.btn-mini-view {
  font-size: 0.8rem;
  color: var(--brand-purple);
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(123, 44, 191, 0.05);
  transition: background 0.2s;
}

.btn-mini-view:hover {
  background: rgba(123, 44, 191, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
  .domain-projects-container {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

@media (max-width: 768px) {
  .projects-hero h1 {
    font-size: 2.25rem;
  }

  .domain-img-container {
    height: 180px;
  }

  .domain-details {
    padding: 20px;
  }

  /* On mobile, cards should be 1 per row */
  .project-details-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================================
   Project Details Page Styling (New)
   ========================================= */

.project-details-grid {
  display: grid;
  /* Changed to 3 columns by default */
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 30px;
}

/* Tablet view adjustments for grid */
@media (max-width: 1100px) {
  .project-details-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.project-detail-card {
  background: var(--bg-card);
  border-radius: 20px;
  /* Slightly more rounded */
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
  padding: 25px;
  padding-right: 20px;
  /* Adjust padding if needed, but header has padding */
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  height: 100%;
}

.project-detail-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(124, 58, 237, 0.2);
}

/* Header: Title + Badges */
.project-card-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  /* Add padding to prevent overlap with number in top-right */
  padding-right: 50px;
}

.project-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  line-height: 1.35;
  transition: color 0.3s ease;
}

.project-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.project-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* Body: Description */
.project-card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.project-card-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 25px 0;
}

/* Footer: Level + Button */
.project-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: auto;
  position: relative;
  z-index: 1;
}

.project-level {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
}

/* Button Styling */
.btn-details {
  background: transparent;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  border-width: 1px;
  border-style: solid;
}

/* Dark Mode Specific Tweaks */
[data-theme="dark"] .project-detail-card,
body.dark-mode .project-detail-card {
  background-color: #1e1e21 !important;
  /* Slightly lighter than pure black */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .project-detail-card:hover,
body.dark-mode .project-detail-card:hover {
  background-color: #252529 !important;
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Project Number Styling - REVISED */
.project-number {
  position: absolute;
  top: 20px;
  right: 20px;
  /* Smaller, Badge-like appearance */
  font-size: 1.2rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.5);
  pointer-events: none;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  z-index: 2;

  /* Circle container styles */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
}

/* Dark mode number visibility */
[data-theme="dark"] .project-number,
body.dark-mode .project-number {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
}

/* Default Brand Styling for Project Cards */

.project-number {
  color: var(--brand-purple);
  background: rgba(123, 44, 191, 0.1);
}

.project-card-title {
  color: var(--text-primary);
}

.project-badge {
  background: rgba(123, 44, 191, 0.1);
  color: var(--brand-purple);
}

.project-detail-card:hover {
  border-color: var(--brand-purple);
}

.btn-details {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  background: transparent;
  border: 1px solid var(--brand-purple);
  box-shadow: none;
}

.btn-details:hover {
  background: var(--brand-purple);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(123, 44, 191, 0.3);
}

.btn-details i {
  color: inherit;
}

.btn-details:hover i {
  color: white;
}

/* =========================================
   Collaboration/CTA Section Styles
   ========================================= */

.collaboration-section {
  padding: 40px 0 80px;
}

.collaboration-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.collab-card {
  background: var(--bg-white);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 1;
}

/* Custom glow element behind */
.collab-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.collab-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* Card Icons */
.collab-icon {
  width: 65px;
  height: 65px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 25px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.4s ease;
}

.collab-card:hover .collab-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Open Source Specifics */
.open-source-card .collab-icon {
  background: #24292e;
  /* GitHub Black */
  color: white;
}

.open-source-card:hover::before {
  background: linear-gradient(135deg, rgba(36, 41, 46, 0.03), rgba(0, 0, 0, 0.05));
  opacity: 1;
}

/* Custom Project Specifics */
.custom-project-card .collab-icon {
  background: var(--primary-gradient);
  color: white;
}

.custom-project-card:hover::before {
  background: linear-gradient(135deg, rgba(255, 122, 0, 0.05), rgba(232, 67, 147, 0.05));
  opacity: 1;
}

/* Typography */
.collab-content h3 {
  font-size: 1.75rem;
  margin-bottom: 16px;
  font-weight: 700;
}

.open-source-card h3 {
  color: var(--text-primary);
}

.custom-project-card h3 {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.collab-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 32px;
}

/* Buttons */
.btn-collab {
  margin-top: auto;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

.open-source-card .btn-collab {
  background: #25D366;
  /* WhatsApp Green */
  color: white;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.open-source-card .btn-collab:hover {
  background: #128C7E;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.custom-project-card .btn-collab {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(232, 67, 147, 0.3);
}

.custom-project-card .btn-collab:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(232, 67, 147, 0.5);
  background: linear-gradient(135deg, #E84393, #FF7A00);
  /* Reverse gradient */
}

/* Dark Mode Overrides */
body.dark-mode .collab-card {
  background: var(--card-bg);
  border-color: var(--border-color);
}

body.dark-mode .open-source-card .collab-icon {
  background: #ffffff;
  color: #24292e;
}

body.dark-mode .open-source-card h3 {
  color: white;
}

/* Responsive */
@media (max-width: 900px) {
  .collaboration-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
}