/* ---------- Reset & base ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy-950: #0a1a2f;
  --navy-900: #0d2038;
  --navy-800: #102843;
  --navy-700: #163a5c;
  --navy-600: #1c4670;
  --ink: #ffffff;
  --ink-muted: rgba(255, 255, 255, 0.72);
  --ink-faint: rgba(255, 255, 255, 0.5);
  --accent: #ffffff;
  --accent-blue: #5b9bff;
  --max-width: 1280px; /* max-w-7xl */
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--navy-900);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-light {
  background: #ffffff;
  color: var(--navy-900);
}

.btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #f0f4f8;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(10, 22, 42, 0.97) 0%, rgba(10, 22, 42, 0.9) 100%);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 34px;
  height: auto;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  font-size: 0.98rem;
  color: var(--ink-muted);
  transition: color 0.2s ease;
  position: relative;
}

.main-nav a:hover {
  color: var(--ink);
}

.main-nav a.active {
  color: var(--accent-blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 140px;
  background:
    radial-gradient(circle at 85% -10%, rgba(255, 255, 255, 0.05) 0%, transparent 45%),
    linear-gradient(160deg, #0b1c33 0%, #0d2038 55%, #0f2c4c 100%);
}

.hero-inner {
  max-width: 760px;
}

.hero h1 {
  font-size: clamp(1.875rem, 6vw, 3.4rem); /* text-3xl (30px) floor on mobile, scales up on desktop */
  font-weight: 700;
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--ink-muted);
  max-width: 640px;
  font-weight: 300;
}

/* ---------- Clients ---------- */
.clients {
  background: var(--navy-900);
  padding-top: 40px;
}

.clients-heading {
  text-align: center;
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding-bottom: 32px;
}

.clients-strip {
  background: #081527;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.clients-track {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px;
}

.client-logo {
  height: 64px; /* md:h-16 */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.client-logo img {
  height: 100%;
  width: auto;
  max-width: 160px;
  object-fit: contain;
}

/* ---------- Stats ----------
   Full-bleed two-column split: the blueprint graphic sets the row's height
   (via its own aspect-ratio, not a % height, to avoid grid sizing circularity)
   and the stats column stretches to match, centering its text inside. */
.stats {
  background: linear-gradient(160deg, #0d2038 0%, #123256 100%);
}

.stats-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.stats-numbers {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  gap: 24px; /* gap-6 between the 3 stat rows */
  padding: 64px 48px;
  padding-left: max(24px, calc((100% - var(--max-width)) / 2 + 24px));
}

/* Each stat is its own locked row: number and label always stay
   side-by-side and never wrap apart, on mobile or desktop. */
.stat {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px; /* gap-3 */
  flex-wrap: nowrap;
  width: 100%;
}

.stat-number {
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 600; /* font-semibold, down from extra-bold */
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.stat-label {
  font-size: 1.25rem;
  color: var(--ink-muted);
  font-weight: 400;
  white-space: nowrap;
}

.stats-art {
  overflow: hidden;
}

.stats-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2780 / 2376;
  object-fit: cover;
}

/* ---------- Services ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.service-card {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.service-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 20, 38, 0.35) 0%, rgba(8, 16, 30, 0.88) 75%);
}

.service-content {
  position: relative;
  z-index: 2;
  padding: 36px 32px;
  width: 100%;
}

.service-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.service-content p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 10px;
}

.service-highlight {
  font-weight: 500 !important;
  color: var(--ink) !important;
  margin-bottom: 22px !important;
}

.service-content .btn {
  margin-top: 14px;
}

/* ---------- Products ---------- */
.products {
  background: linear-gradient(160deg, #0d2038 0%, #0a1a2f 100%);
  padding: 100px 0;
  text-align: center;
}

.products-inner {
  max-width: 640px;
}

.products h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.products p {
  color: var(--ink-muted);
  font-weight: 300;
  margin-bottom: 36px;
  font-size: 1rem;
}

/* ---------- Products page (products.html) ---------- */
.products-hero {
  padding: 72px 0 40px;
  background: linear-gradient(160deg, #0b1c33 0%, #0d2038 60%, #0f2c4c 100%);
}

.products-hero h1 {
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.products-hero-sub {
  color: var(--ink-muted);
  font-weight: 300;
  font-size: 1.05rem;
  max-width: 640px;
}

.product-grid-section {
  padding: 24px 0 96px;
}

.product-grid-heading {
  font-size: 1.6rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 40px;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 10px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: #f3f4f6;
  border-radius: 16px;
  padding: 16px 16px 20px;
  color: #111827;
}

.product-image {
  aspect-ratio: 1 / 1;
  background: #1c1c1c;
  color: var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 20px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.products-empty {
  color: var(--ink-muted);
  font-size: 1rem;
}

.product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-desc {
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
}

.product-price {
  margin-top: auto;
  padding-top: 20px;
  text-align: right;
  font-size: 1.2rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  background: #081527;
  padding: 48px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-col {
  flex: 1;
  min-width: 220px;
}

.footer-contact {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.footer-phone {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.icon-inline {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.footer-email {
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 14px;
}

.footer-social img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.footer-social a:hover img {
  opacity: 1;
}

.footer-brand {
  display: flex;
  justify-content: center;
}

.footer-brand img {
  width: 40px;
  height: auto;
}

.footer-copy {
  text-align: right;
  font-size: 0.9rem;
  color: var(--ink-faint);
}

/* ---------- Admin (update.php) ---------- */
.btn-pill {
  display: inline-block;
  background: #ffffff;
  color: var(--navy-900);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  background: #f0f4f8;
}

.admin-message {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
}

.admin-message-success {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.admin-message-error {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.admin-login-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.admin-login-card {
  width: 100%;
  max-width: 360px;
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 36px 32px;
  text-align: center;
}

.admin-login-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.admin-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-shell {
  padding: 56px 0 96px;
}

.admin-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 40px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto 56px;
}

.admin-input {
  width: 100%;
  border: none;
  border-radius: 28px;
  background: #d9dbe0;
  color: #1f2937;
  padding: 16px 26px;
  font-family: var(--font);
  font-size: 0.95rem;
}

.admin-input::placeholder {
  color: #6b7280;
}

.admin-file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-file-label {
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.admin-file-btn {
  cursor: pointer;
}

.admin-file-current {
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 6px;
}

.admin-cancel-link {
  color: var(--ink-muted);
  font-size: 0.9rem;
  text-decoration: underline;
}

.admin-list-heading {
  max-width: 820px;
  margin: 0 auto 16px;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink-muted);
}

.admin-table-wrap {
  max-width: 820px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.admin-table thead th {
  background: #8b93a1;
  color: #0f172a;
  text-align: left;
  font-weight: 600;
  padding: 14px 18px;
}

.admin-table tbody td {
  background: #d7d9de;
  color: #0f172a;
  padding: 14px 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-table-actions {
  text-align: right;
}

.admin-table-actions a {
  color: #0f172a;
  font-weight: 600;
  margin-left: 16px;
  text-decoration: underline;
}

.admin-logout {
  max-width: 820px;
  margin: 24px auto 0;
  text-align: right;
}

.admin-logout a {
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-decoration: underline;
}

/* ---------- Desktop / large-screen defaults (>= 768px, i.e. md and up) ----------
   .main-nav, .stats-inner and .services are row/grid layouts by default above;
   the single breakpoint below switches everything to the stacked mobile layout
   in one place so nav, stats and cards always change together. */

/* ---------- Responsive (mobile, below md / 768px) ---------- */
@media (max-width: 767px) {
  .services {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 380px;
  }

  .stats-inner {
    grid-template-columns: 1fr;
  }

  .stats-numbers {
    padding: 48px 24px;
    align-items: flex-start;
    text-align: left;
    gap: 24px; /* gap-6, even spacing between the 3 stacked rows */
  }

  .stat {
    justify-content: flex-start;
  }

  .stat-number {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
  }

  .stat-label {
    font-size: clamp(0.85rem, 3.5vw, 1rem);
  }

  .main-nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: #0a1a2f;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(-150%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    padding: 12px 0;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero {
    padding: 56px 0 90px;
  }

  .clients-track {
    gap: 32px 40px;
  }

  .client-logo {
    height: 48px; /* h-12 */
  }

  .client-logo img {
    max-width: 120px;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-phone {
    justify-content: center;
  }

  .footer-social {
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 480px;
  }

  .admin-logout {
    text-align: center;
  }
}
