/* ===== Application Detail Page ===== */

.app-detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: var(--space-4);
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-brand-200);
  border-top-color: var(--color-brand);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Hero Section */
.app-hero {
  position: relative;
  width: 100%;
  min-height: 400px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

@media (min-width: 768px) {
  .app-hero { min-height: 480px; }
}

.app-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--color-brand);
}

.app-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 70, 122, 0.92) 0%, rgba(24, 70, 122, 0.75) 100%);
}

.app-hero-content {
  position: relative;
  z-index: 1;
  padding: var(--space-16) 0;
  text-align: center;
}

.app-hero-category {
  display: inline-block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-3);
}

.app-hero-title {
  font-size: var(--text-4xl);
  font-weight: var(--font-bold);
  color: var(--color-white);
  margin-bottom: var(--space-4);
  letter-spacing: var(--tracking-tight);
}

@media (min-width: 768px) {
  .app-hero-title { font-size: var(--text-5xl); }
}

.app-hero-desc {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.85);
  max-width: 700px;
  margin: 0 auto var(--space-6);
  line-height: var(--leading-relaxed);
}

.app-hero-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
}

.app-hero-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-default);
}

.app-hero-breadcrumb a:hover { color: var(--color-white); }

/* Content Section */
.app-content-section {
  padding: var(--space-16) 0;
}

.app-content-section--alt {
  background: var(--bg-section-alt);
}

.app-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  align-items: start;
}

@media (min-width: 992px) {
  .app-content-grid {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-12);
  }
}

.app-content-text h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.app-content-text p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  white-space: pre-line;
}

.app-content-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.app-content-image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-default);
}

.app-content-image:hover img {
  transform: scale(1.03);
}

/* Features Section */
.app-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .app-features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
  .app-features-grid { grid-template-columns: repeat(3, 1fr); }
}

.app-feature-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  transition: all var(--duration-slow) var(--ease-default);
}

.app-feature-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  border-color: var(--color-brand-200);
}

.app-feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand-50);
  border-radius: var(--radius-md);
  color: var(--color-brand);
  flex-shrink: 0;
}

.app-feature-icon svg {
  width: 20px;
  height: 20px;
}

.app-feature-title {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.app-feature-desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* Applications Section */
.app-applications-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
}

.app-application-tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  background: var(--color-brand-50);
  color: var(--color-brand);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-default);
}

.app-application-tag:hover {
  background: var(--color-brand);
  color: var(--color-white);
}

/* Specs Section */
.app-specs-table {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  border-collapse: collapse;
}

.app-specs-table tr {
  border-bottom: 1px solid var(--border-default);
}

.app-specs-table tr:last-child {
  border-bottom: none;
}

.app-specs-table th,
.app-specs-table td {
  padding: var(--space-4) var(--space-6);
  text-align: left;
  vertical-align: top;
}

.app-specs-table th {
  width: 160px;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--color-text-primary);
  background: var(--bg-section-alt);
}

.app-specs-table td {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* CTA Section */
.app-cta {
  background: var(--color-brand);
  padding: var(--space-12) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.app-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/microscope-275984_1920.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.08;
  z-index: 0;
}

.app-cta > .container {
  position: relative;
  z-index: 1;
}

.app-cta-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text-inverse);
  margin-bottom: var(--space-3);
}

@media (min-width: 768px) {
  .app-cta-title { font-size: var(--text-3xl); }
}

.app-cta-desc {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--space-6);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.app-cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.app-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  gap: var(--space-4);
}

.app-error-icon {
  width: 64px;
  height: 64px;
  color: var(--color-text-tertiary);
}

.app-error-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.app-error-desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 400px;
}

.app-error-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
