/**
 * Market Insights Page Styles
 * Exact Figma Design Implementation
 */

/* Variables */
:root {
  --mi-gold: #c5994f;
  --mi-dark: #2e2e2e;
  --mi-dark-alt: #262d33;
  --mi-text: #292929;
  --mi-text-dark-brown: #291f1e;
  --mi-text-light: #5e5e5e;
  --mi-text-dark-grey: #393f48;
  --mi-light-bg: #e8e8e8;
  --mi-white: #ffffff;
  --mi-green: #21ad59;
  --mi-red: #e53935;
  --mi-font-heading:
    "FrizQuadrataFont-Regular", "Palatino Linotype", Palatino, Palladio,
    "URW Palladio L", "Book Antiqua", Baskerville, "Bookman Old Style",
    "Bitstream Charter", "Nimbus Roman No9 L", Garamond, "Apple Garamond",
    "ITC Garamond Narrow", "New Century Schoolbook", "Century Schoolbook",
    "Century Schoolbook L", Georgia, serif;
  --mi-font-body: "TheSans-B6SemiBold", helvetica, arial, sans-serif;
  --mi-font-body-light: "TheSans-B3Light", helvetica, arial, sans-serif;
}

/* Reset & Base */
.market-insights-page {
  background:
    linear-gradient(0deg, rgba(232, 232, 232, 0.4), rgba(232, 232, 232, 0.4)),
    #ffffff;
  font-family: var(--mi-font-body);
  color: var(--mi-text);
  line-height: 1.5;
}

.market-insights-page * {
  box-sizing: border-box;
}

/* ==================== HERO SECTION ==================== */
/* Uses site-wide .hero-img pattern from theme; title alignment + login button are custom */
.mi-hero h1#page-title.hasSVGWrapper .text {
  position: relative;
  top: 55%;
  left: 23px;
  /* width: 240px; */
  text-align: left;
  transform: translateY(-50%);
  /* text-align: right; */
  margin-left: 0;
  /* Fix: add bottom padding so descenders (g, y, p) aren't clipped by overflow:hidden */
  padding-bottom: 12px;
}

.mi-hero__login-btn {
  position: absolute;
  right: 10%;
  bottom: 15%;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px;
  background: #ffffff;
  color: #262d33;
  font-family: var(--mi-font-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  z-index: 4;
  border: none;
  cursor: pointer;
}

.mi-hero__login-btn span {
  white-space: nowrap;
  flex-shrink: 0;
}

.mi-hero__login-btn:hover {
  background: var(--mi-gold);
  color: var(--mi-white);
}

.mi-hero__login-btn:hover svg {
  stroke: var(--mi-white);
}

.mi-hero__login-btn svg {
  width: 16px;
  height: 16px;
  stroke: var(--mi-gold);
}

/* ==================== SECTIONS ==================== */
.mi-section {
  max-width: 940px;
  margin: 0 auto;
  padding: 40px 0;
}

.mi-section__title {
  font-family: var(--mi-font-heading);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--mi-dark);
  text-transform: capitalize;
  margin: 0 0 30px 0;
  padding: 0 0 6px 0;
  border-bottom: 2px solid var(--mi-gold);
  width: max-content;
}

.mi-title-underline {
  width: 100%;
  /* height: 3px;
  background: var(--mi-gold); */
  margin: 0 0 0px 0;
}

/* ==================== BADGES ==================== */
.mi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  background: var(--mi-gold);
  color: var(--mi-white);
  font-family: var(--mi-font-body);
  font-size: 14px;
  /* font-weight: 530; */
  font-variant: all-small-caps;
  line-height: 16px;
  font-weight: bold;
}

.mi-badge--gold {
  background: var(--mi-gold);
  letter-spacing: 0.05em;
}

.mi-badge--small {
  padding: 0px 10px;
  font-size: 14px;
  width: fit-content;
  letter-spacing: 0.04em;
}

/* ==================== META INFO ==================== */
.mi-meta__read-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  font-weight: 500;
  /* line-height: 25px; */
  color: #262d33;
  justify-self: end;
}

.mi-meta__read-time svg {
  flex-shrink: 0;
}

.mi-meta__read-time--overlay {
  color: var(--mi-dark-alt);
  font-size: 13px;
  font-family: var(--mi-font-body-light);
}

.mi-meta__read-time--overlay svg {
  stroke: var(--mi-gold);
}

/* ==================== BUTTONS ==================== */
.mi-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mi-font-heading);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: stretch;
}

.mi-btn--read {
  display: inline-flex;
  align-items: center;
  gap: 0px;
  color: #c5994f;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--mi-font-heading);
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}

