/* ============================================
   AboutNearMe — Main Stylesheet
   ============================================ */

:root {
  --green:       #1D9E75;
  --green-dark:  #0F6E56;
  --green-light: #E1F5EE;
  --blue:        #185FA5;
  --blue-light:  #E6F1FB;
  --bg:          #F5F5F3;
  --bg-card:     #FFFFFF;
  --bg-sec:      #F1EFE8;
  --border:      rgba(0,0,0,0.10);
  --border-hover:rgba(0,0,0,0.22);
  --text:        #1A1A18;
  --text-muted:  #5F5E5A;
  --text-hint:   #92908A;
  --radius:      10px;
  --radius-lg:   14px;
  --shadow:      0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
  --transition:  0.15s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font: inherit; }
textarea, input, select { font: inherit; }

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--green); color: #fff; padding: 8px 16px;
  border-radius: var(--radius); z-index: 9999;
}
.skip-link:focus { top: 1rem; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.layout-two-col {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 20px;
  align-items: start;
}

.section { padding: 2rem 0; }
.section-title {
  font-size: 18px; font-weight: 600; margin-bottom: 1rem;
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

/* ── Header ── */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  display: flex; align-items: center; gap: 1rem;
  height: 60px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px; white-space: nowrap; flex-shrink: 0;
}
.logo-dot { width: 9px; height: 9px; background: var(--green); border-radius: 50%; }

.header-search {
  flex: 1; max-width: 440px; position: relative;
}
.header-search input {
  width: 100%; padding: 8px 12px 8px 36px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-sec); outline: none; font-size: 14px;
  transition: border-color var(--transition);
}
.header-search input:focus { border-color: var(--green); }
.header-search i {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-hint); font-size: 16px; pointer-events: none;
}

.header-nav { display: flex; gap: 2px; margin-left: auto; }
.header-nav a {
  font-size: 13.5px; color: var(--text-muted); padding: 6px 11px;
  border-radius: var(--radius); transition: background var(--transition), color var(--transition);
}
.header-nav a:hover { background: var(--bg-sec); color: var(--text); }

.mobile-menu-btn {
  display: none; background: none; border: none;
  font-size: 22px; color: var(--text); padding: 4px;
}

.mobile-nav {
  display: none; border-top: 1px solid var(--border); background: var(--bg-card);
}
.mobile-nav .container { display: flex; flex-direction: column; padding: 1rem 1.5rem; gap: 2px; }
.mobile-nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 8px;
  border-radius: var(--radius); color: var(--text); font-size: 14px;
}
.mobile-nav a:hover { background: var(--bg-sec); }
.mobile-nav.open { display: block; }

/* ── Hero ── */
.hero {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
}
.hero h1 { font-size: 36px; font-weight: 700; letter-spacing: -.5px; margin-bottom: .5rem; }
.text-green { color: var(--green); }
.hero-sub { font-size: 16px; color: var(--text-muted); margin-bottom: 1.8rem; }
.hero-search {
  display: flex; gap: 10px; max-width: 580px;
  margin-bottom: 1.2rem; position: relative;
}
.hero-search i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-hint); font-size: 18px; pointer-events: none;
}
.hero-search input {
  flex: 1; padding: 13px 14px 13px 44px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-sec); font-size: 15px; outline: none;
  transition: border-color var(--transition);
}
.hero-search input:focus { border-color: var(--green); }
.hero-search button {
  background: var(--green); color: #fff; border: none;
  border-radius: var(--radius); padding: 13px 24px;
  font-size: 15px; font-weight: 600; flex-shrink: 0;
  transition: background var(--transition);
}
.hero-search button:hover { background: var(--green-dark); }

.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 20px; font-size: 13px;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--bg-sec); transition: border-color var(--transition), color var(--transition);
}
.chip:hover { border-color: var(--green); color: var(--green); }

/* ── Category Grid ── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 10px; }
.cat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.1rem;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-hover); }
.cat-icon { width: 42px; height: 42px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; font-size: 20px; }
.cat-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.cat-card p  { font-size: 12px; color: var(--text-hint); }

/* ── Posts Grid ── */
.posts-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.posts-grid-3 { grid-template-columns: repeat(3,1fr); }

