/* ═══════════════════════════════════════════════════════════════
   CNC MACHINING TR — Shared Styles
   Premium multi-page website
═══════════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400&family=Barlow+Condensed:wght@400;500;600;700;800&display=swap');

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

:root {
  --red:        #C8222B;
  --red-hover:  #a81a22;
  --red-light:  #fdf2f2;
  --black:      #111111;
  --dark:       #1e1e24;
  --gray-dark:  #3a3a42;
  --gray:       #6b6b74;
  --gray-light: #9a9aa8;
  --border:     #e4e4ec;
  --bg:         #f7f7f9;
  --white:      #ffffff;
  --navy:       #0f1c2e;
  --shadow-sm:  0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.09);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.13);
  --radius:     2px;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Barlow', sans-serif;
  background: var(--white); color: var(--black);
  overflow-x: hidden; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── PREMIUM NAVIGATION ─────────────────────────────────────── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-nav.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 56px; height: 78px;
}

/* Logo */
.nav-logo { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo img { height: 50px; width: auto; display: block; object-fit: contain; }

/* Nav menu */
.nav-menu { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-item { position: relative; }

.nav-link, .nav-trigger {
  display: flex; align-items: center; gap: 5px;
  padding: 0 16px; height: 78px;
  font-family: 'Barlow', sans-serif; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--gray-dark); text-decoration: none;
  background: none; border: none; cursor: pointer;
  transition: color var(--transition); white-space: nowrap;
  position: relative;
}
.nav-link::after, .nav-trigger::after {
  content: ''; position: absolute; bottom: 0; left: 16px; right: 16px;
  height: 2px; background: var(--red); transform: scaleX(0);
  transform-origin: center; transition: transform var(--transition);
}
.nav-link:hover, .nav-trigger:hover { color: var(--red); }
.nav-link:hover::after, .nav-trigger:hover::after,
.nav-link.active::after, .nav-item.open .nav-trigger::after { transform: scaleX(1); }
.nav-link.active, .nav-item.open .nav-trigger, .nav-trigger.active { color: var(--red); }
.nav-trigger.active::after { transform: scaleX(1); }

/* Chevron */
.nav-chevron {
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px); transition: transform var(--transition);
}
.nav-item.open .nav-chevron { transform: rotate(225deg) translateY(-1px); }

/* Mega/dropdown */
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 1px); left: 50%;
  transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--border);
  border-top: 2px solid var(--red); border-radius: 0 0 4px 4px;
  box-shadow: var(--shadow-lg); padding: 8px 0; list-style: none;
  min-width: 220px; white-space: nowrap;
}
.nav-item.open .nav-dropdown { display: block; animation: dropIn 0.18s ease; }
@keyframes dropIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-6px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.nav-dropdown li a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; font-size: 13px; font-weight: 500;
  color: var(--gray-dark); text-decoration: none;
  transition: color var(--transition), padding-left var(--transition), background var(--transition);
}
.nav-dropdown li a:hover { color: var(--red); padding-left: 26px; background: var(--bg); }
.nav-dropdown li a svg { color: var(--red); flex-shrink: 0; }

/* CTA Button */
.nav-cta {
  margin-left: 12px; padding: 11px 26px;
  background: var(--red); color: var(--white) !important;
  font-family: 'Barlow', sans-serif; font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(200,34,43,0.3);
}
.nav-cta:hover { background: var(--red-hover) !important; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,34,43,0.4); }
.nav-cta::after { display: none !important; }

/* Mobile toggle */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--black); transition: transform 0.25s, opacity 0.2s; }
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PREMIUM BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Barlow', sans-serif; font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none;
  cursor: pointer; border: none; transition: all var(--transition);
  position: relative; overflow: hidden;
}
.btn-red {
  padding: 14px 32px; background: var(--red); color: var(--white);
  box-shadow: 0 2px 10px rgba(200,34,43,0.25);
}
.btn-red:hover { background: var(--red-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(200,34,43,0.35); }
.btn-red:active { transform: translateY(0); }

.btn-outline {
  padding: 13px 30px; background: transparent;
  border: 1.5px solid var(--red); color: var(--red);
}
.btn-outline:hover { background: var(--red); color: var(--white); box-shadow: 0 4px 16px rgba(200,34,43,0.25); }

.btn-ghost-dark {
  padding: 13px 30px; background: transparent;
  border: 1.5px solid rgba(255,255,255,0.35); color: rgba(255,255,255,0.85);
}
.btn-ghost-dark:hover { border-color: rgba(255,255,255,0.8); color: var(--white); }

.btn-link {
  padding: 0; background: transparent; border: none; box-shadow: none;
  color: var(--red); font-weight: 700;
}
.btn-link:hover { gap: 16px; }
.btn-link svg { transition: transform var(--transition); }
.btn-link:hover svg { transform: translateX(4px); }

.btn-white {
  padding: 14px 32px; background: var(--white); color: var(--red);
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}
.btn-white:hover { background: var(--bg); transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,0.15); }

/* Arrow icon for buttons */
.btn-arrow {
  width: 16px; height: 16px; display: inline-block; flex-shrink: 0;
}

/* ── SECTION UTILITIES ──────────────────────────────────────── */
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.section-tag-line { width: 28px; height: 2px; background: var(--red); }
.section-tag span {
  font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--red);
}

