/* SDLC Research Hub & Phase Page Styles */

/* Container */
.sdlc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Hero Section */
.sdlc-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
}

.sdlc-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.sdlc-hero p {
  font-size: 1.1rem;
  max-width: 80%;
  margin-bottom: 0;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  opacity: 0.9;
}

.sdlc-hero::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30%;
  height: 100%;
  background-image: url("../../../assets/images/app-banners/sdlc-banner.svg");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  opacity: 0.15;
  z-index: 1;
}

/* Objectives Section */
.sdlc-overview {
  margin-bottom: 3rem;
}

.sdlc-overview h2 {
  font-size: 1.6rem;
  color: #1a1a2e;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.sdlc-objectives {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.objective-card {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
  border-top: 4px solid #0f3460;
  transition: transform 0.3s, box-shadow 0.3s;
}

.objective-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 10%);
}

.objective-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.4rem;
  background-color: rgb(15 52 96 / 8%);
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.objective-card h3 {
  font-size: 1.15rem;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.objective-card p {
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 0;
}

/* =============================================
   SDLC Phase Tabs
   ============================================= */

.sdlc-phases {
  margin-bottom: 3rem;
}

.sdlc-phases h2 {
  font-size: 1.6rem;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.phases-subtitle {
  font-size: 0.95rem;
  color: #0f3460;
  font-weight: 600;
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* Tab bar */
.phase-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #e5e5e5;
  margin-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.phase-tabs::-webkit-scrollbar {
  display: none;
}

.phase-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1.1rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  border-radius: 6px 6px 0 0;
}

.phase-tab:hover {
  color: #333;
  background: rgb(0 0 0 / 0.03);
}

.phase-tab .tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  background: #eee;
  color: #888;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.phase-tab .tab-title {
  transition: color 0.2s;
}

.phase-tab.active {
  color: var(--tab-color);
  border-bottom-color: var(--tab-color);
}

.phase-tab.active .tab-num {
  background: var(--tab-color);
  color: white;
}

/* Phase content area (loaded from sub-pages) */
.phase-content {
  margin-top: 1.5rem;
}

.phase-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
  font-size: 0.95rem;
}

/* Injected content inherits phase-detail styles from the sub-pages.
   Remove top margin on the hero since it's already inside a section. */
.phase-content .phase-detail-hero {
  margin-bottom: 2rem;
}

.phase-content .phase-section:last-of-type {
  margin-bottom: 1rem;
}

/* Responsive tabs */
@media (width <= 600px) {
  .phase-tab {
    padding: 0.6rem 0.8rem;
    font-size: 0.78rem;
  }

  .phase-tab .tab-num {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
  }

  .phase-tab .tab-title {
    display: none;
  }
}

/* Methodology Section */
.sdlc-methodology {
  margin-bottom: 2rem;
}

.sdlc-methodology h2 {
  font-size: 1.6rem;
  color: #1a1a2e;
  margin-bottom: 1rem;
  font-weight: 600;
}

.sdlc-methodology p {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.sdlc-methodology p:last-child {
  margin-bottom: 0;
}

/* Back button */
.back-button-container {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #0f3460;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgb(15 52 96 / 20%);
}

.btn:hover {
  background-color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgb(15 52 96 / 30%);
}

/* === Phase Detail Page Styles === */

.phase-detail-hero {
  background: linear-gradient(135deg, var(--phase-primary, #1a1a2e) 0%, var(--phase-secondary, #0f3460) 100%);
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / 15%);
}

.phase-detail-hero .phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgb(255 255 255 / 15%);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

.phase-detail-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.phase-detail-hero p {
  font-size: 1.1rem;
  max-width: 80%;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 0;
}

/* Content sections for phase detail pages */
.phase-section {
  background-color: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 6%);
}

.phase-section h2 {
  font-size: 1.4rem;
  color: var(--phase-primary, #1a1a2e);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--phase-primary, #1a1a2e);
  font-weight: 600;
}

.phase-section h3 {
  font-size: 1.15rem;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.phase-section p {
  font-size: 1rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.phase-section ul {
  margin: 0 0 1rem 0;
  padding: 0;
  list-style: none;
}

.phase-section ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
  line-height: 1.5;
  color: #444;
}

.phase-section ul li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--phase-primary, #0f3460);
  font-weight: 700;
}

/* AI integration callout boxes */
.ai-callout {
  background-color: rgb(15 52 96 / 5%);
  border-left: 4px solid #0f3460;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.ai-callout h4 {
  color: #0f3460;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-callout p {
  color: #555;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Phase navigation at bottom of detail pages */
.phase-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
}

.phase-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background-color: white;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
  transition: transform 0.2s, box-shadow 0.2s;
}

.phase-nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 12%);
}

.phase-nav .nav-label {
  font-size: 0.8rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.phase-nav .nav-title {
  font-size: 1rem;
  color: #333;
}

/* New status badge */
.app-status.new {
  background-color: rgb(15 52 96 / 10%);
  color: #0f3460;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (width <= 992px) {
  .sdlc-hero::after {
    width: 20%;
    opacity: 0.1;
  }
}

@media (width <= 768px) {
  .sdlc-container {
    padding: 1rem;
  }

  .sdlc-hero {
    padding: 2rem 1.5rem;
  }

  .sdlc-hero h1 {
    font-size: 1.8rem;
  }

  .sdlc-hero p {
    max-width: 100%;
    font-size: 1rem;
  }

  .sdlc-hero::after {
    display: none;
  }

  .sdlc-objectives {
    grid-template-columns: 1fr;
  }

  .phase-detail-hero h1 {
    font-size: 1.8rem;
  }

  .phase-detail-hero p {
    max-width: 100%;
  }

  .phase-nav {
    flex-direction: column;
  }

  .phase-nav a {
    width: 100%;
    justify-content: center;
  }
}

/* Main element spacing for fixed header */
main {
  width: 100%;
  max-width: 1200px;
  margin: 60px auto 0;
  padding: 0 20px;
}

@media (max-width: 768px) {
  main {
    margin-top: 76px;
  }
}
