/* ============================================================
   DIGIT-all Service Centre — Main Stylesheet
   Mobile-first, responsive, modern CSS (2024+)
   ============================================================ */

:root {
  --navy: #07152b;
  --navy2: #0b2141;
  --blue: #168bff;
  --cyan: #42d7ff;
  --ink: #10213b;
  --muted: #64748b;
  --pale: #f3f7fc;
  --white: #fff;
  --line: #e3eaf3;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 8px 24px rgba(11, 33, 65, .05);
  --shadow-md: 0 15px 40px rgba(22, 139, 255, .1);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .4);
  --transition: .22s ease;
  --container: 1160px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 85px; 
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, iframe { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: min(var(--container), 92%);
  margin-inline: auto;
}

section { padding: 82px 0; }

/* ---------- Top Bar ---------- */
.topbar {
  background: #041022;
  color: #c7d7ee;
  font-size: 13px;
  padding: 9px 0;
}
.topbar .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar a { color: inherit; }
.topbar a:hover { color: var(--cyan); }

/* ---------- Header & Logo Fix ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 21, 43, .97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  transition: box-shadow 0.3s ease;
}

.nav {
  min-height: 90px; /* Increased header height to fit a bigger logo */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  padding: 6px 0;
}

/* Strict constraints so a missing logo NEVER breaks the header */
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 260px; /* Prevents massive alt-text stretching */
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 75px; /* INCREASED LOGO SIZE */
  object-fit: contain;
  object-position: left center;
  /* If image is missing, the text doesn't explode */
  font-size: 14px; 
  line-height: 1.2;
  overflow: hidden;
}

/* ---------- Nav Links ---------- */
nav {
  display: flex;
  gap: 25px;
  align-items: center;
  font-size: 14px;
  color: #d7e5f6;
  margin-left: auto; /* Pushes nav to the right */
}
nav a { position: relative; padding: 4px 0; transition: color var(--transition); }
nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--cyan);
  transition: width var(--transition);
}
nav a:hover { color: var(--cyan); }
nav a:hover::after { width: 100%; }

/* ---------- Dropdown Menu ---------- */
.dropdown {
  position: relative;
  display: inline-block;
}

/* The button styling */
.dropdown-toggle {
  display: flex;
  align-items: center;
  cursor: pointer;
}

/* The hidden menu box */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--navy);
  min-width: 200px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 0;
  z-index: 100;
  flex-direction: column;
}

/* The links inside the box */
.dropdown-menu a {
  padding: 12px 20px !important;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #d7e5f6;
}

.dropdown-menu a:last-child {
  border-bottom: none;
}

.dropdown-menu a:hover {
  background-color: rgba(255,255,255,0.08);
  color: var(--cyan) !important;
}

.dropdown-menu a::after {
  display: none; /* Removes the hover underline effect from dropdown items */
}

/* Show dropdown on hover (Desktop only) */
@media (min-width: 951px) {
  .dropdown:hover .dropdown-menu {
    display: flex;
  }
}

/* ---------- Header Actions ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 20px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  transition: var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.btn-primary {
  background: linear-gradient(110deg, var(--blue), #27b7ff);
  color: #04152d;
  box-shadow: 0 10px 25px rgba(22, 139, 255, .2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(22, 139, 255, .33);
}
.btn-outline {
  border-color: #6686aa;
  color: #fff;
  background: transparent;
}
.btn-outline:hover { background: rgba(255, 255, 255, .07); }

/* ---------- Mobile Menu Toggle ---------- */
.menu {
  display: none;
  background: none;
  border: 1px solid #54708f;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}
.menu:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(circle at 80% 25%, #124d83 0, transparent 32%),
    linear-gradient(120deg, #061329, #0a2345 60%, #07172f);
  color: #fff;
  overflow: hidden;
  position: relative;
  z-index: 1; /* ADD THIS LINE */
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to right, transparent, #000);
  -webkit-mask-image: linear-gradient(to right, transparent, #000);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 55px;
  align-items: center;
  padding: 0px 0 80px; /* Reduced top padding to tighten gap */
}

.eyebrow {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: #8ce7ff;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 800;
  font-size: 11px;
}
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #48e0a2;
  box-shadow: 0 0 12px #48e0a2;
  animation: pulse 2.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.25); }
}

