/* VizTec site – base theme cloned from VizionCyber, but independent CSS copy */

@import url("viztec-base.css");

/* Service boxes: orange border and lift on hover (pillar cards use .key-card--pillar:hover in base) */
@media (hover: hover) {
  .key-card:not(.key-card--pillar):hover {
    border-color: rgba(248, 164, 53, 0.8);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  }
}

/* Center content and icons inside non-pillar service cards */
.key-services .key-card:not(.key-card--pillar) {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

/* Our services: six pillars in a 3×2 grid — use full container width (not the 960px cap for three home pillars) */
.key-services--core-areas .key-service-grid {
  max-width: min(100%, var(--container));
}

/* Gallery CTA: compact height, small box in the centre */
.key-card--gallery {
  padding: 0.75rem 1.25rem;
  justify-content: center;
  text-align: center;
}

.key-card--gallery h3 {
  margin-top: 0;
  margin-bottom: 0.25em;
  font-size: 1rem;
}

.key-card--gallery p {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

/* Call out box: bullet list with minimal gap between items */
.tight-list {
  margin: 0.5em 0 0.5em 1.2em;
  padding-left: 0.5em;
}
.tight-list li {
  margin-bottom: 0.15em;
}
.tight-list li:last-child {
  margin-bottom: 0;
}

/* Gallery page: clickable tiles for each service */
.gallery-tiles .gallery-tile {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
}

.gallery-tiles .gallery-tile h3 {
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
}

.gallery-tiles .gallery-tile p {
  margin-bottom: 0;
}

.gallery-tiles .gallery-tile:hover {
  border-color: rgba(248, 164, 53, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

/* Gallery: horizontal section links */
.gallery-nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
}

.gallery-nav h3 {
  margin: 0;
  font-size: 0.9rem;
  white-space: nowrap;
}

.gallery-nav a {
  text-decoration: none;
  color: var(--accent);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 238, 252, 0.22);
  background: rgba(20, 35, 66, 0.65);
}

.gallery-nav a:hover {
  border-color: rgba(248, 164, 53, 0.9);
  color: var(--accent-2);
}

.gallery-nav a:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* Home page: reduce gap between hero buttons and the text block below */
.section--tighter-top {
  padding-top: clamp(0.125rem, 0.25vw, 0.25rem) !important;
  /* Also cut bottom padding roughly in half to reduce space before "Key services" */
  padding-bottom: clamp(1.5rem, 3vw, 3rem) !important;
}

/* Further tighten space by reducing hero top & bottom padding on all pages (match home spacing everywhere) */
.hero {
  padding-top: clamp(1.5rem, 3vw, 3rem);
  padding-bottom: clamp(1.5rem, 3vw, 3rem);
}

.services-heading-tight {
  margin-bottom: clamp(0.2rem, 0.4vw, 0.4rem);
}

/* Plain bordered text block (no orange, no hover) */
.text-block-bordered {
  border: 1px solid rgba(232, 238, 252, 0.18);
  border-radius: 12px;
  padding: clamp(1rem, 2vw, 1.5rem);
}

/* Emphasised red intro text block */
.text-red {
  color: #ff5b6e;
}

/* Service icons – blue circle wrapper matching VizTec/VizionCyber blue */
.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 2px solid #00b0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  background: rgba(0, 176, 240, 0.08);
}

.service-icon img {
  max-width: 51px;
  max-height: 51px;
  display: block;
}


.article-body .service-icon {
  margin: 0 auto 0.75rem;
}

/* Gallery: thumbnail grid and lightbox */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--s-4);
}

.gallery-caption-hidden {
  display: none;
}

.gallery-grid figure.card.soft {
  cursor: pointer;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-grid figure.card.soft img {
  max-height: 142px;
  width: auto;
  margin: 0 auto;
}

.gallery-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1400;
}

.gallery-lightbox-overlay.is-open {
  display: flex;
}

.gallery-lightbox-content {
  max-width: min(960px, 96vw);
  max-height: 90vh;
  text-align: center;
}

.gallery-lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
}

.gallery-lightbox-caption {
  margin-top: 0.75rem;
  color: rgba(232, 238, 252, 0.9);
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
  position: absolute;
  background: rgba(15, 26, 46, 0.85);
  border: 1px solid rgba(232, 238, 252, 0.25);
  border-radius: 999px;
  color: #e8eefc;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gallery-lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
}

.gallery-lightbox-prev {
  left: 1.25rem;
}

