.sub-header {
    background-color: #FFFFFF; 
    box-shadow: 0 20px 76px rgba(0, 0, 0, 0.2); 
    position: fixed; 
    top: 0; 
    left: 50%;  
    transform: translateX(-50%); 
    width: calc(100% - 10px); 
    z-index: 999; 
    border-radius: 0 0 34px 34px;
}

.sub-header::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-bottom: 3px solid black;
    border-right: 3px solid black;
    border-radius: 0 0 40px 0;
    bottom: 5px;   
    right: 5px;    
    box-sizing: border-box;
    pointer-events: none;
}

.sub-header-container {
    margin-top: 60px;
    padding: 25px 35px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sub-header-container h4 {
    font-weight: 700;
    font-style: bold;
    font-size: 22px;
    line-height: 28px;
    letter-spacing: -0.45px;
    color: #000000;
}

.tabs {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    width: 100%;
    justify-content: space-between;
    background-color: rgba(118, 118, 128, 0.12);
    border-radius: 34px;
}

.tab {
    font-weight: 590;
    font-size: 14px;
    color: #000000; 
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1; 
    font-style: semibold;
    line-height: 18px;
    letter-spacing: -0.08px;
    padding: 5px 0;
    margin: 4px;
    border-radius: 34px;
}

.tab.active {
    background-color: #FFFFFF; 
    color: #000000; 
}

.tab:hover {
    background-color: #FFFFFF; 
    color: #000000;
   
}

.sub-header-container hr {
  border: none;
  border-bottom: 2px solid rgba(212, 212, 212, 0.3);
  width: calc(100% - 30px);
  margin: 0 auto;
}

.sub-header-container p {
    font-weight: 510;
    font-style: medium;
    font-size: 17px;
    line-height: 20px;
    letter-spacing: -0.43px;
    color: rgba(60, 60, 67, 0.3);
    width: calc(100% - 30px);
    margin: 0 auto;
}


/* ---------- Responsive Breakpoints ---------- */

/* Large desktops (wider than 1400px) */
@media (min-width: 1400px) {
  .sub-header-container { padding: 30px 40px; }
  .sub-header-container h4 { font-size: 24px; line-height: 30px; }
}

/* Large tablets / small laptops */
@media (max-width: 992px) {
  .sub-header-container { padding: 20px 24px; }
  .sub-header-container h4 { font-size: 20px; line-height: 26px; }
  .tab { font-size: 9px; padding: 6px 10px; }
}

/* Medium tablets */
@media (max-width: 820px) {
  .sub-header-container { margin-top: 55px; padding: 18px 20px; }
  .sub-header-container h4 { font-size: 19px; }
  .tab { font-size: 9px; padding: 6px 9px; margin: 3px; }
  .sub-header-container p { font-size: 15px; }
}

/* Small tablets / landscape phones */
@media (max-width: 768px) {
  .sub-header { width: 100%; border-radius: 0 0 20px 20px; }
  .sub-header-container { margin-top: 50px; padding: 16px 18px; }
  .sub-header-container h4 { font-size: 18px; line-height: 24px; }
  .tab { font-size: 9px; padding: 6px 8px; margin: 2px; }
  .sub-header-container p { font-size: 15px; }
}

/* Phones */
@media (max-width: 480px) {
  .sub-header-container { margin-top: 40px; padding: 14px 16px; }
  .sub-header-container h4 { font-size: 16px; line-height: 22px; text-align: center; }
  .tabs { gap: 6px; justify-content: flex-start; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
  .tab { font-size: 9px; padding: 5px 10px; flex: 0 0 auto; } /* prevent tabs from squishing */
  .sub-header-container p { font-size: 14px; line-height: 18px; text-align: center; }
}

/* Extra small phones */
@media (max-width: 360px) {
  .sub-header-container h4 { font-size: 15px; }
  .tab { font-size: 9px; padding: 4px 8px; }
  .sub-header-container p { font-size: 13px; }
}
