/* before-you-invest-teaser.css */

/* =========================================
   1. MAIN GRID LAYOUT (TEASERS)
   ========================================= */
.invest-teaser {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #e2e8f0; 
}

@media (min-width: 768px) {
  .invest-teaser {
    grid-template-columns: 18.75rem 1fr; /* 300px */
    align-items: stretch; 
  }
}

/* =========================================
   2. THE IMAGE BOX
   ========================================= */
.invest-teaser__media {
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 18.75rem; /* 300px */
  margin: 0 auto; 
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .invest-teaser__media {
    margin: 0; 
  }
}

.invest-teaser__media img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  display: block;
}

/* =========================================
   3. CONTENT COLUMN & META DATA
   ========================================= */
.invest-teaser__content {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  height: 100%;
  padding: 0.625rem 0; /* 10px top and bottom padding */
}

.invest-teaser__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.invest-teaser__category .field__item,
.invest-teaser__category a {
  background-color: #9cd4ff; 
  color: #004d99; 
  padding: 0.25rem 1rem;
  border-radius: 9999px; 
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
}

.invest-teaser__date {
  color: #42B1FF; 
  font-size: 0.875rem; 
}

/* =========================================
   4. TYPOGRAPHY
   ========================================= */
.invest-teaser__title {
  margin: 0 0 1rem 0;
  font-size: 1.5rem; 
  font-weight: 600; 
  color: #042969; 
  max-width: 21.875rem; /* 350px */
  line-height: 1.2;
}

.invest-teaser__title a {
  color: inherit;
  text-decoration: none;
}

.invest-teaser__summary {
  color: #5C5C6F; 
  font-size: 0.875rem; 
  line-height: 1.6;
  margin-bottom: 1rem;
}

.invest-teaser__read-more {
  color: #006BB6; 
  font-size: 1rem; 
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.invest-teaser__read-more .arrow {
  transition: transform 0.2s ease;
}

.invest-teaser__read-more:hover .arrow {
  transform: translateX(4px); 
}

/* =========================================
   5. CUSTOM FILTER BAR (MOCKUP MATCH)
   ========================================= */

.custom-invest-filter {
  margin-bottom: 0; 
}

.category-select-wrapper select {
  display: none !important;
}

/* Updated Category Text Styling */
.invest-cat-toggle {
  color: #494959 !important;
  font-weight: 500 !important; /* Medium */
  font-size: 1rem !important; /* 16px */
}

/* Updated Active Pills Text Color */
.invest-active-pill {
  background-color: #f1f5f9; 
  color: #006BB6 !important; 
  padding: 0.4rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.invest-active-pill:hover {
  background-color: #e2e8f0;
}

/* Updated Search Bar Height */
.search-bar-integrated {
  height: 2.75rem; /* 44px */
  border-color: #94a3b8 !important; 
  overflow: visible !important; 
}

.search-bar-integrated .form-item-keys {
  margin: 0 !important;
  width: 100%;
}

.search-bar-integrated input[name="keys"] {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  padding-left: 1rem;
  width: 100%;
  color: #5C5C6F;
}

.search-bar-integrated input[name="keys"]:focus {
  outline: none;
}

/* Updated Date Picker Text Styling */
#dateDropdownToggle {
  color: #494959 !important;
  font-weight: 500 !important; /* Medium */
  font-size: 0.875rem !important; /* 14px */
}

.custom-invest-filter .dropdown-menu.show {
  display: block !important;
  z-index: 1050 !important;
}

.submit-wrapper .form-actions {
  margin: 0;
}

/* Updated Submit Button (Magnifying Glass) Dimensions */
.submit-wrapper input[type="submit"] {
  background-color: #42B1FF; 
  color: transparent; 
  border: none;
  border-radius: 50%;
  width: 2.125rem; /* 34px */
  height: 2.125rem; /* 34px */
  padding: 0;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.125rem; /* Scaled down slightly to fit the 34px circle */
  transition: background-color 0.2s ease;
}

.submit-wrapper input[type="submit"]:hover {
  background-color: #006BB6;
}

.custom-invest-filter .dropdown-menu {
  border: 1px solid #cbd5e1;
}

.custom-invest-filter [data-drupal-selector="edit-created-wrapper"] > div,
.custom-invest-filter [data-drupal-selector="edit-created-wrapper"] > fieldset > div {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0 !important;
}

.custom-invest-filter .form-item-created-min,
.custom-invest-filter .form-item-created-max {
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-invest-filter .form-item-created-min label,
.custom-invest-filter .form-item-created-max label {
  font-weight: 600;
  color: #5C5C6F;
  margin: 0;
}

.custom-invest-filter input[type="date"] {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 0.4rem 0.5rem;
  color: #042969;
}

/* =========================================
   6. VIEW HEADER & REORDERING
   ========================================= */

.view-before-you-invest {
  display: flex;
  flex-direction: column;
}

.view-before-you-invest .view-filters {
  order: 1;
  margin-bottom: 0.5rem !important; 
}

.view-before-you-invest .view-header {
  order: 2;
  font-size: 0.9rem; 
  font-weight: normal; 
  color: #5C5C6F; 
  margin-bottom: 4rem; 
  margin-left: 2.5rem; 
  padding-bottom: 0;
  border-bottom: none; 
}

.view-before-you-invest .view-content {
  order: 3;
  margin-top: 0 !important;
}

.view-before-you-invest .pager {
  order: 4;
}