.mi-btn__text {
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

.mi-btn--read::after {
  content: "";
  display: inline-block;
  width: 93px;
  height: 15px;
  /* border-top: 1px solid #BDA078; */
  background-image: url("../images/right-arrow-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.mi-btn--read:hover {
  opacity: 0.8;
}

.mi-btn--search {
  background: var(--mi-gold);
  color: var(--mi-white);
  padding: 10px 15px;
}

.mi-btn--search:hover {
  background: #b38842;
}

/* ==================== VIEW ALL LINK ==================== */
.mi-link--view-all {
  display: inline-flex;
  align-items: center;
  gap: 19px;
  color: var(--mi-gold);
  font-family: var(--mi-font-heading);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mi-link--view-all::after {
  content: "";
  display: inline-block;
  width: 19px;
  height: 19px;
  /* background: #BDA078; */
  background-image: url("../images/right-arrow-icon.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.mi-link--view-all:hover {
  opacity: 0.8;
}

/* ==================== LATEST UPDATES SECTION ==================== */
.mi-latest-updates {
  position: relative;
  padding: 24px 0;
}

/* Carousel */
.mi-carousel {
  position: relative;
  overflow: hidden;
}

.mi-carousel__track {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.mi-carousel__track.is-dragging {
  transition: none;
  cursor: grabbing;
}

.mi-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
}

.mi-carousel:hover {
  cursor: grab;
}

.mi-carousel:active {
  cursor: grabbing;
}

.pagination-div-container {
  position: absolute;
  bottom: 0px;
  right: 17%;
  width: 20%;
  display: flex;
  gap: 10px;
  z-index: 5;
}

.mi-carousel__dot {
  flex: 1;
  height: 2px;
  background-color: rgba(57, 63, 72, 0.2);
  cursor: pointer;
  transition: height 0.2s ease, background-color 0.2s ease;
}

.mi-carousel__dot--active {
  height: 4px;
  background-color: #C5994F;
}

.mi-featured-article {
  display: flex;
  position: relative;
  margin-left: 0;
  gap: 32px;
}

/* Gold frame - positioned on parent, BEHIND the content wrapper */
.mi-featured-article::after {
  content: "";
  position: absolute;
  top: 0px;
  right: 0px;
  width: 166px;
  height: 160px;
  border: 2px solid #cfa04f;
  pointer-events: none;
  z-index: 0;
}

.mi-featured-article::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 40px;
  width: 166px;
  height: 160px;
  background: linear-gradient(0deg, rgba(232, 232, 232, 0.4), rgba(232, 232, 232, 0.4)), #ffffff;
  pointer-events: none;
  z-index: 1;
}

.mi-featured-article__image {
  position: relative;
  /* width: 873px; */
  width: 60%;
  height: 380px;
  flex-shrink: 0;
  overflow: hidden;
  background: #d6d6d6;
}

.mi-featured-article__image img {
  width: 100%;
  object-fit: cover;
}

.mi-featured-article__content-wrapper {
  position: relative;
  background: var(--mi-white);
  margin: 40px 0px 40px -110px;
  padding: 42px 50px 42px 100px;
  width: 100%;
  /* min-height: 320px; */
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Removed - golden frame now on parent .mi-featured-article::after */

.mi-featured-article__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 600px;
}

.mi-featured-article__meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  width: 100%;
}

.mi-featured-article__category {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  font-weight: 500;
  line-height: 27px;
  color: #393f48;
  opacity: 0.6;
}

.mi-featured-article__title {
  font-family: var(--mi-font-body);
  font-size: 14px;
  font-weight: 530;
  line-height: 1.3;
  color: #2e2e2e;
  margin: 0;
  text-align: justify;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mi-featured-article__summary {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  font-weight: 500;
  line-height: 25px;
  color: #262d33;
  margin: 0;
  text-align: justify;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ==================== ANALYST SECTION ==================== */
.mi-analyst {
  padding-top: 30px;
  padding-bottom: 30px;
}

.mi-analyst__card {
  background: var(--mi-white);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: 0;
}

.mi-analyst__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mi-analyst__links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.mi-analyst__link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #262d33;
  font-family: var(--mi-font-body);
  font-size: 12px;
  font-weight: 530;
  line-height: 18px;
  text-decoration: underline;
}

.mi-analyst__link:hover {
  color: var(--mi-gold);
}

.mi-analyst__body {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.mi-analyst__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.mi-analyst__photo img {
  width: 100%;
  object-fit: cover;
  object-position: center;
}

.mi-analyst__info {
  flex: 1;
}

.mi-analyst__name {
  font-family: var(--mi-font-body);
  font-size: 14px;
  font-weight: 530;
  line-height: 1.3;
  color: #2e2e2e;
  margin: 0 0 18px 0;
}

.mi-analyst__bio {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  font-weight: 500;
  line-height: 25px;
  color: #292929;
  margin: 0;
  text-align: justify;
}

/* ==================== PRECIOUS METALS INSIGHTS SECTION ==================== */
.mi-precious-metals {
  padding-top: 40px;
}

.mi-precious-metals__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 30px;
}

.mi-filters {
  align-self: stretch;
}

.mi-precious-metals__title-wrap {
  display: flex;
  flex-direction: column;
  /* max-width: 454px; */
}

.mi-precious-metals__title-wrap .mi-section__title {
  margin-bottom: 0;
}

.mi-filters {
  display: flex;
  align-items: center;
  gap: 15px;
}

.mi-filter__wrap {
  position: relative;
  flex: 1;
  min-width: 160px;
}

.mi-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 30px 10px 5px;
  gap: 40px;
  background: var(--mi-light-bg);
  border: none;
  border-bottom: 2px solid var(--mi-gold);
  color: #695346;
  font-family: var(--mi-font-body-light);
  width: 100%;
}

.mi-filter__wrap .mi-filter__icon {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}

.mi-filter[type="date"] {
  appearance: none;
  -moz-appearance: textfield; /* Hides icon in Firefox */
  -webkit-appearance: none;
}

.mi-filter[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
}

.mi-filter__label {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: #695346;
}

.mi-filter__input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: #695346;
  outline: none;
  padding: 5px 0 !important;
  min-width: 0;
  width: 100%;
  box-shadow: none !important;
  line-height: 1.4;
  height: auto;
}

.mi-filter__input::placeholder {
  color: #695346;
  opacity: 1;
}

.mi-filter__input[type="month"] {
  -webkit-appearance: none;
  cursor: pointer;
}

.mi-filter__input[type="month"]::-webkit-calendar-picker-indicator {
  display: none;
}

.mi-filter__input[type="month"]::-webkit-inner-spin-button {
  display: none;
}

.mi-filter__input:focus {
  border: none !important;
  box-shadow: none !important;
}

.mi-filters--thematic {
  margin-bottom: 30px;
}

.mi-precious-metals__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mi-precious-metals__left {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.mi-precious-metals__right {
  display: flex;
  flex-direction: column;
}

.mi-precious-metals__image {
  /* flex: 1; */
  /* height: 400px; */
  overflow: hidden;
}

.mi-precious-metals__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 368px;
}

/* ==================== PRICES TABLE ==================== */
/* .mi-prices-panel {
  background: var(--mi-white);
} */

.mi-prices-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mi-prices-panel__accent {
  width: 3px;
  height: 12px;
  background: var(--mi-gold);
  margin-top: 0px;
}

.mi-prices-panel__title {
  font-family: var(--mi-font-heading);
  font-size: 12px;
  font-weight: 400;
  color: #393f48;
  margin: 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 25px;
}

.mi-prices-table {
  width: 100%;
  background: var(--mi-white);
  padding: 20px;
}

.mi-prices-table__header {
  display: grid;
  grid-template-columns: 120px repeat(4, 1fr) 30px;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--mi-light-bg);
}