.gallery-lightbox-next {
  right: 1.25rem;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

/* Why choose us: gap between 3 boxes and stretched box = same as gap between boxes (var(--s-5)) */
.key-services--tight-bottom {
  padding-bottom: var(--s-5) !important;
}
.section--tight-top {
  padding-top: 0 !important;
}

/* Quarter gap between sections (e.g. Achieve Your Vizion and image below) */
.section--quarter-bottom {
  padding-bottom: clamp(0.5rem, 1vw, 1rem) !important;
}
.section--quarter-top {
  padding-top: clamp(0.5rem, 1vw, 1rem) !important;
}

/* Extra-tight bottom spacing for specific sections */
.section--extra-tight-bottom {
  padding-bottom: clamp(0.25rem, 0.5vw, 0.5rem) !important;
}

/* All VizTec pages: full-page background image (top to bottom) */
body {
  background-image: url("home-bg-tools-2.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
}

.nav-links {
    display: flex;
    align-items: center; /* Ensures everything is aligned on the same horizontal line */
}

.nav-item {
    position: relative; /* Crucial for absolute children to align to them */
}

/* Ensure the main links (Home/Our Services) aren't being covered by their own submenus */
.nav-item > a {
    position: relative;
    z-index: 1005; /* Keeps the main text "above" the dropdown box */
}

/* If I hover over the item, show the submenu immediately */
.nav-item.has-submenu:hover .nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* 1. Define the base state of the submenu (match Vizion-AI: vertical panel padding only) */
.nav-submenu {
  position: absolute;      /* Makes it float over content */
  top: 100%;               /* Positions it right below the parent link */
  left: 0;
  min-width: 200px;        /* Gives it a clickable width */
  background: rgb(11, 18, 32); /* Matches your header color */
  border: 1px solid rgba(232, 238, 252, 0.2);
  border-radius: 8px;
  padding: 0.4rem 0;

  /* Start hidden */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;    /* Prevents clicking while hidden */
  z-index: 1001;           /* Sits above the header's 1000 */
  transition: all 0.2s ease;
}

/* 2. Styling for the links inside the submenu (match Vizion-AI: side inset on label text) */
.nav-submenu a {
  display: block;          /* Makes each link take up a full line */
  padding: 0.45rem 1.1rem;
  color: #e8eefc;
  text-decoration: none;
}

.nav-submenu a:hover {
  color: #f8a435;          /* Your VizTec Orange on hover */
}

/* 3. The "Trigger" - This works with your existing JS class */
.nav-item.has-submenu.submenu-open .nav-submenu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;    /* Re-enables clicking when visible */
  transform: translateY(0);
}

/* Ensure header/nav always sit above page content so links are clickable */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo: bigger, with no extra background box around it */
.site-header .brand {
  display: flex;
  align-items: center;
  padding: 0.25rem 0.75rem 0.25rem 0;
  margin: 0;
  background: transparent;
}
.site-header .brand-logo {
  display: block;
  height: 56px;
  width: auto;
}

/* Smart-tech image grid: 3 on first row, 2 spaced left/right on second row, smaller images */
.smart-gallery .grid.three {
  align-items: flex-start;
}

.smart-gallery .card.soft img {
  max-height: 220px;
  width: auto;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 900px) {
  .smart-gallery .grid.three > article:nth-child(4) {
    grid-column: 1;
  }

  .smart-gallery .grid.three > article:nth-child(5) {
    grid-column: 3;
  }
}

/* This ensures the 'Home' and 'Our Services' text is ALWAYS on top of the dropdown box */
.nav-item > a {
    position: relative;
    z-index: 2000 !important;
    pointer-events: auto !important;
    display: inline-block;
}

/* This ensures the submenu doesn't overlap the main link area */
.nav-submenu {
    margin-top: 10px; /* Adds a tiny gap so the dropdown doesn't 'smother' the main link */
}
/* When JS adds .submenu-open, keep dropdown visible and clickable */
.nav-item.has-submenu.submenu-open .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
  z-index: 1001;
}

/* Why choose us: single image in box with italic caption */
.feature-image-box {
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(232, 238, 252, 0.2);
  border-radius: 12px;
  overflow: hidden;
}

.feature-image-box img {
  width: 100%;
  height: auto;
  display: block;
}

.feature-image-box figcaption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.95rem;
  color: rgba(232, 238, 252, 0.9);
  text-align: center;
  line-height: 1.4;
  font-style: italic;
}

/* About us / Who we are: team profile images – same size and aligned */
.team-profiles .team-profile-figure {
  margin: 0 0 1rem;
  text-align: center;
}
.team-profiles .team-profile-img-hit {
  display: block;
  margin: 0 auto;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  line-height: 0;
}
.team-profiles .team-profile-img-hit:focus-visible {
  outline: 2px solid rgba(248, 164, 53, 0.85);
  outline-offset: 3px;
}
.team-profiles .team-profile-img {
  width: 225px;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}
