/*
Theme Name: Astra Custom FreeOnlineTool
Theme URI: https://onlinefreetool.in
Description: Modern India-first tools redesign for Astra
Version: 2.0.0
*/

:root {
  --saffron: #FF9933;
  --saffron-dark: #e67e17;
  --saffron-light: #fff7ed;
  --green: #138808;
  --ink: #1e293b;
  --ink-dark: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft-bg: #f8fafc;
  --white: #ffffff;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  --max-width: 1240px;
  --header-height: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.container { width: min(var(--max-width), calc(100% - 48px)); margin-inline: auto; }

/* Top Tricolor */
.top-tricolor {
  height: 4px;
  width: 100%;
  background: linear-gradient(90deg, var(--saffron) 0% 33.33%, #ffffff 33.33% 66.66%, var(--green) 66.66% 100%);
  border-bottom: 1px solid #efefef;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 90;
}
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-text-group { display: flex; flex-direction: column; }
.brand-title { font-size: 1.42rem; font-weight: 850; letter-spacing: -0.03em; color: var(--ink-dark); line-height: 1.15; }
.brand-title .dotin { color: var(--saffron); }
.brand-sub { font-size: 0.72rem; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.04em; }

.main-nav { display: flex; align-items: center; }
.nav-list { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-link { font-size: 0.95rem; font-weight: 650; color: #475569; padding: 8px 2px; }
.nav-link:hover, .nav-link.active { color: var(--ink-dark); }

.has-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(10px);
  width: 320px; background: #ffffff; border: 1px solid var(--line); border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1); padding: 8px 0; list-style: none;
  opacity: 0; visibility: hidden; transition: all 0.2s ease; z-index: 100;
}
.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(4px); }
.dropdown-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 16px; }
.dropdown-item:hover { background: var(--soft-bg); }

.btn-header-cta {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff; font-size: 0.88rem; font-weight: 700; padding: 9px 18px;
  border-radius: var(--radius-pill); box-shadow: 0 4px 14px rgba(15,23,42,0.12);
}

/* Hero */
.hero { text-align: center; padding: 56px 0 28px; }
.hero-title { font-size: clamp(32px, 4.3vw, 56px); line-height: 1.12; margin: 0 auto 16px; letter-spacing: -1.8px; max-width: 960px; font-weight: 850; color: var(--ink-dark); }
.hero-title .saffron { color: var(--saffron); }
.hero-title .green { color: var(--green); }
.hero-subtitle { margin: 0 auto; max-width: 840px; font-size: clamp(16px, 1.8vw, 21px); color: var(--muted); line-height: 1.5; }

.promise { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; color: #475569; font-size: 0.92rem; font-weight: 650; }
.promise-item::before { content: "✓ "; color: var(--green); font-weight: 900; }

/* Filters */
.filters { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 16px 0 24px; }
.filter-pill {
  border: 1px solid #d4d4d8; color: #52525b; background: #ffffff; border-radius: var(--radius-pill);
  padding: 8px 18px; font-size: 0.92rem; font-weight: 700; display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; position: relative; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.filter-pill .pill-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Hover effect: lift and drop-shadow glow */
.filter-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
  border-color: #a1a1aa;
  color: #1e293b;
}

.filter-pill:hover .pill-icon {
  transform: scale(1.25) rotate(-5deg);
}

/* Active Selected state: Tricolor border gradient and glowing shadow */
.filter-pill.active {
  color: #0f172a;
  border: 2px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box,
              linear-gradient(135deg, var(--saffron) 0%, var(--green) 100%) border-box;
  box-shadow: 0 8px 20px rgba(19, 136, 8, 0.12), 
              0 6px 15px rgba(255, 153, 51, 0.08);
  transform: translateY(-1px) scale(1.03);
}

/* Press/Click effect */
.filter-pill:active {
  transform: translateY(1px) scale(0.97);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: all 0.08s ease;
}

/* Tools Grid */
.tools-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 36px; }
.tool-card {
  border: 1px solid #dedede; border-radius: var(--radius-lg); padding: 24px 22px 22px; min-height: 230px;
  background: #ffffff; display: flex; flex-direction: column; 
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              border-color 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  cursor: pointer;
}

/* Card Hover lift effect */
.tool-card:hover { 
  transform: translateY(-5px); 
}

/* Category Hover Borders and Shadow Colors */
.tool-card[data-category="property"]:hover {
  border-color: #f97316 !important;
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.12), 0 4px 8px rgba(249, 115, 22, 0.04);
}
.tool-card[data-category="government"]:hover {
  border-color: #2563eb !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12), 0 4px 8px rgba(37, 99, 235, 0.04);
}
.tool-card[data-category="vehicle"]:hover {
  border-color: #16a34a !important;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.12), 0 4px 8px rgba(22, 163, 74, 0.04);
}
.tool-card[data-category="salary"]:hover {
  border-color: #8b5cf6 !important;
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.12), 0 4px 8px rgba(139, 92, 246, 0.04);
}
.tool-card[data-category="gst"]:hover {
  border-color: #0284c7 !important;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.12), 0 4px 8px rgba(2, 132, 199, 0.04);
}
.tool-card[data-category="banking"]:hover {
  border-color: #059669 !important;
  box-shadow: 0 12px 30px rgba(5, 150, 105, 0.12), 0 4px 8px rgba(5, 150, 105, 0.04);
}

