/* New code for index.php */
:root{
  --tab-h: 52px;
  --tab-gap: 14px;
  --highlight-h: 45px;
  --i: 0; /* active index (set by JS) */
}

/* keep layout from shifting when scrollbar appears/disappears */
html { scrollbar-gutter: stable both-edges; }
body { overflow: hidden; } /* fallback if scrollbar-gutter unsupported */

body {
  margin: 0;
  font-family: "Montserrat", Arial, Helvetica, sans-serif;

  /* default background image – will be replaced on load */
  background: url('https://picsum.photos/id/1015/1600/900') center/cover no-repeat;
  transition: background-image 0.6s ease; /* note: bg-image itself won't crossfade; we keep it simple */

  min-height: 100vh; /* avoid hard 100vh so footer can exist without jumps */
  position: relative;
}

#navigation { height: 82px; }

.main-content{
  position: relative;
  z-index: 1;          /* above the overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px;
  margin-top: 82px;
  overflow: hidden;
  height: calc(100vh - 132px);
}

/* Tabs */
.tabs{
  display: flex;
  flex-direction: column;
  gap: var(--tab-gap);
  position: relative;
  width: 400px;  /* fixed width keeps layout stable */
}

.tab{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  height: var(--tab-h);
  border-radius: 50px;
  cursor: pointer;
  color: #e2e8f0;      /* lighter on dark bg */
  font-weight: 600;
  position: relative;
  transition: color .22s ease;
  z-index: 1;
  white-space: nowrap;  /* prevent breaking */
}

.tab span{
  background: #052855;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  min-width: 34px;
  text-align: center;
  display: inline-block;
}

.tab:hover { color: #fff; }
.tab.active { color: #0f172a; font-weight: 800; }

/* White highlight pill controlled by --i */
.highlight{
  position: absolute;
  left: 0;
  top: calc((var(--tab-h) - var(--highlight-h)) / 2);
  width: 100%;
  height: var(--highlight-h);
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(2,6,23,0.18);
  z-index: 0;
  transition: transform .36s cubic-bezier(.22,.9,.3,1);
  transform: translateY(calc(var(--i) * (var(--tab-h) + var(--tab-gap))));
}

/* Content (text only) */
.content-container { width: calc(100% - 60%); }
.tab-content{
  display: none;
  opacity: 0;
  max-width: 760px;
}
.tab-content.active{
  display: block;
  animation: fadeSlide .52s ease both;
}

.text{
  max-width: 540px;
  color: #fff;
  animation: slideInRight .56s ease .06s both;
}
.text h4{ font-size:13px; letter-spacing:.12em; margin:0 0 8px; color:#cbd5e1; }
.text h2{ margin:0 0 12px; font-size:32px; color:#fff; }
.text p{ margin:0 0 16px; color:#f1f5f9; line-height:1.55; }
.btn{ padding:10px 16px; border-radius:8px; border:0; cursor:pointer; color:#000; background:#fff; transition: all .3s; }
.btn:hover,.btn:focus{ background:#f1f5f9; }


/* Background crossfade container */
.background {
  position: fixed;
  inset: 0;
  /* z-index: -2; /* behind everything */
  overflow: hidden;
  background-color: rgb(0 0 0);
}

/* Each image layer */
.bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* The visible one */
.bg-image.active {
  /* opacity: 1; */
  opacity: 0.4;
}

/* Overlay (dark blur) stays above background but below content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  z-index: -1; /* now sits above .background */
  pointer-events: none;
}

#footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  z-index: 1; /* above overlay */
}

.ftr_btm {
  height: 50px;
}

/* Animations */
@keyframes fadeSlide { from{opacity:0; transform:translateY(8px)} to{opacity:1; transform:none} }
@keyframes slideInRight{ from{opacity:0; transform:translateX(28px)} to{opacity:1; transform:none} }

/* Responsive */
@media (min-width:1280px){
  .home-slider{ display: none; }
}

@media (max-width:980px){
  .main-content{ flex-direction:column; padding:18px; gap:22px; max-height:none; }
  .tabs{ flex-direction:row; width:100%; overflow:auto; gap:10px; }
  .tab{ min-width:140px; height:44px; border-radius:12px; justify-content:center; }
  .highlight{ height:40px; top:6px; border-radius:12px; transform: translateX(calc(var(--i) * (100% + 10px))); }
  .content-container{ max-width: 100%; }
  .text{ animation:none; text-align:center; margin-inline:auto; }
  .text h2{ font-size:26px; }
}

@media (max-width:480px){
  .tab{ min-width:110px; font-size:12px; padding:0 10px; }

  .text h2{ font-size:22px; }

  .main-content{ display: none; }

  .home-slider{ 
    display: block; 

    .home-slider-item {
      width: 100%;
      /* height: calc(100vh - 130px); */
      /* background-size: cover; */
      margin-top: 70px;
    }
  }

  .background { display: none; }

  body { 
    background: none;
  }

  .carousel-caption {
    position: unset;
    padding-top: 40px;
  }

  .owl-carousel .owl-item img {
    height: 200px;
    object-fit: cover;
  }

  .ftr_btm.landing-footer {
    position: fixed !important;
  }
  
  h2, h4 {
      text-shadow: none;
  }
}