/* ipo.css - Chittorgarh-inspired styles and responsive layout */
:root{
  --bg:#f6f8fb;
  --card-bg:#fff;
  --accent:#1a57d8;
  --muted:#777;
  --nav:#0a1a2f;
}

*{box-sizing:border-box}
body{font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; background:var(--bg); margin:0; color:#0b2340; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;}

.navbar{background:var(--nav); color:#fff; display:flex; align-items:center; justify-content:space-between; padding:14px 20px; position:sticky; top:0; z-index:40}
.logo{font-weight:800; font-size:20px}
.logo .muted{font-weight:600; font-size:11px; opacity:0.85}

.desktop-nav a{color:#fff; text-decoration:none; margin-left:18px; font-weight:600}
.menu-btn{display:none; cursor:pointer}

@media(max-width:768px){ .desktop-nav{display:none} .menu-btn{display:block} .mobile-menu{display:none} }

.mobile-menu{background:var(--nav); padding:12px 18px}

.cta{padding:48px 20px; background: linear-gradient(135deg,#eef3ff,#fff); margin-bottom:10px}
.cta h1{font-size:34px; margin:0 0 8px; color:#07102a}
.cta p{margin:0 0 12px; color:#415069}
.cta .cta-btn{display:inline-block;background:var(--accent); color:#fff; padding:10px 14px; border-radius:8px; text-decoration:none; font-weight:700}

.section{max-width:1100px; margin:24px auto; padding:0 16px}

.ipo-grid{display:grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap:18px}
.ipo-card{background:var(--card-bg); padding:16px; border-radius:12px; box-shadow:0 6px 18px rgba(10,26,47,0.06)}
.ipo-card h3{margin:0 0 6px; font-size:16px}

.muted{color:var(--muted)}

/* Chittorgarh list layout */
.chittorgarh-wrap{display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:12px}
.ch-card{background:var(--card-bg); border-radius:10px; padding:8px 12px; box-shadow:0 2px 10px rgba(10,26,47,0.04)}
.ch-card h3{margin:10px 6px; font-size:18px}
.ch-list{list-style:none; margin:0; padding:0}
.ch-list li{display:flex; justify-content:space-between; align-items:center; padding:10px 12px; border-bottom:1px solid #f0f0f3}
.ch-list li a{color:var(--accent); text-decoration:none; font-weight:600}
.ch-list li .dates{color:#445; text-align:right; min-width:84px}
.ch-list li .dates .short{display:block; font-size:13px}
.ch-list li .dates .small{display:block; font-size:12px; color:#777; margin-top:4px}
.ch-list li:nth-child(odd){background:linear-gradient(180deg,#fbfbfd,#fff)}

/* NSE-style table (improved) */
.ipo-table{width:100%; border-collapse:collapse; background:var(--card-bg); border-radius:8px; overflow:hidden; font-size:14px}
.ipo-table th{background:#2e2a72; color:#fff; padding:12px; text-align:left}
.ipo-table td{padding:12px; border-bottom:1px solid #eee}
.ipo-table tr:hover{background:#fbfbff}
.ipo-table a{color:var(--accent)}

/* table cards (if used) */
.table-grid{display:grid; grid-template-columns:1fr 1fr; gap:18px}
.table-card{background:var(--card-bg); padding:12px; border-radius:10px; box-shadow:0 6px 18px rgba(10,26,47,0.05)}

/* footer */
.footer{background:var(--nav); color:#fff; padding:14px 18px; text-align:center; margin-top:28px; font-size:13px}

/* responsive tweaks */
@media(max-width:900px){ .chittorgarh-wrap{grid-template-columns:1fr} .table-grid{grid-template-columns:1fr} .ch-list li{padding:10px} }

/* new: show all JSON fields neatly without breaking card layout */
.ch-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f6;
}

.ch-left {
  max-width: calc(100% - 160px); /* leave room for right-side date */
}

.ch-title {
  display: inline-block;
  color: #1557d6;
  text-decoration: none;
  margin-bottom: 6px;
}

.extra-fields {
  margin-top: 6px;
  font-size: 13px;
  color: #444;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 18px;
}

.extra-row { line-height: 1.4; color: #444; }
.extra-row .label { color:#666; font-weight:600; margin-right:4px; }
.dates { text-align: right; min-width:140px; white-space:nowrap; color:#666; }

/* --- Alignment fix for extended IPO fields --- */

.ch-list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* IMPORTANT: top align */
  gap: 20px;
}

/* Left content */
.ch-left {
  flex: 1;
  min-width: 0;
}

.ch-title {
  display: inline-block;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Extra fields grid */
.extra-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 6px;
  font-size: 13px;
}

/* Each row */
.extra-row {
  display: flex;
  gap: 4px;
  line-height: 1.4;
  white-space: normal;
}

.extra-row .label {
  color: #666;
  font-weight: 600;
  text-transform: lowercase;
}

.extra-row .val {
  color: #333;
}

/* Right side (date / price) */
.dates {
  min-width: 140px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.dates .short {
  font-weight: 600;
  color: #111;
}

.dates .small {
  font-size: 12px;
  color: #666;
}

