/* Homepage */

.home-hero {
  padding: var(--space-6) 0 var(--space-7);
  background:
    radial-gradient(60% 80% at 0% 0%, color-mix(in srgb, var(--accent-500) 6%, transparent), transparent 60%),
    radial-gradient(50% 70% at 100% 20%, color-mix(in srgb, var(--slate-500) 6%, transparent), transparent 70%),
    var(--bg-page);
  border-bottom: 1px solid var(--border-default);
}

.home-hero__intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.home-hero__intro h1 {
  margin: 0;
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
}
.home-hero__intro p {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--fs-md);
  max-width: 60ch;
}
@media (min-width: 768px) {
  .home-hero__intro h1 { font-size: var(--fs-4xl); }
}

.home-hero__grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .home-hero__grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: var(--space-6);
  }
}

.featured-news {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 768px) {
  .featured-news { grid-template-columns: 1fr 1fr; }
  .featured-news .card--hero { grid-column: 1 / -1; }
}

.widget-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Weather widget */
.weather-widget__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.weather-widget__temp {
  font-family: var(--font-serif);
  font-size: var(--fs-5xl);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}
.weather-widget__icon {
  width: 64px;
  height: 64px;
  color: var(--accent-600);
}
.weather-widget__desc {
  color: var(--text-secondary);
  font-size: var(--fs-sm);
}
.weather-widget__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.weather-widget__meta dt {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  margin-bottom: 2px;
}
.weather-widget__meta dd {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  margin: 0;
}

/* Quick actions grid */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}
.quick-action {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: border-color var(--trans-fast), background var(--trans-fast);
}
.quick-action:hover {
  text-decoration: none;
  border-color: var(--accent-500);
  background: var(--surface-hover);
  color: var(--text-primary);
}
.quick-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-50);
  color: var(--accent-600);
}
[data-theme='dark'] .quick-action__icon { background: rgba(220, 38, 38, 0.12); }
.quick-action__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  line-height: var(--lh-snug);
}
.quick-action__desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Section headers */
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--border-default);
}
.section-head h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  margin: 0;
  line-height: var(--lh-tight);
}
@media (min-width: 768px) {
  .section-head h2 { font-size: var(--fs-3xl); }
}
.section-head__link {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-accent);
}

/* News grid */
.news-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

/* Community section */
.community-section {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-default);
  border-bottom: 1px solid var(--border-default);
}
.community-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 1024px) {
  .community-grid { grid-template-columns: 1fr 1.2fr; }
}
.community-intro h2 {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-3);
}
.community-intro p {
  color: var(--text-secondary);
  max-width: 52ch;
}
.community-intro .cluster { margin-top: var(--space-5); }

.messages-preview {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.message-item {
  padding: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-600);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.message-item__head {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}
.message-item__author {
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
  font-size: var(--fs-sm);
}
.message-item__text {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0;
}

/* App download callout — full-bleed Onești panorama with overlay.
   Sits above the hero so it's the first thing visitors see. */
.app-download {
  position: relative;
  padding: var(--space-8) 0;
  color: #fff;
  background-color: var(--slate-900);
  background-image:
    linear-gradient(to bottom,
      rgba(11, 15, 26, 0.65) 0%,
      rgba(11, 15, 26, 0.55) 50%,
      rgba(11, 15, 26, 0.85) 100%),
    radial-gradient(60% 80% at 0% 0%, color-mix(in srgb, var(--accent-600) 22%, transparent), transparent 60%),
    url('/images/hero-onesti.jpg');
  background-size: cover, cover, cover;
  background-position: center, center, center center;
  background-repeat: no-repeat;
  isolation: isolate;
}
@media (min-width: 768px) {
  .app-download { padding: var(--space-9) 0; }
}

/* Transparent now — the panorama + overlay IS the card background. */
.app-download__card {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  text-align: center;
  color: #fff;
}
@media (min-width: 768px) { .app-download__card { gap: var(--space-5); } }
.app-download__text h2 {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.4);
}
.app-download__text p {
  color: #fff;
  font-weight: 500;
  font-size: var(--fs-lg);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6), 0 1px 2px rgba(0, 0, 0, 0.5);
  max-width: 44ch;
}
.app-download__text h2 {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.app-download__text p {
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0 auto;
  font-size: var(--fs-md);
}

.app-download__stores {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: var(--space-2);
}

/* Official badge images sit at their natural aspect ratio. */
.store-badge-img {
  display: inline-block;
  transition: transform var(--trans-fast), filter var(--trans-fast);
  line-height: 0;
}
.store-badge-img img {
  height: 52px;
  width: auto;
  display: block;
}
.store-badge-img:hover { transform: translateY(-2px); filter: brightness(1.05); }
.store-badge-img:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: transform var(--trans-fast), box-shadow var(--trans-fast), background var(--trans-fast);
  flex: 1 1 0;
  min-width: 0;
}
@media (min-width: 768px) {
  .store-badge { flex: 0 0 auto; padding: 12px 20px; font-size: var(--fs-base); }
}
.store-badge:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}
.store-badge--apple {
  background: #0F172A;
  color: #fff;
  border: 1px solid #0F172A;
}
.store-badge--apple:hover { background: #000; color: #fff; }
.store-badge--android {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.store-badge--android:hover { border-color: var(--accent-500); color: var(--accent-600); }

.store-badge__text {
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Placeholder/skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface-sunken) 0%,
    var(--bg-muted) 50%,
    var(--surface-sunken) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton--card { height: 360px; }
.skeleton--line { height: 14px; margin-bottom: 8px; }
.skeleton--line:last-child { width: 60%; }
