/* ══════════════════════════════════════════
   UniqcalMetrology — Main Stylesheet
   ══════════════════════════════════════════ */

:root {
  --primary: #1a3c6e;
  --primary-dark: #0f2347;
  --accent:  #e8a020;
  --accent-dark: #c98510;
  --light-bg: #f4f7fc;
  --white: #ffffff;
  --text: #2c2c2c;
  --muted: #6b7280;
  --border: #dde3ee;
  --shadow: 0 4px 20px rgba(0,0,0,.09);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

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

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── TOP BAR ── */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,.8);
  font-size: .82rem;
  padding: 8px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.top-contacts { display: flex; gap: 24px; }
.top-contacts span { display: flex; align-items: center; gap: 6px; }
.top-social { display: flex; gap: 10px; }
.top-social a {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; color: rgba(255,255,255,.8);
  transition: background .2s;
}
.top-social a:hover { background: var(--accent); color: #fff; }

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 999;
  background: var(--white);
  box-shadow: 0 2px 14px rgba(0,0,0,.1);
  transition: box-shadow .3s;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.logo img { height: 54px; }
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

/* NAV */
#mainNav {
  display: flex;
  align-items: center;
  gap: 4px;
}
#mainNav > a,
#mainNav > .dropdown > a {
  padding: 8px 15px;
  font-size: .91rem;
  font-weight: 600;
  color: var(--text);
  border-radius: 4px;
  transition: color .2s, background .2s;
  display: flex; align-items: center; gap: 4px;
}
#mainNav > a:hover,
#mainNav > .dropdown > a:hover,
#mainNav > a.active { color: var(--primary); background: #eef3fb; }
.arrow { font-size: .65rem; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 0px); left: 0;
  background: var(--white); min-width: 230px;
  box-shadow: 0 10px 32px rgba(0,0,0,.13);
  border-radius: 6px; border-top: 3px solid var(--accent);
  padding: 6px 0; z-index: 1000;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; padding: 10px 20px;
  font-size: .87rem; font-weight: 400;
  color: var(--text); border-radius: 0;
  transition: background .15s, color .15s;
}
.dropdown-menu a:hover { background: var(--light-bg); color: var(--primary); padding-left: 26px; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--primary); border-radius: 2px; transition: .3s; }

/* ══════════════════════════════════════════
   HERO SLIDER
   ══════════════════════════════════════════ */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 560px;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity .85s ease, transform .85s ease;
  transform: scale(1.04);
}
.slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}
.slide.prev-slide {
  opacity: 0;
  z-index: 1;
}

/* Slide 3 – CSS gradient background */
.slide-3 {
  background: linear-gradient(135deg, #0a1e3f 0%, #1a3c6e 50%, #0f4c81 100%);
}
.slide-3::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(232,160,32,.12) 0%, transparent 60%),
              repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0px, rgba(255,255,255,.015) 1px, transparent 1px, transparent 60px),
              repeating-linear-gradient(90deg, rgba(255,255,255,.015) 0px, rgba(255,255,255,.015) 1px, transparent 1px, transparent 60px);
  pointer-events: none;
}

.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,30,65,.82) 0%, rgba(10,30,65,.45) 55%, rgba(10,30,65,.1) 100%);
}

.slide-content {
  position: relative; z-index: 3;
  height: 100%; display: flex; align-items: center;
}

.slide-text {
  max-width: 580px;
  color: var(--white);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s .3s, transform .7s .3s;
}
.slide.active .slide-text {
  opacity: 1;
  transform: translateY(0);
}

.slide-tag {
  font-size: .8rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.slide-tag::before {
  content: ''; display: block;
  width: 36px; height: 2px; background: var(--accent);
}

.slide-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem; line-height: 1.18;
  margin-bottom: 18px; color: var(--white);
}
.slide-text h1 span { color: var(--accent); }

.slide-desc {
  font-size: 1.05rem; line-height: 1.72;
  color: rgba(255,255,255,.82);
  margin-bottom: 32px;
}

.slide-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-primary {
  display: inline-block;
  padding: 13px 32px;
  background: var(--accent); color: var(--white);
  border-radius: 4px; font-weight: 700;
  font-size: .93rem; letter-spacing: .4px;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-secondary {
  display: inline-block;
  padding: 12px 30px;
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,.7);
  border-radius: 4px; font-weight: 700; font-size: .93rem;
  transition: background .2s, border-color .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,.12); border-color: var(--white); }

