/* ==========================================================================
   Nubek Web — Controlled UI Modernization Stylesheet
   Clean corporate styling, improved hierarchy, high contrast & responsiveness
   ========================================================================== */

:root {
  --nubek-blue-primary: #0066ff;
  --nubek-blue-light: #219bff;
  --nubek-blue-sky: #30b4ff;
  --nubek-gradient: linear-gradient(135deg, #0066ff 0%, #00a3ff 100%);
  --nubek-navy-dark: #0f172a;
  --nubek-navy-card: #1e293b;
  --nubek-gray-light: #f8fafc;
  --nubek-gray-border: #e2e8f0;
  --nubek-text-dark: #1e293b;
  --nubek-text-muted: #64748b;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 30px rgba(0, 102, 255, 0.15);
}

/* Prevent horizontal scroll globally */
html, body {
  overflow-x: hidden;
  max-width: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--nubek-text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.section-heading,
.masthead-heading {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: -0.02em;
}

/* --------------------------------------------------------------------------
   Navigation & Navbar
   -------------------------------------------------------------------------- */
#mainNav {
  background-color: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mainNav .navbar-brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
  margin-right: 1rem;
}

#mainNav .navbar-brand img {
  height: 38px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: height 0.3s ease;
}

#mainNav .navbar-toggler {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  background-color: var(--nubek-blue-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  transition: background-color 0.2s ease;
}

#mainNav .navbar-toggler:hover,
#mainNav .navbar-toggler:focus {
  background-color: #0052cc;
  outline: none;
}

#mainNav .navbar-nav .nav-item .nav-link {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(241, 245, 249, 0.85);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

#mainNav .navbar-nav .nav-item .nav-link:hover,
#mainNav .navbar-nav .nav-item .nav-link:focus,
#mainNav .navbar-nav .nav-item .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

#mainNav .navbar-nav .nav-item.nav-cta .nav-link {
  background: var(--nubek-gradient);
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(0, 102, 255, 0.35);
  padding: 0.5rem 1.15rem;
  margin-left: 0.5rem;
}

#mainNav .navbar-nav .nav-item.nav-cta .nav-link:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

@media (min-width: 992px) {
  #mainNav {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    background-color: rgba(15, 23, 42, 0.85);
  }

  #mainNav .navbar-brand img {
    height: 52px;
  }

  #mainNav.navbar-shrink {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    background-color: rgba(15, 23, 42, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  #mainNav.navbar-shrink .navbar-brand img {
    height: 42px;
  }
}

/* --------------------------------------------------------------------------
   Masthead (Hero Section)
   -------------------------------------------------------------------------- */
header.masthead {
  padding-top: 8.5rem;
  padding-bottom: 5rem;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.82) 100%),
              url("../assets/img/header-bg.jpg") center center / cover no-repeat;
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  background-color: rgba(0, 102, 255, 0.15);
  border: 1px solid rgba(48, 180, 255, 0.35);
  border-radius: 9999px;
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

header.masthead .masthead-heading {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-transform: none !important;
  word-break: break-word;
}

header.masthead .masthead-subheading {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 400;
  line-height: 1.6;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  color: #cbd5e1;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
  margin: 0 auto;
}

.hero-actions .btn {
  width: 100%;
}

@media (min-width: 576px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
    max-width: none;
  }
  .hero-actions .btn {
    width: auto;
  }
}

