/* =========================================================
   Dream Team Automation — Global Styles
   Designed to work with:
   - Navbar: .navbar .logo .nav-list .nav-link .menu
   - Cards & Grid: .cp-wrap .cp-card .cp-form .cp-col-6 .cp-col-12 ...
   - New Contact: .contact-header .contact-brand .contact-map .contact-card
   - Projects gallery, footer, buttons, inputs
   ========================================================= */

/* ------------------ Theme tokens ------------------ */
:root {
  --bg: #0b1f33;
  --card: #0b2440;
  --text: #e6f0ff;
  --muted: #b8c9dd;
  --accent: #4cc1ff;
  --border: rgba(255, 255, 255, 0.1);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

  --nav-height: 64px;
  --nav-pad-y: 10px;
}

/* ------------------ Base ------------------ */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  opacity: 0.9;
}

/* ------------------ Navbar ------------------ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--card);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: var(--nav-pad-y) 24px;
  min-height: var(--nav-height);
  overflow: hidden; /* keep logo inside bar */
}

/* make the logo a solid click target whether it is <a> or <div> */
.navbar .logo {
  display: flex;
  align-items: center;
}
.navbar .logo img {
  max-height: calc(var(--nav-height) - var(--nav-pad-y) * 2);
  height: auto;
  width: auto;
  object-fit: contain;
}

.nav-list {
  margin-left: auto;
  display: flex;
  gap: 20px;
  align-items: center;
}
.nav-link {
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile menu (hamburger) */
.menu {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}
.menu .line {
  width: 24px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  margin: 5px 0;
}

@media (max-width: 900px) {
  .menu {
    display: block;
  }
  .nav-list {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 12px;
  }
  .navbar.change .nav-list {
    display: flex;
  }
  .nav-link {
    padding: 10px 8px;
    width: 100%;
  }
  :root {
    --nav-height: 56px;
    --nav-pad-y: 8px;
  }
}

/* ------------------ Containers, Cards, Typography ------------------ */
.cp-wrap,
.contact-card,
.contact-header {
  width: min(1100px, 100% - 40px);
  margin: 0 auto;
}

.cp-card,
.contact-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 24px;
}

.cp-h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.2vw, 32px);
}
.cp-lead {
  margin: 0 0 18px;
  color: var(--muted);
}

/* ------------------ Legacy grid form (cp-*) ------------------ */
.cp-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.cp-col-6 {
  grid-column: span 6;
}
.cp-col-12 {
  grid-column: span 12;
}

.cp-label {
  display: block;
  margin: 0 0 6px;
}
.cp-req::after {
  content: " *";
  color: #ff8a8a;
}
.cp-input,
.cp-select,
.cp-textarea {
  width: 100%;
  background: #0e2c4f;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.cp-input:focus,
.cp-select:focus,
.cp-textarea:focus {
  border-color: #78d7ff;
  box-shadow: 0 0 0 3px rgba(120, 215, 255, 0.24);
}
.cp-textarea {
  min-height: 140px;
  resize: vertical;
}

.cp-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
}
.cp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #55caff, #2aa8e8);
  color: #002238;
  font-weight: 600;
  cursor: pointer;
}
.cp-btn:hover {
  filter: brightness(0.97);
}
.cp-hint {
  color: var(--muted);
}

/* Responsive collapse for cp-form */
@media (max-width: 800px) {
  .cp-col-6 {
    grid-column: span 12;
  }
}

/* ------------------ New Contact page layout ------------------ */
.contact-header {
  display: grid;
  grid-template-columns: 1fr 1fr; /* left text / right map */
  gap: 22px;
  margin-bottom: 22px;
}
.contact-brand,
.contact-map {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.contact-company h1 {
  margin: 0 0 6px;
}
.contact-company p {
  margin: 0 0 6px;
  color: var(--text);
}

.contact-map img,
.contact-map iframe {
  width: 100%;
  height: auto !important; /* show the whole map */
  object-fit: contain !important;
  border: 0;
  border-radius: 10px;
}

/* New contact form (quote-form) */
.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.form-field {
  flex: 1;
  min-width: 0;
}
.form-field.full {
  flex-basis: 100%;
}
.form-field.small {
  flex: 0.6;
}

/* generic inputs for the new form */
.contact-card input[type="text"],
.contact-card input[type="email"],
.contact-card input[type="tel"],
.contact-card input[type="date"],
.contact-card select,
.contact-card textarea {
  width: 100%;
  background: #0e2c4f;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.contact-card textarea {
  min-height: 160px;
  resize: vertical;
}
.contact-card input:focus,
.contact-card select:focus,
.contact-card textarea:focus {
  border-color: #78d7ff;
  box-shadow: 0 0 0 3px rgba(120, 215, 255, 0.24);
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.btn {
  background: #1d4166;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(180deg, #55caff, #2aa8e8);
  color: #002238;
  border-color: transparent;
  font-weight: 600;
}
.btn:hover {
  filter: brightness(0.97);
}

/* Stack header and form rows on mobile */
@media (max-width: 900px) {
  .contact-header {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
  }
  .form-field.small {
    flex: 1;
  }
}

/* ------------------ Projects gallery ------------------ */
.gallery {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #0e2c4f;
}
.gallery img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery-controls {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
.gallery-btn {
  background: #14385c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}
.gallery-btn:hover {
  background: #184268;
}
.gallery-indicator {
  color: var(--muted);
  margin-top: 8px;
}
.gallery-caption {
  color: var(--muted);
  margin-top: 8px;
}
.projects-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

/* ------------------ Footer ------------------ */
footer {
  margin: 28px 0 36px;
}
.footer-content {
  width: min(1100px, 100% - 40px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}
.footer-content .copyright {
  margin: 0;
}
.img-fluid {
  display: block;
  height: 32px;
  width: auto;
}

/* ------------------ Utility ------------------ */
.note {
  color: var(--muted);
  font-size: 14px;
}
.small {
  font-size: 0.925rem;
}
.center {
  text-align: center;
}
.hidden {
  display: none !important;
}
