/* =========================================================
   CivilToolsIndia.com - Clean Responsive Stylesheet
   Mobile-first, tablet-friendly and desktop-friendly
   ========================================================= */

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

html{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
  overflow-x:hidden;
  scroll-behavior:smooth;
}

body{
  width:100%;
  max-width:100%;
  margin:0;
  padding:0;
  overflow-x:hidden;
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  color:#172033;
  background:#fff;
  line-height:1.6;
}

img,svg,video,canvas{max-width:100%;height:auto}
button,input,textarea,select{font:inherit}
a{color:inherit;text-decoration:none}
h1,h2,h3,h4,p{overflow-wrap:break-word}
main,header,footer,section,div{min-width:0}

.container{
  width:100%;
  max-width:1120px;
  margin:0 auto;
  padding-left:20px;
  padding-right:20px;
}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  width:100%;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid #e9edf3;
  backdrop-filter:blur(10px);
}

.nav{
  min-height:70px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.logo{
  display:inline-block;
  flex:0 0 auto;
  white-space:nowrap;
  font-size:23px;
  font-weight:900;
  line-height:1;
  letter-spacing:-.7px;
}

.logo span{color:#f97316}

.nav nav{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:28px;
  min-width:0;
}

.nav nav a{
  display:block;
  padding:8px 0;
  color:#596579;
  font-size:17px;
  font-weight:700;
  white-space:nowrap;
}

.nav nav a:hover,
.nav nav a.active{color:#f97316}

.menu{
  display:none;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid #e1e6ed;
  border-radius:10px;
  background:#fff;
  color:#172033;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}

/* Hero */
.hero{
  width:100%;
  padding:78px 0;
  background:linear-gradient(135deg,#fffaf4 0%,#f8fafc 100%);
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(0,.85fr);
  align-items:center;
  gap:56px;
}

.hero-copy{min-width:0}

.eyebrow{
  margin:0 0 12px;
  color:#f97316;
  font-size:12px;
  font-weight:900;
  letter-spacing:1.6px;
  line-height:1.3;
}

.hero h1{
  margin:0 0 20px;
  max-width:650px;
  font-size:clamp(42px,5.2vw,68px);
  line-height:1.02;
  letter-spacing:-2.5px;
}

.lead{
  max-width:650px;
  margin:0;
  color:#637083;
  font-size:18px;
  line-height:1.65;
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:28px;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 19px;
  border:1px solid transparent;
  border-radius:10px;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
  text-align:center;
}

.btn.primary{background:#f97316;color:#fff}
.btn.primary:hover{background:#ea650d}
.btn.ghost{background:#fff;border-color:#dce2ea;color:#172033}
.btn.ghost:hover{border-color:#f97316;color:#f97316}

.hero-card{
  width:100%;
  min-width:0;
  padding:32px;
  border-radius:22px;
  background:#172033;
  color:#fff;
  box-shadow:0 22px 60px rgba(23,32,51,.15);
}

.hero-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.hero-badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 10px;
  border-radius:999px;
  background:#f97316;
  color:#fff;
  font-size:11px;
  font-weight:900;
  letter-spacing:1px;
}

.hero-symbol{
  flex:0 0 auto;
  font-size:38px;
  line-height:1;
}

.hero-card h2{
  margin:20px 0 12px;
  color:#fff;
  font-size:31px;
  line-height:1.2;
}

.hero-card p{
  margin:0;
  color:#cbd3df;
  font-size:16px;
  line-height:1.7;
}

.mini-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-top:28px;
}

.mini-stats div{
  min-width:0;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.15);
}

.mini-stats b{
  display:block;
  color:#fff;
  font-size:22px;
  line-height:1.2;
}

.mini-stats span{
  display:block;
  margin-top:3px;
  color:#b8c2d0;
  font-size:12px;
}

/* Sections */
.section{
  width:100%;
  padding:70px 0;
}

.soft{background:#f8fafc}

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:25px;
  margin-bottom:28px;
}

.section h2{
  margin:0 0 8px;
  font-size:clamp(28px,4vw,36px);
  line-height:1.15;
  letter-spacing:-.7px;
}

.muted{color:#687487}
.learn{color:#f97316;font-size:14px;font-weight:900}
.learn:hover{color:#d95708}

/* Tool grid */
.tool-grid{
  width:100%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}

.tool-card{
  width:100%;
  min-width:0;
  min-height:250px;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:flex-start!important;
  padding:22px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 5px 22px rgba(23,32,51,.045);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
  overflow:hidden;
}

.tool-card:hover{
  transform:translateY(-3px);
  border-color:#fdba74;
  box-shadow:0 14px 32px rgba(23,32,51,.09);
}

.tool-card-top{
  width:100%;
  min-width:0;
  display:flex!important;
  align-items:center!important;
  gap:12px;
  margin-bottom:14px;
}

.tool-icon{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  flex:0 0 34px;
  width:34px;
  height:34px;
  font-size:25px;
  line-height:1;
}

.tag{
  display:block;
  color:#f97316;
  font-size:11px;
  font-weight:900;
  line-height:1.2;
  letter-spacing:1.3px;
  text-transform:uppercase;
}

.tool-card h3{
  width:100%;
  min-width:0;
  min-height:50px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  margin:0 0 9px;
  color:#172033;
  font-size:19px;
  line-height:1.3;
}

.tool-card p{
  width:100%;
  min-width:0;
  min-height:68px;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
  margin:0;
  color:#687487;
  font-size:14px;
  line-height:1.6;
}

.tool-card .learn{
  width:100%;
  margin-top:auto;
  padding-top:16px;
}

/* Categories */
.category-cards{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.category-cards a{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:7px;
  padding:22px;
  border:1px solid #e3e8ef;
  border-radius:16px;
  background:#fff;
  transition:.18s;
}

.category-cards a:hover{
  transform:translateY(-2px);
  border-color:#fdba74;
  box-shadow:0 10px 25px rgba(23,32,51,.07);
}

.category-cards strong{font-size:17px}
.category-cards span{color:#687487;font-size:14px}

/* Content/info */
.info-grid{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);
  align-items:start;
  gap:60px;
}

.content-page{width:100%;max-width:900px}
.content-page h2{margin-top:34px}
.content-page p,.content-page li{overflow-wrap:anywhere}

.info-card{
  width:100%;
  padding:26px;
  border:1px solid #e3e8ef;
  border-radius:18px;
  background:#fff;
  box-shadow:0 10px 30px rgba(23,32,51,.06);
}

.info-card h3{margin:0 0 15px;font-size:22px}
.info-card ul{margin:0 0 22px;padding-left:20px;color:#596579}
.info-card li{margin:8px 0}

/* FAQ */
.narrow{
  width:100%;
  max-width:850px;
  margin-left:auto;
  margin-right:auto;
}

.faq details{
  border:1px solid #e1e6ed;
  border-radius:10px;
  padding:15px 18px;
  margin:10px 0;
  background:#fff;
}

.faq summary{
  color:#172033;
  font-weight:800;
  cursor:pointer;
}

/* Forms */
.form{
  width:100%;
  max-width:650px;
  display:grid;
  gap:14px;
}

.form input,.form textarea,
.search{
  width:100%;
  min-width:0;
  padding:14px;
  border:1px solid #dbe1e9;
  border-radius:10px;
  background:#fff;
  color:#172033;
}

.form textarea{min-height:140px;resize:vertical}
.form input:focus,.form textarea:focus,.search:focus{
  outline:none;
  border-color:#f97316;
  box-shadow:0 0 0 3px rgba(249,115,22,.13);
}

.search{
  display:block;
  margin:24px 0;
  font-size:16px;
}

/* Calculator */
.tool-page{width:100%;max-width:900px;margin:0 auto}
.calculator{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);
  align-items:stretch;
  gap:24px;
  margin:30px 0 0;
}

.calculator form,
.result{
  width:100%;
  min-width:0;
  padding:26px;
  border:1px solid #e2e7ee;
  border-radius:18px;
  background:#fff;
}

.calculator form{
  display:grid;
  gap:18px;
  align-content:start;
}

.calculator #fields{
  width:100%;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
}

.calculator label{
  display:block;
  min-width:0;
  color:#172033;
  font-size:14px;
  font-weight:800;
}

.calculator input{
  display:block;
  width:100%;
  min-width:0;
  min-height:48px;
  margin-top:6px;
  padding:12px;
  border:1px solid #d6dde7;
  border-radius:9px;
  background:#fff;
}

.calculator .btn{width:100%}

.result{
  min-height:220px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  overflow-wrap:anywhere;
  background:#172033;
  color:#fff;
}

.result b{
  color:#fdba74;
  font-size:32px;
}

.result p,.result small{color:#c8d0dc}

.formula,.notice{
  width:100%;
  min-width:0;
  overflow-x:auto;
}

.formula{
  margin:15px 0;
  padding:18px;
  border:1px solid #e5eaf0;
  border-radius:12px;
  background:#f8fafc;
  font-weight:700;
}

.notice{
  margin-top:20px;
  padding:18px;
  border-left:4px solid #f97316;
  border-radius:8px;
  background:#fff7ed;
  color:#5e4b3d;
}

/* Footer */
footer{
  width:100%;
  margin-top:40px;
  padding:48px 0 0;
  background:#111827;
  color:#cbd5e1;
}

.footer-grid{
  display:grid;
  grid-template-columns:2fr repeat(3,minmax(0,1fr));
  gap:30px;
}

.footer-grid h4{margin:0 0 12px;color:#fff}
.footer-grid a{display:block;margin:8px 0}
.footer-grid p{max-width:360px}

.copyright{
  margin-top:30px;
  padding-top:18px;
  padding-bottom:18px;
  border-top:1px solid #263142;
  color:#8d99aa;
  font-size:13px;
}

/* Tablet */
@media (max-width:1000px){
  .container{padding-left:18px;padding-right:18px}
  .hero-grid{grid-template-columns:minmax(0,1fr) minmax(280px,.8fr);gap:34px}
  .tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .category-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Mobile navigation/tablet */
@media (max-width:850px){
  .nav{min-height:64px}
  .menu{display:inline-flex;align-items:center;justify-content:center}
  .nav nav{
    display:none;
    position:absolute;
    top:64px;
    left:0;
    right:0;
    width:100%;
    padding:10px 18px 16px;
    border-bottom:1px solid #e3e8ef;
    background:#fff;
    box-shadow:0 12px 30px rgba(23,32,51,.08);
    flex-direction:column;
    align-items:stretch;
    gap:0;
  }
  .nav nav.open{display:flex}
  .nav nav a{padding:12px 0;border-bottom:1px solid #f0f2f5}
  .hero{padding:58px 0}
  .hero-grid{grid-template-columns:1fr;gap:34px}
  .hero h1{font-size:clamp(40px,8vw,58px)}
  .info-grid{grid-template-columns:1fr;gap:30px}
  .calculator{grid-template-columns:1fr}
}

/* Phone */
@media (max-width:600px){
  .container{padding-left:14px;padding-right:14px}
  .hero{padding:46px 0}
  .hero h1{font-size:clamp(34px,10vw,45px);letter-spacing:-1.5px}
  .lead{font-size:16px}
  .actions{flex-direction:column;align-items:stretch}
  .btn{width:100%}
  .hero-card{padding:22px;border-radius:18px}
  .hero-card h2{font-size:26px}
  .mini-stats{gap:8px}
  .mini-stats b{font-size:18px}
  .section{padding:48px 0}
  .section-head{display:block;margin-bottom:22px}
  .section-head .learn{display:inline-block;margin-top:6px}
  .tool-grid,.category-cards{grid-template-columns:1fr}
  .tool-card{min-height:0;padding:19px}
  .tool-card h3{min-height:0;font-size:18px}
  .tool-card p{min-height:0}
  .calculator #fields{grid-template-columns:1fr}
  .calculator form,.result{padding:20px}
  .footer-grid{grid-template-columns:1fr}
}

/* Small phones */
@media (max-width:380px){
  .container{padding-left:11px;padding-right:11px}
  .logo{font-size:20px}
  .hero h1{font-size:32px}
  .hero-card h2{font-size:24px}
}
