/* ════════════════════════════════════════════════════
   YourToolbox.in — Site Structure CSS  v1.0.0
   Design: Calculator.net structure + iLovePDF cards
   ════════════════════════════════════════════════════ */

:root {
  --ytb-white:   #FFFFFF;
  --ytb-bg:      #F8FAFC;
  --ytb-border:  #E2E8F0;
  --ytb-text:    #1E293B;
  --ytb-muted:   #64748B;
  --ytb-light:   #94A3B8;
  --ytb-blue:    #3B82F6;
  --ytb-radius:  12px;
  --ytb-shadow:  0 1px 3px rgba(0,0,0,0.06);
  --ytb-font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* ── GOOGLE FONT (Inter) ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ─────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────── */
#ytb-header {
  background: var(--ytb-white);
  border-bottom: 1px solid var(--ytb-border);
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: var(--ytb-shadow);
  font-family: var(--ytb-font);
}

.ytb-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 60px;
  gap: 24px;
}

/* Logo */
.ytb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.ytb-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  font-weight: 800;
}
.ytb-logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--ytb-text);
  letter-spacing: -0.3px;
  font-family: var(--ytb-font);
}
.ytb-logo-text span { color: var(--ytb-blue); }

/* Nav */
.ytb-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}
.ytb-nav-item {
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ytb-muted);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--ytb-font);
  transition: background 0.15s, color 0.15s;
}
.ytb-nav-item:hover {
  background: var(--ytb-bg);
  color: var(--ytb-text);
}

/* More dropdown */
.ytb-nav-more { position: relative; }
.ytb-nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--ytb-white);
  border: 1px solid var(--ytb-border);
  border-radius: var(--ytb-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 8px;
  min-width: 220px;
  z-index: 200;
}
.ytb-nav-more:hover .ytb-nav-dropdown,
.ytb-nav-more-btn[aria-expanded="true"] + .ytb-nav-dropdown { display: block; }
.ytb-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ytb-text);
  font-size: 13px;
  transition: background 0.12s;
}
.ytb-dropdown-item:hover { background: var(--ytb-bg); }
.ytb-dropdown-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ytb-dropdown-item strong { display: block; font-size: 13px; }
.ytb-dropdown-item small  { display: block; font-size: 11px; color: var(--ytb-light); }

/* Header Search */
.ytb-header-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--ytb-bg);
  border: 1.5px solid var(--ytb-border);
  border-radius: 8px;
  padding: 0 12px;
  gap: 8px;
  height: 36px;
  width: 220px;
  flex-shrink: 0;
}
.ytb-search-icon { color: var(--ytb-light); font-size: 14px; }
.ytb-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--ytb-text);
  width: 100%;
  font-family: var(--ytb-font);
}
.ytb-search-input::placeholder { color: var(--ytb-light); }

/* Search Results Dropdown */
.ytb-search-results {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--ytb-white);
  border: 1px solid var(--ytb-border);
  border-radius: var(--ytb-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 300;
  overflow: hidden;
}
.ytb-search-results.ytb-open { display: block; }
.ytb-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: var(--ytb-text);
  font-size: 13px;
  transition: background 0.12s;
}
.ytb-search-result-item:hover { background: var(--ytb-bg); }
.ytb-result-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ytb-result-name  { font-weight: 600; font-size: 13px; }
.ytb-result-cat   { font-size: 11px; color: var(--ytb-light); }
.ytb-search-no-results { padding: 12px 14px; font-size: 13px; color: var(--ytb-muted); }

/* Hamburger (mobile) */
.ytb-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.ytb-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ytb-text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile nav drawer */
.ytb-mobile-nav {
  display: none;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--ytb-border);
  background: var(--ytb-white);
}
.ytb-mobile-nav.ytb-open { display: block; }
.ytb-mobile-search {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--ytb-border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
  font-family: var(--ytb-font);
}
.ytb-mobile-cats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ytb-mobile-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ytb-text);
  background: var(--ytb-bg);
  font-size: 13px;
}
.ytb-mobile-cat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ytb-mobile-cat-info strong { display: block; font-size: 12px; font-weight: 600; }
.ytb-mobile-cat-info small  { display: block; font-size: 11px; color: var(--ytb-light); }

/* ─────────────────────────────────────────────────────
   HERO
   ───────────────────────────────────────────────────── */
