/* -----------------------------
   IPO Dynamic Pages UI Enhancements
------------------------------ */

/* -----------------------------
   Global Typography
------------------------------ */
.ipo-page h1 {
  margin-bottom: 20px;
  padding-bottom: 10px;
  font-size: 1.7em;
  font-weight: 700;
}

.ipo-page h2 {
  padding: 20px 0;
  font-size: 1.5em;
  color: #1818a9;
  font-weight:bold;
}

.ipo-page h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #272756;
  font-weight:bold;
}

.ipo-details,
.ipo-subscription,
.ipo-timeline {
  margin: 20px 0;
}


/* -----------------------------
   IPO Cards
------------------------------ */
.ipo-card {
  background: #fff;
  padding: 24px;
  box-shadow: 5px 3px 12px #2727561a;
  border-radius: 24px;
  height: 245px;
  display: flex;
}

.ipo-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  padding: 18px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform .2s, box-shadow .2s;
}

.ipo-card-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}


/* -----------------------------
   Company Logo
------------------------------ */
.ipo-page img.ipo-company-logo {
  border-radius: 12px;
  background: #fff;
  padding: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.ipo-logo {
    width: 100%;
    max-width: 200px;   /* desktop limit */
    height: auto;

    max-height: 100px;
    object-fit: contain;

    border-radius: 8px;
    display: block;

    margin-left: 0;    /* left aligned */
    margin-right: auto;
}


/* -----------------------------
   Generic Info Boxes
------------------------------ */
.ipo-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  min-height: 80px;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.ipo-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.ipo-box strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.ipo-box p {
  margin: 0;
  font-size: 14px;
  color: #333;
}


/* -----------------------------
   Timeline Section
------------------------------ */
/* --- IPO Timeline Wrapper --- */
.ipo-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fc;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    gap: 0;
    position: relative;
    overflow: hidden;
}

/* Horizontal Line */
.ipo-timeline::before {
    content: "";
    position: absolute;
    top: 25%;
    left: 3%;
    width: 94%;
    height: 3px;
    background: #e3e6ed;
    z-index: 1;
}

/* --- Timeline Step --- */
.ipo-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

/* Marker Circle */
.ipo-step::before {
    content: '';
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d1d5db;
    border: 3px solid white;
    display: block;
    margin: 0 auto 8px;
    position: relative;
    z-index: 3;
}

/* Label */
.ipo-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

/* Date */
.ipo-date {
    font-size: 13px;
    color: #6b7280;
}

/* --- States --- */
.ipo-step.past::before  { background: #9ca3af; }
.ipo-step.active::before { background: #2563eb; }
.ipo-step.future::before { background: #60a5fa; }

.ipo-step.active .ipo-label { color: #2563eb; }
.ipo-step.future .ipo-label { color: #60a5fa; }

/* --- Mobile Responsive (Vertical Mode) --- */
@media (max-width: 768px) {

    .ipo-timeline {
        flex-direction: column;
        padding: 20px;
    }

    .ipo-timeline::before {
        display: none;
    }

    .ipo-step {
        width: 100%;
        text-align: left;
        padding-left: 35px;
        margin-bottom: 25px;
    }

    .ipo-step:last-child {
        margin-bottom: 0;
    }

    .ipo-step::before {
        position: absolute;
        left: 0;
        top: 5px;
        transform: none;
        margin: 0;
    }
}

/* -----------------------------
   Subscription Section
------------------------------ */
.ipo-subscription {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.ipo-subscription li {
  background: #fff;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  font-weight: 600;
  font-size: .9rem;
  color: #374151;
  transition: transform .2s, box-shadow .2s;
}

.ipo-subscription li:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}


/* -----------------------------
   IPO Status Badges
------------------------------ */
.ipo-status-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    margin-top: 4px;
}

.badge-upcoming {
    background-color: #ffc107;
    color: #222;
}

.badge-open {
    background-color: #28a745;
    color: #fff;
}

.badge-closed {
    background-color: #dc3545;
    color: #fff;
}

.badge-listed {
    background-color: #007bff;
    color: #fff;
}



/* -----------------------------
   IPO FAQ Accordion
------------------------------ */
.ipo-faq-accordion {
  border-radius: 10px;
  overflow: hidden;
}

.faq-item + .faq-item {
  border-top: 1px solid #e5e7eb;
}

.faq-question {
  width: 100%;
  padding: 15px 20px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  color: #0e0e6a;
  transition: background .3s;
}

.faq-question:hover {
  background: #f3f4f6;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 20px;
  font-size: 1.2rem;
}

.faq-question.active::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s;
  padding: 0 20px;
}

.faq-answer.open {
  padding: 0px 20px;
}

.faq-answer p {
  margin: 10px 0 15px;
}


/* -----------------------------
   Lot Size Table
------------------------------ */
.ipo-lots-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-bottom: 20px;
}

.ipo-lots-table thead th {
  background: #f4f7fb;
  padding: 10px 12px;
  border: 1px solid #e9eef5;
  font-weight: 600;
}

.ipo-lots-table tbody td {
  padding: 10px 12px;
  border: 1px solid #eef2f7;
}

/* Mobile */
@media (max-width: 576px) {
  .ipo-lots-table thead { display: none; }
  .ipo-lots-table tbody tr {
    display: block;
    margin-bottom: 12px;
    border: 1px solid #eef2f7;
    border-radius: 6px;
  }
  .ipo-lots-table tbody td {
    display: block;
    width: 100%;
  }
  .ipo-lots-table tbody td:before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    padding: 8px 12px;
    background: #f7f9fb;
  }
}


/* -----------------------------
   ACF About/Strengths/Weakness
------------------------------ */
.acf-section h2 {
  padding: 10px 15px;
  border-radius: 6px;
  display: inline-block;
  font-size: 20px;
  font-weight: 600;
}

.acf-box {
  padding: 20px;
  border-radius: 8px;
  color: #333;
  margin-bottom: 20px;
}

.acf-box ul {
  padding-left: 20px;
}

.acf-box li {
  margin-bottom: 6px;
}


/* -----------------------------
   Sticky Sidebar CTA
------------------------------ */
@media (min-width: 992px) {
  .ipo-layout .col-lg-3 {
    position: relative;
  }
  .ipo-layout .sidebar-card:first-child {
    position: sticky;
    top: 100px;
    z-index: 10;
  }
}

@media (max-width: 991px) {
  .ipo-layout .sidebar-card {
    position: static;
    margin-bottom: 2rem;
  }
}
@media (max-width: 780px) {
  ipo-layout{
 flex-wrap: wrap;
 }
}
/* -----------------------------
   Responsive Adjustments
------------------------------ */
@media (max-width: 768px) {
  .ipo-card-row {
    flex-direction: column;
    text-align: center;
  }

  .ipo-actions-col {
    margin-top: 10px;
    justify-content: center;
  }

  .ipo-timeline {
    flex-direction: column;
  }
}

@media (max-width: 576px) {
  .ipo-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .ipo-header .ipo-logo {
    margin-top: -10px;
  }
}

.ipo-listing-item {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    height: 100%;
}

.ipo-listing-item label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    display: block;
}

.ipo-link span {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.ipo-card-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 8px;
    padding: 4px;
}

/* Mobile adjustments */
@media (max-width: 575px) {
    .ipo-card-logo {
        width: 36px;
        height: 36px;
    }
}
