/* ============================================
   ArbetsAnnonser - Main Stylesheet
   ============================================ */


:root {
  --brand:       #bf1325;
  --brand-dark:  #8e0e1b;
  --bg:          #eeeeee;
  --white:       #ffffff;
  --text:        #1a1a2e;
  --text-light:  #5a5a72;
  --border:      #d8d8e0;
  --card-bg:     #ffffff;
  --nav-h:       72px;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,0.07);
  --shadow-hover:0 8px 40px rgba(0,0,0,0.13);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

.divider {
	height: 20px;
}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 20; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.modal-content article {
  background: no-repeat;
  background-image: url('../images/support.jpg');
  background-position: right top;
  background-origin: content-box;
  min-height: 300px;
}

.modal-content article.about_us {
  background-image: url('../images/about_us.jpg');
}

.modal-content article h3, .modal-content article h4 {
  text-shadow: 1px 1px 20px #ffffff;
}

.modal-content article p {
  width: 70%;
  text-shadow: 1px 1px 10px #ffffff;
  margin-top: 16px;
}

/* The Close Button */
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.button_yellow {
    color: #000000;
	padding-left: 50px;
	padding-right: 50px;
	font-weight: bold;
	font-size: 16px;
	height: 28px;
	background-color: #f2f443;
	background-image: none;
	border: 1px solid #ccc;
	border-radius: 8px;
}

@keyframes blink {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@-webkit-keyframes blink {
  from { opacity: 1; }
  to   { opacity: 0; }
}
blink {
  animation-name: blink;
  animation-duration: 1s;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  -webkit-animation-name: blink;
  -webkit-animation-duration: 1s;
  -webkit-animation-timing-function: ease-in-out;
  -webkit-animation-iteration-count: infinite;
}

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; }

/* ============================================
   NAV
   ============================================ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 5%;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

#navbar.scrolled {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
  filter: none;
  transition: filter 0.35s ease;
}

.nav-links {
  margin-left: auto;
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  position: relative;
  transition: color 0.25s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--brand);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 26px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transition: all 0.3s;
}
#navbar.scrolled .hamburger span { background: var(--brand); }

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px);
  padding: 24px 5% 32px;
  flex-direction: column;
  gap: 4px;
  z-index: 999;
  border-top: 1px solid var(--border);
  animation: slideDown 0.25s ease;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none;
  color: var(--brand);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   HERO
   ============================================ */
#hero {
  position: relative;
  height: 70vh;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../images/background.jpg') center center / cover no-repeat;
  transform: scale(1.06);
  transition: transform 8s ease-out;
}
.hero-bg.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    205deg,
    rgba(26,10,14,0.72) 0%,
    rgba(191,19,37,0.12) 40%,
    rgba(26,10,14,0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 5% 40px;
  max-width: 760px;
}

.hero-content h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: white;
  text-shadow: 1px 1px 100px #000000;
  line-height: 1.15;
  letter-spacing: -0.01em;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s 0.2s ease forwards;
}

.hero-content h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  text-shadow: 1px 1px 50px #000000;
  margin-top: 10px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s 0.4s ease forwards;
}

.hero-content p {
  font-size: clamp(0.88rem, 1.5vw, 1rem);
  color: rgba(255,255,255,0.75);
  text-shadow: 1px 1px 15px #000000;
  margin-top: 16px;
  max-width: 560px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s 0.6s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   SEARCH BAR
   ============================================ */
#search-section {
  background: var(--white);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
}

.search-bar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 5%;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-bar input, .search-bar select, .input {
  flex: 1;
  min-width: 180px;
  padding: 13px 18px;
  border: 1.5px solid var(--border);
  border-radius: 1px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar input:focus, .search-bar select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(191,19,37,0.1);
}

.search-bar button, .button {
  padding: 13px 32px;
  background: #2d7a3a;
  color: white;
  border: none;
  border-radius: 1px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.93rem;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.search-bar button:hover {
  background: #1f5a29;
  transform: translateY(-1px);
}

/* ============================================
   JOB LISTINGS
   ============================================ */
#jobs {
  max-width: 1160px;
  margin: 0 auto;
  padding: 52px 5% 72px;
}

.section-header {
  display: none;
}

.jobs-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.jobs-count {
  font-size: 0.88rem;
  color: var(--text-light);
}
.jobs-sort select {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  background: white;
  color: var(--text);
  cursor: pointer;
}

.job-card {
  display: flex;
  gap: 5px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 1px;
  padding: 20px 20px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.5s ease forwards;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
  min-height: 230px;
}

.job-card a {
  text-decoration: none;
}

.job-listing-link {
  text-decoration: none;
}

.job-listing {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 1px;
  padding: 26px 28px;
  display: flex;
  gap: 22px;
  margin-bottom: 16px;
  min-height: 130px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.5s ease forwards;
  text-decoration: none;
  color: inherit;
}