/* Card Click / Active scale press effect */
.tool-card:active {
  transform: translateY(-2px) scale(0.98);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition-duration: 0.08s;
}

.tool-icon-box { 
  width: 48px; height: 48px; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 18px; color: #ffffff; font-weight: 800; 
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
              box-shadow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tool-card:hover .tool-icon-box {
  transform: scale(1.1) rotate(2deg);
}

.icon-property { background: #f97316; }
.icon-government { background: #2563eb; }
.icon-vehicle { background: #16a34a; }
.icon-salary { background: #8b5cf6; }
.icon-gst { background: #0284c7; }
.icon-banking { background: #059669; }

.tool-title { font-size: 1.18rem; line-height: 1.25; margin: 0 0 10px; font-weight: 750; color: var(--ink-dark); }
.tool-desc { margin: 0; color: #55565c; font-size: 0.9rem; line-height: 1.45; }
.tool-tag { margin-top: auto; padding-top: 18px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: #64748b; display: flex; align-items: center; gap: 7px; }
.tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

.view-all-wrap { text-align: center; padding: 10px 0 45px; }
.btn-view-all {
  display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--saffron); color: var(--saffron-dark);
  background: #ffffff; padding: 12px 32px; border-radius: var(--radius-pill); font-size: 0.95rem; font-weight: 750;
}
.btn-view-all:hover { background: var(--saffron-light); transform: translateY(-2px); }

/* Value Section */
.section { padding: 72px 0; border-top: 1px solid #f1f5f9; }
.section-title { text-align: center; margin: 0 0 40px; font-size: clamp(28px, 3vw, 42px); font-weight: 850; color: var(--ink-dark); }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value-card { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 20px; padding: 32px; min-height: 245px; position: relative; overflow: hidden; }
.value-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--saffron) 0% 33%, #ffffff 33% 66%, var(--green) 66% 100%); }
.value-card-icon { font-size: 42px; margin-bottom: 16px; }

/* Trust */
.trust { padding: 70px 0 80px; text-align: center; }
.trust h2 { font-size: clamp(28px, 3.2vw, 42px); margin: 0 0 14px; font-weight: 850; color: var(--ink-dark); }
.trust p { max-width: 860px; margin: 0 auto; color: var(--muted); font-size: 1.1rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 60px 0 25px; background: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(4, 1fr); gap: 32px; padding-bottom: 42px; }
.footer-brand .footer-desc { color: #64748b; font-size: 0.88rem; line-height: 1.55; max-width: 290px; }
.footer-title { font-size: 0.82rem; font-weight: 800; color: #94a3b8; text-transform: uppercase; margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-links a { font-size: 0.9rem; font-weight: 550; color: #475569; }
.footer-links a:hover { color: var(--ink-dark); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; font-size: 0.82rem; color: #94a3b8; }

@media (max-width: 1050px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) { .main-nav { display: none; } .tools-grid { grid-template-columns: repeat(2, 1fr); gap: 13px; } .value-grid { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tools-grid { grid-template-columns: 1fr; } .filters { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 20px; } .filter-pill { white-space: nowrap; } .footer-grid { grid-template-columns: 1fr; } }
