/* =====================================================
   Digital World Tools - Main Stylesheet
   Site: https://heubf.com
   Theme: Blue & White Professional
   ===================================================== */

:root {
  --primary:       #1a73e8;
  --primary-dark:  #1557b0;
  --primary-light: #e8f0fe;
  --accent:        #fbbc04;
  --success:       #0f9d58;
  --danger:        #d93025;
  --text:          #1f2937;
  --text-light:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f8faff;
  --white:         #ffffff;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow:        0 4px 16px rgba(26,115,232,.12);
  --shadow-lg:     0 8px 32px rgba(26,115,232,.18);
  --radius:        10px;
  --radius-lg:     16px;
  --font:          'Plus Jakarta Sans', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---- HEADER ---- */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--primary-light);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: var(--shadow-sm);
  overflow: visible;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 8px;
  overflow: visible;
}

/* Nav scrollable on medium screens */
.main-nav {
  flex: 1;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}
.logo-text { font-size: 1.35rem; font-weight: 800; color: var(--text); }
.logo-accent { color: var(--primary); }

.main-nav ul { list-style: none; display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: flex; align-items: center; gap: 5px;
  padding: 7px 10px; border-radius: 8px;
  font-weight: 600; font-size: .82rem; color: var(--text);
  transition: background .2s, color .2s;
  white-space: nowrap; cursor: pointer;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  background: var(--primary-light);
  color: var(--primary);
}
/* No dropdowns — categories link directly */
.dropdown { display: none !important; }

.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 1.4rem; cursor: pointer; color: var(--text);
  padding: 8px;
}

/* ---- ADS ---- */
.ad-header-wrap {
  background: #f0f4ff;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.ad-label {
  font-size: .7rem; color: var(--text-light);
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 4px;
}
.ad-header-banner { min-height: 90px; }

.ad-widget { text-align: center; }
.adsbygoogle { min-height: 250px; }

/* ---- HERO ---- */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 50%, #0d47a1 100%);
  color: white; padding: 80px 0 60px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner { text-align: center; position: relative; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 16px; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.15rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; }

.hero-search {
  max-width: 560px; margin: 0 auto;
  display: flex; gap: 0;
  background: white; border-radius: 50px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.hero-search input {
  flex: 1; border: none; outline: none;
  padding: 14px 22px; font-size: 1rem; color: var(--text);
  font-family: var(--font);
}
.hero-search button {
  background: var(--accent); border: none; cursor: pointer;
  padding: 14px 26px; font-weight: 700; color: #333;
  font-family: var(--font); font-size: .95rem;
  transition: background .2s;
}
.hero-search button:hover { background: #f5a623; }

.hero-stats {
  display: flex; justify-content: center; gap: 40px;
  margin-top: 40px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 1.8rem; font-weight: 800; }
.hero-stat span { font-size: .85rem; opacity: .8; }

/* ---- MAIN LAYOUT ---- */
.site-main { padding: 40px 0; }
.content-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: start; }

/* ---- TOOLS GRID ---- */
.section-header { margin-bottom: 28px; }
.section-header h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 6px; }
.section-header p { color: var(--text-light); }
.section-title-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 2px solid var(--primary-light);
}
.section-title-bar h2 { font-size: 1.3rem; font-weight: 800; }
.cat-badge {
  background: var(--primary); color: white;
  font-size: .75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
}

.tools-category { margin-bottom: 48px; }
.cat-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 18px; padding: 14px 18px;
  background: white; border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}
.cat-header-icon { font-size: 1.5rem; }
.cat-header h2 { font-size: 1.15rem; font-weight: 800; }
.cat-header p { font-size: .85rem; color: var(--text-light); margin-top: 2px; }
.cat-header .view-all {
  margin-left: auto; font-size: .82rem; font-weight: 600;
  color: var(--primary); white-space: nowrap;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.tool-card {
  background: white; border-radius: var(--radius-lg);
  padding: 22px 20px; border: 1px solid var(--border);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
}
.tool-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.tool-card:hover::before { transform: scaleX(1); }

.tool-card-icon {
  width: 44px; height: 44px;
  background: var(--primary-light); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--primary);
}
.tool-card h3 { font-size: .95rem; font-weight: 700; line-height: 1.3; }
.tool-card p { font-size: .82rem; color: var(--text-light); line-height: 1.5; flex: 1; }
.tool-card-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  font-size: .8rem; font-weight: 700; padding: 7px 14px;
  border-radius: 6px; transition: background .2s, color .2s;
  width: fit-content;
}
.tool-card:hover .tool-card-btn { background: var(--primary); color: white; }

