.propfirm-page {
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
}

/* Header Section Layout */
.header-section {
    display: flex;
    align-items: flex-start; /* Aligns items to the top */
    justify-content: space-between;
    gap: 20px; /* Adds space between left and right panels */
}


/* Left Panel (Summary) */
.left-panel {
    flex: 0 1 400px; /* Prevents excessive stretching */
    max-width: 450px; /* Limits width */
    min-height: 440px; /* ✅ Ensure all firms match Firm 1's height */
    background-color: #2a2a4f;
    padding: 15px; /* Reduced padding */
    margin-right: 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column; /* Ensures content is stacked properly */
    align-items: center; /* Center content */
}

.rating-summary .overall-rating {
    font-size: 48px;
    font-weight: bold;
    color: #4caf50;
}

.rating-description {
    margin-top: 10px;
    font-size: 16px;
    color: #ffffff;
}

.firm-details {
    margin: 10px 0; /* Reduced space */
    text-align: center;
}

/* Adjust firm logo to prevent too much empty space */
.firm-logo {
    width: 120px; /* Enforce a fixed width */
    height: 120px; /* Enforce a fixed height */
    object-fit: contain; /* Ensures the image fits without stretching */
    display: block;
    margin: 10px auto; /* Maintain center alignment */
    background-color: transparent; /* Ensures logos with transparency work */
}

.firm-name {
    display: block;
    text-align: center;
    font-size: 24px;
    margin-bottom: 5px;
    background: none; /* Remove background if applied */
    border: none; /* Ensure there's no border */
    padding: 5px 0; /* Reduce padding */
}

.instrument-type {
    font-size: 18px;
    color: #ffffff;
}

.rate-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #2196f3;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

/* RIGHT PANEL: Fixes stacking issue */
.right-panel {
    flex: 0 0 auto;
    min-width: 300px;
    max-width: 500px;
    /* Remove the big background, border, and padding so the children become separate boxes */
    background-color: transparent; /* was #2a2a4f */
    border: none;                 /* was 1px solid #ddd */
    border-radius: 0;            /* was 5px */
    padding: 0;                  /* was 15px */
    color: white;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 20px; /* keep gap so boxes have space between them */
    flex-grow: 0;
    overflow: visible;
}

.rating-distribution {
    background-color: #2a2a4f;
    /* Lower the overall padding */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: white;
}

/* Rating Distribution */
.rating-distribution h3 {
    margin: 0 0 5px 0; 
    padding: 0;
}