@media (min-width: 768px) {
  header.masthead {
    padding-top: 13rem;
    padding-bottom: 9rem;
  }
  .hero-badge {
    font-size: 0.85rem;
    padding: 0.4rem 1.1rem;
    margin-bottom: 1.75rem;
  }
  header.masthead .masthead-heading {
    font-size: 3rem;
  }
  header.masthead .masthead-subheading {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary {
  background: var(--nubek-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0, 102, 255, 0.3);
  transition: all 0.25s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, #0052cc 0%, #008be5 100%) !important;
  border: none !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.45);
}

.btn-outline-light {
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

.btn-xl {
  padding: 0.85rem 1.85rem;
  font-size: 0.95rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  .btn-xl {
    padding: 1rem 2.25rem;
    font-size: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Section Layout & Headings
   -------------------------------------------------------------------------- */
.page-section {
  padding: 4.5rem 0;
}

.section-heading {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--nubek-navy-dark);
  margin-bottom: 0.75rem;
}

.section-subheading {
  font-size: 1.05rem;
  font-style: normal !important;
  color: var(--nubek-text-muted) !important;
  margin-bottom: 3rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .page-section {
    padding: 5.5rem 0;
  }
  .section-heading {
    font-size: 2.25rem;
  }
  .section-subheading {
    font-size: 1.1rem;
    margin-bottom: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   Services Section
   -------------------------------------------------------------------------- */
.service-card {
  background: #ffffff;
  border: 1px solid var(--nubek-gray-border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.5rem;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-subtle);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 102, 255, 0.3);
}

.service-icon-wrapper {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(48, 180, 255, 0.15) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--nubek-blue-primary);
  font-size: 1.85rem;
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
  transform: scale(1.08);
  background: var(--nubek-gradient);
  color: #fff;
}

.service-card h4 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nubek-navy-dark);
  margin-bottom: 0.85rem;
}

.service-card p {
  color: var(--nubek-text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Portfolio Section
   -------------------------------------------------------------------------- */
section#portfolio {
  background-color: var(--nubek-gray-light);
}

.portfolio-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  border: 1px solid var(--nubek-gray-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 102, 255, 0.3);
}

.portfolio-item .portfolio-link {
  position: relative;
  display: block;
  background-color: #f1f5f9;
  text-align: center;
  overflow: hidden;
  padding: 1.5rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-item .portfolio-link img {
  max-height: 150px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-link img {
  transform: scale(1.05);
}

.portfolio-item .portfolio-hover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 102, 255, 0.85);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.portfolio-item:hover .portfolio-hover {
  opacity: 1;
}

.portfolio-caption {
  padding: 1.25rem 1rem;
  background-color: #fff;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.portfolio-caption-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--nubek-navy-dark);
  margin-bottom: 0.35rem;
}

.portfolio-caption-subheading {
  font-size: 0.85rem;
  color: var(--nubek-text-muted);
}

/* Portfolio Modals */
.portfolio-modal .modal-content {
  border-radius: var(--radius-lg);
  border: none;
  padding: 2.5rem 1rem;
}

.portfolio-modal .modal-body img {
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-subtle);
}

.portfolio-modal .close-modal {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  cursor: pointer;
  z-index: 1050;
  padding: 0.5rem;
  border-radius: 50%;
  background-color: #f1f5f9;
  transition: background-color 0.2s ease;
}

.portfolio-modal .close-modal:hover {
  background-color: #e2e8f0;
}

/* --------------------------------------------------------------------------
   About / Timeline Section
   -------------------------------------------------------------------------- */
.timeline > li .timeline-image {
  background: var(--nubek-gradient);
  border: 6px solid #f1f5f9;
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.25);
}

.timeline > li.timeline-inverted > .timeline-image {
  background: var(--nubek-gradient);
}

.timeline-heading h4 {
  font-weight: 700;
  color: var(--nubek-blue-primary);
}

.timeline-heading h4.subheading {
  color: var(--nubek-navy-dark);
  font-weight: 700;
}

.timeline-body p {
  color: var(--nubek-text-muted);
  line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
section#contact {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%),
              url("../assets/img/map-image.png") center center / cover no-repeat;
  color: #fff;
  padding: 5rem 0;
}

section#contact .section-heading {
  color: #ffffff;
}

section#contact .section-subheading {
  color: #94a3b8 !important;
}

.contact-card {
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  max-width: 680px;
  margin: 0 auto;
}

.contact-card .contact-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(0, 102, 255, 0.2);
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  margin-bottom: 1.25rem;
}

.contact-card h3 {
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 700;
}

.contact-card p.contact-lead {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  padding: 0.9rem 2rem;
  text-transform: none;
  font-weight: 700;
  border-radius: var(--radius-md);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
footer.footer {
  background-color: #0b1120;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.75rem 0;
  color: #94a3b8;
  font-size: 0.875rem;
}

footer.footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer.footer a:hover {
  color: #38bdf8;
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
  .page-section {
    padding: 3.75rem 0;
  }
  .section-heading {
    font-size: 1.75rem;
  }
  .contact-card {
    padding: 2rem 1rem;
  }
  .contact-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.95rem;
    padding: 0.85rem 1.25rem;
  }
}

/* Timeline responsive fix for mobile */
@media (max-width: 767.98px) {
  .timeline:before {
    left: 35px !important;
  }
  .timeline > li {
    min-height: 70px !important;
    margin-bottom: 35px !important;
  }
  .timeline > li .timeline-image {
    width: 70px !important;
    height: 70px !important;
    left: 0 !important;
    margin-left: 0 !important;
    border-width: 4px !important;
  }
  .timeline > li .timeline-image h4 {
    font-size: 0.65rem !important;
    line-height: 1.1 !important;
    margin-top: 14px !important;
  }
  .timeline > li .timeline-panel {
    width: calc(100% - 85px) !important;
    float: right !important;
    padding: 0 0 0 12px !important;
    box-sizing: border-box !important;
    text-align: left !important;
  }
  .timeline-heading h4 {
    font-size: 1.05rem !important;
  }
  .timeline-heading h4.subheading {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem !important;
  }
  .timeline-body p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
  }
}
