/* ===== Scroll Reveal Animation ===== */
.reveal {
  opacity: 0;
  transform: translateY(2.5rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Global ===== */
:root {
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --tsc-yellow: #f4a300;
  --tsc-dark: #3c3c3c;
  --tsc-whatsapp: #25d366;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-size: clamp(0.95rem, 1vw, 1.1rem);
  overflow-x: hidden;
}

img,
iframe,
video,
embed,
object {
  max-width: 100%;
  height: auto;
}

.container-custom {
  width: 90%;
  max-width: 75rem;
  margin: 0 auto;
}

/* לא על כל האתר */
.btn,
.card,
.nav-link,
.fixed-contact-btn,
.accessibility-float-btn,
.footer-logo,
.service-card-icon {
  transition: all 0.25s ease;
}

/* ===== Navbar ===== */
.navbar {
  padding-top: 1.2vh;
  padding-bottom: 0.2vh;
  background-color: var(--tsc-dark);
}

.navbar .nav-link {
  font-size: clamp(1.1rem, 1.3vw, 1.4rem);
  padding: 0.6rem 0.9rem;
  color: #ffffff;
  transition: color 0.3s ease;
}

.navbar .nav-link:hover {
  color: var(--tsc-yellow);
}

.navbar .nav-link.active {
  color: var(--tsc-yellow);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.35rem;
}

.navbar .btn {
  font-size: clamp(1.1rem, 1.3vw, 1.4rem);
  padding: 0.6rem 1.1rem;
}

.navbar .navbar-logo {
  height: clamp(6rem, 12vw, 15rem);
  width: auto;
  object-fit: contain;
  display: block;
}

.navbar-brand {
  min-width: 0;
}

.navbar-brand .brand-text {
  line-height: 1.1;
  font-size: clamp(1.1rem, 2vw, 1.75rem);
  font-weight: 700;
}

.offcanvas-logo {
  height: clamp(2.5rem, 4.5vh, 3.5rem);
  width: auto;
  object-fit: contain;
  display: block;
}

.offcanvas-logo-lg {
  height: clamp(4.5rem, 8vw, 8rem);
  width: auto;
  object-fit: contain;
  opacity: 0.95;
}

/* ===== Common UI ===== */
.card {
  border-radius: 1.25rem;
}

.card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn,
.form-control,
.alert {
  border-radius: 1rem;
}

/* ===== Cover Image (לפני האתר) ===== */
.hero-cover {
  width: 100%;
  height: 100vh;
  background-image: url("/assets/photos/Highway2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-top: 0;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(180deg, #f8f9fa, #ffffff);
  padding-top: 5vh;
  padding-bottom: 5vh;
}

/* ===== Inner Page Hero ===== */
.page-hero {
  background: linear-gradient(180deg, #f8f9fa, #ffffff);
}

/* ===== Hero top card ===== */
.top-service-card {
  position: relative;
  padding: 1.5rem;
}

.top-service-content {
  padding-inline-start: clamp(4rem, 7vw, 6rem);
}

.top-service-side-image {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: clamp(3.5rem, 6vw, 5rem);
  height: auto;
}

/* ===== Signs page image ===== */
.signs-image {
  height: clamp(26rem, 60vh, 51rem);
  width: auto;
  object-fit: contain;
  opacity: 0.98;
}

/* ===== WhatsApp Button ===== */
.whatsapp-btn {
  display: inline-block;
  background-color: var(--tsc-whatsapp);
  color: #ffffff;
  padding: 0.75rem 1.125rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: bold;
  font-family: Arial, sans-serif;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.whatsapp-btn:hover {
  background-color: #1ebe5d;
  transform: translateY(-0.125rem);
}

.whatsapp-btn:active {
  transform: translateY(0);
}

/* ===== Buttons ===== */
.btn-success,
.btn-primary {
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  border: none;
  background-color: var(--tsc-whatsapp);
}

.btn-success:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  background-color: #0a8e3f;
}

.btn-primary:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

.route-btn {
  background-color: #004fc5;
  border: none;
  color: #fff;
}

.route-btn:hover {
  background-color: #003585;
  color: #fff;
}

/* ===== Bootstrap Warning Override ===== */
.btn-warning {
  background-color: var(--tsc-yellow) !important;
  border-color: var(--tsc-yellow) !important;
  color: #000 !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background-color: var(--tsc-yellow) !important;
  border-color: var(--tsc-yellow) !important;
  color: #000 !important;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
  transform: translateY(-0.125rem);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  gap: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn svg {
  margin-left: 0;
  margin-right: 0.5rem;
}

/* ===== Floating Buttons ===== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  padding: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#backToTop svg {
  display: block;
  margin: 0;
  padding: 0;
}

#backToTop:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

#backToTop.show {
  display: flex;
}

/* Fixed Contact Buttons */
.fixed-contact-wrapper {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 999;
}

.fixed-contact-btn {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
}

.fixed-contact-btn i {
  font-size: 1.5rem;
  line-height: 1;
}

.phone-btn,
.fixed-contact-btn.whatsapp-btn {
  background: var(--tsc-whatsapp);
}

.fixed-contact-btn:hover {
  transform: translateY(-0.2rem) scale(1.05);
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.25);
}

/* ===== Legacy Accessibility Button Hook ===== */
#accessibilityBtn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  padding: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

#accessibilityBtn svg {
  display: block;
  margin: 0;
  padding: 0;
}

#accessibilityBtn:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.15);
}

/* ===== Accessibility Styles ===== */
html.increase-text {
  font-size: 120%;
}

.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

.high-contrast .card,
.high-contrast .btn,
.high-contrast .alert,
.high-contrast .modal-content,
.high-contrast .modal-header,
.high-contrast .modal-body,
.high-contrast .modal-footer {
  background-color: #333 !important;
  color: #fff !important;
  border-color: #666 !important;
}

.high-contrast .modal .btn-close {
  background-color: rgba(255, 255, 255, 0.18) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z' fill='%23fff'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  border-radius: 50%;
  width: 2.4rem;
  height: 2.4rem;
  border: none !important;
  opacity: 1 !important;
  filter: none !important;
}

.high-contrast .modal .btn-close:hover {
  background-color: rgba(255, 255, 255, 0.25) !important;
}

.high-contrast .navbar,
.high-contrast .hero,
.high-contrast .page-hero {
  background: #000 !important;
  color: #fff !important;
}

.high-contrast a {
  color: var(--tsc-yellow) !important;
}

.high-contrast .btn-warning {
  background-color: var(--tsc-yellow) !important;
  color: #000 !important;
  border-color: var(--tsc-yellow) !important;
}

.high-contrast .btn-primary {
  background-color: #007bff !important;
  color: #fff !important;
  border-color: #007bff !important;
}

.high-contrast .form-control,
.high-contrast .form-check-input {
  background-color: #333 !important;
  color: #fff !important;
  border-color: #666 !important;
}

.high-contrast .form-check-label {
  color: #fff !important;
}

.high-contrast .text-muted,
.high-contrast .text-secondary,
.high-contrast .text-dark,
.high-contrast .text-light {
  color: #fff !important;
}

.high-contrast .bg-light,
.high-contrast .bg-white {
  background-color: #333 !important;
}

.high-contrast .border {
  border-color: #666 !important;
}

.high-contrast h1,
.high-contrast h2,
.high-contrast h3,
.high-contrast h4,
.high-contrast h5,
.high-contrast h6,
.high-contrast p,
.high-contrast span,
.high-contrast div,
.high-contrast .navbar-brand,
.high-contrast .nav-link {
  color: #fff !important;
}

.high-contrast .btn-outline-dark,
.high-contrast .btn-outline-secondary {
  background-color: #333 !important;
  color: #fff !important;
  border-color: #666 !important;
}

.disable-animations * {
  transition: none !important;
  animation: none !important;
}

.readable-font {
  font-family: Arial, Helvetica, sans-serif !important;
}

/* ===== Skip Link ===== */
.skip-link {
  position: absolute;
  left: -100vw;
  top: -100vh;
  z-index: 1000;
  background: #000;
  color: #fff;
  padding: 0.5rem;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ===== Image Lightbox ===== */
[data-lightbox="true"] {
  cursor: zoom-in;
}

#lightboxModal .modal-content {
  background: rgba(0, 0, 0, 0.9);
  border-radius: 1rem;
  color: #fff;
}

#lightboxModal .modal-header {
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.2);
}

