/**
 * Alignment Fixes CSS
 * Alignment fixes for blue lines and elements
 */

/* ========================================
   BLUE LINES ALIGNMENT
   ======================================== */

/* Normalize divs with blue top border */
div[style*="border-top:4px solid #007db3"],
div[style*="border-top:4px solid #006b99"] {
  margin-top: 0 !important;
}

/* Inner container with padding */
div[style*="border-top:4px solid #007db3"] > div,
div[style*="border-top:4px solid #006b99"] > div {
  padding-top: 0.75rem !important;
}

/* ========================================
   ALIGNMENT IN 50-25-25 LAYOUT
   ======================================== */

/* Ensure all regions have the same top alignment */
.layout--threecol-section--50-25-25 > .layout__region {
  align-self: flex-start;
}

/* Reset negative margins in first region */
.layout--threecol-section--50-25-25 .layout__region--first div[style*="margin-top:-20px"] {
  margin-top: 0 !important;
}

/* Align inner content */
.layout--threecol-section--50-25-25 .layout__region > .block-content-basic {
  margin-top: 0;
}

/* ========================================
   FULL REPORT - RIGHT MARGIN
   ======================================== */

/* Full Report card with right margin */
.layout--threecol-section--50-25-25 .layout__region--third {
  padding-right: 15px;
}

.layout--threecol-section--50-25-25 .layout__region--third .card {
  margin-right: 0;
}

/* Adjust negative margins of card */
.card[style*="margin-top:-40px"] {
  margin-top: 0 !important;
}

/* ========================================
   PREVIOUS TOPICS - ALIGNMENT
   ======================================== */

/* Normalize negative margins in Previous Topics */
p[style*="border-top:4px solid #006b99"] {
  margin-top: 0 !important;
  padding-top: 0.75rem !important;
}

/* Ensure alignment of both columns */
.layout--twocol-section.layout--twocol-section--50-50 > .layout__region {
  align-self: flex-start;
}

/* ========================================
   BLOCKS WITH TOP BORDERS
   ======================================== */

/* Reset all negative margins causing misalignment */
.layout__region div[style*="margin-top:-20px"],
.layout__region div[style*="margin-top:-40px"],
.layout__region p[style*="margin-top:-36px"],
.layout__region p[style*="margin-top:-16px"] {
  margin-top: 0 !important;
}

/* Add uniform top padding */
.layout__region div[style*="border-top"],
.layout__region p[style*="border-top"] {
  padding-top: 0.75rem !important;
}

/* ========================================
   VERTICAL CONTENT ALIGNMENT
   ======================================== */

/* Ensure block content starts at the same height */
.layout--threecol-section--50-25-25 .block-content-basic .content {
  padding-top: 0;
}

/* Align content start in all regions */
.layout--threecol-section--50-25-25 .field__item {
  margin-top: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* On mobile, restore normal margins */
@media (max-width: 767px) {
  .layout--threecol-section--50-25-25 .layout__region--third {
    padding-right: 0;
  }

  .card[style*="margin-top:-40px"] {
    margin-top: -1rem !important;
  }
}
