/* ============================================================
   RHYNOPAC HEADER OVERRIDE - Surgical CSS injection
   Applied: 2026-08-02
   Purpose: Redesign header nav + fix mobile hero dead space
   Rollback: Remove <link> from index.html + delete this file
   ============================================================ */

/* ---- 1. HEADER: Remove thick border, add slim red accent ---- */
header[data-loc*="Header.tsx"] {
  border-bottom: none !important;
  box-shadow: none !important;
  position: relative;
}

header[data-loc*="Header.tsx"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #b91c1c; /* red-700 */
  z-index: 1;
}

/* ---- 2. HEADER CONTAINER: tighter vertical padding ---- */
header[data-loc*="Header.tsx"] > div {
  padding-top: 0.5rem !important;   /* was py-4 = 1rem */
  padding-bottom: 0.5rem !important;
  align-items: center !important;
}

/* ---- 3. LOGO: bumped from 56-68px to 72-88px (Jason: "a lil small") ---- */
header[data-loc*="Header.tsx"] > div > a:first-child img {
  height: 72px !important;
}

@media (min-width: 640px) {
  header[data-loc*="Header.tsx"] > div > a:first-child img {
    height: 78px !important;
  }
}

@media (min-width: 1024px) {
  header[data-loc*="Header.tsx"] > div > a:first-child img {
    height: 82px !important;
  }
}

@media (min-width: 1280px) {
  header[data-loc*="Header.tsx"] > div > a:first-child img {
    height: 88px !important;
  }
}

/* ---- 4. NAV CLUSTER: reorder phone to end, tighten gap ---- */
header[data-loc*="Header.tsx"] nav {
  gap: 1rem !important;  /* tighter base gap */
}

@media (min-width: 1280px) {
  header[data-loc*="Header.tsx"] nav {
    gap: 1.75rem !important; /* more room on wide screens */
  }
}

/* Phone link is the first child of nav -- push it to the end visually */
header[data-loc*="Header.tsx"] nav > a[href^="tel:"] {
  order: 99 !important;
  margin-left: auto !important;
  padding-left: 1rem;
  border-left: 1px solid #374151; /* gray-700 divider */
  white-space: nowrap;
  font-family: 'Roboto', sans-serif !important;
  font-weight: 500 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.025em !important;
  color: #d1d5db !important; /* gray-300 */
}

header[data-loc*="Header.tsx"] nav > a[href^="tel:"]:hover {
  color: #ffffff !important;
}

/* Phone icon color */
header[data-loc*="Header.tsx"] nav > a[href^="tel:"] svg {
  color: #dc2626 !important; /* red-600 */
}

/* ---- 5. NAV LINKS: Oswald uppercase with underline animation ---- */
header[data-loc*="Header.tsx"] nav > a:not([href^="tel:"]) > span,
header[data-loc*="Header.tsx"] nav .group > button {
  font-family: 'Oswald', sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: #d1d5db !important; /* gray-300 */
  position: relative;
  padding-bottom: 2px;
  transition: color 0.2s ease !important;
  white-space: nowrap !important;
}

@media (min-width: 1280px) {
  header[data-loc*="Header.tsx"] nav > a:not([href^="tel:"]) > span,
  header[data-loc*="Header.tsx"] nav .group > button {
    font-size: 13px !important;
    letter-spacing: 0.08em !important;
  }
}

@media (min-width: 1440px) {
  header[data-loc*="Header.tsx"] nav > a:not([href^="tel:"]) > span,
  header[data-loc*="Header.tsx"] nav .group > button {
    font-size: 14px !important;
  }
}

/* Hover: white text */
header[data-loc*="Header.tsx"] nav > a:not([href^="tel:"]):hover > span,
header[data-loc*="Header.tsx"] nav .group:hover > button {
  color: #ffffff !important;
}

/* Underline animation via ::after */
header[data-loc*="Header.tsx"] nav > a:not([href^="tel:"]) > span::after,
header[data-loc*="Header.tsx"] nav .group > button::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background-color: #b91c1c; /* red-700 */
  transition: width 0.25s ease;
}

header[data-loc*="Header.tsx"] nav > a:not([href^="tel:"]):hover > span::after,
header[data-loc*="Header.tsx"] nav .group:hover > button::after {
  width: 100%;
}

/* ---- 6. CTA BUTTON: polish ---- */
header[data-loc*="Header.tsx"] > div > a[href="/quote"] > button {
  border-radius: 0.25rem !important;
  padding: 0.625rem 1.25rem !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.05em !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
}

header[data-loc*="Header.tsx"] > div > a[href="/quote"] > button:hover {
  background-color: #dc2626 !important; /* red-600 */
  box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3) !important;
}

/* ---- 7. DROPDOWN: polished panel ---- */
header[data-loc*="Header.tsx"] nav .group > div {
  left: 50% !important;
  transform: translateX(-50%) translateY(4px);
  border-radius: 0.375rem !important;
  border: 1px solid #1f2937 !important; /* gray-800 */
  box-shadow: 0 20px 60px rgba(0,0,0,0.5) !important;
  min-width: 200px !important;
  padding: 0.25rem 0 !important;
  margin-top: 0.5rem !important;
}

header[data-loc*="Header.tsx"] nav .group:hover > div {
  transform: translateX(-50%) translateY(0);
}

/* Dropdown items */
header[data-loc*="Header.tsx"] nav .group > div a > span {
  font-family: 'Roboto', sans-serif !important;
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  padding: 0.5rem 1.25rem !important;
}

/* ---- 8. MOBILE HERO: reduce dead space ---- */
/* Target the hero section by its exact class signature */
section[data-loc*="Home.tsx:188"],
section.min-h-screen.flex.items-center.justify-start.overflow-hidden.pt-20 {
  min-height: 70vh !important;
  align-items: flex-start !important;
  padding-top: 1.5rem !important; /* 24px instead of 80px */
}

/* Desktop hero stays unchanged */
@media (min-width: 768px) {
  section[data-loc*="Home.tsx:188"],
  section.min-h-screen.flex.items-center.justify-start.overflow-hidden.pt-20 {
    min-height: unset !important;
    height: 100vh !important;
    align-items: center !important;
    padding-top: 0 !important;
  }
}

/* ---- 9. MOBILE HEADER: slight refinements ---- */
@media (max-width: 1023px) {
  /* Tighter header on mobile */
  header[data-loc*="Header.tsx"] > div {
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
  }
}

/* ---- 10. PREVENT HORIZONTAL OVERFLOW ---- */
html, body {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html {
    overflow-x: clip;
  }
}
