/* =========================================================
   Cralite Tools Dashboard — home.css (Optimized + YouTube Style Cards)
   ========================================================= */

:root {
  --bg: #fafafa;
  --card: #fff;
  --border: #e5e7eb;
  --muted: #6b7280;
  --primary: #ffc50c;
  --secondary: #070026;
  --accent-hover: #e0b200;
  --text: #1f2937;
  --hero-text: #fff;

  --radius: 10px;
  --radius-sm: 14px; /* Updated for consistent banner/card radius */
  --radius-lg: 9999px;

  --shadow-sm: 0 4px 12px rgba(0,0,0,0.03);
  --shadow-hover: 0 12px 24px rgba(0,0,0,0.06);

  --font: 'Sofia Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* BASE */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
}

/* BUTTONS */
.btn.primary {
  background: var(--primary);
  color: var(--secondary);
  padding: .9rem 1.8rem;
  border-radius: var(--radius-lg);
  transition: .25s;
}
.btn.primary:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* =========================================================
   SIDEBAR — Sticky Banner (Optimized & Complete)
   ========================================================= */
.sidebar {
  position: relative;
  padding-left: 1rem;
}

.sidebar .banner {
  /* This is the key for making the banner sticky on desktop */
  position: sticky;
  top: 100px;
  background: var(--secondary);
  border-radius: var(--radius-sm);
  overflow: hidden;
  color: var(--hero-text);
  text-align: center;
  padding-bottom: 1rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.banner img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.banner-content {
  padding: 1.3rem 1.2rem 1.6rem;
}

.banner-content h3 {
  font-size: 20px;
  color: var(--hero-text);
  margin-bottom: 0.6rem;
}

.banner-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.banner-content .btn {
  background: var(--primary);
  color: var(--secondary);
  border-radius: var(--radius-lg);
  padding: 0.6rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.15s ease;
}

.banner-content .btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.banner.visible {
  opacity: 1;
  transform: translateY(0);
}


/* RESPONSIVE */
@media(max-width:900px){
  /* Adjusted mobile padding to avoid conflicts with new desktop centering */
  .tools-container { grid-template-columns: 1fr; max-width: none; margin: 0; }
  .sidebar { padding-left: 0; }
  /* Ensure banner is static on mobile, overriding the sticky property */
  .sidebar .banner { position: static; margin-top: 1.5rem; }
}

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

@media (max-width: 600px) {
  .tool-card { /* Used the correct class name for the card */
    padding: 1.5rem 1rem;
  }

  .tool-title {
    font-size: 18px;
  }

  /* Note: .tool-desc style was not present in original YT card, leaving it out */
}