/* =========================================================
   OSSA Contracting Group — Residential service pages
   Only the components that styles.css and commercial.css
   do not already provide.
   ========================================================= */

/* ---------- Services dropdown in the nav ---------- */
.navdrop { position: relative; display: inline-flex; }
.navdrop__btn {
  display: inline-flex; align-items: center; gap: 5px;
  font: inherit; font-size: inherit; font-weight: inherit;
  color: inherit; background: none; border: none; padding: 0;
  cursor: pointer; letter-spacing: inherit;
}
.navdrop__btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.navdrop__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.navdrop__menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(-6px);
  display: grid; gap: 2px; min-width: 232px; padding: 10px;
  background: #fff; border: 1px solid #e2eaea; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 60;
}
.navdrop__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.navdrop__menu a {
  display: block; padding: 9px 14px; border-radius: 9px;
  font-size: 14.5px; font-weight: 600; color: var(--brand-deep); white-space: nowrap;
  transition: background .18s, color .18s;
}
.navdrop__menu a:hover { background: var(--brand-light); color: var(--brand-primary); }
.navdrop__feat { color: var(--brand-primary) !important; font-weight: 800 !important; border-bottom: 1px solid var(--line, #e2eaea); margin-bottom: 4px; padding-bottom: 11px !important; }
.navdrop__menu a[aria-current="page"] { color: var(--brand-primary); background: var(--primary-12); }
.navdrop:hover .navdrop__menu,
.navdrop:focus-within .navdrop__menu,
.navdrop__menu:hover {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}

/* ---------- Homepage bento cells are links now ---------- */
a.bento__cell { display: block; text-decoration: none; color: inherit; }
.services__more li a { color: inherit; text-decoration: none; transition: color .18s; }
.services__more li a:hover { color: var(--brand-primary); }

/* ---------- Service area chips ---------- */
.areas__list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 900px; margin: 0 auto; }
.areas__list span {
  font-size: 14px; font-weight: 700; color: var(--brand-deep);
  background: var(--brand-light); border: 1px solid #e2eaea;
  padding: 10px 20px; border-radius: 999px;
}

/* ---------- Work section CTA ---------- */
.work__cta { text-align: center; margin-top: clamp(30px, 4vw, 48px); }

/* ---------- Portfolio page ---------- */
.pf-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 auto clamp(28px, 4vw, 44px); max-width: 900px; }
.pf-filter { font: inherit; font-size: 13.5px; font-weight: 700; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line, #DCE7E6); background: #fff; color: var(--brand-slate); cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.pf-filter:hover { border-color: var(--brand-primary); color: var(--brand-deep); }
.pf-filter.on { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.pf-grid { columns: 3; column-gap: 16px; }
.pf-item { break-inside: avoid; margin: 0 0 16px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; display: block; width: 100%; padding: 0; border: none; background: none; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.pf-item img { width: 100%; height: auto; display: block; transition: transform .6s var(--ease); }
.pf-item__count { position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 5px; background: rgba(11,36,44,0.78); color: #fff; font-size: 12.5px; font-weight: 800; padding: 5px 11px 5px 9px; border-radius: 999px; backdrop-filter: blur(4px); }
.pf-item__count svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pf-item:hover img { transform: scale(1.05); }
.pf-item__tag { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 14px; background: linear-gradient(transparent, rgba(11,36,44,0.82)); color: #fff; font-size: 13px; font-weight: 700; opacity: 0; transition: opacity .25s var(--ease); }
.pf-item:hover .pf-item__tag { opacity: 1; }
.pf-item.is-hidden { display: none; }
.pf-item::after { content: ""; position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F2E38' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center/16px no-repeat; opacity: 0; transform: scale(.8); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.pf-item:hover::after { opacity: 1; transform: scale(1); }
.pf-empty { text-align: center; color: var(--brand-slate); padding: 40px 0; display: none; }

/* lightbox */
.pf-lb { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; background: rgba(8,24,29,0.94); backdrop-filter: blur(6px); padding: 24px; }
.pf-lb.on { display: flex; }
.pf-lb__img { max-width: min(1200px, 94vw); max-height: 86vh; width: auto; height: auto; border-radius: var(--radius); box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.pf-lb__cap { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.02em; }
.pf-lb__btn { position: absolute; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3); color: #fff; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; transition: background .2s; backdrop-filter: blur(8px); }
.pf-lb__btn:hover { background: rgba(255,255,255,0.24); }
.pf-lb__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pf-lb__close { top: 22px; right: 22px; }
.pf-lb__prev { left: 22px; top: 50%; transform: translateY(-50%); }
.pf-lb__next { right: 22px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .pf-lb__prev { left: 10px; } .pf-lb__next { right: 10px; } .pf-lb__btn { width: 44px; height: 44px; } }

@media (max-width: 1000px) { .pf-grid { columns: 2; } }
@media (max-width: 560px) { .pf-grid { columns: 1; } }

/* ---------- Form error state ---------- */
.quote__error {
  margin-top: 14px; padding: 12px 16px; border-radius: 10px;
  background: rgba(232, 93, 37, 0.12); color: #9A3D12;
  font-weight: 600; font-size: 14px; text-align: center; line-height: 1.5;
}
.quote__error a { color: #9A3D12; text-decoration: underline; font-weight: 800; }

/* ---------- Service page hero sizing ----------
   Sub-pages use a shorter hero than the homepage so the
   content starts higher on the page. */
.hero { min-height: clamp(420px, 56svh, 560px); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  /* Matches the nav's own breakpoint in styles.css. The mobile nav
     stacks links vertically, so the dropdown becomes an
     always-visible group instead of a hover menu. */
  .navdrop { display: block; width: 100%; }
  .navdrop__btn { display: none; }
  .navdrop__menu {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    min-width: 0; padding: 0; border: none; box-shadow: none; background: none;
    display: grid; gap: 0;
  }
  .navdrop__menu a { padding: 8px 0; color: inherit; font-size: inherit; }
  .navdrop__menu a:hover { background: none; }
}
@media (max-width: 560px) {
  .areas__list { gap: 8px; }
  .areas__list span { font-size: 13px; padding: 8px 16px; }
}