.mi-prices-table__header span {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: var(--mi-text-dark-grey);
  text-align: right;
  font-weight: bold;
}

.mi-prices-table__header span:first-child {
  text-align: left;
}

.mi-prices-table__row {
  display: grid;
  grid-template-columns: 120px repeat(4, 1fr) 30px;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--mi-light-bg);
  align-items: center;
}

.mi-prices-table__metal {
  font-family: var(--mi-font-body);
  font-size: 14px;
  font-weight: 700;
  font-variant: all-small-caps;
  color: #393f48;
}

.mi-prices-table__value {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  line-height: 1.8;
  color: var(--mi-text-light);
  text-align: right;
}

.mi-prices-table__value--up {
  color: var(--mi-green);
}

.mi-prices-table__value--down {
  color: var(--mi-red);
}

.mi-prices-table__arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mi-prices-table__arrow--up::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--mi-green);
}

.mi-prices-table__arrow--down::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 8px solid var(--mi-red);
}

/* ==================== FORECASTS SECTION ==================== */
.mi-forecasts {
  /* margin-top: 20px; */
}

.mi-forecasts__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.mi-forecasts__title-bar {
  display: flex;
  align-items: flex-start;
  gap: 17px;
}

.mi-forecasts__accent {
  width: 3px;
  height: 12px;
  background: var(--mi-gold);
  margin-top: 0px;
}

.mi-forecasts__title {
  font-family: var(--mi-font-heading);
  font-size: 16px;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mi-dark-alt);
  margin: 0;
}

.mi-forecasts__badge {
  margin-bottom: 20px;
}

.mi-forecasts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.mi-forecasts-page__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.mi-forecast-card {
  background: var(--mi-dark-alt);
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* min-height: 185px; */
}

.mi-forecast-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mi-forecast-card__pdf-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 46px;
  background: #393f48;
}

.mi-forecast-card__pdf-icon svg {
  width: 32px;
  height: 34px;
}

.mi-forecast-card__download {
  width: 31px;
  height: 30px;
  cursor: pointer;
}

