/* Home / landing hero container */
.home-landing {
  position: relative;
  min-height: 78vh;
  margin-bottom: 40px;
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;

  /* Use local background path when deploying; replace as needed */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.45),
    inset 0 0 80px rgba(0, 0, 0, 0.35);
}

/* Deep dusk overlay for mood + contrast */
.home-landing::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to bottom,
    rgba(8, 11, 14, 0.55),
    rgba(6, 8, 10, 0.40)
  );
  backdrop-filter: brightness(0.92);
  pointer-events: none;
}

/* Ambient particle layer */
.home-landing::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image: radial-gradient(
    circle at 40% 30%,
    rgba(255,255,255,0.06) 0%,
    transparent 65%
  );
  opacity: 0.35;
  animation: ambientFloat 18s ease-in-out infinite alternate;
}
@keyframes ambientFloat {
   0% { transform: translateY(0px) translateX(0px);}
   100% { transform: translateY(-16px) translateX(12px);} 
  }

/* Frosted glass hero panel */
.hero-overlay {
  position: relative;
  z-index: 2;
  padding: 46px 52px;
  max-width: 950px;
  border-radius: 26px;

  background: rgba(30, 36, 40, 0.35);
  backdrop-filter: blur(26px) saturate(1.6);
  -webkit-backdrop-filter: blur(26px) saturate(1.6);

  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.48), inset 0 0 38px rgba(255, 255, 255, 0.07);
  animation: heroEnter 0.8s ease forwards;
  opacity: 0;
}
@keyframes heroEnter {
   0% { opacity:0; transform: translateY(18px) scale(.97);}
   100% { opacity:1; transform: translateY(0) scale(1);} 
}