.hero h1 {
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: -2px;
  margin: 18px 0;
}
.hero h1 span { color: var(--cyan); }
.hero p {
  color: #c2d3e8;
  max-width: 590px;
  font-size: clamp(15px, 1.6vw, 17px);
  margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.trustline {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
  color: #c4d5e9;
  font-size: 13px;
}
.trustline b { color: #fff; }

/* ---------- Hero Visual ---------- */
.visual { min-height: 390px; position: relative; display: grid; place-items: center; }
.glow {
  position: absolute;
  width: 330px; height: 330px;
  border-radius: 50%;
  background: rgba(22, 139, 255, .2);
  filter: blur(50px);
}
.device-card {
  position: relative;
  width: min(430px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
}
.device-top {
  display: flex;
  justify-content: space-between;
  color: #b8d6f6;
  font-size: 12px;
  margin-bottom: 20px;
}
.board {
  height: 220px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0c2b4d, #06162a);
  border: 1px solid #3c83b6;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.board svg { width: 90%; height: 90%; }
.device-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  color: #fff;
  font-size: 13px;
  gap: 10px;
}
.device-caption strong { font-size: 17px; }
.muted-light { color: #b8d6f6; }
.status { color: #70f0bb; font-size: 11px; white-space: nowrap; }

/* ---------- Stats Bar ---------- */
.stats { background: #fff; border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 24px 0; }
.stat { padding: 4px 22px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 25px; color: var(--navy); letter-spacing: -1px; }
.stat span { font-size: 12px; color: var(--muted); }

/* ---------- Section Headings ---------- */
.section-head { text-align: center; max-width: 700px; margin: 0 auto 42px; }
.kicker { color: #0879d9; font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
.section-head h2 { font-size: clamp(26px, 4vw, 42px); line-height: 1.15; letter-spacing: -1.5px; color: var(--navy); margin: 10px 0 13px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Services ---------- */
.services { background: var(--pale); }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 27px; transition: var(--transition); box-shadow: var(--shadow-sm); }
.service:hover { transform: translateY(-5px); box-shadow: 0 18px 35px rgba(11, 33, 65, .08); border-color: #b8d9f8; }
.service.featured { border: 1.5px solid var(--blue); box-shadow: var(--shadow-md); }
.icon { width: 53px; height: 53px; border-radius: 14px; background: #e8f4ff; color: #0879d9; display: grid; place-items: center; font-size: 25px; margin-bottom: 18px; }
.service h3 { margin: 0 0 9px; color: var(--navy); font-size: 20px; }
.service p { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.service a { color: #0879d9; font-weight: 800; font-size: 13px; }
.service a:hover { color: #0561ac; }

/* ---------- Expertise / Feature Layout ---------- */
.feature-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.workshop { min-height: 400px; border-radius: var(--radius-lg); background: radial-gradient(circle at 50% 45%, #1b79b8, #0b2342 65%, #07152b); position: relative; overflow: hidden; display: grid; place-items: center; padding: 30px; color: #fff; }
.workshop::before { content: ""; position: absolute; inset: 20px; border: 1px solid rgba(143, 220, 255, .33); border-radius: 15px; }
.workshop-inner { text-align: center; position: relative; }
.chip { width: 150px; height: 150px; border: 3px solid #58c9ff; border-radius: 22px; margin: 0 auto 25px; display: grid; place-items: center; background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 8px, transparent 8px 16px), #0b2c4e; box-shadow: 0 0 50px rgba(42, 186, 255, .33); }
.chip span { font-size: 46px; color: #70ddff; }
.workshop-inner h3 { font-size: 25px; margin: 0; }
.workshop-inner p { color: #c2dff5; font-size: 13px; }

.feature-copy h2 { font-size: clamp(28px, 4vw, 43px); line-height: 1.13; color: var(--navy); letter-spacing: -1.5px; margin: 10px 0 18px; }
.feature-copy > p { color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 25px 0; }
.checks li { margin: 12px 0; display: flex; gap: 11px; align-items: flex-start; color: #30445f; font-size: 14px; }
.checks li::before { content: "✓"; width: 22px; height: 22px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #e1f8ed; color: #07975b; font-weight: 900; font-size: 12px; margin-top: 1px; }

/* ---------- About ---------- */
.about { background: var(--navy); color: #fff; }
.about .section-head h2 { color: #fff; }
.about .section-head p { color: #b9cbe0; }
.about-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.about-card { border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .035); border-radius: 15px; padding: 24px; transition: var(--transition); }
.about-card:hover { background: rgba(255, 255, 255, .06); border-color: rgba(123, 223, 255, .4); }
.about-card strong { font-size: 22px; color: #7bdfff; display: block; margin-bottom: 7px; }
.about-card span { font-size: 13px; color: #c0d1e4; }

/* ---------- Process ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { padding: 22px; border-top: 3px solid var(--blue); background: #f6f9fd; border-radius: 0 0 12px 12px; transition: var(--transition); }
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.step b { font-size: 12px; color: #0879d9; letter-spacing: 1px; }
.step h3 { font-size: 17px; margin: 8px 0; }
.step p { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------- CTA Panel ---------- */
.cta { padding: 0 0 82px; }
.cta-panel { border-radius: var(--radius-lg); padding: 45px; background: linear-gradient(110deg, #0b2a50, #0b5a91); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 25px; flex-wrap: wrap; }
.cta-panel h2 { font-size: clamp(22px, 3.5vw, 37px); line-height: 1.15; margin: 0 0 9px; }
.cta-panel p { color: #c7e1f5; margin: 0; }
.cta-panel .btn { flex: none; }

/* ---------- Contact ---------- */
.contact { background: var(--pale); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 35px; }
.contact-info, .contact-form { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 28px; }
.contact-info h3, .contact-form h3 { margin: 0 0 18px; color: var(--navy); font-size: 21px; }
.contact-item { display: flex; gap: 13px; margin: 18px 0; }
.contact-item .icon { width: 40px; height: 40px; flex: none; margin: 0; font-size: 18px; }
.contact-item small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.contact-item strong { font-size: 14px; }
.contact-item a:hover { color: #0879d9; }
.contact-form p { font-size: 13px; color: var(--muted); margin-top: -10px; }

/* ---------- Form ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 800; color: #41536b; }
.field input, .field select, .field textarea { width: 100%; padding: 12px; border: 1px solid #dce5ef; border-radius: 9px; font: inherit; font-size: 14px; outline: none; background: #fff; transition: border-color var(--transition), box-shadow var(--transition); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22, 139, 255, .1); }
.field textarea { min-height: 95px; resize: vertical; }
.contact-form button { margin-top: 15px; width: 100%; }

/* ---------- Map ---------- */
.map { margin-top: 22px; border: 0; width: 100%; height: 190px; border-radius: 12px; }

/* ---------- Footer ---------- */
footer { background: #041022; color: #b7c9df; padding: 45px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 35px; }
.footer-brand img { display: block; width: auto; height: clamp(42px, 5vw, 65px); max-width: min(310px, 100%); object-fit: contain; object-position: left center; }
.footer-grid p { font-size: 13px; color: #a9bdd5; max-width: 350px; }
.footer-grid h4 { color: #fff; margin: 4px 0 13px; font-size: 15px; }
.footer-grid a { display: block; font-size: 13px; margin: 8px 0; color: #b7c9df; transition: color var(--transition); }
.footer-grid a:hover { color: var(--cyan); }
.copyright { border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 30px; padding-top: 18px; font-size: 11px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- Floating WhatsApp ---------- */
.float-wa { position: fixed; right: 20px; bottom: 20px; z-index: 30; background: #20c66b; color: #052416; border-radius: 50px; padding: 13px 18px; font-weight: 900; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); font-size: 13px; transition: var(--transition); }
.float-wa:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 15px 35px rgba(32, 198, 107, .4); }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ---------- Tablet & Mobile: up to 950px ---------- */
@media (max-width: 950px) {
  /* Mobile Navigation Setup */
  .menu { display: block; }
  .desktop-cta { display: none; }
  .header-actions { margin-left: auto; } /* Pushes hamburger right */

  nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 20px 4%;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    margin-left: 0;
    z-index: 1000; /* ADD THIS LINE */
  }
  nav.open { display: flex; }
  nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  
  /* Mobile Dropdown Fixes */
  .dropdown { width: 100%; position: relative; }
  
  .dropdown-toggle { display: block; padding: 12px 0; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  
  .dropdown-menu {
    position: static;
    display: none; 
    box-shadow: none;
    border: none;
    padding-left: 20px; /* Indents sub-items */
    background: rgba(0,0,0,0.3);
    border-radius: 0;
    flex-direction: column;
    width: 100%;
  }
  
  .dropdown.active .dropdown-menu {
    display: flex; /* Shows when JS toggles the .active class */
  }

  .dropdown-menu a { 
    border-bottom: none !important; 
    font-size: 14px; 
    padding: 10px 0 !important;
  }
  nav a:last-child { border-bottom: 0; }
  nav a::after { display: none; }

  .hero-grid { grid-template-columns: 1fr; padding: 50px 0 60px; gap: 40px; }
  .brand { max-width: 200px; }

  .visual { min-height: 320px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }

  .service-grid { grid-template-columns: 1fr 1fr; }
  .feature-layout { grid-template-columns: 1fr; gap: 35px; }
  .about-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

/* ---------- Mobile: up to 560px ---------- */
@media (max-width: 560px) {
  section { padding: 52px 0; }
  .topbar .container { justify-content: center; text-align: center; font-size: 12px; }
  
  .brand { max-width: 160px; } /* Smaller logo for mobile */
  .brand img { max-height: 38px; }

  .hero-grid { padding: 40px 0 50px; }
  .hero p { font-size: 15px; }
  .hero h1 { letter-spacing: -1.2px; }

  .visual { min-height: 270px; }
  .device-card { padding: 15px; }
  .board { height: 170px; }

  .stats-grid { padding: 20px 0; }
  .stat { padding: 4px 12px; }
  .stat strong { font-size: 21px; }

  .service-grid, .process-grid { grid-template-columns: 1fr; }
  .cta-panel { padding: 28px; display: block; text-align: center; }
  .cta-panel .btn { margin-top: 22px; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }

  .float-wa { padding: 11px 15px; font-size: 12px; right: 14px; bottom: 14px; }
}

@media (max-width: 380px) {
  .brand { max-width: 130px; }
  .brand img { max-height: 32px; }
  .hero-actions .btn { width: 100%; }
}