.ytb-hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 50%, #FFF7ED 100%);
  padding: 56px 20px 48px;
  text-align: center;
  border-bottom: 1px solid var(--ytb-border);
  font-family: var(--ytb-font);
}
.ytb-hero-tag {
  display: inline-block;
  background: #DBEAFE;
  color: #1D4ED8;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ytb-hero-title {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin: 0 0 12px;
}
.ytb-hero-sub {
  font-size: 16px;
  color: var(--ytb-muted);
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.5;
}
.ytb-hero-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--ytb-white);
  border: 2px solid var(--ytb-border);
  border-radius: var(--ytb-radius);
  padding: 4px 4px 4px 16px;
  max-width: 540px;
  margin: 0 auto 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  gap: 8px;
}
.ytb-hero-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--ytb-text);
  background: transparent;
  padding: 8px 0;
  font-family: var(--ytb-font);
}
.ytb-hero-search-btn {
  background: linear-gradient(135deg, #3B82F6, #8B5CF6);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--ytb-font);
  transition: opacity 0.15s;
}
.ytb-hero-search-btn:hover { opacity: 0.88; }
.ytb-hero-results {
  top: calc(100% + 8px);
  left: 0; right: 0;
}
.ytb-hero-stats {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.ytb-stat { text-align: center; }
.ytb-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--ytb-text);
  font-family: var(--ytb-font);
}
.ytb-stat span {
  display: block;
  font-size: 12px;
  color: var(--ytb-light);
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────
   SECTIONS
   ───────────────────────────────────────────────────── */
.ytb-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  font-family: var(--ytb-font);
}
.ytb-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.ytb-section-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ytb-section-left h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}
.ytb-section-left small {
  font-size: 13px;
  color: var(--ytb-light);
}
.ytb-see-all {
  font-size: 13px;
  color: var(--ytb-blue);
  font-weight: 600;
  text-decoration: none;
}
.ytb-see-all:hover { text-decoration: underline; }
.ytb-divider {
  border: none;
  height: 1px;
  background: #F1F5F9;
  max-width: 1200px;
  margin: 0 auto;
}

/* ─────────────────────────────────────────────────────
   CATEGORY GRID
   ───────────────────────────────────────────────────── */
.ytb-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.ytb-cat-card {
  background: var(--ytb-white);
  border: 1.5px solid var(--ytb-border);
  border-radius: var(--ytb-radius);
  padding: 16px;
  text-align: center;
  text-decoration: none;
  color: var(--ytb-text);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: block;
}
.ytb-cat-card:hover {
  border-color: var(--cat-color, var(--ytb-blue));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--cat-color, var(--ytb-blue)) 15%, transparent);
  transform: translateY(-2px);
}
.ytb-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 8px;
}
.ytb-cat-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.ytb-cat-count {
  font-size: 12px;
  color: var(--ytb-light);
}

/* ─────────────────────────────────────────────────────
   TOOL CARDS
   ───────────────────────────────────────────────────── */
.ytb-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}
.ytb-tool-card {
  background: var(--ytb-white);
  border: 1.5px solid var(--ytb-border);
  border-radius: var(--ytb-radius);
  padding: 14px;
  text-decoration: none;
  color: var(--ytb-text);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ytb-tool-card:hover {
  border-color: var(--card-color, var(--ytb-blue));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--card-color, var(--ytb-blue)) 12%, transparent);
  transform: translateY(-1px);
}
.ytb-tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.ytb-tool-info strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.ytb-tool-info small  { display: block; font-size: 11px; color: var(--ytb-light); margin-top: 2px; }

/* Featured (larger) */
.ytb-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.ytb-featured-card {
  background: var(--ytb-white);
  border: 1.5px solid var(--ytb-border);
  border-radius: 14px;
  padding: 16px;
  text-decoration: none;
  color: var(--ytb-text);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ytb-featured-card:hover {
  border-color: var(--card-color, var(--ytb-blue));
  box-shadow: 0 4px 16px color-mix(in srgb, var(--card-color, var(--ytb-blue)) 14%, transparent);
  transform: translateY(-2px);
}
.ytb-featured-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.ytb-featured-card strong { display: block; font-size: 14px; font-weight: 600; }
.ytb-featured-card small  { display: block; font-size: 11px; color: var(--ytb-light); margin-top: 2px; }

/* ─────────────────────────────────────────────────────
   PROMO BANNER
   ───────────────────────────────────────────────────── */
.ytb-promo-banner {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  padding: 40px 20px;
  text-align: center;
  font-family: var(--ytb-font);
}
.ytb-promo-banner h3 {
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.ytb-promo-banner p {
  font-size: 15px;
  color: var(--ytb-light);
  margin: 0 0 20px;
}
.ytb-currency-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}
.ytb-currency-badges span {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: #E2E8F0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ─────────────────────────────────────────────────────
   TOOL PAGE
   ───────────────────────────────────────────────────── */
.ytb-tool-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  font-family: var(--ytb-font);
}
.ytb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ytb-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.ytb-breadcrumb a { color: var(--ytb-blue); text-decoration: none; }
.ytb-breadcrumb a:hover { text-decoration: underline; }
.ytb-tool-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ytb-tool-header-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.ytb-tool-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 4px;
  letter-spacing: -0.5px;
}
.ytb-tool-id {
  font-size: 12px;
  color: var(--ytb-light);
  font-weight: 500;
}
.ytb-currency-switcher {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ytb-muted);
}
.ytb-currency-switcher select {
  padding: 6px 10px;
  border: 1.5px solid var(--ytb-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--ytb-font);
  color: var(--ytb-text);
  background: var(--ytb-white);
  cursor: pointer;
  outline: none;
}
.ytb-tool-content { margin-bottom: 32px; }

