/* 
 * CSS for Regulatory Regime Ordinance Page
 * Specific styling for /eng/regulatory-regime/ordinance/
 * Updated with 0.13.4 styles
 */


@media print {
  /* Force card row to display as flexbox like PC view - VERY SPECIFIC */
  .row.g-4.mb-5,
  div.row.g-4.mb-5,
  .row.g-4 {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
    page-break-inside: avoid !important;
    align-items: stretch !important;
  }
  
  /* Each column takes equal width - FORCE INLINE DISPLAY */
  .row.g-4 > .col-lg-4,
  .row.g-4.mb-5 > .col-lg-4,
  div.row.g-4 > div.col-lg-4 {
    flex: 0 0 32% !important;
    width: 32% !important;
    max-width: 32% !important;
    min-width: 32% !important;
    float: none !important;
    display: inline-flex !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  
 
  
  
  
  /* Card button - PRESERVE RED COLOR IN PRINT */
  .row.g-4 .btn-primary {
    border: 1px solid rgb(209, 65, 26) !important;
    border-radius: 0.375rem !important;
    background-color: rgb(209, 65, 26) !important;
    color: rgb(255, 255, 255) !important;
  }
  
  /* Page card styles */
  .page-card .card-body {
    padding-bottom: 0.75rem !important;
    padding-top: 0.75rem !important;
  }
  
  .page-card .card-img-top + .card-body {
    padding-top: 2.5rem !important;
  }
  

  
  /* Force the specific row to stay horizontal */
  .row.g-4.mb-5 > * {
    display: inline-flex !important;
  }
}

/* Card Body Border - From 0.13.4 version */
.page-card .card-body + .card-body {
  border-top-color: #dbdbdb !important;
  border-top-style: solid !important;
  border-top-width: calc(1rem * var(--border-width) / 16) !important;
}

/* Additional card styling for consistency */
.page-card .card-body {
  position: relative;
}

/* Ensure proper spacing for nested content */
.page-card .card-body > :first-child {
  margin-top: 0 !important;
}

.page-card .card-body > :last-child {
  margin-bottom: 0 !important;
}

/* Debug styles to ensure CSS is loading */
.page-card .card-body {
  border: 1px solid transparent; /* This will confirm CSS is loading */
}

/* Mobile view - center cards (screens smaller than 992px) */
@media (max-width: 991px) {
  .row.g-4.mb-5 {
    display: block !important; /* Disable flex layout on mobile */
    margin: 0 !important; /* Remove all row margins */
    padding: 0 !important; /* Remove all row padding */
    gap: 0 !important; /* Remove Bootstrap gap */
  }
  
  .row.g-4 > .col-lg-4 {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5rem; /* Add spacing between cards */
    padding: 0 !important; /* Remove column padding */
  }
  
  .row.g-4 > .col-lg-4 .card {
    width: 100%;
  }
}