#lightboxModal .modal-body {
  padding: 1rem;
  color: #fff;
}

#lightboxModal .modal-title,
#lightboxModal #lightboxModalTitle {
  color: #fff;
}

#lightboxModal .modal-body img {
  max-height: 80vh;
  max-width: 80vw;
  object-fit: contain;
}

#lightboxModal .modal-body p {
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 1rem;
  line-height: 1.4;
}

#lightboxModal .text-muted {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ===== Cards ===== */
.card-img-top {
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
}

/* ===== Map ===== */
.map-container {
  position: relative;
  width: 100%;
  height: clamp(18rem, 40vh, 24rem);
  border-radius: 0.375rem;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.alert .map-embed {
  flex-shrink: 0;
  width: 100%;
}

.alert .map-embed iframe {
  border-radius: 0.5rem;
  width: 100%;
  height: clamp(20rem, 45vh, 28rem);
  display: block;
}

/* ===== Footer ===== */
.footer-logo {
  margin-right: 5%;
  height: 3rem;
  width: auto;
  opacity: 0.85;
}

.footer-logo:hover {
  opacity: 1;
}

/* ===== Service Cards ===== */
.service-card-header {
  display: flex;
  align-items: center;
}

.service-card-icon {
  order: -1;
  width: clamp(3rem, 3.75vw, 4.5rem);
  height: auto;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.service-card-header h5 {
  margin: 0;
  font-size: clamp(1.1rem, 1.3vw, 1.4rem);
}

.card-body h6 {
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
}

.card-body p {
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: 1.6;
}

.card:hover .service-card-icon {
  transform: rotate(-8deg) scale(1.05);
}

/* ===== About ===== */
#aboutHeader {
  color: var(--tsc-yellow);
  font-size: clamp(2rem, 5vw, 4rem);
}

.about-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: start;
  gap: 2rem;
}