.team-profiles .team-profile-figure figcaption {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Orange CTAs sit centred under each portrait (same width as photo column) */
.team-profiles > div {
  text-align: center;
}

/* Main before/after image: centred, half width, in a box (modified shipping containers page) */
.main-image-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.main-image-wrapper .main-image-caption {
  flex: 0 0 auto;
  width: 50%;
  max-width: 480px;
  margin: 0;
}

.main-image-wrapper .main-image-caption figcaption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.95rem;
  color: rgba(232, 238, 252, 0.9);
  text-align: center;
  line-height: 1.4;
  font-style: italic;
}

/* Modified shipping containers: 3 image boxes side by side with captions */
.image-caption-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.image-caption-box {
  flex: 1 1 280px;
  max-width: 360px;
  margin: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(232, 238, 252, 0.2);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.image-caption-box img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  padding-top: 0.5rem;
}

.image-caption-box figcaption {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.95rem;
  color: rgba(232, 238, 252, 0.9);
  text-align: center;
  line-height: 1.35;
  font-style: italic;
}

/* Left image box at one-eighth size (half of quarter) */
.image-caption-box--small {
  flex: 0 0 auto;
  max-width: 12.5%;
  min-width: 120px;
}

/* Equal-sized row: same width boxes, images not warped (object-fit: contain) */
.image-caption-row--equal .image-caption-box--equal {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.image-caption-row--equal .image-caption-box--equal img {
  object-fit: contain;
  object-position: center;
  height: 240px;
  width: 100%;
}


/* Gallery: force 5 thumbnails per row on wide screens */
@media (min-width: 900px) {
  .grid.three.gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Slightly tighter gallery cards so five fit comfortably */
.gallery-grid figure.card.soft {
  padding: 0.5rem 0.75rem;
}

.gallery-grid figure.card.soft figcaption {
  font-size: 0.9rem;
}

/* 1. Lift the entire header higher than the page content */
.site-header {
    z-index: 9999 !important;
}

/* 2. Fix the Submenu stacking */
.nav-item {
    z-index: 10000 !important;
}

.nav-submenu {
    z-index: 10001 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    /* This ensures the submenu sits ABOVE the 'main' section */
}

/* 3. Ensure the Child Links are recognized as clickable areas */
.nav-submenu a {
    position: relative;
    z-index: 10002 !important;
    display: block !important;
}

/* 4. Fix the 'Bridge' gap mentioned in your base.css */
.nav-submenu::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    height: 20px; /* This creates an invisible 'safety' zone so the menu doesn't disappear */
    background: transparent;
}

/* --- SUBMENU INDICATOR ARROW --- */

/* 1. Create space and add the arrow icon */
.nav-item.has-submenu > a::after {
    content: '▼';                /* The arrow symbol */
    font-size: 0.6rem;           /* Makes it smaller than the text */
    margin-left: 6px;            /* Adds a gap so it doesn't touch the words */
    vertical-align: middle;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
}

/* 2. Make the arrow turn orange when you hover over the link */
.nav-item.has-submenu:hover > a::after {
    color: var(--accent);
    transform: rotate(180deg);   /* Flips the arrow up when the menu opens */
}

/* 3. Ensure the arrow stays white/muted when not hovered */
.nav-item.has-submenu > a {
    display: flex;
    align-items: center;
}

/* Pop-out dialogs: see viztec-popouts.css (linked after sovereign-flow.css on Home + Our services) */

/* --- SUBMENU TEXT-ONLY HIGHLIGHT --- */
.nav-submenu a:hover {
    background: transparent !important;
    color: var(--accent) !important;
    text-decoration: none !important;
    transition: color 0.2s ease;

    border-radius: 6px;
    /* Horizontal padding comes from .nav-submenu a (Vizion-AI parity); avoid changing padding on hover so text does not shift */
}

/* =========================================================
   Unified nav layer (final authority)
   Keeps behavior consistent and overrides legacy conflicts.
   ========================================================= */
.site-header{
  z-index: 999 !important;
}
.site-header .nav-toggle{
  display: none;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid rgba(232,238,252,.22);
  border-radius: 10px;
  background: rgba(15,26,46,.72);
  color: var(--text);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .24rem;
  cursor: pointer;
}
.site-header .nav-toggle span{
  width: 1.1rem;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
  transition: transform .16s ease, opacity .16s ease;
}
.site-header .nav-item.has-submenu > .nav-submenu-toggle{
  display: none;
  margin-left: .35rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid rgba(232,238,252,.2);
  border-radius: 8px;
  background: rgba(15,26,46,.7);
  color: var(--muted);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.site-header .nav-item.has-submenu > .nav-submenu-toggle span{
  font-size: .62rem;
  line-height: 1;
  transition: transform .2s ease, color .2s ease;
}
.site-header .nav-item.submenu-open > .nav-submenu-toggle span{
  transform: rotate(180deg);
  color: var(--accent);
}
.site-header .nav-item.has-submenu > .nav-submenu{
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(4px) !important;
}
.site-header .nav-item.has-submenu.submenu-open > .nav-submenu{
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

@media (max-width: 767px){
  body.nav-drawer-open{
    overflow: hidden;
  }
  .site-header .navbar{
    position: relative;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
  }
  .site-header .brand-logo{
    width: clamp(155px, 42vw, 210px);
    max-height: 50px;
    height: auto;
  }
  .site-header .nav-toggle{
    display: inline-flex !important;
    margin-left: auto;
    position: relative;
    z-index: 60;
  }
  .site-header .nav-cta-desktop,
  .site-header .navbar > .btn.btn-cta{
    display: none !important;
  }
  .site-header .nav-links{
    order: 3;
    width: 100%;
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: .2rem !important;
    margin-top: .4rem !important;
    padding: 0 .4rem !important;
    border-radius: 12px;
    background: rgba(11,18,32,.98) !important;
    border: 1px solid rgba(232,238,252,.14) !important;
  }
  .site-header.nav-open .nav-links{
    display: flex !important;
    max-height: 78vh !important;
    overflow: auto !important;
    padding: .55rem .4rem .7rem !important;
  }
  .site-header .nav-links > a,
  .site-header .nav-item > a{
    width: 100%;
    padding: .7rem .75rem !important;
    border-radius: 10px;
  }
  .site-header .nav-item{
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .site-header .nav-item.has-submenu{
    position: relative !important;
  }
  /* One chevron on small screens: keep the toggle button, hide duplicate ::after (Vizion-AI uses ::after only — no boxed control) */
  .site-header .nav-item.has-submenu > a::after{
    content: none !important;
  }
  .site-header .nav-item.has-submenu > a{
    width: calc(100% - 2.2rem);
  }
  .site-header .nav-item.has-submenu > .nav-submenu-toggle{
    display: inline-flex !important;
    position: absolute;
    right: .35rem;
    top: .55rem;
    z-index: 2;
    margin-left: 0;
  }
  .site-header .nav-item.has-submenu > .nav-submenu{
    position: static !important;
    width: 100% !important;
    margin: .15rem 0 .35rem !important;
    border-radius: 10px !important;
    border: 1px solid rgba(91,140,255,.24) !important;
    box-shadow: none !important;
    background: rgba(20,35,66,.55) !important;
    padding: .35rem 0 !important;
    max-height: 60vh !important;
    overflow: auto !important;
    transform: none !important;
  }
  .site-header .nav-item.has-submenu > .nav-submenu a{
    padding: .45rem 1rem !important;
  }
  .site-header .nav-item.has-submenu:not(.submenu-open) > .nav-submenu{
    display: none !important;
  }
  .site-header .nav-item.has-submenu.submenu-open > .nav-submenu{
    display: block !important;
  }
}

@media (min-width: 768px){
  .site-header .nav-toggle{
    display: none !important;
  }
  .site-header .nav-links{
    display: flex !important;
    align-items: center !important;
    gap: var(--s-5) !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }
  .site-header .nav-item{
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
  }
  /* Desktop: match Vizion-AI — chevron is only on the label via ::after; hide JS toggle (no duplicate boxed arrow) */
  .site-header .nav-item.has-submenu > .nav-submenu-toggle{
    display: none !important;
  }
  .site-header .nav-item.has-submenu > .nav-submenu{
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 200px !important;
    margin-top: 0 !important;
    padding: .4rem 0 !important;
    border-radius: 12px !important;
    background: rgba(11,18,32,.98) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
  }
  .site-header .nav-item.has-submenu > .nav-submenu a{
    padding: .45rem 1.1rem !important;
  }
}

/* LinkedIn placeholder: same site background, centred message + CTA */
.page-linkedin-soon .coming-soon-main{
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) var(--s-4);
  box-sizing: border-box;
}
.page-linkedin-soon .coming-soon-inner{
  text-align: center;
  max-width: 36rem;
}
.page-linkedin-soon .coming-soon-title{
  margin: 0 0 var(--s-6);
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}
.page-linkedin-soon .coming-soon-actions{
  margin: 0;
}
