/**
 * Components CSS
 * Reusable layout and UI components for Integrated Contracting
 * Extracted from inline styles and component patterns
 */

/* ============================================
   NAVIGATION COMPONENTS
   ============================================ */

/* Navigation Button Transitions */
#nav-button {
  transition: transform 0.5s ease, opacity 0.3s ease;
}

#wide-nav-div {
  transition: width 0.5s ease;
}

/* GLOBAL Navbar Rules - Prevents Selection/Highlight/Tap-Flash */
.navbar,
.navbar * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Specific to Menu Bar Images - Handles Drag and Pointer Events Only */
.menu-line.top-line,
.menu-line.bottom-line {
  -webkit-user-drag: none;
  pointer-events: none;
}

/* ============================================
   SERVICE BLOCK COMPONENTS
   ============================================ */

/* Default look */
.service-block {
  color: #fff;
}

/* Active state: light overlay + blue border, text stays white */
.service-block.active {
  background: rgba(255,255,255,.10);
  border: 1px solid #0e6cc4;
}

/* ============================================
   BACKGROUND VIDEO COMPONENTS
   ============================================ */

[data-wf-bgvideo-fallback-img] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-wf-bgvideo-fallback-img] {
    position: absolute;
    z-index: -100;
    display: inline-block;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}

/* ============================================
   404 ERROR PAGE COMPONENTS
   ============================================ */

.error-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #0e6cc4 0%, #1a1a1a 100%);
  color: white;
}

.error-code {
  font-size: 120px;
  font-weight: 900;
  margin: 0;
  line-height: 1;
}

.error-message {
  font-size: 32px;
  margin: 20px 0;
  font-weight: 600;
}

.error-description {
  font-size: 18px;
  margin: 20px 0 40px;
  max-width: 600px;
  opacity: 0.9;
}

.home-button {
  display: inline-block;
  padding: 15px 40px;
  background: white;
  color: #0e6cc4;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 600;
  font-size: 18px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.home-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ============================================
   BLOG DIRECTORY COMPONENTS
   ============================================ */

.section.blog-directory {
  display: flex;
  flex-direction: row;
  gap: 5vw;
  padding: 5vh 5vw;
  align-items: flex-start;
}

/* Docs-style sidebar navigation */
.blog-sidebar {
  width: 20vw;
  min-width: 200px;
  position: sticky;
  top: 120px;
  padding-right: 2vw;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-sidebar-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #888;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.blog-sidebar-link {
  display: block;
  padding: 10px 0;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.blog-sidebar-link:hover {
  color: #0e6cc4;
}

.blog-sidebar-link.w--current {
  color: #0e6cc4;
  font-weight: 500;
}

/* Thumbnail grid area */
.blog-home-thumbnail-div {
  width: 50vw;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  align-content: flex-start;
}

/* Individual thumbnail card */
.blog-thumbnail {
  width: calc(50% - 15px);
  flex-shrink: 0;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.5);
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.blog-thumbnail:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 0 #000;
}

.blog-thumbnail-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-thumbnail-content {
  padding: 25px;
}

.blog-thumbnail-date {
  font-size: 13px;
  color: #888;
  margin-bottom: 10px;
}

.blog-thumbnail-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
  color: #000;
}

.blog-thumbnail-excerpt {
  font-size: 15px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 15px;
}

.blog-thumbnail-cta {
  color: #000;
  font-weight: 500;
  font-size: 14px;
}

/* Responsive: Stack on smaller screens */
@media (max-width: 991px) {
  .section.blog-directory {
    flex-direction: column;
    gap: 30px;
    padding-left: 5vw;
    padding-right: 5vw;
    box-sizing: border-box;
  }

  .blog-sidebar {
    width: 100%;
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-right: 0;
    padding-bottom: 20px;
  }

  .blog-home-thumbnail-div {
    width: 100%;
  }

  .blog-thumbnail {
    width: calc(50% - 15px);
  }
}

@media (max-width: 600px) {
  .blog-thumbnail {
    width: 100%;
  }
}

/* ============================================
   SERVICE GALLERY
   ============================================ */

.section.service-gal {
  border-top: 1px solid var(--black-10);
  border-bottom: 1px solid var(--black-10);
  flex-flow: column;
  justify-content: flex-start;
  align-items: flex-start;
  min-height: auto;
  width: 90vw;
  max-width: 90vw;
  padding: 2vh 5vw;
  overflow: hidden;
}

.div-service-gal-heading {
  display: flex;
  align-items: flex-start;
  max-width: 90vw;
}

.slider-button-holder {
  flex-flow: row;
  justify-content: center;
  align-items: flex-start;
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
}

.service-img-wrapper {
  justify-content: flex-start;
  align-items: center;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.gallery-track {
  flex: 1;
  min-height: 0;
  justify-content: flex-start;
  align-items: center;
  margin-top: 20px;
  display: flex;
  position: relative;
  overflow: visible;
}

.gallery-track.show-mobile {
  display: none;
}

.template-img-item {
  flex-shrink: 0;
  width: 50vw;
  height: 25vw;
  margin-right: 20px;
}

.gallery-img {
  object-fit: cover;
  border: 1px solid #000;
  flex: none;
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
}

/* Tablet landscape (≤976px) */
@media screen and (max-width: 976px) {
  .section.service-gal {
    padding: 5vh 5vw;
  }
}

/* Mobile landscape / tablet portrait (≤768px) */
@media screen and (max-width: 768px) {
  .div-service-gal-heading {
    flex-flow: column;
    gap: 16px;
  }
}

/* Mobile landscape / tablet portrait (≤480px) */
@media screen and (max-width: 480px) {
  .slider-button-holder {
    margin-top: 10px;
    margin-bottom: 0;
  }

  .service-img-wrapper {
    width: 100%;
    margin-top: 10px;
  }

  .gallery-track {
    margin-top: 0;
    margin-right: 0;
    padding-left: 5vw;
    overflow: auto;
  }

  .gallery-track.show-desktop {
    display: none;
  }

  .gallery-track.show-mobile {
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    padding-left: 5vw;
    padding-right: 5vw;
    display: flex;
    overflow: auto;
  }

  .template-img-item {
    width: 70vw;
    height: 40vw;
  }

  .gallery-img {
    margin-left: 0;
    margin-right: 20px;
  }
}

/* Mobile portrait (≤479px) */
@media screen and (max-width: 479px) {
  .section.service-gal {
    padding-top: 2vh;
    padding-bottom: 2vh;
  }

  .div-service-gal-heading {
    margin-bottom: 20px;
  }

  .gallery-track {
    justify-content: flex-start;
    align-items: center;
    margin-top: 0;
  }

  .template-img-item {
    flex: none;
    width: 80vw;
    height: 50vw;
  }

  .service-img-wrapper {
    margin-top: 20px;
  }
}
