* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: sans-serif;
  overflow-x: hidden;
  background: linear-gradient(to bottom, #d0d0d0, #b0b0b0);
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 130px;
  background-color: #d6336c;
  padding-bottom:2px;
  color: white;
  display: flex;
  flex-direction: column; /* add this line */
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  z-index: 1000;
  width: calc(100% - 17px);
  overflow-x: hidden; 
}

.headdertext {
	display:block;
	width:100%;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.footer {
  background-color: #d9ead3;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0;
  width: 100%;
  grid-column: 1 / -1;
  grid-area: footer;
}

#footertext {
  text-align: center;
  font-size: 0.8rem;
  line-height: 1;
}

/* --- Layout Container --- */
/*.container {
  display: grid;
  grid-template-areas:
    "leftbar maincontent rightbar";
  grid-template-columns: 0.8fr 3fr 0.8fr;
  gap: 0;
  margin-top: 80px; /* Push below fixed header */
/*}*/

.container {
  display: grid;
  grid-template-areas:
    "leftbar maincontent rightbar"
    "footer footer footer";
  grid-template-columns: 0.8fr 3fr 0.8fr;
  grid-template-rows: 1fr auto;
  margin-top: 120px; /* offset for fixed header */
  min-height: calc(80vh - 80px); /* ensure at least full remaining height */
}

/* --- Sidebar Styles --- */
.leftbar {
  grid-area: leftbar;
  background: linear-gradient(to bottom, #d0d0d0, #b0b0b0);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.rightbar {
  grid-area: rightbar;
  background: linear-gradient(to bottom, #d0d0d0, #b0b0b0);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

/* --- Main Content --- */
.maincontent {
  grid-area: maincontent;
  /*background: linear-gradient(to bottom, #ffffff, #6699FF);*/
  background:#6699FF;
  color: white;
  padding: 1rem;
  min-height: 500px;
  width: 100%;
  border-radius: 1rem;
}

/* --- Profile Grid --- */
.profile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.profile-item {
  width: 210px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
}

/* --- Carousel Image --- */
.profile-image {
  width: 200px;
  height: 200px;
  border-radius: 1rem;
  object-fit: fill;
  flex-shrink: 0;
}

.profile-image-profilpage {
  width: 300px;
  height: 300px;
  border-radius: 1rem;
  object-fit: fill;
  flex-shrink: 0;
}

.profile-img {
  width: 350px;
  height: 350px;
  border-radius: 1rem;
  object-fit: fill;
  flex-shrink: 0;
  margin-top:10px;
}

/* --- Carousel Wrapper --- */
.image-carousel-wrapper {
  position: relative;
  width: 200px;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Carousel Track --- */
.image-carousel {
  display: flex;
  width: 200px;
  overflow: hidden;
  scroll-behavior: smooth;
}

.image-carousel img {
  min-width: 200px;
  height: 200px;
  border-radius: 1rem;
  object-fit: fill;
  flex-shrink: 0;
}



/* --- Scroll Buttons --- */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0,0,0,0.2);
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  z-index: 20;
  color: white;
}

.scroll-btn.left {
  left: 0;
  z-index: 20;
}

.scroll-btn.right {
  right: 0;
  z-index: 20;
}

/* --- Profile Info --- */
.profile-info {
  text-align: center;
  margin-top: 0.5rem;
}

.name {
  font-weight: bold;
  font-size: 1rem;
}

.age-location {
  font-size: 0.85rem;
  color: #555;
}

.favorite-btn {
  margin-top: 0.4rem;
  padding: 0.3rem 0.6rem;
  border: none;
  background-color: #ff6584;
  color: white;
  border-radius: 1rem;
  cursor: pointer;
}


.favorite-btn_nl {
  margin-top: 0.4rem;
  padding: 0.3rem 0.6rem;
  border: none;
  background-color: #BB6584;
  color: white;
  border-radius: 1rem;
  cursor: pointer;
}

.send-msg-btn {
  margin-top: 0.4rem;
  padding: 0.3rem 0.6rem;
  border: none;
  background-color: #3366FF;
  color: white;
  border-radius: 1rem;
  cursor: pointer;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pages-btn {
  margin-top: 0.4rem;
  margin-left:0.2rem;
  padding: 0.6rem 0.9rem;
  border: none;
  color: black;
  border-radius: 1rem;
  cursor: pointer;
}

.active-pages-btn {
  margin-top: 0.4rem;
  margin-left:0.2rem;
  padding: 0.6rem 0.9rem;
  border: none;
  background-color:#008040;
  color: white;
  border-radius: 1rem;
  cursor: pointer;
}


/*filtermenu*/
.filtermenu {
	width:100%;
	justify-content: center;
  	align-items: center;
    text-align: center;
}

#spalderfra {
	width: 2.8rem;
}

#spaldertil {
	width: 2.8rem;
}

input[type=checkbox] {
	padding-left:0.6rem;
	padding-right:0.6rem;
	border-radius: 3px;
	background-color:#FF0000;
}

/*select*/
.select2-results__option {
  padding-left: 25px;
  position: relative;
  font-family: Arial, sans-serif;
  line-height: 1.5em;
  display: flex;
  align-items: center;
}

.select2-results__option::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 1px solid #999;
  background-color: #fff;
  flex-shrink: 0;
}

.select2-results__option[aria-selected="true"]::before {
  background-color: #0078d7;
  border-color: #0078d7;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7l2 2 4-4' stroke='%23fff' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/**new tag behavoir*/
.select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 42px;
  min-height: 42px;
  overflow-y: auto;
  font-size: 20px;
  transition: font-size 0.2s ease;
}

/* Shrink font size only when too many tags overflow */
.select2-selection__rendered.too-many {
  font-size: 0.9rem;
}

.select2-selection__choice {
  padding: 4px 8px;
  white-space: nowrap;
}


.jobimg {
	max-height:350px;
	min-height:150px;
}

.lon {
	background-color:#FFFFFF;
	color:#000000;
	display: grid; 
	place-items: center;

	width:5em;
	height:2em;
	
	border-radius: 1rem;
}


/* --- Responsive --- */
@media (max-width: 768px) {
  .container {
    grid-template-areas:
      "maincontent"
      "leftbar"
      "rightbar"
      "footer";
    grid-template-columns: 1fr;
  }
}