.about-image-container {
  display: flex;
  justify-content: center;
  padding-top: 0;
}

.about-image {
  max-width: 70%;
  height: auto;
  object-fit: contain;
}

/* ===== Section Headers ===== */
.services-header {
  display: flex;
  align-items: center;
  width: 100%;
}

.services-header h1 {
  margin: 0;
}

.services-header .service-logo {
  width: clamp(9rem, 15vw, 15rem);
  height: auto;
  margin-inline-start: 5%;
}

.projects-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.projects-header h1 {
  margin: 0;
}

.projects-header .projects-logo {
  width: clamp(8rem, 14vw, 16rem);
  height: auto;
  margin-inline-start: auto;
}

.projects-header p {
  width: 100%;
  margin-top: 0.5rem;
}

/* ===== Small Desktop / Tablet ===== */
@media (max-width: 62rem) {
  .navbar .navbar-logo {
    height: clamp(4.5rem, 10vw, 8rem);
  }

  .navbar-brand .brand-text {
    font-size: 1.2rem;
  }
}

/* ===== Mobile ===== */
@media (max-width: 48rem) {
  .navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .navbar .navbar-logo {
    height: 3.5rem;
  }

  .navbar-brand .brand-text {
    font-size: 1rem;
  }

  .display-5 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    line-height: 1.2;
  }

  .hero {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    line-height: 1.25;
    text-align: center;
  }

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

  .hero .d-flex.flex-wrap.gap-2 {
    flex-direction: column;
  }

  .hero .d-flex.flex-wrap.gap-2 .btn {
    width: 100%;
  }

  .top-service-card {
    padding: 1rem;
  }

  .top-service-content {
    padding-inline-start: 0;
    padding-top: 4rem;
    text-align: center;
  }

  .top-service-side-image {
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 3.2rem;
  }

  .about-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .about-image-container {
    order: -1;
  }

  .about-image {
    max-width: 55%;
  }

  #aboutHeader {
    font-size: clamp(1.8rem, 7vw, 2.4rem);
  }

  .services-header,
  .projects-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .services-header h1,
  .projects-header h1 {
    text-align: center;
  }

  .services-header .service-logo,
  .projects-header .projects-logo {
    margin-inline-start: 0;
    width: clamp(6rem, 30vw, 9rem);
  }

  .signs-image {
    height: clamp(18rem, 48vh, 37rem);
  }

  .fixed-contact-wrapper {
    bottom: 1rem;
    gap: 0.75rem;
  }

  .fixed-contact-btn {
    width: 3.25rem;
    height: 3.25rem;
  }

  #backToTop {
    bottom: 6.5rem;
    right: 1rem;
    width: 3.25rem;
    height: 3.25rem;
  }

  .accessibility-float-btn,
  #accessibilityBtn {
    bottom: 6.5rem;
    left: 1rem;
  }

  footer .container {
    gap: 1rem;
    text-align: center;
  }

  footer .d-flex {
    width: 100%;
  }

  footer .justify-content-start,
  footer .justify-content-end {
    justify-content: center !important;
  }

  .footer-logo {
    margin-right: 0;
  }

  .map-container {
    height: clamp(16rem, 34vh, 20rem);
  }

  #lightboxModal .modal-body {
    padding: 0.75rem;
  }

  #lightboxModal .text-start {
    text-align: center !important;
  }

  #lightboxModal .modal-body img {
    max-width: 100%;
    max-height: 60vh;
  }
}

/* ===== Extra Small Mobile ===== */
@media (max-width: 36rem) {
  .fixed-contact-wrapper {
    gap: 0.6rem;
  }

  .fixed-contact-btn {
    width: 3rem;
    height: 3rem;
  }

  .fixed-contact-btn i {
    font-size: 1.35rem;
  }

  .about-image {
    max-width: 65%;
  }
}