/* ═══════════════════════════════════════════════════════════════════════════
   UniToolx — Home Page Styles v3.0
   Fully responsive, mobile-first, professional
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Top Bar ────────────────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  animation: fadeSlideDown 0.6s var(--ease-out) both;
}

.brand-dot {
  display: inline-flex;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand-glow);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.brand-name {
  font-weight: 800;
  letter-spacing: -0.01em;
}

.topbar-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-shrink: 0;
}

.lang {
  width: auto;
  padding: 10px 36px 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}

.lang:hover {
  border-color: var(--border-hover);
  background: var(--panel-hover);
}

/* ── Hero Section ───────────────────────────────────────────────────────── */
.hero2 {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-xl);
  padding: var(--space-xl) 0 var(--space-lg);
  align-items: center;
  min-height: calc(100vh - 200px);
  min-height: calc(100dvh - 200px);
}

.hero2-left {
  animation: fadeSlideUp 0.7s var(--ease-out) 0.1s both;
}

.hero2-right {
  animation: fadeSlideUp 0.7s var(--ease-out) 0.25s both;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--glass);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  backdrop-filter: blur(8px);
}

.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--brand);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.hero2-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
  margin: 0 0 var(--space-md);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero2-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 52ch;
  line-height: 1.7;
}

.hero2-cta {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.trust-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--brand);
  opacity: 0.8;
  flex-shrink: 0;
}

/* ── Preview Card ───────────────────────────────────────────────────────── */
.preview-card {
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(15, 23, 42, 0.7) 100%);
  overflow: hidden;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.preview-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: 0.5;
}

.preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--glass-border);
}

.preview-title { font-weight: 700; font-size: 0.9375rem; }

.preview-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.1);
  color: var(--brand-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.preview-body { padding: var(--space-md); }

.preview-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.5);
  margin-bottom: var(--space-sm);
  transition: all var(--duration-normal) var(--ease-out);
  cursor: pointer;
}

.preview-row:hover {
  background: rgba(15, 23, 42, 0.8);
  border-color: rgba(34, 197, 94, 0.2);
  transform: translateX(4px);
}

.preview-row:last-of-type { margin-bottom: 0; }

.preview-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel2) 100%);
  color: var(--brand);
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.preview-row:hover .preview-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border-color: rgba(34, 197, 94, 0.3);
}

.preview-text { flex: 1; min-width: 0; }
.preview-name { font-weight: 700; font-size: 0.9375rem; margin-bottom: 2px; }

.preview-desc {
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-note {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background: rgba(15, 23, 42, 0.4);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ── Tools Section ──────────────────────────────────────────────────────── */
.tools {
  padding: var(--space-2xl) 0 var(--space-lg);
  animation: fadeSlideUp 0.7s var(--ease-out) 0.4s both;
}

.tools-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.tools-title {
  margin: 0;
  font-size: 1.5rem;
  position: relative;
}

.tools-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--brand);
  border-radius: var(--radius-full);
}

.search2 {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  max-width: 100%;
}

.search2 input[type="search"] {
  width: 100%;
  min-width: 0;
  max-width: 320px;
  padding: 12px 16px;
}

/* ── Tool Cards ─────────────────────────────────────────────────────────── */
.tool-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
}

.tool-card.disabled { opacity: 0.5; pointer-events: none; }

.tool-top {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--glass-border);
  background: linear-gradient(135deg, var(--panel) 0%, var(--panel2) 100%);
  color: var(--brand);
  flex-shrink: 0;
  transition: all var(--duration-normal) var(--ease-out);
}

.tool-card:hover .tool-icon {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
  border-color: rgba(34, 197, 94, 0.4);
  transform: scale(1.05);
}

.tool-meta { flex: 1; min-width: 0; }

.tool-meta h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1.0625rem;
  transition: color var(--duration-normal) var(--ease-out);
}

.tool-card:hover .tool-meta h3 { color: var(--brand-light); }

.tool-meta p { margin: 0; font-size: 0.875rem; line-height: 1.5; }

.tool-bottom {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: space-between;
}

.tool-chip {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all var(--duration-normal) var(--ease-out);
}

.tool-card:hover .tool-chip { border-color: var(--border-hover); background: var(--glass); }

.tool-link {
  color: var(--brand);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--duration-normal) var(--ease-out);
}

