.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-overview {
  background-image: url(/assets/img/light-bg.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--color-brown-dark);
  color: white;
}

.company-info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  position: relative;
}

.company-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.company-name h3 {
  margin: 0;
  font-family: var(--font-family);
  color: #FFF;
}

/* Update ticker and ISIN styles to place them next to each other */
.company-ticker {
  background-color: white;
  color: #333;
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-block;
  font-size: 14px;
  vertical-align: middle;
}

.company-isin {
  color: #ccc;
  font-size: 14px;
  display: inline-block;
  vertical-align: middle;
}

.company-score {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Rank Categories Section Styles */
.rank-categories-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0;
}

.rank-categories {
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
}

.rank-content {
  display: flex;
  width: 100%;
  height: 100%;
}

.rank-left-section {
  /* width: 30%; */
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  display: flex;
  flex-direction: column;
  position: relative;
}

.overlay-card {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 100%;
  z-index: 10;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.rank-unlock-card {
  background-color: transparent;
  border-radius: 12px;
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.rank-unlock-card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rank-unlock-card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.rank-unlock-card-title {
  font-family: "Inter", sans-serif;
  font-size: var(--fluid-16-20);
  font-weight: 600;
  color: var(--color-primary);
  text-align: center;
}

.rank-list {
  list-style-type: none;
  padding: 0;
  margin-top: 20px;
  flex-grow: 1;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 14px 30px;
  width: 100%;
}

.rank-item.active {
  background-color: #33993325;
  padding: 24px 30px;
  position: relative;
  z-index: 20;
}

.rank-border.active {
  z-index: 30;
}

.rank-item.active .rank-name {
  font-weight: 700;
}

.rank-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.rank-icon img, .rank-icon svg {
  width: 24px;
  height: 24px;
}

.rank-name {
  font-family: "Inter", sans-serif;
  font-size: var(--fluid-14-16);
  font-weight: 400;
  color: #3f3b37;
  /* padding-left: 18px; */
}

.combined {
  font-family: "Inter", sans-serif;
  font-weight: 700;
}

.rank360 {
  font-weight: 700;
}

.rank-value {
  font-family: "Inter", sans-serif;
  font-size: var(--fluid-16-20);
  font-weight: 600;
  color: #1f2225;
  margin-right: 15px;
  width: 40px;
  text-align: center;
  margin-left: auto;
}

.rank-bar {
  width: 50%;
  height: 4px;
  background-color: var(--color-rank-grey);
  border-radius: 0;
  position: relative;

}

.rank-progress {
  height: 6px;
  position: absolute;
  top: 50%;
  left: 0;
  background-color: transparent;
  border-radius: 0px;
  transform: translateY(-50%);
}

.rank-progress.yellow {
  background-color: var(--color-rank-yellow);
}

.rank-progress.red {
  background-color: var(--color-rank-red);
}

.rank-progress.dark_green {
  background-color: var(--color-rank-green-dark);
}

.rank-progress.light_green {
  background-color: var(--color-rank-green-light);
}

.rank-border {
  position: relative;
  width: 100%;
  border-bottom: solid 1px #e0dad1;
}

.rank-border::after {
  content: "";
  position: absolute;
  left: 6%;
  transform: translateX(-6%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid white;
  top: -1px;
}

.rank-border::before {
  content: "";
  position: absolute;
  left: 6%;
  transform: translateX(-6%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid #e0dad1;
  top: 1px;
}

/* Stock Analysis Wrapper */
.stock-analysis-wrapper {
  max-width: var(--container-max-width);
  margin: 0;
  overflow: hidden;
  border-right: solid 1.3px #e0dad1;
}

/* Adjust company-overview section to work within wrapper */
.stock-analysis-wrapper .company-overview {
  margin: 0;
  border-radius: 0;
  border-bottom: none;
}

/* Adjust rank-categories-container to work within wrapper */
.stock-analysis-wrapper .rank-categories-container {
  margin: 0;
}

.stock-analysis-wrapper .rank-categories {
  margin: 0;
  border: none;
  border-radius: 0;
}

/* Stock page main container - wraps analysis and sidebar */
.stock-page-container {
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  min-height: 450px; /* Set minimum height for the container */
  border: solid 1.3px #e0dad1;
}

.stock-analysis-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Company details sidebar */
.company-details-sidebar {
  width: 50%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.company-description-card {
  padding: 30px;
  height: 100%; 
  display: flex;
  flex-direction: column;
}

.company-description-card h6 {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: #1f2225;
  margin-bottom: 10px;
}

.company-explainatory-content {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-end;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.company-description-card p {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #3f3b37;
}

.analysis-heading {
  margin-top: 0px;
}

.more-link {
  color: #6b3305;
  text-decoration: none;
  font-weight: 500;
}

.more-link:hover {
  text-decoration: underline;
}

.metadata-item {
  display: flex;
  justify-content: flex-start; 
  margin-bottom: 5px;
}

.metadata-label {
  font-size: 15px;
  color: #5f5b55;
  width: 120px; 
  flex-shrink: 0; 
}

.metadata-value {
  font-size: 15px;
  color: #1f2225;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.metadata-flag {
  width: 24px;
  height: 16px;
}

.metadata-value a {
  color: #6b3305;
  text-decoration: none;
}

.metadata-value a:hover {
  text-decoration: underline;
}

.index-theme-section {
  margin: 16px 0;
}

.index-theme-section h6 {
  font-family: var(--font-family);
  font-weight: 400;
  color: #1f2225;
  margin-bottom: 15px;
}

.index-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.index-badge {
  background-color: #f3f3f3;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #3f3b37;
  text-decoration: none;
  transition: background-color 0.2s;
}

.index-badge:hover {
  background-color: #e6e0db;
}

.stock-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin-top: auto; /* Push to the bottom of the flex container */
  margin-bottom: -10px; /* Add 15px spacing from the bottom */
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: var(--fluid-14-16);
  font-weight: 500;
  text-decoration: none;
  border-radius: 29px;
  padding: 10px 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  width: fit-content;
  user-select: none;
  text-wrap: nowrap;
  background-color: #fff;
  color: #1f2225;
  border: 1px solid var(--color-border);
}

.action-button:hover {
  background-color: #f9f2ec;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.analysis-date {
  margin-top: 20px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  margin-bottom: 50px;
}

.full-box-wrapper {
  width: 100%;
  background: linear-gradient(180deg, rgba(242, 238, 235, 1) 0%, rgba(255, 255, 255, 1) 100%);
  padding: 16px 0;
}

/* Blurred Cell for Metrics Table */
.blurred-cell {
  opacity: 0.5;
  filter: blur(10px);
  pointer-events: none;
}
.metric-table-lock {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  transform: translate(0, 0);
  width: 75%;
  height: 100%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.metric-table-lock .metric-table-lock-text {
  font-family: "Inter", sans-serif;
  font-size: var(--fluid-16-20);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 20px;
  text-align: center;
  max-width: 70%;
}

/* Similar Stocks Section */
.similar-stocks-section {
  max-width: var(--container-max-width);
  margin: 60px auto;
  padding: 0 20px;
  overflow-x: hidden;
}

.similar-stocks-header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.similar-stocks-header h2 {
  font-family: "SangBleuRegular", serif;
  font-weight: 400;
  color: #1f2225;
  line-height: 1.2;
  margin-bottom: 10px;
}

.similar-stocks-header p {
  font-size: var(--fluid-16-20);
  font-weight: normal;
  margin-bottom: 24px;
  line-height: 1.2;
}

/* Text and button inline styling */
.text-button-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.button-inline-text {
  margin: 0;
  padding: 0;
  flex: 1;
}

/* Arrow icon styling for buttons */
.button-arrow {
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
}

/* Similar Stocks Cards */

.similar-stocks-cards {
  display: grid;
  grid-template-columns: repeat(4, 300px);
  gap: 16px;
  margin-bottom: 40px;
  position: relative;
}

.similar-stock-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  border: 1px solid var(--color-border);
}

.similar-stock-card.blurred-card {
  filter: blur(10px);
  opacity: 0.5;
  pointer-events: none;
}

.similar-stock-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stock-header {
  margin-bottom: 20px;
}

.stock-name {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #1f2225;
  margin: 0 0 8px 0;
}

.stock-ticker {
  display: inline-block;
  background-color: #f5f5f5;
  color: #666;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 8px;
}

.stock-details {
  margin-bottom: 24px;
}

.stock-detail-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 6px;
  gap: 10px;
}

.stock-detail-item:last-child {
  margin-bottom: 0;
}

.detail-label {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #666;
}

.detail-value {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1f2225;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.score-circle {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.score-circle-large {
  width: 130px;
  height: 130px;
}

.score-circle-large .score-number {
  font-size: var(--fluid-24-32);
  color: #fff;
}

.score-circle-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-circle-svg-circle {
  stroke: var(--color-rank-grey);
  stroke-width: 2;
  fill: transparent;
  r: 16;
  cx: 18;
  cy: 18;
}

.score-circle-svg-progress {
  stroke: inherit;
  stroke-width: 3;
  stroke-dasharray: 100;
  fill: transparent;
  transition: stroke-dashoffset 0.3s ease;
  r: 16;
  cx: 18;
  cy: 18;
}

.score-circle-svg-progress.yellow {
  stroke: var(--color-rank-yellow);
}

.score-circle-svg-progress.dark_green {
  stroke: var(--color-rank-green-dark);
}

.score-circle-svg-progress.red {
  stroke: var(--color-rank-red);
}

.score-circle-svg-progress.light_green {
  stroke: var(--color-rank-green-light);
}

.score-number {
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 600;
  color: #1f2225;
  z-index: 1;
  position: relative;
}

.score-bar-container {
  flex: 1;
}

.score-label {
  display: block;
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 6px;
}

.score-bar {
  width: 100%;
  height: 4px;
  background-color: var(--color-rank-grey);
  position: relative;
}

.score-progress {
  height: 6px;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  transition: width 0.3s ease;

}

.score-progress.yellow {
  background-color: var(--color-rank-yellow);
}

.score-progress.dark_green {
  background-color: var(--color-rank-green-dark);
}

.score-progress.light_green {
  background-color: var(--color-rank-green-light);
}

.score-progress.red {
  background-color: var(--color-rank-red);
}

.stock-analysis-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #6b3305;
  text-decoration: none;
  transition: color 0.2s ease;
}

.stock-analysis-link:hover {
  color: #472101;
}

.stock-analysis-link svg {
  width: 20px;
  height: 20px;
}

/* Responsive for similar stocks cards */
@media (max-width: 920px) {
  .similar-stocks-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .similar-stock-card {
    padding: 16px;
  }

  .metrics-table {
    display: block;
    overflow-x: auto;
  }

  .metrics-tabs {
    overflow-x: auto;
  }

  .stock-page-container {
    flex-direction: column;
  }

  .company-details-sidebar {
    width: 100%;
  }

  .stock-analysis-wrapper {
    border-right: none;
    border-bottom: solid 1.3px var(--color-border);
  }

}

@media (max-width: 768px) {
  .similar-stocks-cards {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .similar-stock-card {
    padding: 16px;
  }
  
  .stock-score {
    gap: 12px;
  }
  
  .score-circle {
    width: 40px;
    height: 40px;
  }

  .score-circle-large {
    width: 90px;
    height: 90px;
  }
  
  .score-number {
    font-size: 16px;
  }
  
  .similar-stocks-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .rank-content {
    flex-direction: column;
  }

  .rank-left-section {
    width: 100%;
  }

  .rank-bar {
    width: 40%;
  }

  .overlay-card {
    width: 60%;
  }

  .company-info {
    padding: 25px 16px;
  }

  .rank-item, .rank-item.active {
    padding: 14px 16px;
  }

  .company-description-card {
    padding: 16px;
  }

  .stock-actions {
    display: flex;
    background: white;
    border-top: 1px solid #e0e0e0;
    overflow: hidden;
    margin: 0 -16px;
    margin-bottom: -16px;
    gap: 0;
  }

  .action-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    background: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    min-height: 80px;
    margin: 0;
    gap: 8px;
  }

  .action-button:hover {
    background-color: #f8f8f8;
  }

  .action-button:active {
    background-color: #f0f0f0;
  }

  .action-button .action-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 8px;
  }

  .action-button:first-child {
    border-right: 1px solid #e0e0e0;
  }

  .action-button {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
    line-height: 1.2;
  }

  .similar-stocks-button {
    display: none;
  }

  .similar-stocks-section {
    margin-bottom: 0px;
  }

  /* Hide detailed ranks section on mobile */
  .metrics-table-section {
    display: none;
  }
}

@media (max-width: 480px) {
  .action-button {
    padding: 14px 8px;
    min-height: 70px;
  }
  
  .action-button .action-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 6px;
  }
  
  .action-button {
    font-size: 12px;
  }
}

/* Pricing section spacing for stock research pages */
.features-carousel-section + .pricing-section.container.pricing-rounded-box {
  margin-top: 80px;
}

.pricing-section.container.pricing-rounded-box {
  margin-bottom: 80px;
}

@media (max-width: 768px) {
  .features-carousel-section + .pricing-section.container.pricing-rounded-box {
    margin-top: 60px;
  }
  
  .pricing-section.container.pricing-rounded-box {
    margin-bottom: 60px;
  }
}

@media (max-width: 480px) {
  .features-carousel-section + .pricing-section.container.pricing-rounded-box {
    margin-top: 50px;
  }
  
  .pricing-section.container.pricing-rounded-box {
    margin-bottom: 50px;
  }
}