/* style.css - Clean, Minimal, Responsive, Premium Upgrades */

:root{
  --primary:#0b4d8f;
  --muted:#666;
  --card:#fff;
  --bg:#f6f8fb;
  --accent:#e6f0fb;
  --max-width:980px;
}

*{box-sizing:border-box;}
body{
  font-family: 'Inter', "Segoe UI", Roboto, Arial, sans-serif;
  margin:0;
  color:#222;
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.45;
}

/* Container */
.container{
  width:92%;
  max-width:var(--max-width);
  margin:0 auto;
  padding:20px 0;
}

/* NAVIGATION */
.header{
  background:#fff;
  border-bottom:1px solid #e6e9ef;
  position:sticky;
  top:0;
  z-index:50;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 0;
  width:92%;
  max-width:var(--max-width);
  margin:0 auto;
}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:var(--primary);
}
.brand .logo{
  width:44px;
  height:44px;
  background:var(--accent);
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--primary);
  font-weight:700;
  font-size:1.2rem;
}
.nav{
  display:flex;
  gap:14px;
  align-items:center;
}
.nav a{
  color:#333;
  text-decoration:none;
  padding:8px 10px;
  border-radius:6px;
  font-weight:600;
}
.nav a:hover{ background:#f2f6fb; color:var(--primary); }
.nav a.active{ background:var(--primary); color:#fff; }

/* HERO */
.hero{
  background: linear-gradient(180deg, #fff, #fbfdff);
  border-radius:10px;
  box-shadow:0 6px 18px rgba(14,30,60,0.04);
  padding:28px;
  margin-top:18px;
}
.hero h1{ margin:0 0 6px 0; font-size:1.6rem; color:#0b3e6b; }
.hero p{ margin:0 0 14px 0; color:var(--muted); }

/* SEARCHBAR */
.searchbar{
  display:flex;
  gap:8px;
  align-items:center;
}
.searchbar input{
  flex:1;
  padding:10px 12px;
  border:1px solid #e1e6f0;
  border-radius:8px;
  font-size:15px;
}
.searchbar button{
  padding:10px 14px;
  background:var(--primary);
  color:#fff;
  border:none;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
}

/* CATEGORIES GRID */
.categories{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:18px;
}
.category-card{
  background:#fff;
  padding:16px;
  border-radius:12px;
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:#222;
  box-shadow:0 4px 12px rgba(15,30,60,0.03);
  transition:all 0.2s ease;
}
.category-card:hover{ transform:translateY(-3px); }
.cat-icon{
  width:46px;height:46px;border-radius:8px;background:var(--accent);display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--primary)
}

/* FEATURED & CARDS */
.section-title{ margin:24px 0 8px 0; font-size:1.05rem; color:#0b3e6b; }
.cards{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
.card{
  background:var(--card);
  padding:12px;
  border-radius:10px;
  box-shadow:0 4px 14px rgba(12,24,48,0.03);
  transition:all 0.2s ease;
}
.card:hover{ transform:translateY(-2px); }
.card h3{ margin:0 0 6px 0; font-size:1rem;}
.card p{ margin:0; color:var(--muted); font-size:0.95rem; }

/* LISTING ROWS */
.listing{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.list-row{
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  border:1px solid #f0f3f8;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition:all 0.2s ease;
}
.list-row:hover{
  transform:translateY(-2px);
}
.list-left{ max-width:70%; }
.list-left h4{ margin:0 0 6px 0; font-size:1rem; color:#133a63; }
.meta{ color:var(--muted); font-size:0.92rem; }

/* CTA */
.cta{
  background:linear-gradient(90deg,#e8f3ff,#fff);
  border:1px solid #d7eefe;
  padding:14px;
  border-radius:10px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}
.cta a.button{
  padding:10px 16px;
  background:var(--primary);
  color:#fff;
  border-radius:8px;
  font-weight:700;
  text-decoration:none;
  transition:0.2s;
}
.cta a.button:hover{ background:#0052d1; }

/* FOOTER */
.footer{
  margin-top:28px;
  padding:20px 0;
  color:var(--muted);
  text-align:center;
  font-size:0.95rem;
}

/* RESPONSIVE */
@media (max-width:800px){
  .categories{ grid-template-columns:repeat(2,1fr); }
  .cards{ grid-template-columns:1fr; }
  .header-inner{ padding:10px; gap:8px; }
}
@media (max-width:520px){
  .categories{ grid-template-columns:repeat(1,1fr); }
  .nav{ display:none; } /* minimal nav on mobile */
  .brand{ gap:8px; }
  .hero h1{ font-size:1.2rem; }
  .searchbar input{ width:100%; }
}

/* AUTOCOMPLETE / SUGGESTIONS */
.suggestions-box {
  margin-top: 5px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-height: 180px;
  overflow-y: auto;
  display: none;
  position: absolute;
  width: 100%;
  z-index: 50;
}
.suggestion-item {
  padding: 10px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}
.suggestion-item:hover {
  background: #f7f7f7;
}

.verified-badge {
  display:inline-block;
  background:#0b4d8f;
  color:#fff;
  font-size:0.75rem;
  font-weight:600;
  padding:2px 6px;
  border-radius:6px;
  text-transform:uppercase;
  margin-left:6px;
}

/* =========================================
   FIX FOR NATURAL TEXT FLOW IN LISTINGS
   ========================================= */
.list-left {
  min-width: 0; /* allows flex children to shrink properly */
}

.list-left h4,
.list-left .meta {
  white-space: normal; /* allow wrapping naturally */
  word-break: break-word; /* prevents long words from overflowing */
}
/* Fix listing text flow */
.list-row {
  flex-wrap: wrap; /* allow children to wrap instead of shrinking */
  align-items: flex-start; /* let text take natural height */
}

.list-left {
  max-width: 100%; /* allow full width for text */
  flex: 1 1 auto; /* allow it to grow and shrink */
}

.list-left h4,
.list-left .meta {
  white-space: normal;
  word-break: break-word;
}
