/* Landing page specific styles */

/* --- MAIN LAYOUT --- */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

/* Widescreen optimization */
@media (min-width: 1400px) {
  main {
    max-width: 1400px;
  }
}

/* --- HERO SECTION --- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
  padding-top: 20px;
}

/* Better balance on larger screens */
@media (min-width: 1400px) {
  .hero {
    gap: 80px;
    margin-bottom: 100px;
  }
}

@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
}

.hero-content h1 {
  font-size: 42px;
  line-height: 1.1;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

.hero-content h1 span {
  background: linear-gradient(to right, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-content p {
  font-size: 16px;
  color: var(--text-sub);
  margin-bottom: 30px;
  max-width: 500px;
}

@media (max-width: 960px) {
  .hero-content p {
    margin: 0 auto 30px;
  }
}

.badges {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .badges {
    justify-content: center;
  }
}

.badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(148,163,184,0.1);
  color: var(--text-sub);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge span {
  color: var(--accent);
}

.hero-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}

@media (max-width: 960px) {
  .hero-buttons {
    justify-content: center;
  }
}

.btn-primary {
  display: inline-flex;
  padding: 12px 24px;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(56, 189, 248, 0.4);
  color: #fff;
}

/* --- HERO IMAGE --- */
.hero-image-wrapper {
  position: relative;
  perspective: 1000px;
}

.hero-image-container {
  position: relative;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow:
    0 20px 50px -10px rgba(0,0,0,0.5),
    0 0 100px -20px rgba(56, 189, 248, 0.2);
  overflow: hidden;
  transition: transform 0.3s;
}

.hero-image-container:hover {
  transform: translateY(-5px);
  box-shadow:
    0 30px 60px -10px rgba(0,0,0,0.6),
    0 0 120px -20px rgba(56, 189, 248, 0.3);
}

.hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

.img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(45deg, #0f172a, #1e293b);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sub);
  font-size: 14px;
  border: 2px dashed var(--border-soft);
}

/* --- FEATURES GRID --- */
.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 28px;
  margin: 0 0 10px;
}

.section-title p {
  color: var(--text-sub);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

/* Force 3 columns on larger screens for better visual consistency */
@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

@media (min-width: 1400px) {
  .grid {
    gap: 32px;
  }
}

.card {
  background: rgba(15,23,42,0.6);
  border: 1px solid var(--border-soft);
  padding: 24px;
  border-radius: 12px;
  transition: background 0.2s;
}

.card:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148,163,184,0.3);
}

.card-icon {
  font-size: 24px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text-main);
}

.card p {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

/* --- STEPS --- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 80px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1400px) {
  .steps {
    gap: 20px;
  }
}

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

.step {
  background: var(--bg-card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-soft);
  position: relative;
}

.step-num {
  font-size: 30px;
  font-weight: 800;
  color: rgba(255,255,255,0.05);
  position: absolute;
  top: 10px;
  right: 15px;
}

.step h4 {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 14px;
}

.step p {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}

/* --- FAQ --- */
.faq-section {
  max-width: 800px;
  margin: 0 auto 80px;
}

details {
  background: rgba(15,23,42,0.4);
  margin-bottom: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

summary {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

details[open] summary {
  background: rgba(255,255,255,0.03);
}

details p {
  padding: 12px 16px;
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
}

/* --- ADDITIONAL MOBILE IMPROVEMENTS --- */
@media (max-width: 768px) {
  main {
    padding: 16px 16px 40px;
  }

  .hero {
    margin-bottom: 40px;
    padding-top: 16px;
    gap: 24px;
  }

  .hero-content h1 {
    font-size: 32px;
    margin-bottom: 16px;
  }

  .hero-content p {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .badges {
    margin-bottom: 24px;
  }

  .section-title h2 {
    font-size: 24px;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 48px;
  }

  .card {
    padding: 20px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .btn-primary {
    text-align: center;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
  }

  /* Optimize ad spacing on mobile */
  #features {
    margin-bottom: 48px;
  }

  #how-it-works {
    margin-bottom: 48px;
  }
}

@media (max-width: 480px) {
  main {
    padding: 12px 12px 32px;
  }

  .hero {
    gap: 20px;
    margin-bottom: 32px;
    padding-top: 12px;
  }

  .hero-content h1 {
    font-size: 26px;
    margin-bottom: 14px;
  }

  .hero-content p {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .badges {
    gap: 8px;
    margin-bottom: 20px;
  }

  .badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  .section-title h2 {
    font-size: 22px;
  }

  .section-title {
    margin-bottom: 28px;
  }

  .card {
    padding: 18px;
  }

  .card h3 {
    font-size: 15px;
  }

  .card p {
    font-size: 13px;
    line-height: 1.5;
  }

  .grid {
    gap: 14px;
    margin-bottom: 40px;
  }

  .btn-primary {
    padding: 16px 24px;
    font-size: 16px;
  }
}

/* --- AD CONTAINER OPTIMIZATION --- */
.ad-container {
  transition: margin 0.3s ease;
}

@media (min-width: 1400px) {
  .ad-container {
    margin: 60px auto !important;
  }
}

@media (max-width: 768px) {
  .ad-container {
    margin: 32px auto !important;
    padding: 0 16px !important;
  }
}

@media (max-width: 480px) {
  .ad-container {
    margin: 28px auto !important;
    padding: 0 12px !important;
  }
}

/* --- STICKY CTA FOR MOBILE --- */
@media (max-width: 768px) {
  .sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    z-index: 90;
    display: none;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  }

  .sticky-cta-mobile.visible {
    display: block;
    animation: slideUpFade 0.3s ease;
  }

  .sticky-cta-mobile .btn-primary {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
  }

  @keyframes slideUpFade {
    from {
      opacity: 0;
      transform: translateY(100%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Add padding to bottom of page when sticky CTA is visible */
  body.sticky-cta-active {
    padding-bottom: 70px;
  }
}