.mi-forecast-card__content {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mi-forecast-card__title {
  font-family: var(--mi-font-heading);
  font-size: 12px;
  font-weight: normal;
  line-height: 1.4;
  color: var(--mi-white);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mi-forecast-card__date {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: #ffffff;
}

/* ==================== WEEK AHEAD SECTION ==================== */
.mi-week-ahead {
  background: var(--mi-white);
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.mi-week-ahead__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mi-week-ahead__title {
  font-family: var(--mi-font-heading);
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  color: var(--mi-dark);
  margin: 0;
}

.mi-week-ahead__date {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  line-height: 27px;
  color: #291f1e;
  opacity: 0.7;
  margin: 0;
}

.mi-week-ahead__author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mi-font-body-light);
  font-size: 18px;
  line-height: 27px;
  color: var(--mi-text);
}

.mi-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}

.mi-author-avatar--small {
  width: 24px;
  height: 24px;
}

.mi-author-avatar img {
  width: 100%;
  object-fit: cover;
}

/* ==================== QUICK THOUGHTS SECTION ==================== */
.mi-quick-thoughts {
  padding-top: 30px;
  padding-bottom: 30px;
}

.mi-quick-thoughts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-left: 0;
}

/* Card Link Styles */
.mi-insight-card__link,
.mi-research-card__link,
.mi-news-card__link,
.mi-week-ahead__link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.mi-insight-card__link:hover,
.mi-research-card__link:hover,
.mi-news-card__link:hover {
  transform: translateY(-4px);
}

.mi-week-ahead__link:hover h3 {
  color: var(--mi-gold);
}

.mi-insight-card:has(.mi-insight-card__link:hover),
.mi-research-card:has(.mi-research-card__link:hover),
.mi-news-card:has(.mi-news-card__link:hover) {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mi-insight-card__link {
  display: grid;
  grid-template-rows: auto 1fr;
}

.mi-insight-card {
  background: var(--mi-white);
  border-bottom: 7px solid #c5994f;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
}

.mi-insight-card__image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.mi-insight-card__image img {
  width: 100%;
  object-fit: cover;
}

.mi-insight-card__badges {
  /* position: absolute; */
  /* bottom: 6px;
  left: 10px;
  right: 10px; */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.mi-insight-card__category {
  font-weight: 300;
  font-family: var(--mi-font-body-light);
}

.mi-insight-card__content {
  padding: 15px 16px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  /* flex-direction: column; */
  gap: 10px;
  /* justify-content: space-between; */
}

.mi-insight-card__badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mi-insight-card__title {
  font-family: var(--mi-font-body);
  font-size: 14px;
  font-weight: 530;
  line-height: 1.3;
  color: #2e2e2e;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.mi-insight-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  font-weight: 500;
  line-height: 27px;
  color: #292929;
  margin-top: auto;
}

/* ==================== THEMATIC RESEARCH SECTION ==================== */
.mi-thematic__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
}

.mi-thematic__title-wrap {
  display: flex;
  flex-direction: column;
}

.mi-thematic__title-wrap .mi-section__title {
  margin-bottom: 0;
}

.mi-thematic__content {
  display: grid;
  grid-template-columns: 5fr 2fr;
  gap: 24px;
  margin-left: 0;
}

.mi-thematic__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  background-color: var(--mi-white);
  padding: 15px 16px;
}

.mi-research-card {
  background: var(--mi-white);
  /* border-bottom: 7px solid var(--mi-gold); */
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
}

.mi-research-card__image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.mi-research-card__image img {
  width: 100%;
  object-fit: cover;
}

.mi-research-card__badges {
  /* position: absolute;
  bottom: 6px;
  left: 10px;
  right: 10px; */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.mi-research-card__content {
  padding: 16px 16px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 16px;
}

.mi-thematic_header_container {
  display: grid;
  grid-template-rows: auto 1fr;
}

.mi-research-card__title {
  font-family: var(--mi-font-body);
  font-size: 14px;
  font-weight: 530;
  line-height: 1.3;
  color: var(--mi-dark);
  margin: 0 0 0px 0;
}

.mi-research-card__summary {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  line-height: 1.6;
  color: var(--mi-text);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

/* Promo Boxes */
.mi-thematic__sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background-color: var(--mi-light-bg);
  padding: 50px 16px 16px 16px;
}

.mi-promo-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  width: 100%;
  height: 240px;
  max-height: 240px;
  overflow: hidden;
}

.mi-promo-box > a {
  display: block;
  width: 100%;
  height: 100%;
}