.rating-distribution ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.rating-distribution li {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.rating-distribution .label {
    width: 120px;
}

.rating-distribution .count {
    width: 50px;
    text-align: right;
    margin-right: 10px;
}

/* The gray background track */
.bar-container {
  flex: 1;             /* fills the horizontal space */
  background-color: #ddd;
  height: 12px;        /* thickness of the bar */
  margin: 0 10px;      /* spacing to left & right */
  border-radius: 6px;  /* round corners */
  overflow: hidden;    /* so the bar doesn't overflow the container */
  position: relative;
}

/* The colored bar that shows the rating percentage */
.bar {
  background-color: #007bff; /* or your brand color */
  height: 100%;
  border-radius: 6px;
}

/* The numeric count on the right */
.rating-count {
  width: 30px;         /* or auto */
  text-align: right;
  font-weight: bold;
}



/* REVIEWS SECTION: Now properly stacked below the rating distribution */
.reviews-section {
    max-width: 1200px;
    margin: 20px auto; /* centers it horizontally, plus 20px top/bottom space */
    background-color: #2a2a4f;
    padding: 1px 20px 20px 20px; /* Reduce top padding from 20px to 10px */
    border: 1px solid #ddd;
    border-radius: 10px;
    color: white;
}

/* Adjust Reviews Section Header */
.reviews-header {
    display: flex;
    justify-content: space-between; /* Moves items to opposite sides */
    align-items: center;
    padding: 10px 20px;
    width: 100%;
}

/* Move Reviews Title to the Left */
.reviews-header h2 {
    margin: 0;
    font-size: 20px;
    color: white;
    text-align: left;
}

/* Individual Review Box */
/* Individual Review Box */
.review {
    display: flex;
    flex-direction: column; /* Stack elements vertically */
    justify-content: space-between; /* Keeps spacing consistent */
    align-items: flex-start;
    background-color: #1e1e3f;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #444;
    position: relative; /* Ensures payout proof aligns properly */
    overflow: hidden;
    padding-bottom: 50px; /* Extra space at the bottom */
}

/* Ensures text & payout proof stay aligned properly */
.review-body {
    display: flex;
    flex-direction: column;  /* Stack elements properly */
    justify-content: flex-start;  /* Align text to the top */
    align-items: flex-start;
    width: 100%;
    margin-top: 0;  /* Remove any extra space above */
}

/* Review Content (Text) */
.review-content {
    max-width: 75%;
    width: 100%;
    display: block; /* Forces it to a new row */
    margin-top: -25px; /* Add spacing */
}

/* Top Section: Ratings + Date */
.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* Ratings Container */
.review-ratings {
    display: flex;
    flex-direction: row;  /* Change from column to row */
    justify-content: center; /* Center ratings horizontally */
    align-items: center; /* Align ratings vertically */
    gap: 15px; /* Add spacing between each rating */
    flex-wrap: wrap; /* Ensure proper wrapping on small screens */
    width: 100%;
    text-align: center;
    margin-bottom: 10px; /* Adds some space below */
}


/* Individual Rating Block (Quality, Difficulty) */
.review-rating {
    display: flex;
    align-items: center;
    color: white;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    width: fit-content;
}

/* Colors for Different Ratings */
.review-rating-5 { background-color: #4caf50; }  /* Green - Awesome */
.review-rating-4 { background-color: #ffeb3b; color: black; }  /* Yellow - Great */
.review-rating-3 { background-color: #ffeb3b; color: black; }  /* Yellow - Okay */
.review-rating-2 { background-color: #f44336; }  /* Red - Poor */
.review-rating-1 { background-color: #f44336; }  /* Red - Awful */

/* Difficulty rating should be a different color */
.review-rating.difficulty {
    background-color: #9e9e9e;
}

/* Firm Name & Date */
.review-metadata {
    display: flex;
    flex-direction: column;
    text-align: right;
    font-size: 14px;
    color: #bbb;
}

/* Review Text */
.review-text {
    display: block;
    width: 100%; /* Forces it to a new row */
    text-align: left;
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

/* Review Tags */
.review-tags {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.review-tag {
    background-color: #666;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
}

/* Helpful Section */
.review-helpful {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

.review-helpful button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.review-helpful button:hover {
    color: #4caf50;
}

/* Filters for Reviews */
.review-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end; /* or space-between, if you prefer */
    margin-bottom: -15px;
    margin-right: 45px;
}

.review-filters select {
    /* Remove the flex:1 so they don't expand too wide */
    width: auto; 
    min-width: 120px;    /* ensures they don’t get too narrow */
    padding: 6px;
    font-size: 13px;
    border-radius: 5px;
    border: none;
    background-color: #ddd;
    color: black;
    outline: none;       /* if you prefer a clean look */
    cursor: pointer;
}

/* ЁЯСд Username & Date Styling */
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap; /* Ensures wrapping on small screens */
    gap: 10px; /* Adjust spacing */
}

.propfirm-user-info {
    display: flex;
    flex-direction: column; /* Forces stacking */
    gap: 2px; /* Adds spacing between username & date */
}

.review-username {
    font-weight: bold;
    color: #fff;
}

.review-date {
    font-style: italic;
    color: #888;
    font-size: 12px;
    margin-top: -2px; /* Add a small space between username & date */
}

/* тнР Rating Breakdown Styling (Now in a Single Row) */
.review-ratings {
    display: flex;
    flex-direction: row;  /* Keep ratings in one line */
    flex-wrap: nowrap; /* Prevent wrapping */
    gap: 15px; /* Keep spacing between rating boxes */
    font-size: 14px;
    justify-content: center; /* Keep it centered horizontally */
    align-items: center;
    
    position: relative; /* Change this if necessary */
    top: -35px;  /* Moves the ratings higher */
    transform: translateY(-10px); /* Adjust as needed */
    margin-top: 0; /* Remove default margin */
    margin-bottom: 0;
}


/* Ensures rating blocks remain inline */
.review-ratings span {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    white-space: nowrap; /* Prevents line breaks inside individual ratings */
}

/* Payout Proof stays fixed on the right */
.payout-proof {
    position: absolute; /* Absolute positioning inside the review box */
    top: 20px; /* Distance from the top */
    right: 10px; /* Distance from the right */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; /* Aligns content to the right */
    cursor: pointer;
    width: 120px; /* Adjust width to prevent shifting */
}

/* Payout Proof text */
.payout-proof strong {
    text-align: center; /* Ensure the text is centered */
    margin-bottom: 5px;
    display: block; /* Block element for proper alignment */
}

/* Wrapper around image to allow for hover effects */
.payout-proof-wrapper {
    position: relative;
    display: flex;
    justify-content: center; /* Center image */
    align-items: center;
}

.payout-proof img {
    width: 80px;
    height: auto;
    border-radius: 5px;
    border: 1px solid #555;
    transition: transform 0.2s ease-in-out;
}

/* Hover Effect: Slightly Enlarges */
.payout-proof-wrapper:hover img {
    transform: scale(1.1);
}

/* "View" Text on Hover */
.payout-proof-wrapper::after {
    content: "View";
    position: absolute;
    bottom: -15px; /* Moves it slightly below the image */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    opacity: 0; /* Initially hidden */
    transition: opacity 0.2s ease-in-out;
}

/* Show "View" text when hovering over the wrapper */
.payout-proof-wrapper:hover::after {
    opacity: 1;
}


/* FULLSCREEN IMAGE MODAL */
.image-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000; /* Ensure it's on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Black background with transparency */
    justify-content: center;
    align-items: center;
}

/* Fullscreen Image */
.image-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.5);
}

/* Close Button (X) */
.close-modal {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}

.close-modal:hover {
    color: red;
}

.middle-panel {
    flex: 0 1 350px;
    height: 370px;
    background-color: #2a2a4f;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.radar-chart-container {
    position: relative; /* ✅ Ensures radar-values stays inside */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#radarChart {
    width: 100%;
    height: 100%;
}

.radar-values {
    position: absolute;
    bottom: -20px; /* ✅ Ensures text is inside the container */
    text-align: center;
    color: #ddd;
    font-size: 13px;
    width: 100%;
    background: none;
    padding: 0;
    border-radius: 0;
}
.radar-values p {
    margin: 0;
    line-height: 1.2; /* ✅ Keeps text compact */
}


/* Wrap your existing rules */
.favorite-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 33px;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.heart-icon {
  /* 14s total per cycle, infinite repeat */
  animation: bounceCycle 14s infinite;
  animation-fill-mode: forwards; /* keep final state of each segment */
}

/* Keyframes timeline:
   - 0% to ~35.71% (5s): Shake
   - ~35.71% to ~57.14% (3s): Idle
   - ~57.14% to ~78.57% (3s): Shake
   - ~78.57% to 100% (3s): Idle
   Total: 14s per loop
*/
@keyframes bounceCycle {
  /* ---- FIRST 5s OF SHAKE ---- */
  0% {
    transform: translateY(0) rotate(0);
  }
  5% {
    transform: translateY(-3px) rotate(-3deg);
  }
  10% {
    transform: translateY(3px) rotate(3deg);
  }
  15% {
    transform: translateY(-3px) rotate(-3deg);
  }
  20% {
    transform: translateY(3px) rotate(3deg);
  }
  25% {
    transform: translateY(-3px) rotate(-3deg);
  }
  30% {
    transform: translateY(3px) rotate(3deg);
  }
  35.71% { /* ~5s mark */
    transform: translateY(0) rotate(0);
  }

  /* ---- IDLE for 3s (5–8s) ---- */
  57.14% { /* ~8s mark */
    transform: translateY(0) rotate(0);
  }

  /* ---- SECOND 3s OF SHAKE (8–11s) ---- */
  60% {
    transform: translateY(-3px) rotate(-3deg);
  }
  65% {
    transform: translateY(3px) rotate(3deg);
  }
  70% {
    transform: translateY(-3px) rotate(-3deg);
  }
  75% {
    transform: translateY(3px) rotate(3deg);
  }
  78.57% { /* ~11s mark */
    transform: translateY(0) rotate(0);
  }

  /* ---- FINAL IDLE (11–14s) ---- */
  100% { /* ~14s mark */
    transform: translateY(0) rotate(0);
  }
}

.offers-box {
    background-color: #1e1e2d;
    padding: 4px 4px; /* Reduced padding for less space inside */
    border-radius: 10px;
    text-align: center;
    margin-top: 37px; /* Adds spacing from radar chart */
    margin-bottom: 0; /* Ensures no extra space below */
    width: 100%;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4); /* Subtle white glow */
    border: 1px solid #ddd
}

.offers-box h3 {
    color: #fff;
    font-size: 14px; /* Slightly smaller to reduce height */
    margin: 2px 0; /* Tiny margin above and below */
    padding: 2px 0; /* Adds a little breathing room */
    line-height: 1; /* Prevent extra space */
}

.offers-box p {
    font-size: 13px; /* Reduce text size for compact look */
    color: #ddd;
    margin: 4px 0 0 0; /* Minimal spacing below h3 */
    line-height: 1.4; /* Improves readability without extra spacing */
}

/* Firm Comparison Box - Same Style as Offers Box */
/* Firm Comparison Box - Fixes the Expansion Issue */
/* Firm Comparison Box */
/* Firm Comparison Box */
.firm-comparison-box {
    background-color: #2a2a4f;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    text-align: center;

    width: 100%;
    max-width: 320px;  /* keeps it from stretching too wide */
    height: 220px;     /* fixed height, as you wanted */
    margin-top: -25px;
    align-self: center;

    /* so we can absolutely position the button within this box */
    position: relative;

    /* allow the content to scroll if it exceeds 263px */
    overflow-y: auto;

    /* add extra bottom padding so text doesn't overlap the button */
    padding: 15px 15px 60px 15px; /* 60px bottom padding for button space */
}

/* Centers the box horizontally */
.firm-comparison-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px; 
}

/* "Get Discount" Button pinned at bottom center */
.signup-btn {
    position: absolute;   /* so it stays at the bottom of .firm-comparison-box */
    bottom: 15px;         /* 15px above the bottom edge */
    left: 50%;            /* center horizontally */
    transform: translateX(-50%);  /* offset by half its own width */
    
    display: inline-block;
    padding: 8px 15px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    width: 100%;
    max-width: 200px; /* ensures the button never exceeds 200px in width */
}

/* Table layout if needed */
.comparison-table {
    table-layout: fixed; 
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.comparison-table th, .comparison-table td {
    padding: 8px;
    border-bottom: 1px solid #555;
    text-align: center;
    color: white;
    font-size: 14px;
    word-wrap: break-word;
    white-space: normal;
}

/* Minimal margins for the heading */
.firm-comparison-box h3 {
    margin: 0 0 5px;
    padding: 0;
}

/* If you have a .comparison-container, no special rules needed beyond above */
.comparison-container {
    margin-top: 0;
}

/* Info icon styling */
.info-icon {
    cursor: help;
    font-size: 1.9em;
    margin-left: 4px;
    color: #888;
}

/* For Overall rating: colored background + white text */
.rating-value {
  display: inline-block;
  padding: 4px 8px;
  margin-right: 6px;
  border-radius: 5px;
  color: #fff; /* text color always white here */
}

/* Background color classes */
.rating-green {
  background-color: #4caf50;
}

.rating-yellow {
  background-color: #ff9800;
}

.rating-red {
  background-color: #f44336;
}

/* For the other 3 ratings: only text color changes */
.text-green {
  color: #4caf50;
}
.text-yellow {
  color: #ff9800;
}
.text-red {
  color: #f44336;
}

.no-bg {
    background: none !important;
    margin-left: -12px;
}


.review-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-profile-pic {
    width: 40px; /* Adjust as needed */
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
