@import url('https://fonts.googleapis.com/css2?family=Inter:wght@700&display=swap');

/* --- Color Palette & Variables --- */
:root {
  --bg-color: #d8dec4;    /* Muted olive background */
  --accent-color: #4f4f4f; /* Neutral accent */
  --text-dark: #090807;    /* Near black */
  --text-muted: #5D5C5A;   /* Gray */
  --white: #EAEAEA;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
}
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-dark);
}

/* Custom scrollbar styling */
html {
  scrollbar-width: thin;
  scrollbar-color: hsl(214, 100%, 48%) transparent;
}

*::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: hsl(214, 100%, 48%);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: hsl(214, 100%, 40%);
}

*::-webkit-scrollbar-corner,
*::-webkit-scrollbar-button {
  background: transparent;
  display: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* --- Header & Navigation --- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6rem;
  flex-wrap: wrap;
  gap: 1rem;
}



.logo img {
  display: block;
  max-width: 360px;
  max-height: 104px;
  width: auto;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

nav a,
nav .nav-link {
  margin: 0 0.75rem;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-dropdown-toggle::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown.active .nav-dropdown-toggle::after {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 180px;
  box-shadow: 0 8px 24px rgba(9, 8, 7, 0.12);
  border: 1px solid rgba(9, 8, 7, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  margin: 0;
  padding: 0.65rem 1rem;
  display: block;
  white-space: nowrap;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown-menu a:hover {
  background-color: rgba(9, 8, 7, 0.04);
  color: var(--text-dark);
}

.btn-dark {
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 0.95rem 1.8rem;
  border-radius: 12px;
  border: 1px solid rgba(9, 8, 7, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 700;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }

  header {
    justify-content: space-between;
    align-items: center;
    padding-bottom: 3rem;
  }

  .logo img {
    max-width: 300px;
    max-height: 88px;
  }

  nav {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }

  nav a,
  nav .nav-link {
    margin: 0.35rem;
    font-size: 0.9rem;
  }

  .nav-dropdown {
    display: contents;
  }

  .nav-dropdown-toggle {
    padding: 0.35rem;
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    box-shadow: none;
    border: none;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    max-height: none;
    transform: translate(-50%, 0.4rem);
    max-height: none;
    padding: 0;
    margin: 0;
    display: none !important;
    width: max-content;
    min-width: 0;
    width: auto;
    min-width: 0;
    gap: 0.25rem;
    transition: opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease;
    z-index: 1000;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    padding: 0.45rem 0 0.15rem;
    transform: translate(-50%, 0.2rem);
  }

  .nav-dropdown-menu a {
    padding: 0.35rem 1rem;
    font-size: 0.88rem;
    color: var(--text-dark);
    text-align: center;
    width: 100%;
    background-color: rgba(9, 8, 7, 0.03);
    border-radius: 6px;
    margin: 0.1rem 0;
  }

  .nav-dropdown-menu a:hover {
    background-color: rgba(9, 8, 7, 0.08);
  }
}

.btn-dark {
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.2s, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-dark:hover {
  opacity: 0.95;
  background-color: #f5f5f5;
  border-color: rgba(9, 8, 7, 0.18);
}

.btn-dark:active {
  background-color: #ececec;
}

/* --- Hero Section --- */
.hero {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-about {
  max-width: 1060px;
}

.hero-content-about {
  width: 100%;
}

.aboutus-card {
  margin-top: 1.25rem;
  min-height: clamp(340px, 40vw, 520px);
  border-radius: 28px;
}

.aboutus-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 7, 0.38);
  z-index: 1;
  pointer-events: none;
}

.aboutus-card .hero-image-placeholder__image {
  position: relative;
  z-index: 0;
}

.aboutus-card-copy {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  margin: 0;
  padding: 1.1rem 1.2rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.75;
  color: #ffffff !important;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  z-index: 2;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  letter-spacing: -1px;
}


.btn-primary {
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 0.95rem 1.8rem;
  border-radius: 12px;
  border: 1px solid rgba(9, 8, 7, 0.12);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary:hover {
  opacity: 0.95;
  background-color: #f5f5f5;
  border-color: rgba(9, 8, 7, 0.18);
}

.btn-primary:active {
  background-color: #ececec;
}

.service-summary {
  margin-top: 3rem;
}

.hero-image-placeholder {
  position: relative;
  width: min(100%, 920px);
  margin: 1rem auto 0;
  min-height: clamp(120px, 22vw, 240px);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(79, 79, 79, 0.08));
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(9, 8, 7, 0.12);
}

.hero-image-placeholder__image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.hero-image-placeholder__eyebrow {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  margin: 0;
  color: rgba(93, 92, 90, 0.92);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.35;
  overflow-wrap: break-word;
  z-index: 2;
  pointer-events: none;
}

.hero-image-placeholder__eyebrow--light {
  color: rgba(255, 255, 255, 0.94);
}

.hero-image-placeholder__eyebrow--large {
  font-size: 1.1rem;
}

.hero-image-placeholder__button {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
  cursor: pointer;
}

.blog-previews {
  margin-top: 3rem;
}

.blog-intro {
  margin: 1.5rem 0 2rem;
  max-width: 820px;
}

.blog-intro p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(9, 8, 7, 0.85);
}

.hero-blog {
  padding-bottom: 1rem;
}

.hero-blog .eyebrow {
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  color: rgba(9, 8, 7, 0.65);
}

.hero-blog .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 1.75rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  background-color: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
   color: inherit;
   text-decoration: none;
 }
 .blog-card, .blog-card * {
   color: inherit;
   text-decoration: none;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  background-color: #0f172a;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.blog-card-body {
  padding: 1.6rem 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-card-category {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.blog-card-body p {
  margin: 0;
  color: rgba(241, 245, 249, 0.9);
  line-height: 1.8;
  flex-grow: 1;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .hero {
    text-align: center;
  }

  .hero-about {
    text-align: left;
  }

  .aboutus-card {
    min-height: clamp(440px, 110vw, 620px);
    border-radius: 18px;
    overflow: hidden;
  }

  .aboutus-card-copy {
    left: 0.75rem;
    right: 0.75rem;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    padding: 0.75rem;
    font-size: 0.78rem;
    line-height: 1.4;
    border-radius: 14px;
  }

  .hero-image-placeholder {
    min-height: 96px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(9, 8, 7, 0.1);
  }

  .aboutus-card.hero-image-placeholder {
    min-height: clamp(440px, 110vw, 620px);
  }

  .aboutus-card .hero-image-placeholder__image {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    object-position: center center;
  }

  .hero-image-placeholder__eyebrow {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    line-height: 1.3;
    z-index: 2;
    pointer-events: none;
  }

  .hero-image-placeholder__eyebrow--large {
    font-size: 0.8rem;
  }

  .hero-image-placeholder__button {
    right: 0.75rem;
    bottom: 0.75rem;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    z-index: 5;
    cursor: pointer;
  }

  .hero-image-placeholder__image {
    image-rendering: -webkit-optimize-contrast;
    background: #ffffff;
  }

  .hero .hero-actions {
    justify-content: center;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.why-work {
  margin-top: 3rem;
  padding: 3rem 2rem;
  background-color: #000000;
  color: #ffffff;
  border-radius: 28px;
}

.why-content {
  max-width: 900px;
  margin: 0 auto;
}

.why-content .section-label {
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: #ffffff;
  opacity: 0.75;
  font-size: 0.85rem;
}

.why-content h2 {
  margin: 0 0 1.25rem 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
}

.why-content p {
  margin: 0 0 1.75rem 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
  font-size: 1.05rem;
}

.why-content ul {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}

.why-content li {
  line-height: 1.8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 1rem;
}

.service-card {
  display: block;
  position: relative;
  padding: 1.6rem 1.4rem;
  min-height: 220px;
  background-color: #2b3b5b;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  text-decoration: none;
  color: #ffffff;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  overflow-wrap: break-word;
  word-break: break-word;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
  border-color: hsl(214, 100%, 48%);
  box-shadow: 0 10px 30px rgba(9, 8, 7, 0.18);
}

.service-card h5,
.service-card p {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.service-card h5 {
  margin: 0 0 0.85rem 0;
  font-size: 1.05rem;
}

.service-card:nth-child(1) {
    background-image: url("homecam.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }

  .service-card:nth-child(2) {
    background-image: url("homewifi.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }

  .service-card:nth-child(3) {
    background-image: url("homecable.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }

  .service-card:nth-child(4) {
    background-image: url("homeservicecall.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
  }
.service-card:nth-child(5) {
  background-color: #334156;
}

.service-card:nth-child(6) {
  background-color: #2f4b5f;
}

.service-card:nth-child(7) {
  background-color: #2d3d56;
}

.service-card:nth-child(8) {
  background-color: #283a50;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: rgba(9, 8, 7, 0.55);
  padding: 1.5rem;
  z-index: 4000;
}

.modal-overlay.active {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open header,
body.modal-open nav,
body.modal-open .logo,
body.modal-open .logo img {
  z-index: 1 !important;
}

.modal-card {
  width: min(540px, 100%);
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(9, 8, 7, 0.16);
  padding: 2rem;
  position: relative;
}

.modal-card h2 {
  margin-top: 0;
}

.modal-card p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: none;
  background: transparent;
  color: var(--text-dark);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.modal-row label {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  display: block;
  color: var(--text-dark);
}

.modal-row input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(9, 8, 7, 0.16);
  background: #f6f7f5;
  color: var(--text-dark);
  font-family: inherit;
}

.modal-row input:focus {
  outline: none;
  border-color: rgba(9, 8, 7, 0.2);
  box-shadow: 0 0 0 4px rgba(9, 8, 7, 0.08);
}

.modal-row textarea {
  width: 100%;
  min-height: 124px;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(9, 8, 7, 0.16);
  background: #f6f7f5;
  color: var(--text-dark);
  font-family: inherit;
  resize: vertical;
}

.modal-row textarea:focus {
  outline: none;
  border-color: rgba(9, 8, 7, 0.25);
  box-shadow: 0 0 0 4px rgba(9, 8, 7, 0.08);
}

.modal-card button.btn-primary {
  outline: none;
  border-color: rgba(9, 8, 7, 0.25);
  box-shadow: 0 0 0 4px rgba(9, 8, 7, 0.08);
}

.prompt-options button.btn-primary {
  border-color: #000;
  box-shadow: none;
  background-color: #ffffff;
  color: var(--text-dark);
}

.modal-card button.btn-primary {
  width: 100%;
}

.modal-card button.btn-primary:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.contact-form-status {
  min-height: 1.25rem;
  margin: 0.25rem 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.35;
}

.contact-form-status.is-error {
  color: #9a1c1c;
}

.contact-form-status.is-success {
  color: #1d5f36;
}

.contact-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.prompt-options {
  display: grid;
  gap: 1rem;
}

.prompt-options button {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  border-color: #000;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.14);
}

.site-footer {
  margin-top: 5rem;
  padding: 2.75rem 2.75rem 1.5rem;
  border-top: 1px solid rgba(9, 8, 7, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(3, minmax(160px, 1fr));
  gap: 2rem 2.5rem;
  align-items: start;
}

.footer-brand,
.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-brand {
  gap: 0.9rem;
}

.footer-brand h3,
.footer-column h4 {
  margin: 0;
  color: var(--text-dark);
}

.footer-brand h3 {
  font-size: 1.35rem;
  line-height: 1.2;
}

.footer-brand p {
  margin: 0;
  max-width: 34ch;
  color: var(--text-muted);
}

.footer-column {
  gap: 0.85rem;
}

.footer-column h4 {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer-grid a {
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.footer-grid a:hover {
  opacity: 0.72;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(9, 8, 7, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

@media (max-width: 1024px) {
  .container {
    padding: 1.5rem;
  }

  .hero {
    width: 100%;
    gap: 1.5rem;
  }

  .hero-content h1 {
    font-size: clamp(2.75rem, 5vw, 3.3rem);
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .site-footer {
    padding: 2.25rem 2rem 1.4rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }

  header {
    position: relative;
    z-index: 2000;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem;
  }

  .logo {
    display: flex;
    justify-content: center;
  }

  .logo img {
    width: min(240px, 62vw);
    max-width: 100%;
    height: auto;
  }

  nav {
    position: relative;
    z-index: 2000;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    overflow: visible;
    gap: 0.7rem;
    padding-bottom: 0.2rem;
  }

  nav a,
  nav .nav-link,
  nav .nav-dropdown,
  nav .btn-dark {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  nav a,
  nav .nav-link {
    margin: 0;
    font-size: 0.72rem;
  }

  nav .nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    align-self: center;
  }

  nav .nav-dropdown-toggle {
    margin: 0;
    font-size: 0.72rem;
    line-height: 18px;
    padding: 0 0.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    min-height: 18px;
    box-sizing: border-box;
  }

  nav .btn-dark {
    margin: 0;
    padding: 0.38rem 0.55rem;
    font-size: 0.64rem;
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    display: none;
    box-shadow: 0 8px 24px rgba(9, 8, 7, 0.12);
    border: 1px solid rgba(9, 8, 7, 0.1);
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 0.4rem);
    max-height: none;
    overflow: visible;
    padding: 0.5rem 0;
    margin: 0;
    width: max-content;
    min-width: 0;
    gap: 0.25rem;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease;
    z-index: 1000;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
    padding: 0.5rem 0;
    transform: translate(-50%, 0.2rem);
  }

  .nav-dropdown-menu a {
    margin: 0;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    color: var(--text-dark);
    text-align: center;
    width: 100%;
    background: transparent;
    border-radius: 0;
  }

  .nav-dropdown-menu a:hover {
    background-color: rgba(9, 8, 7, 0.04);
  }

  .hero {
    position: relative;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100% !important;
  }

  .hero-content {
    text-align: center !important;
    align-items: center !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 720px !important;
  }

  .hero-content h1 {
    font-size: clamp(2.4rem, 7vw, 2.9rem) !important;
  }

  .hero-content p {
    font-size: 0.98rem !important;
    margin: 0 auto 1rem !important;
  }

  .hero-content .btn-primary,
  .hero-content .btn-dark {
    margin: 0.75rem auto 0 !important;
    align-self: center !important;
    width: min(320px, 100%) !important;
    max-width: 100% !important;
  }

  #getStartedBtn.btn-primary {
    width: auto !important;
    max-width: none !important;
    padding: 0.75rem 1.25rem;
  }

  .service-grid,
  .footer-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    justify-items: stretch !important;
  }

  .service-grid > *,
  .footer-grid > div {
    justify-self: stretch !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .footer-brand {
    align-items: center !important;
  }

  .footer-brand p {
    margin: 0 auto !important;
    text-align: center !important;
  }

  .service-card {
    width: 100% !important;
    min-width: 0 !important;
  }

  .modal-overlay {
    padding: 0.75rem !important;
  }

  .modal-card {
    width: min(100%, 520px) !important;
    max-height: calc(100vh - 2rem) !important;
    overflow-y: auto !important;
    padding: 1.5rem !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    text-align: center !important;
    width: 100% !important;
  }

  .footer-bottom > * {
    width: 100% !important;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 1rem;
  }

  .site-footer {
    padding: 1.5rem 1.2rem 1.1rem;
  }

  nav a,
  nav .nav-link {
    margin: 0;
    font-size: 0.7rem;
  }

  nav .nav-dropdown-toggle {
    font-size: 0.7rem;
    line-height: 18px;
    padding: 0 0.1rem;
    height: 18px;
  }

  nav {
    position: relative;
    z-index: 2000;
    gap: 0.7rem;
  }

  .nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    display: none;
    box-shadow: 0 8px 24px rgba(9, 8, 7, 0.12);
    border: 1px solid rgba(9, 8, 7, 0.1);
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 0.4rem);
    max-height: none;
    overflow: visible;
    padding: 0.5rem 0;
    margin: 0;
    width: max-content;
    min-width: 0;
    gap: 0.25rem;
    flex-direction: column;
    align-items: center;
    transition: opacity 0.2s ease, transform 0.2s ease, padding 0.2s ease;
    z-index: 1000;
  }

  .nav-dropdown.active .nav-dropdown-menu {
    display: flex;
    opacity: 1;
    visibility: visible;
    padding: 0.5rem 0;
    transform: translate(-50%, 0.2rem);
  }

  .nav-dropdown-menu a {
    margin: 0;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    color: var(--text-dark);
    text-align: center;
    width: 100%;
    background: transparent;
    border-radius: 0;
  }

  .nav-dropdown-menu a:hover {
    background-color: rgba(9, 8, 7, 0.04);
  }

  nav .btn-dark {
    width: auto;
    padding: 0.34rem 0.5rem;
    font-size: 0.6rem;
    border-radius: 999px;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 10vw, 2.4rem);
  }

  .hero-content p {
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
  }

  .service-card {
    padding: 1rem;
  }

  .modal-overlay {
    padding: 1rem;
  }

  .modal-card {
    padding: 1.25rem;
    border-radius: 18px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .modal-row input,
  .modal-row textarea {
    padding: 0.85rem 0.95rem;
  }

  .btn-primary,
  .btn-dark {
    width: 100%;
  }

  nav .btn-dark {
    width: auto;
  }

  .hero-image-placeholder__button {
    width: auto !important;
    max-width: calc(100% - 1.5rem) !important;
    padding: 0.7rem 0.95rem !important;
    font-size: 0.88rem !important;
    white-space: nowrap !important;
    z-index: 5 !important;
    cursor: pointer !important;
  }

  .hero-image-placeholder__image {
    image-rendering: -webkit-optimize-contrast;
    background: #ffffff;
  }

  #getStartedBtn.btn-primary {
    width: auto !important;
    max-width: none !important;
    padding: 0.7rem 1.1rem;
  }
}

.hero-content p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

/* --- Contractor Portal --- */
.portal-main {
  margin-top: 1.25rem;
}

.portal-hero {
  max-width: 720px;
  margin-bottom: 2rem;
}

.portal-eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.portal-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  color: var(--text-dark);
}

.portal-hero p {
  margin: 0.9rem 0 0;
  color: var(--text-muted);
  max-width: 64ch;
}

.portal-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(290px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.portal-form-card,
.portal-preview {
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(9, 8, 7, 0.14);
  border-radius: 22px;
  padding: 1.35rem;
  box-shadow: 0 16px 42px rgba(9, 8, 7, 0.09);
}

.portal-preview {
  display: flex;
  flex-direction: column;
}

.portal-form-card h2,
.portal-preview h2 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.portal-form-card .modal-row {
  margin-bottom: 0;
}

.portal-form-card .modal-row textarea,
.portal-form-card .modal-row input,
.portal-form-card .modal-row select {
  width: 100%;
  border: 1px solid rgba(9, 8, 7, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.82rem 0.95rem;
  font: inherit;
  color: var(--text-dark);
}

.portal-form-card .modal-row textarea {
  min-height: 112px;
  resize: vertical;
}

.portal-form-card .modal-row select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dark) 50%), linear-gradient(135deg, var(--text-dark) 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.portal-form-card .modal-row input[type="file"] {
  padding: 0.45rem 0.55rem;
  font-size: 0.8rem;
}

.portal-form-card .modal-row input[type="file"]::file-selector-button,
.portal-form-card .modal-row input[type="file"]::-webkit-file-upload-button {
  background-color: #ffffff;
  color: var(--text-dark);
  border: 1px solid rgba(9, 8, 7, 0.12);
  border-radius: 8px;
  padding: 0.58rem 1rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  margin-right: 0.68rem;
  transition: opacity 0.2s, background-color 0.2s ease, border-color 0.2s ease;
}

.portal-form-card .modal-row input[type="file"]:hover::file-selector-button,
.portal-form-card .modal-row input[type="file"]:hover::-webkit-file-upload-button {
  opacity: 0.95;
  background-color: #f5f5f5;
  border-color: rgba(9, 8, 7, 0.18);
}

.portal-form-card .modal-row input[type="file"]:active::file-selector-button,
.portal-form-card .modal-row input[type="file"]:active::-webkit-file-upload-button {
  background-color: #ececec;
}

.portal-field-hint {
  display: block;
  margin-top: 0.35rem;
  color: rgba(9, 8, 7, 0.66);
  font-size: 0.74rem;
  line-height: 1.35;
}

.contractor-profile-card {
  position: relative;
  background: linear-gradient(160deg, #141619, #191d21 64%, #20252a);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.88rem;
  color: #f3f5f7;
  min-height: 244px;
  overflow: hidden;
  width: 100%;
  max-width: none;
}

.portal-preview.is-awaiting-profile-type {
  padding: 1.05rem;
}

.contractor-profile-card.is-awaiting-profile-type {
  width: 100%;
  max-width: none;
  min-height: 214px;
  padding: 0.78rem;
}

.profile-image-anchor {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: 6rem;
  height: 6rem;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  display: grid;
  place-items: center;
  overflow: visible;
  z-index: 0;
}

.profile-image-caption {
  position: absolute;
  top: 0.22rem;
  right: 0.22rem;
  padding: 0.08rem 0.26rem;
  border-radius: 999px;
  background: rgba(18, 22, 26, 0.72);
  color: rgba(243, 246, 250, 0.92);
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

.profile-image-preview,
.profile-image-placeholder-asset {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-image-fallback {
  padding: 0 0.5rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(242, 246, 251, 0.78);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.3;
}

.profile-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 0.45rem;
}

.profile-cluster {
  display: flex;
  align-items: center;
  gap: 0;
}

.profile-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.profile-card-flag {
  display: inline-block;
  --CountryFlagIcon-height: 2.6rem !important;
  width: calc(var(--CountryFlagIcon-height) * 3 / 2) !important;
  height: var(--CountryFlagIcon-height) !important;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(234, 234, 234, 0.25);
  filter: saturate(0.95);
  background-position: center;
  background-size: cover;
  flex: 0 0 auto;
}

.profile-status {
  position: relative;
  z-index: 1;
  margin: 0.22rem 0 0;
  color: rgba(232, 237, 244, 0.77);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
}

.profile-name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.28;
  font-weight: 700;
}

.profile-company,
.profile-specialty,
.profile-bio,
.profile-region {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(232, 237, 244, 0.84);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
}

.profile-company {
  color: rgba(232, 237, 244, 0.66);
  font-size: 0.73rem;
  font-weight: 600;
}

.profile-region {
  margin-top: 0.18rem;
  font-size: 0.82rem;
}

.profile-specialty {
  margin-top: 0.08rem;
  color: rgba(232, 237, 244, 0.64);
  font-size: 0.74rem;
}

.profile-bio {
  margin-top: 0;
  color: rgba(232, 237, 244, 0.72);
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-metrics {
  position: relative;
  z-index: 1;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: none;
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: rgba(232, 237, 244, 0.86);
  font-size: 0.73rem;
  flex-wrap: wrap;
}

.profile-dot {
  opacity: 0.8;
}

@media (max-width: 980px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .portal-form-grid {
    grid-template-columns: 1fr;
  }

  .portal-form-card,
  .portal-preview {
    padding: 1rem;
    border-radius: 18px;
  }

  .contractor-profile-card {
    min-height: 245px;
    border-radius: 16px;
  }
}