/* Slider Controls */
.slider-btn {
  position: absolute; top: 50%; z-index: 10;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  border: 2px solid rgba(255,255,255,.4);
  color: var(--white); width: 52px; height: 52px;
  border-radius: 50%; font-size: 1.1rem; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
  display: flex; align-items: center; justify-content: center;
}
.slider-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-50%) scale(1.08); }
#prevBtn { left: 24px; }
#nextBtn { right: 24px; }

/* Dots */
.slider-dots {
  position: absolute; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 10;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.45);
  cursor: pointer;
  transition: background .25s, transform .25s;
}
.dot.active { background: var(--accent); transform: scale(1.3); }

/* ── STATS BAR ── */
.stats-bar {
  background: var(--primary);
  padding: 28px 0;
}
.stats-inner {
  display: flex; justify-content: center;
  gap: 0; flex-wrap: wrap;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 0 50px;
  border-right: 1px solid rgba(255,255,255,.15);
  color: var(--white);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem; font-weight: 700; color: var(--accent);
  line-height: 1.1;
}
.stat-lbl { font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,.7); }

/* ── SECTIONS ── */
.section { padding: 84px 0; }
.section.alt { background: var(--light-bg); }

.label {
  font-size: .78rem; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.1rem; color: var(--primary);
  line-height: 1.28; margin-bottom: 12px;
}
.divider {
  width: 50px; height: 3px; background: var(--accent);
  border-radius: 2px; margin-bottom: 26px;
}
.divider.center-div { margin: 12px auto 36px; }
.section-head.center { text-align: center; }

/* Two Column Layout */
.two-col {
  display: flex; gap: 70px; align-items: center;
}
.two-col.reverse { flex-direction: row-reverse; }
.col-text { flex: 1; }
.col-text p { color: var(--muted); line-height: 1.82; margin-bottom: 16px; font-size: .97rem; }
.col-img {
  flex: 0 0 440px;
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 14px 40px rgba(0,0,0,.13);
  position: relative;
}
.col-img::before {
  content: ''; position: absolute;
  top: -8px; right: -8px;
  width: 80%; height: 80%;
  border: 3px solid var(--accent);
  border-radius: 10px; z-index: -1;
}
.col-img img { width: 100%; height: 320px; object-fit: cover; }
.mt20 { margin-top: 20px; }

/* ── SERVICES GRID ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--white); border-radius: 10px;
  padding: 36px 24px 28px; text-align: center;
  box-shadow: var(--shadow);
  border-top: 4px solid transparent;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(0,0,0,.13);
}
.svc-icon { margin-bottom: 20px; }
.svc-icon img { width: 80px; height: 80px; object-fit: contain; margin: 0 auto; }
.service-card h3 {
  font-size: 1.05rem; color: var(--primary);
  margin-bottom: 12px; font-weight: 700;
}
.service-card p { font-size: .86rem; color: var(--muted); line-height: 1.72; margin-bottom: 16px; }
.svc-link {
  font-size: .84rem; font-weight: 700;
  color: var(--accent); letter-spacing: .4px;
  transition: letter-spacing .2s;
}
.svc-link:hover { letter-spacing: 1px; }

/* ── WHY US ── */
.why-us {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  position: relative; overflow: hidden;
}
.why-us::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(232,160,32,.08) 0%, transparent 55%),
              radial-gradient(ellipse at 20% 80%, rgba(255,255,255,.04) 0%, transparent 50%);
  pointer-events: none;
}
.why-us .section-title { color: var(--white); }
.why-us .label { color: var(--accent); }
.why-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 24px;
}
.why-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px; padding: 32px 24px; text-align: center;
  transition: background .25s, transform .25s;
}
.why-card:hover { background: rgba(255,255,255,.1); transform: translateY(-6px); }
.why-icon { font-size: 2.2rem; margin-bottom: 14px; }
.why-card h4 { color: var(--accent); font-size: 1rem; margin-bottom: 10px; font-weight: 700; }
.why-card p { color: rgba(255,255,255,.72); font-size: .87rem; line-height: 1.72; }

/* ── CLIENTS CAROUSEL ── */
.clients-carousel-wrap {
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}
.clients-carousel-wrap::before,
.clients-carousel-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 80px; z-index: 2;
  pointer-events: none;
}
.clients-carousel-wrap::before { left: 0; background: linear-gradient(90deg, var(--light-bg), transparent); }
.clients-carousel-wrap::after  { right: 0; background: linear-gradient(270deg, var(--light-bg), transparent); }

.clients-track {
  display: flex; gap: 20px;
  width: max-content;
  animation: scrollClients 38s linear infinite;
}
.clients-track:hover { animation-play-state: paused; }

