/* ==========================================================================
   AVIONICS — Global stylesheet
   Palette : #10064d / #002ea9 / #00b5cf
   Mobile-first responsive
   ========================================================================== */

/* ---------- Variables & reset ---------- */
:root {
  --navy:       #10064d;
  --navy-dark:  #0a0430;
  --steel:      #002ea9;
  --accent:     #00b5cf;
  --accent-glow:#00d4f0;
  --light:      #f0f4fa;
  --gray:       #556070;
  --border:     #dde3ed;
  --white:      #ffffff;
  --shadow:     0 6px 24px rgba(16, 6, 77, 0.14);
  --radius:     12px;
  --font-body:  "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --font-head:  "Archivo", "Inter", "Segoe UI", Arial, sans-serif;
  --container:  1160px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--gray);
  line-height: 1.65;
  background: var(--white);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--steel); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
  font-weight: 700;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent);
  color: var(--navy);
}
.btn-primary:hover { background: var(--accent-glow); box-shadow: 0 4px 18px rgba(0, 181, 207, 0.35); color: var(--navy); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-dark {
  background: var(--steel);
  color: var(--white);
}
.btn-dark:hover { background: var(--navy); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}
.header-top {
  background: var(--navy-dark);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
}
.header-top .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.header-top a { color: rgba(255, 255, 255, 0.85); }
.header-top a:hover { color: var(--accent); }
.header-top .divider { opacity: 0.4; padding: 0 6px; }

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.brand img {
  height: 48px;
  width: auto;
}
.brand-text {
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 700;
  font-family: var(--font-head);
  letter-spacing: 0.5px;
}

.main-nav ul { display: flex; gap: 4px; }
.main-nav li a {
  display: block;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.main-nav li a:hover { color: var(--white); }
.main-nav li a.active {
  background: var(--accent);
  color: var(--navy);
  font-weight: 600;
}

/* Burger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  margin: 5px 0;
  border-radius: 3px;
  transition: all 0.3s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--steel) 100%);
  color: var(--white);
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 90px; }

/* Hero background image */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(16, 6, 77, 0.92) 0%, rgba(16, 6, 77, 0.75) 45%, rgba(0, 46, 169, 0.45) 100%);
  z-index: 1;
}
.hero::after {
  content: "";
  position: absolute;
  top: -35%;
  right: -8%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 181, 207, 0.25), transparent 65%);
  z-index: 1;
}
.hero::before {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(0, 46, 169, 0.3), transparent 65%);
  z-index: 1;
}
.hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 3.2rem); margin-bottom: 18px; }
.hero h1 span { color: var(--accent); }
.hero p { max-width: 620px; font-size: 1.05rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 28px; }
.hero .btn + .btn { margin-left: 10px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--light); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 12px; }
.section-head p { font-size: 1rem; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr; }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(16, 6, 77, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card-body p { font-size: 0.9rem; flex: 1; margin-bottom: 16px; }
.card-link { font-weight: 600; color: var(--accent); font-size: 0.9rem; }
.card-link:hover { color: var(--steel); text-decoration: underline; }
.card-media {
  height: 170px;
  background: linear-gradient(135deg, var(--steel), var(--navy));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* ---------- Accordion / category tree ---------- */
.accordion { width: 100%; max-width: 760px; margin: 0 auto; }
.acc-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: var(--white); }
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.2s ease;
}
.acc-head:hover { background: var(--light); }
.acc-icon { font-size: 1.2rem; transition: transform 0.3s ease; color: var(--accent); }
.acc-item.open .acc-icon { transform: rotate(45deg); }
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.acc-body-inner { padding: 4px 20px 20px; }
.acc-body ul { padding-left: 8px; border-left: 2px solid var(--border); margin-left: 22px; padding-left: 16px; }
.acc-body ul li { margin: 8px 0; }
.acc-body ul li a { display: block; padding: 6px 10px; border-radius: 6px; font-size: 0.95rem; color: var(--gray); }
.acc-body ul li a:hover { background: var(--light); color: var(--accent); }

/* ---------- Product template ---------- */
.product-layout { display: grid; gap: 36px; }
.product-media {
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--steel), var(--navy));
  background-size: cover;
  background-position: center;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-head);
  font-size: 1.1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.product-info h1 { font-size: 2rem; margin-bottom: 6px; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 12px; color: var(--gray); }
.breadcrumb a:hover { color: var(--accent); }
.product-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.tag {
  background: var(--light);
  border: 1px solid var(--border);
  color: var(--steel);
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 600;
}
.product-info p { font-size: 1rem; margin-bottom: 16px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 40px; }
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 2px 10px rgba(16, 6, 77, 0.05);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; color: var(--navy); margin-bottom: 6px; }
.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--white);
  transition: border 0.2s ease;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0, 181, 207, 0.12); }
textarea.form-control { resize: vertical; min-height: 130px; }

.contact-side h3 { margin-bottom: 14px; }
.contact-list li {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.contact-list .ico {
  flex: 0 0 20px;
  color: var(--accent);
  font-weight: 700;
}
.contact-list strong { color: var(--navy); display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.contact-list span { font-size: 0.95rem; }

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 26px;
}
.map-embed img { width: 100%; height: 240px; object-fit: cover; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: rgba(255, 255, 255, 0.8); padding: 56px 0 0; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 40px; }
.footer-col h4 { color: var(--accent); margin-bottom: 16px; font-size: 1.05rem; }
.footer-col p { font-size: 0.9rem; }
.footer-col ul li { margin: 8px 0; }
.footer-col ul li a { color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-contact li { display: flex; gap: 10px; margin: 10px 0; font-size: 0.9rem; align-items: flex-start; }
.footer-contact .ico { color: var(--accent); font-weight: 700; flex: 0 0 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- Gallery (Automotive) ---------- */
.gallery { display: grid; gap: 20px; grid-template-columns: 1fr; }

/* ---------- Feature rows (image + paragraph) ---------- */
.feature-list { display: flex; flex-direction: column; gap: 28px; }
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(16, 6, 77, 0.05);
}
.feature-row img,
.feature-row .feature-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  background-size: cover;
  background-position: center;
}
.feature-body { padding: 8px 24px 24px; }
.feature-body h3 { font-size: 1.25rem; margin-bottom: 8px; }
.feature-body p { font-size: 0.95rem; }

@media (min-width: 768px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  .feature-body { padding: 32px; }
  .feature-row.reverse .feature-img { order: 2; }
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .product-layout { grid-template-columns: 1fr 1fr; }
  .contact-layout { grid-template-columns: 1.1fr 0.9fr; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
  }
  .main-nav.open { max-height: 460px; overflow: auto; }
  .main-nav ul { flex-direction: column; padding: 12px 0; gap: 2px; }
  .main-nav li a { padding: 13px 20px; border-radius: 0; }
  .main-nav li a.active,
  .main-nav li a:hover { background: var(--accent); color: var(--navy); }
}