/* Hero typography */
.hero-title { margin: 0 0 8px 0; font-family: "Kensmark One", "Inter", system-ui, sans-serif; font-weight:700; color: var(--accent-gold); font-size: clamp(34px,4vw,48px); text-shadow: 0 0 12px rgba(20,29,26,0.65); }
.hero-lead { color: #eaf0fa; font-size:1.12rem; line-height:1.6; opacity:0.98; }

/* CTA */
.cta-row { margin-top:18px; display:flex; gap:14px; }
.hero-overlay .btn { padding: 14px 32px; background: linear-gradient(90deg, var(--machine-accent), #2b8bce); color: #fff; border-radius:14px; font-weight:600; box-shadow: 0 6px 16px rgba(0,0,0,0.4), inset 0 0 12px rgba(255,255,255,0.12); transition: all .25s ease; }
.hero-overlay .btn:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0,0,0,0.45), inset 0 0 14px rgba(255,255,255,0.22); }

.btn-text {
  margin-right: 8px;
}

.btn-icon {
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.btn-primary:hover .btn-icon,
.btn-ghost:hover .btn-icon {
  transform: translateX(2px);
  opacity: 1;
}

/* Browse Categories */
.browse-categories { margin-top: 24px; text-align: center; }
.browse-categories h3 { color: var(--accent); font-size: 18px; margin-bottom: 16px; font-weight: 600; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.category-card { background: rgba(20, 40, 60, 0.4); border: 1px solid rgba(80, 150, 228, 0.3); border-radius: 12px; padding: 16px 12px; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.category-card:hover { background: rgba(20, 40, 60, 0.6); border-color: var(--accent-gold); transform: translateY(-2px); }
.category-icon { font-size: 24px; }
.category-name { color: var(--accent); font-weight: 600; font-size: 14px; }
.category-count { color: rgba(234, 243, 255, 0.7); font-size: 12px; }

/* Favorites Content */
.favorites-content { margin-top: 24px; text-align: center; }
.favorites-content h3 { color: var(--accent); font-size: 18px; margin-bottom: 16px; font-weight: 600; }
.favorites-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; min-height: 32px; }
.favorite-item { background: rgba(255, 215, 0, 0.2); border: 1px solid rgba(255, 215, 0, 0.5); color: #ffd700; padding: 8px 14px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: all 0.2s ease; font-weight: 500; }
.favorite-item:hover { background: rgba(255, 215, 0, 0.3); transform: translateY(-1px); }
.no-favorites { color: rgba(234, 243, 255, 0.5); font-style: italic; padding: 8px; font-size: 13px; }



/* Quick Access */
.quick-access { margin-top: 24px; text-align: center; }
.quick-access h3 { color: var(--accent); font-size: 18px; margin-bottom: 16px; font-weight: 600; }
.quick-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 768px) {
  .hero-overlay { padding: 32px 24px; margin: 0 16px; }
  .hero-title { font-size: 28px; }
  .category-grid { grid-template-columns: 1fr; gap: 8px; }
  .category-card { padding: 12px; }
  .favorites-links { gap: 6px; }
  .favorite-item { font-size: 12px; padding: 6px 10px; }

  .quick-links { gap: 8px; }
  .quick-link { font-size: 12px; padding: 6px 10px; }
}

/* Mobile accessibility improvements merged from accessibility.css */
@media (max-width: 768px) {
  button, .btn, .result-item { min-height: 48px; padding: 12px 16px; }
  .category-grid { gap: 16px; }
}
.quick-link { background: rgba(20, 40, 60, 0.3); border: 1px solid rgba(80, 150, 228, 0.2); color: var(--accent); padding: 8px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; transition: all 0.2s ease; }
.quick-link:hover { background: rgba(20, 40, 60, 0.5); border-color: var(--accent-gold-soft); transform: translateY(-1px); }
.no-recent { color: rgba(234, 243, 255, 0.5); font-style: italic; padding: 12px; }

/* Comparison Tool Styles */
/* Logo */
.logo-mark { 
  width:46px;
  height:46px;
  border-radius:12px;
  /* use packaged icon from images/ */
  background-image: url('../images/icon-192.png');
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  background-color:#0b1f2a;
  box-shadow: 0 6px 16px rgba(0,0,0,0.45), inset 0 0 10px rgba(242,197,124,0.12);
  border:1px solid rgba(255,255,255,0.04); }

/* Auto-link styling preserved & harmonized */
.auto-link { color: var(--accent-gold); font-weight:600; text-decoration:none; cursor:pointer; transition: color .18s ease, text-shadow .18s ease, background-color .18s ease, padding .15s ease, border-radius .15s ease; border-radius:4px; padding:2px 4px; }
.auto-link:hover { color:#fff7d0; background: rgba(242,197,124,0.16); text-shadow: 0 0 8px rgba(242,197,124,0.55); border-radius:6px; }
/* Ensure .auto-link anchors sit above overlays and are clickable */
.auto-link { position: relative; z-index: 10; }

/* Back button */
.back-home { background: rgba(20, 40, 60, 0.4); border: 1px solid var(--accent-gold-soft); color: var(--accent); padding: 8px 16px; border-radius: 6px; margin-bottom: 20px; cursor: pointer; transition: all 0.2s ease; }
.back-home:hover { background: rgba(20, 40, 60, 0.6); transform: translateY(-1px); }

/* Tips Carousel */
.tips-carousel {
  margin-top: 32px;
  text-align: center;
}

.tips-carousel h3 {
  color: var(--accent);
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
}

.tips-container {
  position: relative;
  height: 120px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(20, 40, 60, 0.3);
  border: 1px solid rgba(80, 150, 228, 0.2);
}

.tip-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s ease;
}

.tip-card.active {
  opacity: 1;
  transform: translateX(0);
}

.tip-card.prev {
  opacity: 0;
  transform: translateX(-100%);
}

.tip-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.tip-content {
  text-align: left;
  flex: 1;
}

.tip-content h4 {
  color: var(--accent-gold);
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.tip-content p {
  color: rgba(234, 243, 255, 0.9);
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.recent-sidebar.expanded {
  width: 200px;
}

.sidebar-toggle {
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  height: 40px;
  background: rgba(80, 150, 228, 0.2);
  border: none;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s ease;
}

.sidebar-toggle:hover {
  background: rgba(80, 150, 228, 0.3);
}

.sidebar-content {
  padding: 130px 12px 20px 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recent-sidebar.expanded .sidebar-content {
  opacity: 1;
}

.recent-sidebar h3 {
  color: var(--accent);
  font-size: 16px;
  margin: 0 0 12px 0;
  font-weight: 600;
}

.recent-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-links .quick-link {
  background: rgba(20, 40, 60, 0.3);
  border: 1px solid rgba(80, 150, 228, 0.2);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.recent-links .quick-link:hover {
  background: rgba(20, 40, 60, 0.5);
  border-color: var(--accent-gold-soft);
  transform: translateY(-1px);
}

.recent-links .no-recent {
  color: rgba(234, 243, 255, 0.5);
  font-style: italic;
  font-size: 12px;
  text-align: center;
}

.main-with-sidebar {
  margin-left: 0;
}

.main-with-sidebar.sidebar-expanded {
  margin-left: 160px;
}

@media (max-width: 1200px) {
  .recent-sidebar {
    display: none;
  }
  
  .main-with-sidebar,
  .main-with-sidebar.sidebar-expanded {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .tips-container {
    height: 140px;
  }
  
  .tip-card {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 16px;
  }
  
  .tip-content {
    text-align: center;
  }
  
  .tip-icon {
    font-size: 28px;
  }
}