.mi-promo-box > img,
.mi-promo-box > a > img {
  width: 100%;
  height: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.mi-promo-box--dark {
  background: var(--mi-dark-alt);
  color: var(--mi-white);
  flex: 1;
}

.promo-cast-bars {
  position: relative;
  padding-top: 0px;
  background-color: #020404;
}

.promo-cast-bars-img1 {
  height: 50%;
  width: 100%;
  object-fit: cover;
  object-position: bottom;
}

.promo-cast-bars-img2 {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: 60%;
  width: 100%;
  object-fit: cover;
}

.promo-precious-metal {
  width: 130px;
  position: absolute;
  bottom: 0px;
  right: 8px;
  z-index: 1;
}

.promo-precious-metal > img {
  width: 100%;
  object-fit: cover;
}

.mi-promo-box--gold {
  background: var(--mi-gold);
  color: var(--mi-white);
  flex: 1;
}

.mi-promo-box__label {
  font-family: var(--mi-font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.mi-promo-box__title {
  font-family: var(--mi-font-heading);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  z-index: 3;
}

.mi-promo-box__title-gold {
  font-family: var(--mi-font-heading);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  z-index: 3;
  color: var(--mi-gold);
}

/* ==================== EVENTS & IN THE NEWS SECTION ==================== */
.mi-events-news__grid {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 70px;
}

.mi-events__header,
.mi-in-the-news__header {
  display: flex;
  justify-content: space-between;
  /* align-items: flex-end; */
  margin-bottom: 30px;
}

.mi-events__title-wrap {
  display: flex;
  flex-direction: column;
}

.mi-events__title-wrap .mi-section__title {
  margin-bottom: 0;
}

.mi-events__list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.mi-event-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  /* background: var(--mi-white); */
}

.mi-event-card__image {
  width: 190px;
  /* height: 190px; */
  overflow: hidden;
}

.mi-event-card__image img {
  width: 100%;
  object-fit: cover;
}

.mi-event-card__content {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mi-event-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 13px;
}

.mi-event-card__title {
  font-family: var(--mi-font-body);
  font-size: 16px;
  font-weight: 530;
  line-height: 23px;
  color: var(--mi-dark);
  margin: 0;
}

.mi-event-card__date {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: var(--mi-text);
  white-space: nowrap;
}

.mi-event-card__description {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  line-height: 1.5;
  color: var(--mi-text);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mi-event-card__speakers {
  margin-top: auto;
}

.mi-event-card__speakers-label {
  display: block;
  font-family: var(--mi-font-body);
  font-size: 11px;
  font-weight: 530;
  color: var(--mi-gold);
  text-decoration: underline;
  margin-bottom: 8px;
}

.mi-event-card__avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.mi-speaker-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}

.mi-speaker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mi-speaker-name {
  font-family: var(--mi-font-body-light);
  font-size: 12px;
  color: var(--mi-text);
  margin-right: 10px;
}

.mi-speaker-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  margin-bottom: 6px;
}

.mi-event-card__avatars {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-top: 8px;
}

/* In The News */
.mi-in-the-news {
  padding: 0px 0px;
}

.mi-in-the-news__header {
  margin-bottom: 30px;
}

.mi-in-the-news__header .mi-section__title {
  font-size: 24px;
  margin-bottom: 0;
}

.mi-news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  padding-inline-start: 0px !important;
}

.mi-news-list__item {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 15px;
  padding: 9px 0 !important;
  align-items: baseline;
  border-bottom: 2px solid var(--mi-gold);
}

.mi-news-list__item:last-child {
  border-bottom: 2px solid transparent;
}

.mi-news-list_source_date {
  display: flex;
  justify-content: space-between;
}

.mi-news-list__item:first-child {
  padding-top: 0;
}

