/* ─── Base ─────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}

/* ─── Scroll offset for fixed navbar ───────────────── */
#about,
#services,
#work,
#testimonials,
#social {
  scroll-margin-top: 80px;
}
#contact {
  scroll-margin-top: 100px;
}

/* ─── Hero section height ───────────────────────────── */
.hero-section {
  padding-top: 5rem; /* 80px = h-20 navbar mobile */
  min-height: auto;
}
@media (min-width: 768px) {
  .hero-section {
    padding-top: 6rem; /* 96px = h-24 navbar desktop */
    min-height: calc(100vh - 120px);
  }
}

/* ─── Hero background ──────────────────────────────── */
#hero {
  background-image: url("../img/hero.jpg");
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to right, rgba(1, 10, 18, 0.92), rgba(1, 10, 18, 0.8), rgba(1, 10, 18, 0.5));
}
#hero > .relative {
  z-index: 2;
}

/* ─── Navbar ────────────────────────────────────────── */
.nav-scrolled {
  backdrop-filter: blur(10px);
  background-color: rgba(1, 10, 18, 0.97) !important;
}

.nav-link {
  position: relative;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #bcd0e8;
  transition:
    color 0.2s,
    background-color 0.2s;
}
.nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.15);
}
.nav-link.nav-active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.2);
}

/* ─── Buttons ───────────────────────────────────────── */
.btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a3451 0%, #0e223a 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(14, 34, 58, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
}
.btn-orange:hover {
  background: linear-gradient(135deg, #254a6f 0%, #1a3451 100%);
  box-shadow: 0 4px 12px rgba(14, 34, 58, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
  color: #fff;
}
.btn-orange:active {
  background: linear-gradient(135deg, #0e223a 0%, #081523 100%);
  box-shadow: 0 1px 4px rgba(14, 34, 58, 0.2);
  color: #fff;
}

/* ─── Form inputs ───────────────────────────────────── */
.form-input {
  background-color: #f9fafb;
  border-radius: 8px;
}
.form-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(14, 34, 58, 0.1);
  border-color: #0e223a;
  background-color: #fff;
}

/* ─── Stats Bar ─────────────────────────────────────── */
.stats-bar {
  background: linear-gradient(135deg, #081523 0%, #0e223a 60%, #0a1a2b 100%);
  border-top: 3px solid #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0;
}
.stats-bar dl {
  display: grid;
}
.stat-item {
  padding: 28px 24px;
  text-align: center;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.stat-item--last {
  border-right: none;
}
@media (max-width: 767px) {
  .stat-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .stat-item--last {
    border-bottom: none;
  }
  /* On 2-col mobile: remove right border on every 2nd item */
  .stat-item:nth-child(2n) {
    border-right: none;
  }
}
.stat-number {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 2.25rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-star {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}
.stat-label {
  margin-top: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* ─── Service Cards (compact) ───────────────────────── */
.svc-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: #fff;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  border-left: 4px solid #0e223a;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.2s;
}
.svc-card:hover {
  background-color: #f9fafb;
  border-color: #0e223a;
  box-shadow: 0 4px 12px rgba(14, 34, 58, 0.08);
}
.svc-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0e223a;
  letter-spacing: -0.01em;
}
.svc-cta {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0e223a;
  white-space: nowrap;
  transition: color 0.2s;
}
.svc-cta:hover {
  color: #1a3451;
}

/* ─── Before / After gallery ────────────────────────── */
.before-after-container {
  position: relative;
  overflow: hidden;
}
.before-after-container img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}
.before-label,
.after-label {
  position: absolute;
  top: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: 4px;
  text-transform: uppercase;
}
.before-label {
  left: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
}
.after-label {
  right: 12px;
  background: #fff;
  color: #0e223a;
}

/* ─── Lightbox ──────────────────────────────────────── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#lightbox.open {
  display: flex;
}
#lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}
#lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}
#lightbox-close:hover {
  opacity: 1;
}
#lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 14px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ─── Review cards uniform height ──────────────────── */
.review-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.review-card:hover {
  box-shadow: 0 8px 24px rgba(14, 34, 58, 0.12);
}
.review-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.review-text {
  flex: 1;
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  /* clamp to ~4 lines */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: all 0.2s;
}
.review-text.expanded {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}
.review-toggle {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0e223a;
  cursor: pointer;
  margin-bottom: 1rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.review-toggle:hover {
  color: #1a3451;
}

/* ─── Testimonials scrollbar hide ──────────────────── */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ─── Star ratings ──────────────────────────────────── */
.star-filled {
  color: #0e223a;
}
.star-empty {
  color: #547091;
}

/* ─── Veteran badge flag ────────────────────────────── */
.veteran-star {
  width: 48px;
  height: 33px;
  display: block;
  margin: 0 auto;
  flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* ─── Toast Notifications ───────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
  transform: translateX(calc(100% + 40px));
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.toast.success .toast-icon {
  background: #10b981;
  color: white;
}

.toast.error .toast-icon {
  background: #ef4444;
  color: white;
}

.toast.info .toast-icon {
  background: #3b82f6;
  color: white;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #111827;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  font-size: 20px;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #4b5563;
}

@media (max-width: 640px) {
  #toast-container {
    left: 20px;
    right: 20px;
    max-width: none;
  }
}

/* ─── Loading Spinner Overlay ───────────────────────── */
.form-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s;
}

.form-loading-overlay.show {
  display: flex;
  opacity: 1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(14, 34, 58, 0.2);
  border-top-color: #0e223a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Contact form container needs position relative */
#contact {
  position: relative;
}