.job-listing-page {
  display: grid;
  grid-template-columns: auto 250px;
  grid-template-rows: 150px;
  border: 1.5px solid black;

  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 1px;
  padding: 26px 28px;
  gap: 22px;
  margin-bottom: 16px;
  min-height: 130px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: cardIn 0.5s ease forwards;
  text-decoration: none;
  color: inherit;
}

.job-listing:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
  transform: translateY(-3px);
}

.job-listing:nth-child(1)  { animation-delay: 0.05s; }
.job-listing:nth-child(2)  { animation-delay: 0.10s; }
.job-listing:nth-child(3)  { animation-delay: 0.15s; }
.job-listing:nth-child(4)  { animation-delay: 0.20s; }
.job-listing:nth-child(5)  { animation-delay: 0.25s; }
.job-listing:nth-child(6)  { animation-delay: 0.30s; }
.job-listing:nth-child(7)  { animation-delay: 0.35s; }
.job-listing:nth-child(8)  { animation-delay: 0.40s; }
.job-listing:nth-child(9)  { animation-delay: 0.45s; }
.job-listing:nth-child(10) { animation-delay: 0.50s; }

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.job-logo {
  width: 150px; height: 75px;
  min-width: 150px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--brand);
  border: 1.5px solid var(--border);
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 10px;
}

.job-logo-img-card {
  width: 150px; height: 75px;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: start;
  min-height: 75px;
}

.job-logo-img {
  width: 150px; height: 75px;
  min-width: 150px;
  display: flex;
  align-items: start;
  justify-content: start;
  min-height: 75px;
}

.job-logo-img-page {
  width: 150px; height: 75px;
  min-width: 150px;
  display: flex;
  align-items: center;
  justify-content: start;
  min-height: 75px;
}

.job-body { flex: 1; min-width: 0; }




.job-body-page {
  grid-column: 1;
  grid-row: 1 / 3;
}
.job-side-top {
  grid-column: 2;
  grid-row: 1;
}
.job-side-bottom {
  grid-column: 2;
  grid-row: 2;
  margin-top: 40px;
}





.job-title-card {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.50rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  word-wrap: break-word;
  inline-size: 250px;
}

.job-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.50rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.job-title-page {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.50rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  word-wrap: break-word;
  inline-size: 250px;
}

.job-company {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--brand);
  margin-bottom: 10px;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.tag {
  padding: 3px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tag-type     { background: #f0f0f5; color: #555; border: 1px solid #ddd; }
.tag-location { background: #f5f0ee; color: #7a5040; border: 1px solid #e8d8d0; }
.tag-category { background: #f0f5f0; color: #3a6040; border: 1px solid #c8dcc8; }

.job-date {
  font-size: 0.78rem;
  color: var(--text-light);
}

.job-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  min-width: 130px;
}

.break-column {
  flex-basis: 100%;
  width: 0;
}

.job-side-page {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 130px;
}



.btn-apply {
  padding: 10px 22px;
  background: #2d7a3a;
  color: white;
  border: none;
  border-radius: 1px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-apply:hover { background: #1f5a29; transform: translateY(-1px); }

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: #f5f5f5;
  color: var(--text);
  padding: 60px 5% 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  padding: 52px 6% 72px;
  border-bottom: 1px solid var(--border);
}

.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.50rem;
  color: var(--text);
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-col p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-light);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  transition: color 0.2s;
  position: relative;
  padding-left: 14px;
}
.footer-col ul a::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--brand);
  transition: transform 0.2s;
}
.footer-col ul a:hover { color: var(--brand); }
.footer-col ul a:hover::before { transform: translateX(4px); }

/* ============================================
   FOOTER BOTTOM (logo strip + copyright)
   ============================================ */
.footer-brand-strip {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 40px 5% 0;
}

.footer-brand-logo {
  display: block;
  width: 100%;
  text-align: center;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.footer-brand-logo img {
  width: 100%;
  height: auto;
  display: inline-block;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 0 32px;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-light);
}
.footer-copy a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-copy a:hover { color: var(--brand); }

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.social-link:hover {
  border-color: var(--brand);
  color: white;
  background: var(--brand);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 800px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .job-listing {
    flex-wrap: wrap;
  }

  .job-listing > :nth-child(1) { order: 1; flex-basis: calc(50% - 26px); }
  .job-listing > :nth-child(2) { order: 3; flex-basis: 100%; }
  .job-listing > :nth-child(3) { order: 2; flex-basis: calc(50% - 26px);}





  .job-listing-page {
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: 150px auto auto;
    border: 1.5px solid black;
  }
  .job-body-page {
    grid-column: 1;
    grid-row: 2;
  }
  .job-side-top {
    grid-column: 1;
    grid-row: 1;
  }
  .job-side-bottom {
    grid-column: 1;
    grid-row: 3;
  }


  .modal-content article header {
    padding-top: 200px
  }
  .modal-content article p {
    width: 100%;
  }


  .footer-bottom-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 560px) {
  .search-bar { flex-direction: column; }
  .search-bar input, .search-bar select, .search-bar button { width: 100%; min-width: unset; }
}