.mi-news-list__source {
  font-family: var(--mi-font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--mi-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  white-space: nowrap;
}

.mi-news-list__link {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  line-height: 1.4;
  color: var(--mi-text);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.mi-news-list__link:hover {
  color: var(--mi-gold);
  text-decoration: underline;
}

.mi-news-list__summary {
  font-family: var(--mi-font-body-light);
  font-size: 13px;
  line-height: 1.5;
  color: var(--mi-text-light);
  margin: 6px 0 0 0;
}

.mi-news-list__date {
  font-family: var(--mi-font-body-light);
  font-size: 12px;
  color: var(--mi-text-light);
  text-align: right;
}

/* ==================== NEWS GRID SECTION ==================== */
.mi-news-section .mi-section__title {
  /* margin-bottom: 30px; */
}

.mi-news-section-header {
  display: flex;
  margin-bottom: 30px;
  justify-content: space-between;
}

.mi-news__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-left: 0;
}

.mi-news-card {
  background: var(--mi-white);
  /* border-bottom: 7px solid var(--mi-gold); */
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
}

.mi-news-main_title {
  margin-bottom: 0px !important;
}

.mi-news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.mi-news-card__image {
  height: 200px;
  overflow: hidden;
}

.mi-news-card__image img {
  width: 100%;
  object-fit: cover;
}

.mi-news-card__content {
  padding: 16px 16px 32px 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  position: relative;
  background-color: var(--mi-white);
  overflow: hidden;
}

.mi-news-card::before {
  content: "";
  z-index: 1;
  width: 50%;
  height: 16%;
  border-top: 2px solid #cfa04f;
  border-left: 2px solid #cfa04f;
  position: absolute;
  right: 10%;
  bottom: 125px;
}

.mi-news-card::after {
  content: "";
  z-index: 1;
  width: 20%;
  height: 47.9%;
  border-right: 2px solid #cfa04f;
  border-bottom: 2px solid #cfa04f;
  position: absolute;
  right: 10%;
  bottom: 21px;
}

.mi-news-card__date {
  display: inline-block;
  /* background: var(--mi-gold); */
  color: var(--mi-text-dark-brown);
  font-family: var(--mi-font-body);
  font-size: 14px;
  /* padding: 3px 10px; */
  margin-bottom: 12px;
}

.mi-news-card__title {
  font-family: var(--mi-font-body);
  font-size: 16px;
  width: 80%;
  /* font-weight: 530; */
  font-weight: bold;
  line-height: 1.4;
  color: var(--mi-dark);
  margin: 0 0 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mi-analyst__links_sm {
  display: none;
}

.mi-analyst__links_sm .mi-analyst__name {
  margin-bottom: 0px;
  text-align: left;
}

/* ==================== EMPTY STATE ==================== */
.mi-empty-message {
  padding: 40px 20px;
  text-align: center;
  font-family: var(--mi-font-body-light);
  font-size: 16px;
  color: var(--mi-text-light);
  background: var(--mi-white);
  border: 1px dashed #ccc;
  border-radius: 4px;
}

.mi-empty-message a {
  color: var(--mi-gold);
  text-decoration: underline;
}

.mi-empty-message a:hover {
  color: #b38842;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
  /* .mi-thematic__content {
    grid-template-columns: 1fr;
  } */


  .mi-thematic__sidebar {
    flex-wrap: wrap;
  }

  .mi-promo-box {
    flex: 1;
    height: 200px;
  }
}

@media (max-width: 1227px) {
  .mi-thematic__content {
    grid-template-columns: 1fr;
  }

  .mi-section {
    padding: 60px 32px;
  }

  .mi-prices-panel__accent {
    margin: 8px 0 0 0;
  }

  .mi-prices-panel__header {
    align-items: flex-start;
  }

  .mi-featured-article::after {
    display: none;
  }

  .mi-thematic__sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    padding: 16px 16px;
  }

  .mi-featured-article::before {
    display: none;
  }

  .mi-hero h1#page-title.hasSVGWrapper .text {
    left: 32px;
  }

  .mi-precious-metals__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mi-quick-thoughts__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mi-thematic__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mi-news__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mi-featured-article {
    flex-direction: column;
  }

  .mi-featured-article__image {
    width: 100%;
    height: auto;
    aspect-ratio: 873 / 514;
  }

  .mi-featured-article__content-wrapper {
    width: 90%;
    margin: -60px auto 0px auto;
    padding: 20px 20px;
  }

  .mi-featured-article__content {
    max-width: unset;
  }

  .mi-featured-article__content-wrapper::before {
    display: none;
  }

  .mi-filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr) auto;
  }

  .pagination-div-container {
    bottom: -20px;
    right: 50%;
    transform: translateX(50%);
    width: 30%;
  }
}

@media (max-width: 899px) {
  .mi-section {
    padding: 40px 20px;
  }

  .mi-hero h1#page-title.hasSVGWrapper .text {
    left: 20px;
  }

  .mi-precious-metals__content {
    grid-template-columns: 1fr;
  }

  .mi-forecasts__grid {
    grid-template-columns: 1fr 1fr;
  }

  .mi-forecasts-page__grid {
    grid-template-columns: 1fr, 1fr;
  }

  .mi-thematic__header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .mi-forecasts__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .mi-events-news__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .mi-link--view-all {
    align-self: flex-end;
  }
}

