.r-and-d-timeline-wrapper {
  height: 70px;
  position: relative;
  margin: 20px 15px 30px 15px;
  overflow-x: auto !important;
  overflow-y: hidden;
  white-space: nowrap;
}

/* Custom horizontal scrollbar for timeline */
.r-and-d-timeline-wrapper::-webkit-scrollbar {
  height: 2px;  /* adjust thickness */
}

.r-and-d-timeline-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.r-and-d-timeline-wrapper::-webkit-scrollbar-thumb {
  background: #730909;  /* match your brand color */
  border-radius: 10px;
}

.r-and-d-timeline-wrapper::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Firefox scrollbar */
.r-and-d-timeline-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #730909 #f1f1f1;
}

.r-and-d-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    height: 2px;
    background: #999;
    width: 100%;
    z-index: 1;
  }

 .r-and-d-timeline {
        position: relative;
        z-index: 2;
        display: inline-flex;
    }

.r-and-d-timeline form {
  display: inline-flex;   /* inline to respect nowrap */
  justify-content: flex-start;
  align-items: flex-start;
  width: auto;            /* auto so it doesn’t stretch full width */
  white-space: nowrap;    /* keep children on one line */
}

.r-and-d-timeline label {
  position: relative;
  display: inline-block;  /* not block/flex: works with nowrap */
  text-align: center;
  cursor: pointer;
  padding-top: 45px;
  min-width: 70px;        /* each label takes some width */
  margin: 0 4px;          /* small gaps */
  color: #666;
  font-size: 13px;
  line-height: 1.3;
}

/* Remove the HTML <br> line breaks inside labels that force wrapping */
.r-and-d-timeline label br {
  display: none;
}

/* Bullet styling */
.r-and-d-timeline label:before {
  content: '';
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  border: 3px solid #999;
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  transition: all 0.3s ease;
  box-shadow: 0 0 0 3px #fff;
  z-index: 2;
}

/* Active and hover states */
.r-and-d-timeline label.active,
.r-and-d-timeline label:hover {
  color: #730909;
  font-weight: bold;
}

.r-and-d-timeline label.active:before,
.r-and-d-timeline label:hover:before {
  border-color: #730909;
  background: #730909;
  transform: translateX(-50%) scale(1.25);
}

/* Hide radios */
.r-and-d-timeline label input[type="radio"] {
  display: none;
}