@keyframes scrollClients {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.client-logo {
  flex: 0 0 160px; height: 90px;
  background: var(--white); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 18px;
  border: 1px solid var(--border);
  transition: box-shadow .2s, transform .2s;
}
.client-logo:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-3px); }
.client-logo img {
  max-width: 100%; max-height: 56px; object-fit: contain;
  filter: grayscale(60%); transition: filter .25s;
}
.client-logo:hover img { filter: grayscale(0%); }

/* ── CTA BANNER ── */
.cta-banner {
  background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 64px 0;
}
.cta-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 40px;
}
.cta-inner h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem; color: var(--white); margin-bottom: 8px;
}
.cta-inner p { color: rgba(255,255,255,.75); font-size: .97rem; }
.btn-outline {
  display: inline-block;
  padding: 14px 38px;
  border: 2px solid var(--accent); color: var(--accent);
  border-radius: 4px; font-weight: 700; font-size: .95rem;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--accent); color: var(--white); }

/* ── FOOTER ── */
footer {
  background: #0d1e3a;
  color: rgba(255,255,255,.8);
  padding: 68px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr 1.4fr;
  gap: 52px;
  padding-bottom: 52px;
}
.footer-logo { height: 48px; margin-bottom: 18px; }
.footer-about { font-size: .87rem; line-height: 1.8; color: rgba(255,255,255,.58); }
.footer-col h4 {
  font-size: .78rem; font-weight: 700;
  letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.contact-item {
  display: flex; gap: 10px; margin-bottom: 14px; font-size: .87rem; line-height: 1.65;
  color: rgba(255,255,255,.72);
}
.contact-item > span:first-child { flex-shrink: 0; margin-top: 2px; }
.social-links {
  display: flex; gap: 8px; margin-top: 20px;
}
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.08);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .8rem; color: rgba(255,255,255,.75);
  transition: background .2s, color .2s;
}
.social-links a:hover { background: var(--accent); color: var(--white); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  font-size: .88rem; color: rgba(255,255,255,.72);
  transition: color .2s, padding-left .2s;
  display: flex; align-items: center; gap: 6px;
}
.footer-links a::before { content: '›'; color: var(--accent); font-size: 1rem; }
.footer-links a:hover { color: var(--accent); padding-left: 4px; }
.qc-form { display: flex; flex-direction: column; gap: 12px; }
.qc-form input {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 5px; padding: 11px 14px;
  color: var(--white); font-family: inherit; font-size: .88rem;
  outline: none; transition: border-color .2s;
}
.qc-form input::placeholder { color: rgba(255,255,255,.38); }
.qc-form input:focus { border-color: var(--accent); }
.qc-form button {
  padding: 12px; background: var(--accent); color: var(--white);
  border: none; border-radius: 5px; font-weight: 700;
  font-size: .9rem; cursor: pointer; transition: background .2s;
}
.qc-form button:hover { background: var(--accent-dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.09);
  padding: 22px 0; text-align: center;
  font-size: .82rem; color: rgba(255,255,255,.42);
}
.footer-bottom a { color: var(--accent); }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 1050px) {
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .why-grid      { grid-template-columns: repeat(2,1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; gap: 40px; }
  .col-img       { flex: 0 0 360px; }
}

@media (max-width: 820px) {
  .slider-wrapper { height: 480px; }
  .slide-text h1  { font-size: 2.2rem; }
  .two-col        { flex-direction: column; gap: 36px; }
  .two-col.reverse { flex-direction: column; }
  .col-img        { flex: 0 0 auto; width: 100%; }
  .cta-inner      { flex-direction: column; text-align: center; }
  .stat-item      { padding: 0 22px; }
}

@media (max-width: 640px) {
  .top-bar { display: none; }
  #mainNav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 12px 0; }
  #mainNav.open { display: flex; }
  #mainNav > a, #mainNav > .dropdown > a { padding: 12px 24px; border-radius: 0; width: 100%; }
  .dropdown-menu { position: static; box-shadow: none; border: none; border-left: 3px solid var(--accent); margin-left: 20px; padding: 0; display: none; }
  .dropdown.open .dropdown-menu { display: block; }
  .hamburger { display: flex; }
  .slider-wrapper { height: 420px; }
  .slide-text h1  { font-size: 1.75rem; }
  .slider-btn     { width: 40px; height: 40px; font-size: .9rem; }
  #prevBtn { left: 12px; } #nextBtn { right: 12px; }
  .services-grid  { grid-template-columns: 1fr; }
  .why-grid       { grid-template-columns: 1fr; }
  .stats-inner    { gap: 0; }
  .stat-item      { padding: 12px 20px; border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); width: 50%; }
  .stat-item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.1); }
  .footer-grid    { grid-template-columns: 1fr; gap: 32px; }
}