@media (max-width: 599px) {
  .mi-section {
    padding: 30px 15px;
  }

  .mi-section__title,
  .mi-latest-updates .mi-title-underline,
  .mi-featured-article,
  .mi-analyst__card,
  .mi-precious-metals__content,
  .mi-precious-metals__header,
  .mi-quick-thoughts__grid,
  .mi-thematic__header,
  .mi-thematic__content,
  .mi-events-news__grid,
  .mi-news-section-header,
  .mi-news__grid {
    margin-left: 0;
  }

  .mi-analyst__links_sm {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    align-self: stretch;
  }

  .mi-analyst__links_sm .mi-analyst__name,
  .mi-analyst__links_sm .mi-analyst__photo,
  .mi-analyst__links_sm .mi-analyst__links {
    display: block;
  }

  .mi-analyst__links_sm .mi-analyst__photo {
    width: 47px;
    height: 47px;
  }

  .mi-thematic__title-wrap {
    margin: auto;
  }

  .mi-forecasts__grid {
    grid-template-columns: 1fr;
  }

  .mi-forecasts-page__grid {
    grid-template-columns: 1fr;
  }

  .mi-analyst__links_sm .mi-analyst__links {
    display: flex;
    justify-content: flex-start;
    margin: 10px 0 0 0;
  }

  .mi-analyst__name, .mi-analyst__photo, .mi-analyst__links {
    display: none;
  }

  .mi-section__title {
    text-align: center;
    font-size: 20px;
    margin: auto auto 20px auto;
    width: fit-content;
  }

  .mi-week-ahead__title {
    font-size: 16px;
  }

  .mi-week-ahead__author {
    font-size: 14px;
  }

  .mi-week-ahead {
    gap: 10px;
  }

  .mi-precious-metals__image img {
    min-height: unset;
  }
  
  .mi-link--view-all {
    font-size: 12px;
  }

  .mi-promo-box {
    flex: none;
    height: fit-content;
  }

  .mi-promo-box--dark {
    flex: none;
  }

  .mi-in-the-news__header {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .mi-news-section-header {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .mi-title-underline {
    margin-left: auto !important;
    margin-right: auto;
    width: 100px !important;
  }

  .mi-events__header {
    align-items: center;
    flex-direction: column;
    gap: 10px;
  }

  .mi-hero h1#page-title.hasSVGWrapper .text {
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
  }

  .mi-news-card__title {
    -webkit-line-clamp: 1;
  }

  .mi-news-card::before {
    height: 14%;
  }

  .mi-precious-metals__title-wrap {
    margin: auto;
  }

  .mi-hero__login-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 14px;
    gap: 10px;
  }

  .mi-quick-thoughts__grid,
  .mi-thematic__grid,
  .mi-news__grid {
    grid-template-columns: 1fr;
  }

  .mi-thematic__sidebar {
    flex-direction: column;
  }

  .mi-event-card {
    grid-template-columns: 1fr;
    gap: 0px;
  }

  .mi-event-card__image {
    width: 100%;
    height: 200px;
  }

  .mi-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .mi-btn--search {
    width: max-content;
  }

  .mi-filter {
    width: 100%;
  }

  .mi-prices-table {
    padding: 20px 2px;
  }

  .mi-prices-table__value {
    font-size: 12px;
  }

  .mi-analyst__header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
  }

  .mi-analyst__links {
    justify-content: center;
  }

  .mi-analyst__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .mi-featured-article__content-wrapper {
    padding: 30px 20px;
  }

  .mi-thematic__title-span {
    display: block;
  }
}

/* ==================== MODALS ==================== */
.mi-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
}

.mi-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.mi-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.mi-modal__container {
  position: relative;
  background: var(--mi-white);
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px 16px 45px 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(0px);
  transition: transform 0.3s ease;
  z-index: 10;
  margin: 106px 0 0 0;
}

.mi-modal[aria-hidden="false"] .mi-modal__container {
  transform: translateY(0);
}

.mi-modal__container--wide {
  max-width: 640px;
}

.mi-modal__close {
  position: absolute;
  top: 10px;
  right: 20px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--mi-text);
  transition: color 0.2s ease;
}

.mi-modal__close:hover {
  color: var(--mi-gold);
}

.mi-modal__content {
  width: 100%;
}

.mi-modal__title {
  font-family: var(--mi-font-heading);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--mi-dark);
  margin: 0 0 16px 0;
}

.mi-modal__subtitle {
  font-family: var(--mi-font-body-light);
  font-size: 16px;
  line-height: 1.5;
  color: var(--mi-text);
  margin: 0 0 15px 0;
}

/* ==================== FORM STYLES ==================== */
.mi-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mi-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mi-form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mi-form__label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mi-font-body-light);
  font-size: 16px;
  color: var(--mi-text);
}

.mi-form__required {
  color: var(--mi-gold);
}

.mi-form__input,
.mi-form__textarea {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--mi-font-body-light);
  font-size: 16px;
  color: var(--mi-text);
  background: var(--mi-white);
  border: 1px solid #cccccc;
  border-radius: 0;
  transition: border-color 0.2s ease;
}

.mi-form__input:focus,
.mi-form__textarea:focus {
  outline: none;
  border-color: var(--mi-gold);
}

.mi-form__input::placeholder,
.mi-form__textarea::placeholder {
  color: #999999;
}