/* Date container */
.r-and-d-timeline .ap-date {
    width: 100%;
    display: none;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Container principal pentru proiecte */
.r-and-d-projects {
    padding: 0px 20px 30px 20px;
}

/* Articole individuale */
.r-and-d-projects article {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #730909;
	border-right: 4px solid #730909;
    animation: fadeIn 0.3s ease;
}

/* Titluri articole */
.r-and-d-projects article h3 {
    text-decoration: none;
    font-size: 18px !important;
    color: #730909;
    line-height: 1.5 !important;
}

.r-and-d-projects article .content p {
    font-size: 14px;
}

/* Content container cu padding pentru imagine */
.r-and-d-projects article .content {
    position: relative;
    padding-left: 330px;
}

/* Imagini featured */
.r-and-d-projects article .content img {
    position: absolute;
    top: 0;
    left: 0;
    height: auto;
    max-width: 300px;
}

/* Replacement pentru featured image */
.r-and-d-projects article .content .featured-image-replacement {
    position: absolute;
    top: 0;
    left: 0;
    width: 300px;
}

.r-and-d-projects article .content .featured-image-replacement h4 {
    font-size: 22px;
    line-height: 1.5;
    margin: 0;
    color: #730909;
}

/* Meta informații proiect */
.r-and-d-projects article .content .project-meta {
    margin-bottom: 12px;
    color: #730909;
}

.r-and-d-projects article .content .project-meta .project-meta-detail {
    font-size: 14px;
    display: block;
    vertical-align: top;
    margin-bottom: 6px;
}

/* Info links cu iconițe */
.r-and-d-projects article .content .info {
    font-size: inherit;
    line-height: 20px;
    display: inline-block;
    vertical-align: top;
    height: 20px;
    position: relative;
    padding-right: 20px;
    text-decoration: none;
}

.r-and-d-projects article .content .info .icon {
    position: absolute;
    top: 2px;
    right: 0;
    width: 16px;
    height: 16px;
    display: block !important;
}

.r-and-d-projects article .content .info:hover {
    color: #730909;
}

.r-and-d-projects article .content .info:hover .icon svg path {
    fill: #730909;
}

/* Links container */
.r-and-d-projects article .links {
    font-size: 0;
    line-height: 0;
    padding-top: 10px;
    display: block !important;
}

.r-and-d-projects article .links a {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: top;
    margin-right: 6px;
}

.r-and-d-projects article .links a:last-child {
    margin-right: 0;
}

.r-and-d-projects article .links a svg {
    width: 20px;
    height: 20px;
    display: block;
}

.r-and-d-projects article .links a svg path {
    transition: all 450ms ease;
}

.r-and-d-projects article .links a:hover svg path {
    fill: #000;
}

.r-and-d-projects article .links a:hover,
.r-and-d-projects article .links a:active,
.r-and-d-projects article .links a:focus {
    color: #000;
}

/* Detalii proiect individual */
.r-and-d-project-detail {
    padding: 40px 30px 0 0;
}

.r-and-d-project-detail h2 {
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.r-and-d-project-detail h3 {
    font-size: 20px !important;
}

.r-and-d-project-detail h3.section-title {
    color: #730909;
}

.r-and-d-project-detail hr {
    margin-bottom: 40px;
}

.r-and-d-project-detail .main-image {
    float: left;
    margin-right: 20px;
    margin-bottom: 14px;
}

.r-and-d-project-detail .links li {
    margin-bottom: 6px;
}

.r-and-d-project-detail .links li a {
    font-size: inherit;
    display: block;
    line-height: 20px;
    text-decoration: none;
    position: relative;
    padding-left: 16px;
}

.r-and-d-project-detail .links li a span {
    display: block !important;
    width: 12px;
    height: 12px;
    position: absolute;
    top: 2px;
    left: 0;
}

.r-and-d-project-detail .links li a span svg path {
    fill: currentColor;
}

.r-and-d-project-detail .links li a:hover {
    color: #730909;
}

/* Search functionality */
.rd-search {
    margin: 20px 0 0 0;
    padding: 0 15px;
}

.rd-search .inputs-wrapper {
    overflow: hidden;
    margin-bottom: 20px;
}

.rd-search .inputs-wrapper .inputs {
  position: relative;
  padding-right: 46px; /* space for search button */
  float: right;
  width: 270px;
}

.rd-search .inputs.has-search-value input[type="text"] {
  padding-right: 10px; /* extra space when clear button shows */
}

.rd-search input[type="text"] {
    box-shadow: none;
    height: 46px;
    box-sizing: border-box;
    line-height: 28px;
  padding: 0 20px 0 10px; /* avoid text under the search button */
    color: #999;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
    transition: all 450ms ease;
    font-size: 13px;
}

.rd-search input[type="text"]:focus {
    border-color: #999;
}

/* Placeholder styles */
.rd-search ::-webkit-input-placeholder {
    color: #999;
    opacity: 1;
}

.rd-search ::-moz-placeholder {
    color: #999;
    opacity: 1;
}

.rd-search :-ms-input-placeholder {
    color: #999;
    opacity: 1;
}

.rd-search :-moz-placeholder {
    color: #999;
    opacity: 1;
}

/* Search button */
.rd-search button {
    width: 46px;
    height: 46px;
    border: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
	background-color: #7e253f;
    transition: all 450ms ease;
    position: absolute;
    top: 0;
    right: 0;
    display: block !important;
    cursor: pointer;
	color: #ffffff
}

  .rd-search .clear-search {
    position: absolute;
    top: 0;
    right: 46px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f6f6;
    color: #730909;
    text-decoration: none;
    font-weight: bold;
    border-right: 1px solid #e6e6e6;
    transition: all 200ms ease;
  }

  .rd-search .clear-search:hover {
    background: #ebebeb;
    color: #7e253f;
  }

.rd-search button:hover {
	background: #cc949c;
}

.rd-search button svg path {
    fill: #fff;
}

.flaticon-search:before {
	font-size: 16px;
}

/* RESPONSIVE DESIGN */
/* Mobile cards under 767px */
@media (max-width: 767px) {
  /* Reduce container padding */
  .r-and-d-projects {
    padding: 0 12px 20px 12px;
  }

  /* Card spacing and padding */
  .r-and-d-projects article {
    padding: 12px;
    margin-bottom: 16px;
  }

  /* Stack layout: image above text */
  .r-and-d-projects article .content {
    padding-left: 0;           /* remove left padding */
    display: flex;
    flex-direction: column;
  }

  /* Image becomes top block, centered, smaller */
  .r-and-d-projects article .content img {
    position: static;          /* not absolute */
    max-width: 100%;
    width: 100%;
    height: auto;
    margin-bottom: 12px;
    border-radius: 6px;
  }

  /* Featured image replacement also stacks */
  .r-and-d-projects article .content .featured-image-replacement {
    position: static;
    width: 100%;
    height: auto;
    min-height: 100px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f3f3;
    border-radius: 6px;
    padding: 20px;
  }

  .r-and-d-projects article .content .featured-image-replacement h4 {
    font-size: 16px;
    text-align: center;
  }

  /* Smaller title on mobile */
  .r-and-d-projects article h3 {
    font-size: 16px !important;
    margin-bottom: 8px;
  }

  /* Adjust text and meta */
  .r-and-d-projects article .content p {
    font-size: 13px;
    line-height: 1.6;
  }

  .r-and-d-projects article .content .project-meta {
    margin-bottom: 10px;
  }

  .r-and-d-projects article .content .project-meta .project-meta-detail {
    font-size: 12px;
  }

  /* Links spacing */
  .r-and-d-projects article .links {
    padding-top: 8px;
  }

  /* Project detail page adjustments */
  .r-and-d-project-detail {
    padding: 20px 15px 0 15px;
  }

  .r-and-d-project-detail .main-image {
    float: none;
    width: 100%;
    margin: 0 0 15px 0;
  }

  .r-and-d-project-detail h2 {
    font-size: 22px;
  }

  .r-and-d-project-detail h3 {
    font-size: 18px !important;
  }
}

/* Extra small mobile: under 480px */
@media (max-width: 480px) {
  .r-and-d-projects {
    padding: 0 8px 15px 8px;
  }

  .r-and-d-projects article {
    padding: 10px;
    border-left: 3px solid #730909;
    border-right: 3px solid #730909;
  }

  .r-and-d-projects article h3 {
    font-size: 15px !important;
  }

  .r-and-d-projects article .content p {
    font-size: 12px;
  }
}