/* Related tools */
.ytb-related-tools { margin-top: 32px; }
.ytb-related-tools h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 14px;
}
.ytb-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}
.ytb-related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--ytb-border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ytb-text);
  font-size: 13px;
  font-weight: 600;
  transition: border-color 0.15s, background 0.15s;
}
.ytb-related-card:hover { border-color: var(--ytb-blue); background: #EFF6FF; }
.ytb-related-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────
   CATEGORY PAGE
   ───────────────────────────────────────────────────── */
.ytb-cat-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
  font-family: var(--ytb-font);
}
.ytb-cat-hero {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--cat-color, #3B82F6) 8%, white),
    color-mix(in srgb, var(--cat-color, #3B82F6) 4%, white));
  border-bottom: 1px solid var(--ytb-border);
  padding: 40px 20px 32px;
  text-align: center;
  margin: 0 -20px 24px;
}
.ytb-cat-hero-icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}
.ytb-cat-hero h1 {
  font-size: 28px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 8px;
  letter-spacing: -0.5px;
}
.ytb-cat-hero p {
  font-size: 15px;
  color: var(--ytb-muted);
  margin: 0;
}
.ytb-tool-card-body h3 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.ytb-tool-card-body p  { font-size: 12px; color: var(--ytb-muted); margin: 0; }
.ytb-tool-card-arrow   { margin-left: auto; color: var(--ytb-light); font-size: 16px; }
.ytb-tool-card { cursor: pointer; }
.ytb-no-tools { color: var(--ytb-muted); font-size: 14px; padding: 20px 0; }

/* ─────────────────────────────────────────────────────
   INLINE SEARCH
   ───────────────────────────────────────────────────── */
.ytb-inline-search {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--ytb-white);
  border: 1.5px solid var(--ytb-border);
  border-radius: var(--ytb-radius);
  padding: 0 14px;
  gap: 8px;
  height: 44px;
  font-family: var(--ytb-font);
}
.ytb-inline-search-input { font-size: 14px; }
.ytb-inline-results { top: calc(100% + 6px); left: 0; right: 0; }

/* ─────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .ytb-nav, .ytb-header-search { display: none; }
  .ytb-hamburger { display: flex; }

  .ytb-hero { padding: 40px 16px 32px; }
  .ytb-hero-title { font-size: 30px; }
  .ytb-hero-sub { font-size: 14px; }
  .ytb-hero-search-wrap { flex-wrap: wrap; padding: 8px; }
  .ytb-hero-search-input { width: 100%; }
  .ytb-hero-search-btn { width: 100%; text-align: center; padding: 10px; }
  .ytb-hero-stats { gap: 20px; }

  .ytb-section { padding: 28px 16px; }
  .ytb-category-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
  .ytb-tools-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ytb-featured-grid { grid-template-columns: 1fr; gap: 8px; }

  .ytb-tool-header { flex-direction: column; }
  .ytb-currency-switcher { margin-left: 0; }
  .ytb-related-grid { grid-template-columns: 1fr 1fr; }

  .ytb-promo-banner { padding: 28px 16px; }
  .ytb-promo-banner h3 { font-size: 20px; }
}

@media (max-width: 480px) {
  .ytb-mobile-cats { grid-template-columns: 1fr; }
  .ytb-category-grid { grid-template-columns: repeat(3, 1fr); }
  .ytb-tools-grid { grid-template-columns: 1fr; }
  .ytb-related-grid { grid-template-columns: 1fr; }
}