.mi-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.mi-form__toggle-password {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.mi-form__toggle-text {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: #695346;
}

.mi-form__mandatory-note {
  font-family: var(--mi-font-body-light);
  font-size: 14px;
  color: var(--mi-text-light);
  margin: 0;
}

/* Gold button styles */
.mi-btn--gold {
  background: var(--mi-gold);
  color: var(--mi-white);
  padding: 10px 40px;
  font-family: var(--mi-font-heading);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mi-btn--gold:hover {
  background: #b38842;
}

.mi-btn--full {
  width: 100%;
  text-align: center;
  justify-content: center;
  width: max-content;
  align-self: center;
}

.mi-btn--submit {
  width: auto;
  align-self: center;
  min-width: 160px;
}

/* Checkbox styles */
.mi-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-family: var(--mi-font-body-light);
  font-size: 15px;
  color: var(--mi-text);
}

.mi-form__checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.mi-form__checkbox-mark {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #cccccc;
  background: var(--mi-white);
  transition: all 0.2s ease;
}

.mi-form__checkbox input:checked ~ .mi-form__checkbox-mark {
  background: var(--mi-dark);
  border-color: var(--mi-dark);
}

.mi-form__checkbox-mark::after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--mi-white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.mi-form__checkbox input:checked ~ .mi-form__checkbox-mark::after {
  display: block;
}

.mi-form__checkbox-label {
  line-height: 1.4;
}

.mi-form__checkbox--policy {
  margin-top: 10px;
}

/* Form options row */
.mi-form__options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mi-form__link {
  font-family: var(--mi-font-body-light);
  font-size: 15px;
  color: var(--mi-text);
  text-decoration: underline;
}

.mi-form__link:hover {
  color: var(--mi-gold);
}

.mi-form__link--bold {
  font-family: var(--mi-font-body);
  font-weight: 530;
}

.mi-form__signup {
  font-family: var(--mi-font-body-light);
  font-size: 15px;
  color: var(--mi-text);
  margin: 0px 0;
}

.mi-form__recaptcha-notice {
  font-family: var(--mi-font-body-light);
  font-size: 13px;
  line-height: 1.5;
  color: var(--mi-text-light);
  margin: 10px 0 0 0;
}

/* reCAPTCHA placeholder */
.mi-form__recaptcha {
  margin: 10px 0;
}

.mi-form__recaptcha-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f9f9f9;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  max-width: 300px;
  margin: 0 auto;
}

.mi-form__recaptcha-badge {
  font-family: Arial, sans-serif;
  font-size: 10px;
  color: #555;
  text-align: right;
  line-height: 1.3;
}

.mi-form__recaptcha-badge small {
  color: #777;
}

/* Success/Error messages */
.mi-form__message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  margin-top: 10px;
}

.mi-form__message--success {
  background: rgba(33, 173, 89, 0.1);
  border: 1px solid #21ad59;
}

.mi-form__message--error {
  background: rgba(229, 57, 53, 0.1);
  border: 1px solid #E53935;
}

.mi-form__message svg {
  flex-shrink: 0;
}

.mi-form__message p {
  font-family: var(--mi-font-body-light);
  font-size: 15px;
  line-height: 1.5;
  color: var(--mi-text);
  margin: 0;
}

/* Loading state */
.mi-btn--loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.mi-btn--loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: var(--mi-white);
  border-radius: 50%;
  animation: mi-spin 0.8s linear infinite;
}

@keyframes mi-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==================== MODAL RESPONSIVE ==================== */
@media (max-width: 768px) {
  .mi-modal {
    /* Align to top instead of center so modal doesn't get pushed above viewport */
    align-items: flex-start;
    overflow-y: auto;
  }

  .mi-modal__container {
    margin: 40px auto 40px auto;
    width: 95%;
    max-height: calc(100vh - 80px);
  }

  .mi-modal__title {
    font-size: 24px;
  }

  .mi-form__row {
    grid-template-columns: 1fr;
  }

  .mi-form__options {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}

@media (max-width: 576px) {
  .mi-modal__container {
    margin: 20px auto 20px auto;
    width: 95%;
    max-height: calc(100vh - 40px);
  }

  .mi-modal__close {
    top: 10px;
    right: 10px;
  }

  .mi-modal__title {
    font-size: 24px;
  }

  .mi-btn--gold {
    padding: 16px 30px;
  }

  .mi-form__recaptcha-placeholder {
    flex-direction: column;
    gap: 10px;
    padding: 16px;
  }
}

/* ==================== FORM VALIDATION STYLES ==================== */

/* Error state for inputs */
.mi-form__input--error,
.mi-form__textarea.mi-form__input--error {
  border-color: #dc3545 !important;
  background-color: #fff5f5;
}

.mi-form__input--error:focus,
.mi-form__textarea.mi-form__input--error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2);
}

/* Error message */
.mi-form__error {
  display: none;
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
  padding-left: 2px;
  line-height: 1.4;
}

/* Checkbox error state */
.mi-form__checkbox--error .mi-form__checkbox-mark {
  border-color: #dc3545 !important;
}

.mi-form__checkbox--error .mi-form__checkbox-label {
  color: #dc3545;
}

/* Shake animation for error fields */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.mi-form__input--error {
  animation: shake 0.5s ease-in-out;
}

/* Success state for inputs (optional) */
.mi-form__input--valid {
  border-color: #28a745 !important;
}

/* Character counter (optional enhancement) */
.mi-form__char-count {
  font-size: 12px;
  color: #999;
  text-align: right;
  margin-top: 4px;
}

.mi-form__char-count--warning {
  color: #ffc107;
}

.mi-form__char-count--error {
  color: #dc3545;
}

/* reCAPTCHA v3 notice */
.mi-form__recaptcha-notice {
  font-size: 12px;
  color: #999;
  margin: 0px 0;
  line-height: 1.5;
}

.mi-form__recaptcha-notice a {
  color: #999;
  text-decoration: underline;
}

.mi-form__recaptcha-notice a:hover {
  color: #c5994f;
}
