/* ============================================================
   PROJECT PAGE COMPACTION STYLES v3
   Fixes: breadcrumb offset, pill badges, BC/GRC accordion,
          video section cinematic full-width, cs-card related projects,
          techy animations
   ============================================================ */

/* ── 1. BREADCRUMB — push below fixed navbar (height ~72px) ── */
.project-breadcrumb,
.breadcrumb-nav,
.breadcrumb {
  margin-top: 72px !important;
  padding-top: 0.5rem !important;
}

/* ── 2. CLOUD BADGE — pill shape ── */
.cloud-badge {
  border-radius: 50px !important;
  padding: 5px 18px !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  min-width: 72px !important;
  justify-content: center !important;
  height: 28px !important;
  line-height: 1 !important;
}

/* ── 3. CERT BADGE — pill shape ── */
.cert-badge,
.certification-badge {
  border-radius: 50px !important;
  padding: 4px 12px !important;
  font-size: 0.76rem !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  white-space: nowrap !important;
}

/* ── 4. REDUCED SECTION PADDING ── */
.project-hero,
.business-context-section,
.grc-mapping-section,
.architecture-section,
.tech-stack-section,
.documentation-section,
.related-projects-section {
  padding: 48px 0 !important;
}

/* ── 5. TWO-COLUMN HERO LAYOUT ── */
.project-header-content {
  display: grid !important;
  grid-template-columns: 1fr 340px !important;
  gap: 2rem !important;
  align-items: start !important;
}

.project-icon-large {
  display: none !important;
}

.project-header-info {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.6rem !important;
}

.project-hero-right-col {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

/* ── 6. COMPACT INLINE INFO BAR ── */
.project-compact-infobar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  overflow-x: auto;
  white-space: nowrap;
}

.project-compact-infobar .infobar-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.project-compact-infobar .infobar-item i {
  color: #6366f1;
  font-size: 0.75rem;
}

.project-compact-infobar .infobar-sep {
  color: rgba(255,255,255,0.2);
}

.project-meta { display: none !important; }
.project-meta-enhancements { display: none !important; }

/* Override inline style on status-badge */
.project-badges .status-badge {
  padding: 5px 14px !important;
  font-size: 0.8rem !important;
  border-radius: 50px !important;
  height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
}

/* ── 7. COMPACT COST CARD ── */
.cost-estimate-card {
  padding: 0.85rem 1.1rem !important;
  border-radius: 10px !important;
}
.cost-estimate-card h4 { font-size: 0.72rem !important; margin-bottom: 0.25rem !important; }
.cost-amount { font-size: 1.4rem !important; }
.cost-breakdown { flex-wrap: wrap !important; gap: 0.3rem !important; }
.cost-item { font-size: 0.72rem !important; padding: 2px 8px !important; }

/* ── 8. COMPACT PROJECT ACTIONS (2 per row) ── */
.project-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.5rem !important;
}
.project-actions .btn {
  font-size: 0.8rem !important;
  padding: 0.5rem 0.75rem !important;
  justify-content: center !important;
  text-align: center !important;
}

/* ── 9. BC/GRC ACCORDION — animated max-height ── */
.bc-accordion-header,
.grc-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 10px;
  margin-bottom: 0;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  user-select: none;
}

.bc-accordion-header:hover,
.grc-accordion-header:hover {
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.5);
}

.bc-accordion-header.open,
.grc-accordion-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: rgba(99,102,241,0.1);
  border-color: rgba(99,102,241,0.5);
}

.acc-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6366f1;
  white-space: nowrap;
  min-width: 130px;
}

.grc-accordion-header .acc-title {
  color: #10b981;
}

