/* ==========================================================================
   App Detail Page — Common Styles
   ========================================================================== */

/* --- App Hero --- */
.app-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 4rem) 1.5rem 4rem;
  position: relative;
  overflow: hidden;
}

.app-hero--ocean {
  background: linear-gradient(180deg, #0c4a6e 0%, var(--bg-primary) 100%);
}

.app-hero--warm {
  background: linear-gradient(180deg, #78350f 0%, var(--bg-primary) 100%);
}

[data-theme="light"] .app-hero--ocean {
  background: linear-gradient(180deg, #e0f2fe 0%, var(--bg-primary) 100%);
}

[data-theme="light"] .app-hero--warm {
  background: linear-gradient(180deg, #fef3c7 0%, var(--bg-primary) 100%);
}

.app-hero--green {
  background: linear-gradient(180deg, #064e3b 0%, var(--bg-primary) 100%);
}

[data-theme="light"] .app-hero--green {
  background: linear-gradient(180deg, #d1fae5 0%, var(--bg-primary) 100%);
}

.app-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 700px;
}

.app-hero__icon {
  width: 120px;
  height: 120px;
  border-radius: 27px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.app-hero__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-hero__icon--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
}

.app-hero__icon--ocean {
  background: linear-gradient(135deg, #0e7490, #06b6d4);
}

.app-hero__icon--warm {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.app-hero__icon--green {
  background: linear-gradient(135deg, #059669, #10b981);
}

.app-hero__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}

.app-hero__subtitle {
  font-size: 1.25rem;
  max-width: 500px;
}

.app-hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* --- Features Grid --- */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .features__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Screenshot Gallery --- */
.gallery {
  background: var(--bg-secondary);
}

.gallery__track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
  scrollbar-width: none;
}

.gallery__track::-webkit-scrollbar {
  display: none;
}

.gallery__item {
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: center;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.gallery__item img {
  width: 100%;
  height: auto;
}

/* Screenshot placeholder */
.gallery__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

/* --- Alternating Feature Sections --- */
.feature-showcase {
  display: flex;
  align-items: center;
  gap: 4rem;
  padding: 4rem 0;
}

.feature-showcase:nth-child(even) {
  flex-direction: row-reverse;
}

.feature-showcase__image {
  flex: 1;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

.feature-showcase__image img {
  width: 100%;
}

.feature-showcase__content {
  flex: 1;
}

.feature-showcase__title {
  margin-bottom: 1rem;
}

.feature-showcase__desc {
  font-size: 1.0625rem;
}

@media (max-width: 768px) {
  .feature-showcase,
  .feature-showcase:nth-child(even) {
    flex-direction: column;
    gap: 2rem;
  }
}

/* --- Tech Specs --- */
.specs {
  background: var(--bg-secondary);
}

.specs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.specs__item {
  text-align: center;
  padding: 1.5rem;
}

.specs__label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.specs__value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  padding: 6rem 1.5rem;
}

.cta-section__title {
  margin-bottom: 1rem;
}

.cta-section__subtitle {
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

.cta-section__legal {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.cta-section__legal a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}

.cta-section__legal a:hover {
  color: var(--text-primary);
  text-decoration-color: var(--text-primary);
}

.cta-section__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Hidden states for placeholder content --- */
.gallery--hidden {
  display: none;
}

.feature-showcase__image--hidden {
  display: none;
}

.feature-showcase__image--hidden + .feature-showcase__content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* App hero placeholder SVG icon */
.app-hero__icon--placeholder svg {
  width: 60px;
  height: 60px;
}
