/* ==========================================
   SERVICE DETAIL PAGE STYLES
   För: Offentliga miljöer, Byggnadssnickerier etc.
   ========================================== */

/* --- MAIN LAYOUT --- */
.service-detail-layout {
  display: flex;
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 40px;
  gap: 40px;
  align-items: flex-start;
}

/* --- MAIN CONTENT AREA --- */
.service-detail-content {
  flex: 1;
  min-width: 0;
}

/* --- HERO IMAGE --- */
.detail-hero {
  width: 100%;
  height: 350px;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 30px;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- ARTICLE CONTENT --- */
.detail-article {
  max-width: 900px;
}

.detail-article h1 {
  font-size: 2.2rem;
  color: #333;
  margin-bottom: 15px;
  margin-top: 0;
  font-weight: 700;
  line-height: 1.3;
}

.lead-text {
  font-size: 1.2rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 40px;
  font-weight: 400;
}

.detail-article h2 {
  font-size: 1.7rem;
  color: #333;
  margin-top: 40px;
  margin-bottom: 15px;
  font-weight: 700;
}

.detail-article p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #666;
  margin-bottom: 20px;
}

/* --- CTA SECTION --- */
.detail-cta {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 2px solid #f0f0f0;
}

.detail-cta h2 {
  font-size: 1.6rem;
  color: #333;
  margin-top: 0;
  margin-bottom: 15px;
  font-weight: 700;
}

.detail-cta p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #666;
}

.cta-link {
  color: #c7081b;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  transition: border-bottom 0.3s;
}

.cta-link:hover {
  border-bottom-color: #c7081b;
}

/* --- SIDEBAR HAMBURGER MENU (MOBILE) --- */
.sidebar-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: fixed;
  right: 18px;
  top: 120px;
  z-index: 1002;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  border-radius: 6px;
  background: #fff;
}

.sidebar-menu-toggle .hamburger-line {
  display: block;
  width: 28px;
  height: 3px;
  background-color: #c7081b;
  border-radius: 2px;
  transition: all 0.3s;
}

@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .sidebar-menu-toggle {
    display: flex;
  }
  .sidebar-mobile-navigation[hidden] {
    display: none;
  }
  .sidebar-mobile-navigation {
    display: block;
    position: fixed;
    right: 0;
    top: 70px;
    width: 80vw;
    max-width: 320px;
    background: #fff;
    box-shadow: -2px 0 16px rgba(0, 0, 0, 0.13);
    border-radius: 8px 0 0 8px;
    z-index: 1001;
    padding: 30px 0 20px 0;
    animation: sidebarSlideIn 0.25s;
  }
  .sidebar-mobile-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .sidebar-mobile-navigation li {
    border-bottom: 1px solid #f0f0f0;
  }
  .sidebar-mobile-navigation li:last-child {
    border-bottom: none;
  }
  .sidebar-mobile-navigation a {
    display: block;
    padding: 14px 0;
    color: #c7081b;
    font-weight: 600;
    font-size: 1.08rem;
    text-decoration: none;
    border-radius: 4px;
    transition:
      background 0.2s,
      color 0.2s,
      padding-left 0.2s;
  }
  .sidebar-mobile-navigation a:hover {
    background: #fff8f8;
    color: #a00616;
    padding-left: 10px;
  }
}

@keyframes sidebarSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* --- RESPONSIVE DESIGN --- */

/* Large Desktop */
@media screen and (max-width: 1400px) {
  .service-detail-layout {
    max-width: calc(100% - 40px);
  }
}

/* Tablets */
@media screen and (max-width: 1024px) {
  .service-detail-layout {
    padding: 0 20px;
    gap: 30px;
  }

  .sidebar {
    flex: 0 0 200px;
  }

  .detail-hero {
    height: 300px;
  }

  .detail-article h1 {
    font-size: 2rem;
  }

  .lead-text {
    font-size: 1.1rem;
  }

  .detail-article h2 {
    font-size: 1.6rem;
  }
}

/* Tablet Portrait */
@media screen and (max-width: 900px) {
  .service-detail-layout {
    flex-direction: column;
    margin: 30px auto;
  }

  .sidebar {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    top: 0;
    margin-bottom: 30px;
  }

  .detail-hero {
    height: 280px;
  }
}

/* Mobile */
@media screen and (max-width: 820px) {
  .service-detail-layout {
    margin: 20px auto;
    padding: 0 15px;
  }

  .detail-hero {
    height: 250px;
    margin-bottom: 25px;
  }

  .detail-article h1 {
    font-size: 1.8rem;
  }

  .lead-text {
    font-size: 1.05rem;
    margin-bottom: 30px;
  }

  .detail-article h2 {
    font-size: 1.5rem;
    margin-top: 30px;
  }

  .detail-article p {
    font-size: 1rem;
  }

  .detail-cta {
    margin-top: 40px;
    padding-top: 30px;
  }

  .detail-cta h2 {
    font-size: 1.5rem;
  }
}

/* Small Mobile */
@media screen and (max-width: 480px) {
  .service-detail-layout {
    padding: 0 10px;
    margin: 15px auto;
  }

  .sidebar {
    margin-bottom: 20px;
  }

  .detail-hero {
    height: 200px;
    margin-bottom: 20px;
  }

  .detail-article h1 {
    font-size: 1.6rem;
  }

  .lead-text {
    font-size: 1rem;
  }

  .detail-article h2 {
    font-size: 1.4rem;
  }

  .detail-article p {
    font-size: 0.95rem;
  }

  .detail-cta {
    margin-top: 30px;
    padding-top: 25px;
  }

  .detail-cta h2 {
    font-size: 1.4rem;
  }

  .detail-cta p {
    font-size: 0.95rem;
  }
}

/* Extra Small Mobile */
@media screen and (max-width: 360px) {
  .detail-hero {
    height: 180px;
  }

  .detail-article h1 {
    font-size: 1.5rem;
  }
}
