/*
Theme Name: SoftTools
Author: SoftTools
Description: A clean, fast, lightweight custom theme built for SoftTools - a free online tools website. No external fonts, no frameworks, no CDN dependencies. System font stack, mobile-first responsive layout, non-sticky header and card-based tool grid.
Version: 1.8.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: softtools-theme
Tags: tools, clean, minimal, responsive, fast, custom-menu, custom-logo
*/

/* ============ Reset & base ============ */
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:17px;line-height:1.65;color:#1f2937;background:#f8fafc;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{line-height:1.25;color:#0f172a;margin:0 0 .6em}
h1{font-size:2rem}h2{font-size:1.55rem}h3{font-size:1.25rem}
p{margin:0 0 1em}
a{color:#2563eb;text-decoration:none}
a:hover{color:#1d4ed8;text-decoration:underline}
img{max-width:100%;height:auto}
.container{max-width:1200px;margin:0 auto;padding:0 20px}
:focus-visible{outline:3px solid #2563eb;outline-offset:2px}

/* ============ Header ============ */
/* Header is intentionally NOT sticky (v1.6.0): it scrolls away with the
   page on mobile, tablet and desktop, so it never eats screen space.
   v1.7.0 layout: one 64px row on desktop — [logo + "SoftTools" text]
   [nav, one line, no wrapping] [language switcher at the far right].
   The tagline is NOT in the header any more: it had no fixed width, so
   on /en/ it was crushed into a ~40px column wrapping 9 lines and made
   the header ~173px tall, while on /hi/ it got ~200px and the header was
   only ~70px. The tagline message already lives in the hero. The header
   row is 1320px wide (wider than the 1200px page container) because 8
   nav items + 3-language switcher + brand do not fit in 1200px. */
.site-header{background:#fff;border-bottom:1px solid #e2e8f0;box-shadow:0 1px 4px rgba(15,23,42,.05)}
.header-inner{max-width:1320px;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px}
.site-brand{display:flex;align-items:center;gap:10px;flex-shrink:0;min-width:0}
.brand-name{font-size:1.25rem;font-weight:800;color:#0f172a;letter-spacing:-.02em;white-space:nowrap}
.brand-name:hover{text-decoration:none;color:#0f172a}
.site-brand .logo-mark{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:9px;background:#2563eb;color:#fff;font-size:1.05rem;font-weight:800}
.site-brand .logo-mark .dot{color:#bfdbfe}
.brand-name{font-size:1.25rem;font-weight:800;color:#0f172a;letter-spacing:-.02em;white-space:nowrap}
/* Custom logo (512x512 PNG set in Customizer): constrain to one fixed height
   everywhere. Without this the image sizes itself from its container context
   and rendered ~15px tall on /en/ but ~185px tall on /hi/ and /es/. */
.site-brand .custom-logo-link{display:flex;align-items:center;flex-shrink:0}
.site-brand .custom-logo{width:auto;height:48px;max-width:180px;flex-shrink:0}
/* v1.5.0 belt-and-braces: the v1.4.0 rule above did NOT take effect live
   (logo still ~15px on /en/, ~234px on /hi/, ~124px on /es/ — cause
   unknown: selector mismatch, an override, or a stale cached
   stylesheet). This !important rule plus the get_custom_logo filter in
   functions.php (inline style + 48x48 attributes on the <img> itself)
   force one size even if the stylesheet is stale. */
.site-brand img.custom-logo{width:48px!important;height:48px!important;max-width:48px!important;max-height:48px!important;object-fit:contain}
.site-brand .custom-logo-link{flex:0 0 auto!important;height:48px}
.main-nav{display:flex;align-items:center;gap:20px;min-width:0}
.main-nav ul{display:flex;gap:4px;list-style:none;margin:0;padding:0;flex-shrink:0}
.main-nav a{display:block;padding:9px 11px;border-radius:8px;color:#334155;font-weight:600;font-size:.92rem;white-space:nowrap}
.main-nav a:hover{background:#eff6ff;color:#2563eb;text-decoration:none}
.main-nav .current-menu-item a{background:#eff6ff;color:#2563eb}
.menu-toggle{display:none;background:#2563eb;color:#fff;border:0;border-radius:8px;padding:9px 14px;font-size:1rem;cursor:pointer;flex-shrink:0}

/* ============ Hero ============ */
.hero{background:linear-gradient(135deg,#1e40af 0%,#2563eb 55%,#3b82f6 100%);color:#fff;text-align:center;padding:64px 20px 56px}
.hero h1{color:#fff;font-size:2.5rem;margin-bottom:.4em;letter-spacing:-.02em}
.hero p{font-size:1.15rem;color:#dbeafe;max-width:680px;margin:0 auto 26px}
.hero-search{max-width:520px;margin:0 auto;display:flex;gap:8px}
.hero-search input{flex:1;padding:13px 16px;border:0;border-radius:10px;font-size:1rem}
.hero-search button{padding:13px 22px;border:0;border-radius:10px;background:#0f172a;color:#fff;font-size:1rem;font-weight:700;cursor:pointer}
.hero-search button:hover{background:#1e293b}

/* ============ Tool grid ============ */
.section{padding:44px 0}
.section-head{text-align:center;margin-bottom:28px}
.section-head p{color:#64748b;max-width:640px;margin:0 auto}
.tools-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.tool-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:24px;display:flex;flex-direction:column;transition:box-shadow .15s ease,transform .15s ease}
.tool-card:hover{box-shadow:0 10px 26px rgba(15,23,42,.10);transform:translateY(-2px)}
.tool-card:hover a{text-decoration:none}
.tool-icon{width:48px;height:48px;border-radius:12px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.15rem;margin-bottom:14px}
.tool-card h3{margin-bottom:.35em;font-size:1.12rem}
.tool-card h3 a{color:#0f172a}
.tool-card p{color:#64748b;font-size:.95rem;flex:1}
.tool-link{font-weight:700;font-size:.95rem}
.intro-text{max-width:760px;margin:0 auto 10px;text-align:center;color:#475569}
.intro-text h2{margin-bottom:.4em}

/* ============ Content / pages ============ */
.content-wrap{padding:40px 0 56px}
.page-card,.post-card{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:32px}
.entry-title{margin-bottom:.3em}
.entry-meta{color:#64748b;font-size:.9rem;margin-bottom:1.2em}
.post-list{list-style:none;margin:0;padding:0;display:grid;gap:18px}
.post-list article{background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:24px}
.post-list h2{font-size:1.3rem;margin-bottom:.3em}
.post-list h2 a{color:#0f172a}
.post-list .excerpt{color:#64748b}
.pagination{margin-top:28px;display:flex;gap:8px;justify-content:center}
.pagination a,.pagination span{padding:8px 14px;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#334155}
.pagination .current{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:700}
.tool-note{background:#eff6ff;border:1px solid #bfdbfe;border-radius:10px;padding:14px 18px;color:#1e3a8a;font-size:.95rem;margin-bottom:22px}

/* ============ Author box (single posts) ============ */
.author-box{display:flex;gap:16px;align-items:flex-start;margin-top:24px;border-top:1px solid #e2e8f0;padding-top:18px}
.author-box img{border-radius:50%;flex-shrink:0}
.author-box .author-name{font-weight:700;margin-bottom:4px}
.author-box .author-bio{color:#64748b;margin-bottom:0}

/* ============ Footer ============ */
.site-footer{background:#0f172a;color:#cbd5e1;margin-top:20px}
.footer-inner{display:grid;grid-template-columns:2fr 1fr 1fr;gap:32px;padding:44px 0 28px}
.site-footer h3{color:#fff;font-size:1rem;margin-bottom:12px}
.site-footer p{font-size:.95rem;color:#94a3b8}
.footer-links{list-style:none;margin:0;padding:0}
.footer-links li{margin-bottom:8px}
.footer-links a{color:#cbd5e1;font-size:.95rem}
.footer-links a:hover{color:#fff}
.footer-bottom{border-top:1px solid #1e293b;padding:18px 0;text-align:center;font-size:.88rem;color:#94a3b8}

/* ============ 404 / search ============ */
.not-found{text-align:center;padding:40px 0}
.not-found .big{font-size:5rem;font-weight:800;color:#2563eb;line-height:1}
.search-form{display:flex;gap:8px;max-width:480px;margin:18px auto}
.search-form input{flex:1;padding:12px 14px;border:1px solid #cbd5e1;border-radius:9px;font-size:1rem}
.search-form button{padding:12px 20px;border:0;border-radius:9px;background:#2563eb;color:#fff;font-weight:700;cursor:pointer}

/* ============ Language switcher ============ */
.lang-switcher{display:flex;align-items:center;gap:8px;font-size:.88rem;font-weight:600;white-space:nowrap;flex-shrink:0}
.lang-switcher a{color:#334155;padding:6px 8px;border-radius:8px}
.lang-switcher a:hover{background:#eff6ff;color:#2563eb;text-decoration:none}
.lang-switcher .current-lang a,.lang-switcher a.current-lang,.lang-switcher a[aria-current="page"],.lang-switcher a[aria-current="true"]{background:#eff6ff;color:#2563eb}
.lang-switcher ul{display:flex;gap:4px;list-style:none;margin:0;padding:0}
.lang-switcher li{display:flex;align-items:center}
.lang-switcher img{width:18px;height:auto;margin-right:4px}

/* ============ Tool categories ============ */
.tool-group{margin-bottom:36px}
.tool-group h2{margin-bottom:.3em}
.tool-group .category-desc{color:#64748b;max-width:720px;margin-bottom:20px}

/* ============ Long SEO content (homepage) ============ */
.seo-content{background:#fff;border-top:1px solid #e2e8f0}
.seo-content .container{max-width:820px}
.seo-content h2{margin-top:1.6em}
.seo-content h2:first-child{margin-top:0}
.seo-content h3{margin-top:1.2em}
.seo-content ol,.seo-content ul{margin:0 0 1em;padding-left:1.4em}
.seo-content li{margin-bottom:.45em}
.seo-content .faq-item{margin-bottom:1.2em}
.seo-content .faq-item h3{margin-bottom:.25em}

/* ============ Responsive ============ */
/* v1.7.0: the hamburger menu now appears at 1100px, not 640px. At 641–
   1100px (tablet) the old theme showed the full 8-item nav + switcher in
   one row, overflowing ~1200–1300px of content into a 768px viewport
   with About/Contact/switcher hidden off-screen and no Menu button.
   At <=1100px the header is one compact row (logo + Menu button); the
   nav opens as a dropdown panel below it, and the language switcher
   sits at the bottom of that panel (it lives inside <nav> in
   header.php), so logo, menu and language are all in one place. */
@media (max-width:1100px){
  .menu-toggle{display:block}
  .site-brand{flex-shrink:1}
  .brand-name{overflow:hidden;text-overflow:ellipsis}
  .main-nav{display:none;width:100%;flex:0 0 100%;flex-direction:column;align-items:stretch;gap:0}
  .main-nav.open{display:flex;border-top:1px solid #e2e8f0}
  .main-nav ul{flex-direction:column;padding:10px 0 8px}
  .main-nav a{padding:10px 4px}
  .lang-switcher{justify-content:flex-start;padding:6px 0 14px;border-top:1px solid #eef2f7;font-size:.85rem}
  .header-inner{flex-wrap:wrap;row-gap:0;padding-top:8px;padding-bottom:8px;min-height:56px}
}
@media (max-width:900px){
  .tools-grid{grid-template-columns:repeat(2,1fr)}
  .footer-inner{grid-template-columns:1fr 1fr}
  .hero h1{font-size:2rem}
}
@media (max-width:640px){
  body{font-size:16px}
  .tools-grid{grid-template-columns:1fr}
  .footer-inner{grid-template-columns:1fr}
  .site-brand .custom-logo{height:40px}
  .site-brand img.custom-logo{width:40px!important;height:40px!important;max-width:40px!important;max-height:40px!important}
  .hero{padding:44px 16px 40px}
  .hero h1{font-size:1.7rem}
  .page-card,.post-card{padding:22px}
  .hero-search{flex-direction:column}
}