.section-h1, .section-h2 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 800;
  text-transform: uppercase; line-height: 0.96; letter-spacing: -0.01em;
}
.section-h1 { font-size: clamp(40px, 4.5vw, 64px); color: var(--black); }
.section-h2 { font-size: clamp(32px, 3.5vw, 50px); color: var(--black); }
.section-h1 em, .section-h2 em { font-style: italic; font-weight: 300; color: var(--gray-light); }

.section-lead { font-size: 17px; line-height: 1.75; color: var(--gray); }

/* ── PAGE HEADER (inner pages) ──────────────────────────────── */
.page-header {
  background: var(--navy); padding: 140px 80px 80px;
  position: relative; overflow: hidden;
}
.page-header-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.22; filter: grayscale(20%);
}
.page-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,28,46,0.92) 0%, rgba(15,28,46,0.6) 100%);
}
.page-header-content { position: relative; z-index: 2; max-width: 720px; }
.page-header-breadcrumb {
  display: flex; align-items: center; gap: 8px; margin-bottom: 20px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(255,255,255,0.45);
}
.page-header-breadcrumb a { color: inherit; text-decoration: none; transition: color var(--transition); }
.page-header-breadcrumb a:hover { color: rgba(255,255,255,0.8); }
.page-header-breadcrumb span { color: var(--red); }
.page-header h1 { color: var(--white); margin-bottom: 20px; }
.page-header p { font-size: 18px; line-height: 1.7; color: rgba(255,255,255,0.65); max-width: 580px; }

/* ── SCROLL ANIMATIONS ──────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-left {
  opacity: 0; transform: translateX(-32px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right {
  opacity: 0; transform: translateX(32px);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.reveal-right.visible { opacity: 1; transform: none; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer { background: #0d1520; padding: 64px 0 0; }
.footer-inner { max-width: 1400px; margin: 0 auto; padding: 0 56px; }
.footer-top { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 60px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-brand-logo img { height: 44px; width: auto; margin-bottom: 16px; display: block; }
.footer-tagline { font-size: 14px; line-height: 1.75; color: rgba(255,255,255,0.38); max-width: 280px; }
.footer-col-title { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.3); margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.5); text-decoration: none; transition: color var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: var(--white); padding-left: 4px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.25); }
.footer-socials { display: flex; gap: 10px; }
.footer-social-link { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.4); text-decoration: none; transition: all var(--transition); border-radius: 2px; }
.footer-social-link:hover { border-color: var(--red); color: var(--red); background: rgba(200,34,43,0.08); }
.footer-credit {
  text-align: center;
  padding: 16px 0 22px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-family: 'Barlow', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.28);
}
.footer-credit a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}
.footer-credit a:hover { color: var(--red); }

/* ── UTILITIES ──────────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 80px; }
.text-red { color: var(--red); }
.text-gray { color: var(--gray); }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── WHATSAPP FLOAT BUTTON ──────────────────────────────────── */
.whatsapp-float {
  position: fixed; bottom: 32px; right: 32px; z-index: 8000;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  text-decoration: none; transition: transform 0.2s, box-shadow 0.2s;
  animation: waPulse 2.5s ease-in-out infinite;
  /* Respect iOS safe-area on devices with home indicator */
  bottom: max(32px, env(safe-area-inset-bottom, 32px));
  right: max(32px, env(safe-area-inset-right, 32px));
}
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.65); }
@keyframes waPulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); }
  50% { box-shadow: 0 4px 32px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.12); }
}
.whatsapp-tooltip {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  background: var(--black); color: white; padding: 7px 14px;
  font-size: 12px; font-weight: 600; white-space: nowrap; border-radius: 4px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  font-family: 'Barlow', sans-serif;
}
.whatsapp-tooltip::after {
  content: ''; position: absolute; left: 100%; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--black);
}
.whatsapp-float:hover .whatsapp-tooltip { opacity: 1; }
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px; height: 50px;
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    right: 16px;
  }
  .whatsapp-float svg { width: 24px; height: 24px; }
  .whatsapp-tooltip { display: none; }
  /* Add a small bottom-pad to the body so the WhatsApp float never hides
     a CTA / submit button on tiny viewports. */
  body { padding-bottom: 12px; }
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .nav-inner, .container { padding: 0 40px; }
  .page-header { padding: 120px 40px 60px; }
  .footer-inner { padding: 0 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  .nav-menu {
    display: none;
    position: fixed; top: 78px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 0 18px;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
  }
  .nav-menu.mobile-open { display: flex; }
  .nav-menu .nav-link, .nav-menu .nav-trigger {
    height: auto; padding: 14px 24px; width: 100%; justify-content: space-between;
  }
  .nav-menu .nav-link::after, .nav-menu .nav-trigger::after { display: none; }
  .nav-menu .nav-dropdown {
    position: static; transform: none; box-shadow: none;
    border: none; border-top: 1px solid var(--border); border-radius: 0;
    background: var(--bg); padding: 4px 0; min-width: 0;
  }
  .nav-menu .nav-dropdown li a { padding: 11px 36px; font-size: 13px; }
  .nav-menu .nav-cta {
    margin: 12px 24px 4px; justify-content: center; padding: 13px 22px;
  }
  .nav-hamburger { display: flex; }
  .nav-inner, .container { padding: 0 24px; }
  .page-header { padding: 110px 24px 48px; }
  .footer-inner { padding: 0 24px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}