/* ---- TOOL PAGE ---- */
.tool-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; padding: 40px 0; margin-bottom: 0;
}
.tool-hero h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 8px; }
.tool-hero p { opacity: .9; max-width: 600px; }
.breadcrumb { font-size: .82rem; margin-bottom: 12px; opacity: .8; }
.breadcrumb a { color: rgba(255,255,255,.8); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { margin: 0 6px; }

.tool-box {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 30px;
  box-shadow: var(--shadow); margin-bottom: 30px;
}

.tool-input-group { margin-bottom: 18px; }
.tool-input-group label {
  display: block; font-weight: 700; font-size: .9rem; margin-bottom: 8px;
}
.tool-input-group input,
.tool-input-group textarea,
.tool-input-group select {
  width: 100%; padding: 12px 16px;
  border: 2px solid var(--border); border-radius: var(--radius);
  font-family: var(--font); font-size: .95rem; color: var(--text);
  transition: border-color .2s, box-shadow .2s; outline: none;
  background: white;
}
.tool-input-group input:focus,
.tool-input-group textarea:focus,
.tool-input-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26,115,232,.1);
}
.tool-input-group textarea { resize: vertical; min-height: 120px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-weight: 700; font-size: .95rem; cursor: pointer;
  border: none; font-family: var(--font); transition: all .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; box-shadow: 0 4px 12px rgba(26,115,232,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,115,232,.45); }
.btn-secondary { background: var(--primary-light); color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: white; }
.btn-lg { padding: 14px 36px; font-size: 1rem; }

.tool-result {
  background: #f8faff; border: 2px solid var(--primary-light);
  border-radius: var(--radius); padding: 20px; margin-top: 20px;
  display: none;
}
.tool-result.show { display: block; }

/* In-Content Ad */
.ad-incontent {
  background: #f0f4ff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px;
  text-align: center; margin: 30px 0;
}

/* Tool Content Sections */
.tool-content { margin-top: 30px; }
.tool-content h2 {
  font-size: 1.25rem; font-weight: 800; margin: 28px 0 12px;
  color: var(--primary); border-left: 4px solid var(--primary);
  padding-left: 12px;
}
.tool-content h3 { font-size: 1.05rem; font-weight: 700; margin: 20px 0 8px; }
.tool-content p { margin-bottom: 14px; color: var(--text); line-height: 1.8; }
.tool-content ul, .tool-content ol {
  padding-left: 22px; margin-bottom: 14px;
}
.tool-content li { margin-bottom: 8px; line-height: 1.7; }

/* FAQ */
.faq-list { margin-top: 20px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden;
}
.faq-question {
  padding: 16px 20px; font-weight: 700; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  background: white; transition: background .2s; user-select: none;
}
.faq-question:hover { background: var(--primary-light); color: var(--primary); }
.faq-question.open { background: var(--primary); color: white; }
.faq-question .faq-icon { transition: transform .3s; }
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  padding: 0 20px; max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .25s;
  background: #fafbff; font-size: .92rem; line-height: 1.8;
}
.faq-answer.open { max-height: 400px; padding: 16px 20px; }

