/* =============================================
   WEB APPLICATION SERVICES PAGE — APPTOLOGY THEME
   Uses parent styles.css design tokens
   ============================================= */

/* ===== ANIMATED PLAY LOGO ===== */
.play-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.play-logo-animated {
  width: clamp(50px, 4.5vw, 70px);
  height: auto;
  object-fit: contain;
  animation: logoBreathePulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(6, 221, 235, 0.4));
}

@keyframes logoBreathePulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(6, 221, 235, 0.3));
  }
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 18px rgba(6, 221, 235, 0.7)) drop-shadow(0 0 40px rgba(6, 221, 235, 0.25));
  }
}

/* ===== NAV WEB APP BADGE ===== */
.nav-link--wa-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-cyan) !important;
  font-weight: 500;
  position: relative;
}

.wa-badge-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.wa-badge-pulse::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--accent-cyan);
  opacity: 0.4;
  animation: wa-pulse 2s ease-in-out infinite;
}

@keyframes wa-pulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.8); opacity: 0; }
}

/* ===== ROTATING HERO HEADLINES ===== */
.hero-rotating-wrapper {
  position: relative;
  display: inline;
}

.hero-rotating-text {
  display: inline-block;
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transform: translateY(10px);
}

.hero-rotating-text--active {
  opacity: 1;
  position: relative;
  transform: translateY(0);
}

/* ===== WA SERVICES GRID ===== */
.wa-services-section {
  position: relative;
  background: var(--bg-secondary);
  padding: 60px 40px;
  overflow: hidden;
}

.wa-services-bg-shape {
  position: absolute;
  top: -30px;
  right: -264px;
  width: min(1145px, 60vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.wa-services-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.wa-services-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.wa-services-desc {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 620px;
}

.wa-services-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.wa-service-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 28px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  backdrop-filter: var(--blur-card);
  -webkit-backdrop-filter: var(--blur-card);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.wa-service-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(6, 221, 235, 0.08);
}

.wa-service-card--highlight {
  background: linear-gradient(135deg, rgba(0, 122, 130, 0.15), rgba(6, 221, 235, 0.05));
  border-color: rgba(6, 221, 235, 0.3);
}

.wa-service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-teal);
  color: var(--text-white);
  flex-shrink: 0;
}

.wa-service-icon--accent {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-teal));
}

.wa-service-name {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--text-white);
}

.wa-service-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== STATS ===== */
.wa-stats-section {
  background: var(--bg-primary);
  padding: 50px 40px;
}

.wa-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.wa-stat-card {
  text-align: center;
  padding: 40px 24px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-stat);
  transition: border-color 0.3s;
}

.wa-stat-card:hover {
  border-color: var(--accent-cyan);
}

.wa-stat-number {
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: clamp(36px, 3vw, 56px);
  line-height: 1;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.wa-stat-unit {
  font-size: 0.6em;
  color: var(--accent-teal);
}

.wa-stat-label {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== WA TECHNOLOGIES ===== */
.wa-tech-section {
  position: relative;
  background: var(--bg-secondary);
  padding: 60px 40px;
  overflow: hidden;
}

.wa-tech-decoration {
  position: absolute;
  top: -67px;
  left: -166px;
  width: min(999px, 52vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.wa-tech-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.wa-tech-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.wa-tech-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
}

.wa-tech-card {
  padding: 32px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.3s;
}

.wa-tech-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.wa-tech-card:nth-child(odd) {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.wa-tech-card:nth-last-child(-n+2) {
  border-bottom: none;
}

.wa-tech-number {
  font-family: var(--font-inter);
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-cyan);
  display: block;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.wa-tech-name {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  color: var(--text-white);
  margin-bottom: 10px;
}

.wa-tech-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.wa-tech-line {
  display: none;
}

/* ===== WHY CHOOSE APPTOLOGY ===== */
.wa-why-section {
  position: relative;
  background: var(--bg-primary);
  padding: 60px 40px;
  overflow: hidden;
}

.wa-why-bg-shape {
  position: absolute;
  top: -30px;
  right: -264px;
  width: min(1145px, 60vw);
  height: auto;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.wa-why-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.wa-why-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
  max-width: 700px;
}

.wa-why-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.wa-why-card {
  padding: 36px 28px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  transition: border-color 0.3s, transform 0.3s;
}

.wa-why-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-4px);
}

.wa-why-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(6, 221, 235, 0.08);
  margin-bottom: 20px;
}

.wa-why-name {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.4;
  color: var(--text-white);
  margin-bottom: 10px;
}

.wa-why-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== INDUSTRIES ===== */
.wa-industries-section {
  background: var(--bg-secondary);
  padding: 60px 40px;
}

.wa-industries-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  text-align: center;
}

.wa-industries-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.wa-industries-desc {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 780px;
}

.wa-industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.wa-industry-card {
  padding: 28px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-card);
  transition: border-color 0.3s, transform 0.3s;
}

.wa-industry-card:hover {
  border-color: var(--accent-teal);
  transform: translateY(-3px);
}

.wa-industry-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 122, 130, 0.15);
  color: var(--accent-cyan);
  margin-bottom: 16px;
}

.wa-industry-card h3 {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  color: var(--text-white);
  margin-bottom: 8px;
}