.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex; flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow); border-color: var(--border-hover); }
.post-card > img { width: 100%; height: 160px; object-fit: cover; }
.post-body { padding: 1rem; flex: 1; }
.post-body h3 { font-size: 14px; font-weight: 600; line-height: 1.45; margin-bottom: 6px; }
.post-body p  { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

.post-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}
.post-meta {
  display: flex; gap: 12px; font-size: 12px; color: var(--text-hint);
  margin-top: 10px;
}
.post-meta i { font-size: 13px; }

/* Post list (search) */
.posts-list { display: flex; flex-direction: column; gap: 10px; }
.post-list-item {
  display: flex; gap: 1rem;
  transition: box-shadow var(--transition); cursor: pointer;
}
.post-list-item:hover { box-shadow: var(--shadow); }
.post-list-item > img { width: 160px; height: 100px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.post-list-body { flex: 1; }
.post-list-body h2 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }

/* ── Sidebar ── */
.widget { margin-bottom: 14px; }
.widget-title { font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }

.sidebar-post {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text); transition: color var(--transition);
}
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post:hover { color: var(--green); }
.views-count { font-size: 12px; color: var(--text-hint); flex-shrink: 0; margin-left: 8px; }

.sidebar-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 13.5px; color: var(--text); transition: color var(--transition);
}
.sidebar-link:last-child { border-bottom: none; }
.sidebar-link:hover, .sidebar-link.active { color: var(--green); }
.badge-count {
  font-size: 11px; padding: 2px 9px; border-radius: 20px;
  background: var(--bg-sec); color: var(--text-hint); flex-shrink: 0;
}

/* ── IFSC Widget ── */
.ifsc-widget .ifsc-widget-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.2rem; }
.ifsc-widget h2 { font-size: 17px; font-weight: 600; margin-bottom: 3px; }
.ifsc-widget .desc { font-size: 13px; color: var(--text-muted); }

.ifsc-form .form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.ifsc-result-header { margin-bottom: 1rem; }
.ifsc-result-header h2 { font-size: 20px; }
.ifsc-code-box {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-sec); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 1rem;
  font-family: monospace; font-size: 22px; font-weight: 700; letter-spacing: .05em;
}
.ifsc-details { display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex; padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 130px; flex-shrink: 0; color: var(--text-muted); font-weight: 500; }
.detail-value { flex: 1; }

.ifsc-results-list { display: flex; flex-direction: column; gap: 8px; }
.ifsc-row-item {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  transition: box-shadow var(--transition);
}
.ifsc-row-item:hover { box-shadow: var(--shadow); }
.ifsc-code-pill {
  font-family: monospace; font-size: 14px; font-weight: 700;
  background: var(--blue-light); color: var(--blue);
  padding: 4px 12px; border-radius: 20px; flex-shrink: 0;
}

/* ── Category Hero ── */
.cat-hero { background: var(--bg-card); padding: 2rem 0 1.5rem; }
.cat-hero-inner { display: flex; align-items: center; gap: 1.2rem; }
.cat-icon-lg {
  width: 60px; height: 60px; border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.cat-hero-inner h1 { font-size: 26px; font-weight: 700; margin-bottom: 4px; }

/* ── Post Page ── */
.post-header { margin-bottom: 1rem; }
.post-header h1 { font-size: 26px; font-weight: 700; line-height: 1.35; margin-bottom: .75rem; }
.post-image { margin-bottom: 1rem; border-radius: var(--radius-lg); overflow: hidden; }
.post-image img { width: 100%; max-height: 450px; object-fit: cover; }

.post-content {
  font-size: 15px; line-height: 1.8;
}
.post-content h2 { font-size: 20px; font-weight: 600; margin: 1.5rem 0 .75rem; }
.post-content h3 { font-size: 17px; font-weight: 600; margin: 1.2rem 0 .6rem; }
.post-content p  { margin-bottom: 1rem; }
.post-content ul, .post-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.post-content li { margin-bottom: .4rem; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.post-content td, .post-content th { border: 1px solid var(--border); padding: 8px 12px; font-size: 14px; }
.post-content th { background: var(--bg-sec); font-weight: 600; }
.post-content a { color: var(--green); text-decoration: underline; }
.post-content img { border-radius: var(--radius); margin: .5rem 0; }

.post-share { display: flex; align-items: center; gap: 10px; }
.post-share a, .post-share button {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-sec); border: 1px solid var(--border);
  color: var(--text); font-size: 17px; transition: background var(--transition);
}
.post-share a:hover, .post-share button:hover { background: var(--green); color: #fff; border-color: var(--green); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius); font-size: 14px;
  font-weight: 500; border: 1px solid transparent; transition: all var(--transition);
  cursor: pointer;
}
.btn-green  { background: var(--green); color: #fff; border-color: var(--green); }
.btn-green:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-sec); }
.btn-full { width: 100%; justify-content: center; }