.acc-summary {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-left: 0.75rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acc-chevron {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.bc-accordion-header.open .acc-chevron,
.grc-accordion-header.open .acc-chevron {
  transform: rotate(180deg);
}

/* Accordion body — smooth max-height animation */
.bc-accordion-body,
.grc-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease,
              padding 0.3s ease;
  opacity: 0;
  padding: 0;
  border: 1px solid rgba(99,102,241,0.25);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.bc-accordion-body.open,
.grc-accordion-body.open {
  max-height: 2000px;
  opacity: 1;
  padding: 1.25rem 1rem;
}

/* Tighten grids inside accordions */
.bc-accordion-body .bc-grid,
.grc-accordion-body .grc-grid {
  margin-top: 0.5rem !important;
  gap: 1rem !important;
}

.bc-grid > div,
.grc-grid > div {
  padding: 1rem !important;
}

.bc-grid ul li,
.grc-grid ul li {
  padding-top: 0.3rem !important;
  padding-bottom: 0.3rem !important;
  font-size: 0.85rem !important;
}

/* ── 10. VIDEO SECTION — Cinematic full-width banner ── */
/* All visual styles are in youtube-thumbnail.css — this block only handles layout */

/* Hide any h2/h3 heading inside the video section */
.video-section h2,
.video-section h3,
.video-section .section-title {
  display: none !important;
}

/* Section: comfortable padding, transparent background */
.video-section {
  padding: 2rem 0 !important;
  background: transparent !important;
  border-top: none !important;
  border-bottom: none !important;
  overflow: visible !important;
  position: relative !important;
}

/* Container: standard page width with padding */
.video-section .container {
  max-width: 1200px !important;
  padding: 0 1.5rem !important;
  margin: 0 auto !important;
  width: 100% !important;
  display: block !important;
}

/* video-container: let the wrapper control sizing */
.video-section .video-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* youtube-thumbnail-wrapper: compact card, centred */
.video-section .youtube-thumbnail-wrapper {
  width: 100% !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  border-radius: 14px !important;
  display: block !important;
}

/* Video placeholder fallback */
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: rgba(30,41,59,0.6);
  border: 2px dashed rgba(99,102,241,0.3);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  color: #64748b;
  min-height: 200px;
}

.video-placeholder .fab.fa-youtube {
  font-size: 3rem;
  color: #ef4444;
}

/* ── 10b. HIDE REDUNDANT RESOURCES SECTION ── */
/* The doc-grid / tabbed resources (Deployment Guide, Architecture,
   Source Code, Video Tutorial) duplicate the hero CTA buttons.
   Hide them — the deployment stepper above is kept. */
.doc-grid,
.doc-tabs-container {
  display: none !important;
}

/* ── 11. ARCHITECTURE — diagram only ── */
.architecture-section .deployment-stepper,
.architecture-section .prerequisites-section {
  display: none !important;
}

/* ── 12. TECH STACK — compact chips ── */
.tech-stack-section { padding: 32px 0 !important; }
.tech-grid { gap: 0.5rem !important; }
.tech-tag { font-size: 0.78rem !important; padding: 0.3rem 0.75rem !important; }

/* ── 13. RELATED PROJECTS — cs-card style ── */
.related-projects-section .related-grid,
.related-projects-section .related-scroll-strip {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.25rem !important;
  overflow: visible !important;
}

/* cs-card style for project-card */
.project-card {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(51, 65, 85, 0.6) !important;
  border-radius: 14px !important;
  padding: 1.25rem !important;
  cursor: pointer !important;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  position: relative !important;
  overflow: hidden !important;
  text-decoration: none !important;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.06), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.project-card:hover {
  border-color: rgba(99, 102, 241, 0.4) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12) !important;
}

.project-card:hover::before { opacity: 1; }

.project-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 0.75rem !important;
}

.project-icon {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.1rem !important;
  background: rgba(99, 102, 241, 0.15) !important;
  color: #a5b4fc !important;
  flex-shrink: 0 !important;
}

.project-id {
  font-size: 0.72rem !important;
  color: #475569 !important;
  font-family: 'Courier New', monospace !important;
  margin-top: 0.25rem !important;
}

.project-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  line-height: 1.35 !important;
}

.project-description {
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
  line-height: 1.55 !important;
  flex: 1 !important;
}

.project-tags {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
}

.tag {
  font-size: 0.72rem !important;
  color: #64748b !important;
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px solid rgba(51, 65, 85, 0.6) !important;
  padding: 0.2rem 0.55rem !important;
  border-radius: 4px !important;
}

.project-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-top: 0.75rem !important;
  border-top: 1px solid rgba(51, 65, 85, 0.4) !important;
  flex-wrap: wrap !important;
  gap: 0.5rem !important;
}

.project-footer .cloud-badge {
  font-size: 0.7rem !important;
  padding: 3px 10px !important;
}

.project-footer .certification-badge {
  font-size: 0.72rem !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.3rem !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
}

/* View Study button */
.project-card-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.project-card-view-btn:hover { opacity: 0.85; }

/* ── 14. TECHY ANIMATIONS ── */

/* Scan line sweep on project card hover */
.project-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99,102,241,0.6), transparent);
  transition: top 0.4s ease;
  pointer-events: none;
}

.project-card:hover::after { top: 100%; }

/* Neon pulse on accordion header hover */
@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(99,102,241,0.2); }
  50% { box-shadow: 0 0 18px rgba(99,102,241,0.5), 0 0 30px rgba(139,92,246,0.2); }
}

.bc-accordion-header:hover,
.grc-accordion-header:hover {
  animation: neon-pulse 1.8s ease-in-out infinite;
}

/* Shimmer on project-card title hover */
@keyframes shimmer-text {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.project-card:hover .project-title {
  background: linear-gradient(90deg, #f1f5f9 0%, #a5b4fc 50%, #f1f5f9 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 1.5s linear infinite;
}

/* Floating dot on related section */
@keyframes float-dot {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-8px); opacity: 0.8; }
}

.related-projects-section {
  position: relative;
  overflow: hidden;
}

.related-projects-section::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6366f1;
  top: 20px;
  right: 40px;
  animation: float-dot 2.5s ease-in-out infinite;
  pointer-events: none;
}

/* ── 15. RESPONSIVE ── */
@media (max-width: 900px) {
  .project-header-content {
    grid-template-columns: 1fr !important;
  }
  .related-projects-section .related-grid,
  .related-projects-section .related-scroll-strip {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .project-actions {
    grid-template-columns: 1fr !important;
  }
}
