/* =====================================================
   IPOGMPIndia.in – FINAL STYLE.CSS (REPLACE FULL FILE)
   Clean • Fast • SEO + AdSense Safe • Mobile First
   ===================================================== */

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== GLOBAL OVERFLOW FIX (IMPORTANT) ===== */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f5f7fa;
  color: #222;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== LAYOUT ===== */
.container {
  width: 92%;
  max-width: 1150px;
  margin: auto;
}

/* ===== HEADER ===== */
.site-header {
  background: #0d1b2a;
  padding: 14px 0;
  border-bottom: 3px solid #1b263b;
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  display: block;
  max-width: 100%;
}

/* ===== HEADER NAV – PRO TRADER STYLE (FINAL) ===== */
.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  color: #e0e1dd;
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  padding: 6px 16px;
  position: relative;
  white-space: nowrap;
}

/* DOT SEPARATOR – IMPROVED SPACING */
.main-nav a:not(:last-child)::after {
  content: "•";
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  color: #415a77;
  font-size: 15px;
  opacity: 0.8;
}

/* HOVER + ACTIVE */
.main-nav a:hover,
.main-nav a.active {
  color: #00b4d8;
}

/* ===== HERO ===== */
.hero-clean {
  background: linear-gradient(120deg, #1b263b, #0d1b2a);
  color: white;
  padding: 55px 0;
  text-align: center;
}

.hero-clean h1 {
  font-size: 32px;
  margin-bottom: 10px;
  font-weight: 600;
}

.hero-sub {
  opacity: 0.9;
  font-size: 16px;
}

/* ===== CONTENT BOX ===== */
.content-box {
  background: #ffffff;
  padding: 26px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  border: 1px solid #edf2f7;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.content-box h2 {
  margin-bottom: 12px;
  font-size: 22px;
  color: #1b263b;
}

.content-box h3 {
  margin-top: 18px;
  font-size: 17px;
  color: #1b263b;
}

.long-content p {
  margin-bottom: 14px;
}

/* ===== IPO TABLE (MOBILE SAFE) ===== */
.ipo-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
  min-width: 520px;
}

.content-box {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ipo-table th {
  background: #1b263b;
  color: white;
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}

.ipo-table td {
  padding: 10px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.ipo-table tr:hover {
  background: #f1f5f9;
}

/* ===== GMP COLORS ===== */
.gmp-value {
  font-weight: 700;
}
.gmp-value.green { color: #0a8f3d; }
.gmp-value.red { color: #d93025; }

/* ===== TABLE LINKS ===== */
.ipo-table a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
.ipo-table a:hover {
  text-decoration: underline;
}

/* =====================================================
   ARTICLE GRID (FIXED – MATCH HTML)
   ===================================================== */
.article-grid,
.article-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
  max-width: 100%;
}

/* SAME STYLE FOR BOTH */
.article-card,
.article-preview {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  transition: all .2s ease;
}

.article-card:hover,
.article-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.article-card h3,
.article-preview h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.article-card p,
.article-preview p {
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}

.article-card a,
.article-preview a {
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.article-card a:hover,
.article-preview a:hover {
  text-decoration: underline;
}

/* =====================================================
   STOCK RESULTS CALENDAR
   ===================================================== */

.date-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 12px;
}

.date-tabs button {
  padding: 6px 12px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  cursor: pointer;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.date-tabs button.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

#results-count {
  margin: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

#results-list .result-item {
  padding: 12px 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
}

#results-list .result-item strong {
  color: #1b263b;
}

/* ===== DISCLAIMER ===== */
.disclaimer {
  font-size: 13px;
  color: #555;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 14px;
  border-radius: 8px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #0d1b2a;
  color: #cbd5e1;
  text-align: center;
  padding: 28px 0;
  margin-top: 40px;
  font-size: 14px;
}

.site-footer a {
  color: #00b4d8;
  text-decoration: none;
  margin: 0 6px;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .hero-clean h1 { font-size: 24px; }

  .header-flex {
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav a:not(:last-child)::after {
    display: none;
  }

  .content-box {
    padding: 20px;
  }
}

/* =====================================================
   STOCK MARKET NEWS – CARD STYLE
   ===================================================== */

.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 25px;
}

.news-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.12);
}

.news-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.news-content {
  padding: 16px;
}

.news-content h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.news-content h2 a {
  color: #1b263b;
  text-decoration: none;
}

.news-content h2 a:hover {
  color: #2563eb;
}

.news-meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.news-excerpt {
  font-size: 14px;
  color: #374151;
}

/* ===== PAPER TRADING DASHBOARD UI FIX ===== */

.pt-card label {
  display: block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 14px;
}

.pt-card input,
.pt-card select {
  width: 100%;
  padding: 8px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.pt-btn {
  padding: 9px 16px;
  border: none;
  color: #fff;
  background: #28a745;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin: 6px 6px 0 0;
}

.pt-btn:hover {
  opacity: 0.9;
}

.pt-btn.sell {
  background: #dc3545;
}

.pt-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.pt-card th {
  background: #1b263b;
  color: white;
  padding: 8px;
  font-size: 13px;
}

.pt-card td {
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 13px;
}

.pt-card tr:hover {
  background: #f1f5f9;
}

/* Profit / Loss colors */
.profit { color: #0a8f3d; font-weight: 700; }
.loss { color: #d93025; font-weight: 700; }

/* ===== PAPER TRADING HEADER ===== */
.pt-header {
  text-align: center;
  padding: 30px 15px 10px;
}

.pt-header h1 {
  font-size: 26px;
  color: #1b263b;
  margin-bottom: 6px;
}

.pt-header p {
  color: #6b7280;
  font-size: 14px;
}

/* Dashboard Layout */
.pt-container {
  max-width: 950px;
  margin: 25px auto;
  display: grid;
  gap: 20px;
}

/* Card look upgrade */
.pt-card table {
  display: block;
  overflow-x: auto;
  white-space: nowrap;
}

/* BUY SELL alignment */
.pt-action {
  margin-top: 15px;
}

/* Balance highlight */
#balance {
  color: #0a8f3d;
}

/* =====================================================
   HIDE IPO GMP & UPCOMING IPO TABLES ON HOME PAGE ONLY
   (AdSense Safe)
   ===================================================== */

#ipoTableBody,
#upcomingIpo2026 {
  display: none;
}

/* Extra safety – hide table wrapper */
table.ipo-table {
  display: none;
}