/* ── Badges ── */
.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
}
.badge-blue { background: var(--blue-light); color: var(--blue); }

/* ── Forms ── */
.form-group { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.form-row .form-group { min-width: 140px; }
input[type="text"], input[type="email"], input[type="url"], input[type="search"],
input[type="password"], input[type="number"], select, textarea {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 9px 12px; font-size: 14px; background: var(--bg-sec);
  color: var(--text); outline: none; width: 100%;
  transition: border-color var(--transition);
}
input:focus, select:focus, textarea:focus { border-color: var(--green); }
textarea { resize: vertical; min-height: 80px; }
.req { color: #E53E3E; }

.search-bar-lg { display: flex; gap: 10px; position: relative; }
.search-bar-lg i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-hint); }
.search-bar-lg input { padding-left: 40px; flex: 1; }

/* ── Alerts ── */
.alert {
  padding: 12px 16px; border-radius: var(--radius); margin-bottom: 1rem;
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.alert-success { background: var(--green-light); color: var(--green-dark); }
.alert-danger   { background: #FEE2E2; color: #991B1B; }
.alert-info     { background: var(--blue-light); color: var(--blue); }

/* ── Pagination ── */
.pagination { display: flex; gap: 5px; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: 13px; color: var(--text); transition: all var(--transition);
}
.page-btn:hover { background: var(--bg-sec); }
.page-btn.active { background: var(--green); color: #fff; border-color: var(--green); }
.page-dots { display: flex; align-items: center; color: var(--text-hint); padding: 0 4px; }

/* ── Breadcrumb ── */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; font-size: 13px; }
.breadcrumb li { display: flex; align-items: center; gap: 4px; color: var(--text-muted); }
.breadcrumb li:not(:last-child)::after { content: '›'; color: var(--text-hint); }
.breadcrumb li a { color: var(--text-muted); }
.breadcrumb li a:hover { color: var(--green); }
.breadcrumb li.current { color: var(--text); }

/* ── FAQ ── */
.faq-item { margin-bottom: 8px; padding: 0; overflow: hidden; }
.faq-question {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; background: none; border: none;
  font-size: 15px; font-weight: 500; text-align: left; color: var(--text);
}
.faq-question i { flex-shrink: 0; transition: transform .2s; font-size: 18px; color: var(--text-hint); }
.faq-answer { padding: 0 1.25rem 1rem; font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }
.empty-state i { font-size: 48px; margin-bottom: 1rem; display: block; color: var(--border-hover); }
.results-count { font-size: 14px; color: var(--text-muted); margin-left: 10px; }

/* ── Featured grid ── */
.featured-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 1.5rem; }
.featured-card { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-card); display: block; }
.featured-card img { width: 100%; height: 140px; object-fit: cover; }
.featured-body { padding: .75rem 1rem; }
.featured-body h3 { font-size: 13px; font-weight: 600; line-height: 1.4; }

/* ── Copy button ── */
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius); font-size: 13px;
  background: var(--green); color: #fff; border: none; font-weight: 500;
  transition: background var(--transition);
}
.copy-btn:hover { background: var(--green-dark); }

/* ── Contact form ── */
.contact-form textarea { min-height: 140px; }

/* ── Footer ── */
.site-footer { background: var(--bg-card); border-top: 1px solid var(--border); margin-top: 2rem; }
.footer-inner { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 2.5rem 0; }
.footer-brand p { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.footer-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-hint); margin-bottom: 10px; }
.footer-col a { display: block; font-size: 13.5px; color: var(--text-muted); padding: 3px 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--green); }
.footer-bottom { border-top: 1px solid var(--border); padding: 1rem 0; text-align: center; }
.footer-bottom p { font-size: 12px; color: var(--text-hint); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .layout-two-col { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
  .featured-grid { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: block; margin-left: auto; }
  .hero h1 { font-size: 26px; }
  .hero-search { flex-direction: column; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid-3 { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2,1fr); }
  .sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .container { padding: 0 1rem; }
  .hero { padding: 2rem 0 1.5rem; }
  .hero h1 { font-size: 22px; }
  .post-header h1 { font-size: 20px; }
  .post-list-item > img { display: none; }
}