.wa-industry-card p {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ===== CTA BANNER ===== */
.wa-cta-section {
  padding: 50px 40px;
  background: var(--bg-primary);
}

.wa-cta-card {
  position: relative;
  max-width: var(--container-max);
  margin: 0 auto;
  background: var(--bg-deep);
  border-radius: var(--radius-overlay);
  padding: 60px 64px;
  overflow: hidden;
}

.wa-cta-glow {
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 221, 235, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.wa-cta-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.wa-cta-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(24px, 2vw, 36px);
  line-height: 1.2;
  color: var(--text-white);
  margin-bottom: 12px;
}

.wa-cta-text {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 560px;
}

/* ===== FAQ ===== */
.wa-faq-section {
  background: var(--bg-secondary);
  padding: 60px 40px;
}

.wa-faq-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-bottom: 50px;
  text-align: center;
}

.wa-faq-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 48px);
  line-height: 1.2;
  color: var(--text-white);
}

.wa-faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wa-faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: border-color 0.3s;
}

.wa-faq-item[open] {
  border-color: var(--accent-teal);
}

.wa-faq-question {
  padding: 20px 28px;
  font-family: var(--font-inter);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-white);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wa-faq-question::-webkit-details-marker {
  display: none;
}

.wa-faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--accent-cyan);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.wa-faq-item[open] .wa-faq-question::after {
  content: '\2212';
}

.wa-faq-answer {
  padding: 0 28px 20px;
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ===== CONTACT ===== */
.wa-contact-section {
  background: var(--bg-primary);
  padding: 60px 40px;
  max-width: var(--container-max);
  margin: 0 auto;
}

.wa-contact-header {
  text-align: center;
  margin-bottom: 50px;
}

.wa-contact-title {
  font-family: var(--font-inter);
  font-weight: 600;
  font-size: clamp(28px, 2.5vw, 44px);
  line-height: 1.2;
  color: var(--text-white);
  margin-bottom: 12px;
}

.wa-contact-subtitle {
  font-family: var(--font-inter);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-muted);
}

.wa-contact-form {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .wa-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wa-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wa-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wa-industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .wa-services-section,
  .wa-stats-section,
  .wa-tech-section,
  .wa-why-section,
  .wa-industries-section,
  .wa-faq-section,
  .wa-cta-section {
    padding: 60px 20px;
  }

  .wa-services-grid,
  .wa-why-grid {
    grid-template-columns: 1fr;
  }

  .wa-stats-grid {
    grid-template-columns: 1fr;
  }

  .wa-tech-cards {
    grid-template-columns: 1fr;
  }

  .wa-tech-card {
    border-right: none !important;
  }

  .wa-industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wa-cta-content {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .form-row {
    flex-direction: column;
  }

  /* .nav-links-wrapper {
    display: none;
  } */
}

@media (max-width: 480px) {
  .wa-industries-grid {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   PROJECT INSIGHTS SECTION
   Matches SpaceXTech container-xl (1320px)
   ============================================= */
.project-insights-section {
  padding: 40px 12px 20px;
  max-width: 1320px;
  margin: 0 auto;
}

.project-insights-header {
  margin-bottom: 48px;
}

.project-insights-title {
  font-family: 'Figtree', 'Inter Tight', 'Inter', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.15;
}

.insights-highlight {
  background: linear-gradient(135deg, rgba(6, 221, 235, 0.25) 0%, rgba(6, 221, 235, 0.45) 100%);
  color: #ffffff;
  padding: 2px 16px;
  border-radius: 8px;
  font-style: italic;
}

/* Page containers */
.insights-page {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.insights-page--active {
  display: grid;
}

/* Cards */
.insight-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  transition: 0.9s ease-out;
}

.insight-card:hover {
  transform: scale(1.02);
  border-bottom-color: #ccd4d6;
}

.insight-card-media {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.insight-card-media::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.9s ease-out;
  pointer-events: none;
}

.insight-card:hover .insight-card-media::after {
  opacity: 1;
}

.insight-card-img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.9s ease-out;
}

.insight-card:hover .insight-card-img {
  transform: scale(1.1);
}

.insight-card-body {
  background: #f4f4f4;
  padding: 16px 20px 20px;
}

.insight-card-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.insight-card-logo img {
  height: auto;
  max-height: 45px;
  width: auto;
  object-fit: contain;
}

.insight-card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: #777;
  margin: 0;
}

/* Pagination */
.insights-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  flex-wrap: wrap;
}

.insights-pagination-nums {
  display: flex;
  align-items: center;
  gap: 12px;
}

.insights-page-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: 'Figtree', 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-white);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.insights-page-btn:hover {
  color: #fff;
}

.insights-page-btn:focus {
  box-shadow: none;
  outline: none;
}

.insights-page-arrow {
  font-size: 1.5rem;
  color: var(--text-white);
}

.insights-page-num--active {
  background-color: #000;
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .insights-page {
    grid-template-columns: 1fr;
  }

  .project-insights-section {
    padding: 60px 5% 50px;
  }

  .insight-card-body {
    padding: 18px 20px 22px;
  }
}

@media (max-width: 480px) {
  .project-insights-title {
    font-size: 1.75rem;
  }

  .insight-card-desc {
    font-size: 0.85rem;
  }
}
