:root{
  --navy: #1f2e66;
  --cyan: #00a6e6;
  --green: #7fc241;
  --muted: #6b7280;
  --bg-light: #f7f9fb;
  --container-width: 1200px;
  scroll-behavior: smooth;
}

*{box-sizing:border-box;margin:0;padding:0;}
body{
  font-family: Inter,Segoe UI,Roboto,Arial,sans-serif;
  color:#222;
  line-height:1.6;
  background:#ffffff;
}
.container{
  width:90%;
  max-width:var(--container-width);
  margin:0 auto;
  padding:0 8px;
}

/* ======================= Header / Nav ======================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.logo{height: 54px;}
.brand{display: flex; align-items: center; gap: 12px; text-decoration: none;}
.nav-links{
  list-style: none;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  align-items: center;
}
.nav-links li{}
.nav-links a{
  color: var(--navy);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 600;
}
.nav-links a:hover{background: rgba(0,166,230,0.08);}
.nav-toggle{
  display: none;
  background: none;
  border: 0;
  font-size: 20px;
  color: var(--navy);
  cursor: pointer;
}

/* ======================= Hero Section ======================= */
.hero-section{
  height: 80vh;
  min-height: 400px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.video-wrap{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 8s ease;
  z-index: 0;
}

.hero-video.active{
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(31,46,102,0.45), rgba(0,0,0,0.2));
}

.hero-content{
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 20px 10px;
}
.hero-content h1{
  font-size: clamp(22px, 6vw, 48px);
  margin:0 0 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.lead{
  font-size: clamp(14px,4vw,18px);
  margin-bottom: 18px;
  color: rgba(255,255,255,0.9);
}
.btn{
  display: inline-block;
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(14px,3vw,16px);
}
.btn.primary{
  background: var(--cyan);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,166,230,0.14);
}
.btn.outline{
  background: transparent;
  border: 2px solid rgba(255,255,255,0.15);
  color: #fff;
}

/* ======================= Slideshow dots ======================= */
.slideshow-controls{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}
.dot{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border:0;
  cursor: pointer;
}
.dot.active{background: var(--cyan);}

/* ======================= Sections ======================= */
.section{padding: 72px 0;}
.bg-light{background: var(--bg-light);}
.section-title{
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 22px;
  text-align: center;
}

/* ======================= About Grid ======================= */
.about-grid{
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 10px;
  align-items: top;
}
.about-visual .card{
  background: linear-gradient(180deg,#ffffff,#ffffff);
  padding: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:0 10px 30px rgba(31,46,102,0.08);
}
.about-logo{height:540px;}

/* ======================= Services Grid ======================= */
.services-grid{
  display:grid;
  grid-template-columns: repeat(3,1fr);
  gap:2rem;
  margin-top: 24px;
}
.service-card{
  display:flex;
  flex-direction:column;
  background:#fff;
  padding:22px;
  border-radius:12px;
  box-shadow:0 8px 20px rgba(31,46,102,0.06);
  text-align:center;
  transition: transform .35s, box-shadow .35s;
}
.service-card:hover{
  transform:translateY(-8px);
  box-shadow:0 18px 40px rgba(31,46,102,0.12);
}
.service-card .icon{
  font-size:28px;
  color: var(--cyan);
  margin-bottom:12px;
}
.service-img img{
  width:100%;
  height:auto;
  display:block;
}

/* ======================= Projects Grid ======================= */
.projects-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:18px;
  margin-top:20px;
}
.project{
  background:#fff;
  padding:12px;
  border-radius:8px;
  box-shadow:0 8px 20px rgba(31,46,102,0.05);
  text-align:center;
}
.project-img{
  height:160px;
  background-size:cover;
  background-position:center;
  border-radius:6px;
  margin-bottom:10px;
}

/* ======================= Contact Grid ======================= */
.contact-grid{
  display:grid;
  grid-template-columns:1fr 360px;
  gap:28px;
  align-items:start;
}
.contact-form input, .contact-form textarea{
  width:100%;
  padding:12px;
  border-radius:8px;
  border:1px solid #e6e9ef;
  margin-bottom:12px;
}
.contact-form .btn.primary{width:100%;}

/* ======================= Footer ======================= */
.site-footer{
  background: var(--navy);
  color:#fff;
  padding:18px 0;
  text-align:center;
}

/* ======================= Go to Top Button ======================= */
#gotoTop{
  position:fixed;
  right:18px;
  bottom:18px;
  background:var(--navy);
  color:#fff;
  border:0;
  width:48px;
  height:48px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 8px 18px rgba(31,46,102,0.28);
  cursor:pointer;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s,transform .3s;
}
#gotoTop.show{
  opacity:1;
  visibility:visible;
  transform:translateY(-6px);
}

/* ======================= Reveal Animations ======================= */
.reveal{
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s ease, transform .6s ease;
}
.reveal.delay{transition-delay:.12s;}
.reveal.delay-2{transition-delay:.22s;}
.reveal.delay-3{transition-delay:.32s;}
.reveal.delay-4{transition-delay:.42s;}
.reveal.delay-5{transition-delay:.52s;}
.reveal.visible{
  opacity:1;
  transform:none;
}

/* ======================= Justify Text ======================= */
.justify{ text-align: justify; }
.justify-list{ padding-left:1.2rem; margin-top:.5rem; }
.justify-list li{ text-align: justify; line-height:1.5; }

/* ======================= Hero Video ======================= */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1s ease, transform 8s ease; /* fade effect */
  z-index: 0;
}
.hero-video.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1; /* ensure active video is on top */
}

/* ======================= Responsive Styles (Updated) ======================= */
@media(max-width: 900px){
  .about-grid{grid-template-columns:1fr; text-align:center;}
  .contact-grid{grid-template-columns:1fr;}
  .nav-links{
    display:none;
    position:absolute;
    right:12px;
    top:64px;
    background:#fff;
    padding:12px;
    border-radius:8px;
    box-shadow:0 20px 40px rgba(31,46,102,0.08);
    flex-direction:column;
    gap:8px;
  }
  .nav-links.show{display:flex;}
  .nav-toggle{display:block;}

  .hero-section{height: 60vh; min-height: 350px;}
  .hero-content h1{font-size: clamp(18px,6vw,32px);}
  .hero-content .lead{font-size: clamp(12px,4vw,16px);}
  .slideshow-controls{bottom: 12px; gap: 6px;}
}

@media(max-width: 768px){
  .services-grid{grid-template-columns:1fr;}
  .projects-grid{grid-template-columns:1fr;}
  .hero-section{height: 55vh; min-height: 300px; padding: 0 8px;}
  .hero-content{padding: 10px 8px;}
  .hero-content h1{font-size: clamp(18px,5vw,28px);}
  .hero-content .lead{font-size: clamp(12px,4vw,14px);}
  .about-visual .card{padding: 20px;}
}

@media(max-width: 480px){
  .hero-section{height: 50vh; min-height: 250px;}
  .hero-content h1{font-size: clamp(16px,5vw,24px);}
  .hero-content .lead{font-size: clamp(11px,4vw,13px);}
  .services-grid, .projects-grid{gap: 1rem;}
  .nav-links{top: 56px; right: 8px; padding: 10px;}
  .nav-links a{padding: 6px 8px; font-size: 14px;}
  .about-logo{height: 180px;}
}
.hero-video {
  will-change: opacity;
  transform: none; /* remove scale transform to prevent jitter */
}