.tool-card:hover .tool-link { gap: var(--space-sm); }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer2 {
  margin-top: var(--space-2xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  animation: fadeIn 0.6s var(--ease-out) 0.5s both;
}

.footer2-row {
  display: flex;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

.footer2-left { display: flex; flex-direction: column; gap: var(--space-xs); }
.brand.mini { font-size: 0.9375rem; }
.brand.mini .brand-dot { width: 8px; height: 8px; }
.footer2-tagline { color: var(--muted); }

.footer2-right {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.8125rem;
}

.footer2-right a { color: var(--text-secondary); transition: color var(--duration-fast) var(--ease-out); }
.footer2-right a:hover { color: var(--brand); }

.sep { opacity: 0.3; }

.footer2-bottom { margin-top: var(--space-md); font-size: 0.75rem; opacity: 0.7; }


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Home Page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤1024px) ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero2 {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    min-height: auto;
    padding: var(--space-lg) 0;
  }

  .hero2-left { text-align: center; }
  .hero2-subtitle { margin: 0 auto; }
  .hero2-cta { justify-content: center; }
  .trust { justify-content: center; }

  .preview-card { max-width: 480px; margin: 0 auto; }

  .tools-head {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-md);
  }

  .search2 input[type="search"] { max-width: none; }

  .tools-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ── Large phones (≤768px) ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tool-card { grid-column: span 6; }
  .topbar-actions { gap: var(--space-xs); }
  #top-cta { display: none; }
  .hero2-title { font-size: clamp(1.625rem, 6vw, 2.5rem); }
}

/* ── Phones (≤560px) ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .tool-card {
    grid-column: span 12;
    min-height: 170px;
  }

  .hero2-title { font-size: 1.75rem; }
  .hero2-subtitle { font-size: 1rem; }

  .preview-row { padding: var(--space-sm) var(--space-md); gap: var(--space-sm); }
  .preview-icon { width: 40px; height: 40px; }
  .preview-name { font-size: 0.875rem; }

  .preview-desc {
    white-space: normal;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.75rem;
  }

  .btn { padding: 12px 16px; font-size: 0.875rem; width: 100%; }
  .btn.mini, .preview-row .btn { width: auto; }

  .hero2-cta { flex-direction: column; }
  .hero2-cta .btn { width: 100%; justify-content: center; }
  .trust { flex-direction: column; align-items: center; }

  .footer2-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .footer2-left { align-items: center; }
  .footer2-right { justify-content: center; }
  .footer2-bottom { text-align: center; }

  .topbar {
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
  }

  .topbar .brand { flex: 1 1 auto; min-width: 0; }

  .topbar-actions {
    flex: 1 1 100%;
    justify-content: stretch;
  }

  .lang { flex: 1; min-width: 0; }
  .pill { font-size: 0.75rem; padding: 6px 12px; }
  .tools { padding: var(--space-xl) 0 var(--space-md); }
  .tools-title { font-size: 1.25rem; text-align: center; }
}

/* ── Small phones (≤380px) ─────────────────────────────────────────────── */
@media (max-width: 380px) {
  .hero2-title { font-size: 1.5rem; }
  .preview-head { padding: var(--space-sm) var(--space-md); }
  .preview-body { padding: var(--space-sm); }
  .tool-icon { width: 44px; height: 44px; }
  .topbar .badge { padding: 4px 8px; font-size: 0.7rem; }

  .tool-card { padding: var(--space-md); }
  .tool-meta h3 { font-size: 1rem; }
  .tool-meta p { font-size: 0.8125rem; }
  .tool-chip { font-size: 0.625rem; padding: 4px 8px; }
  .tool-link { font-size: 0.8125rem; }

  .preview-row { gap: var(--space-sm); padding: 10px; }
  .preview-icon { width: 36px; height: 36px; }
  .preview-name { font-size: 0.8125rem; }

  .footer2-right { flex-direction: column; gap: 4px; }
  .footer2-right .sep { display: none; }
}

/* ── Landscape phone ───────────────────────────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .hero2 {
    min-height: auto;
    padding: var(--space-md) 0;
    grid-template-columns: 1fr 1fr;
  }
  .hero2-left { text-align: left; }
  .hero2-cta { justify-content: flex-start; }
  .trust { justify-content: flex-start; }
}