/* Pros/Cons Benefits */
.benefits-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px; margin: 20px 0;
}
.benefit-card {
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  display: flex; gap: 12px; align-items: flex-start;
}
.benefit-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 1rem;
}
.benefit-card h4 { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.benefit-card p { font-size: .82rem; color: var(--text-light); margin: 0; }

/* ---- SIDEBAR ---- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
  background: white; border-radius: var(--radius-lg);
  border: 1px solid var(--border); padding: 20px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 1rem; font-weight: 800; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--primary-light);
  display: flex; align-items: center; gap: 8px; color: var(--text);
}
.widget-title i { color: var(--primary); }

.popular-tools-list { list-style: none; }
.popular-tools-list li a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: .87rem; font-weight: 500; color: var(--text);
  transition: color .15s;
}
.popular-tools-list li:last-child a { border-bottom: none; }
.popular-tools-list li a:hover { color: var(--primary); }
.popular-tools-list li a i { color: var(--primary); width: 16px; }

.category-list { list-style: none; }
.category-list li a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  font-size: .875rem; font-weight: 600; color: var(--text);
  transition: background .15s; margin-bottom: 2px;
}
.category-list li a:hover { background: var(--primary-light); color: var(--primary); }
.cat-icon { font-size: 1rem; }
.cat-count {
  margin-left: auto; background: var(--primary-light); color: var(--primary);
  font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 12px;
}

.newsletter-widget { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; }
.newsletter-widget .widget-title { color: white; border-color: rgba(255,255,255,.2); }
.newsletter-widget p { font-size: .87rem; opacity: .9; margin-bottom: 14px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input {
  padding: 10px 14px; border-radius: 8px; border: none;
  font-family: var(--font); font-size: .88rem; outline: none;
}
.newsletter-form button {
  background: var(--accent); color: #333; border: none;
  padding: 10px; border-radius: 8px; font-weight: 700;
  font-family: var(--font); cursor: pointer; font-size: .88rem;
  transition: background .2s;
}
.newsletter-form button:hover { background: #f5a623; }

/* ---- FOOTER ---- */
.site-footer {
  background: #0d1b2a; color: rgba(255,255,255,.8);
  padding: 60px 0 0; margin-top: 60px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px; padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .logo-text { color: white; }
.footer-brand p { font-size: .875rem; margin: 14px 0 20px; line-height: 1.7; opacity: .75; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.1); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; transition: background .2s;
}
.footer-social a:hover { background: var(--primary); }
.footer-col h4 { font-size: .95rem; font-weight: 700; color: white; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .85rem; color: rgba(255,255,255,.65); transition: color .2s; }
.footer-col ul li a:hover { color: white; }

.footer-bottom {
  padding: 20px 0; text-align: center;
  font-size: .82rem; opacity: .6;
}
.footer-bottom a { color: var(--accent); }
.footer-ssl { margin-top: 6px; font-size: .78rem; }
.footer-ssl i { color: #0f9d58; margin-right: 4px; }

/* ---- SEARCH RESULTS ---- */
.search-results { margin: 24px 0; }
.search-result-item {
  background: white; border-radius: var(--radius);
  padding: 18px; border: 1px solid var(--border); margin-bottom: 12px;
  display: flex; gap: 16px; align-items: flex-start;
  transition: box-shadow .2s;
}
.search-result-item:hover { box-shadow: var(--shadow); }

/* ---- UTILITIES ---- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-muted { color: var(--text-light); }
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: .73rem; font-weight: 700;
}
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-green { background: #e6f4ea; color: var(--success); }
.badge-yellow { background: #fef9e7; color: #c77700; }

.alert {
  padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start; font-size: .9rem;
}
.alert-info { background: var(--primary-light); color: var(--primary); border-left: 4px solid var(--primary); }
.alert-success { background: #e6f4ea; color: var(--success); border-left: 4px solid var(--success); }
.alert-warning { background: #fef9e7; color: #c77700; border-left: 4px solid #fbbc04; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open {
    display: block; position: fixed; inset: 68px 0 0 0;
    background: white; overflow-y: auto; z-index: 999;
    padding: 20px;
  }
  .main-nav.open ul { flex-direction: column; gap: 4px; }
  .main-nav.open .dropdown { position: static; box-shadow: none; border: none; display: none; }
  .main-nav.open .has-dropdown.open .dropdown { display: block; }
  .mobile-menu-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 50px 0 40px; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .benefits-grid { grid-template-columns: 1fr; }
}
