/* ═══════════════════════════════════════════
   HARBOR LEGAL — Components v3.1
   Megamenu, pillar cards, service cards, etc.
   ═══════════════════════════════════════════ */

/* ─── MEGAMENU ─── */
.nav-item { position: relative; display: inline-flex; align-items: center; }
.nav-item > a { cursor: pointer; line-height: inherit; }

.megamenu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: var(--white); border: 1px solid var(--border-light);
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.08);
  padding: 28px 32px; min-width: 560px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateX(-50%) translateY(8px);
  z-index: 100;
}
.nav-item:hover .megamenu,
.nav-item:focus-within .megamenu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.megamenu-group {
  border-radius: 8px; padding: 8px 10px; margin: -8px -10px;
  transition: background .15s;
}
.megamenu-group:hover { background: var(--bg-subtle); }
.megamenu-group:hover .megamenu-title { color: var(--indigo-light); }
.megamenu-title,
.nav-links a.megamenu-title {
  font-family: var(--f-display); font-weight: 600; font-size: 17px;
  color: var(--ink); display: block; margin-bottom: 10px;
  text-transform: none; letter-spacing: 0; padding: 0;
}
.megamenu-title::after { display: none !important; }
.megamenu-title:hover { color: var(--indigo-light); }
a.megamenu-desc { display: block; text-decoration: none; }
a.megamenu-desc::after { display: none !important; }
.megamenu-desc {
  font-size: 13px; color: var(--ink-muted); line-height: 1.6;
  margin: 0; letter-spacing: 0; text-transform: none;
}

.megamenu-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.megamenu-links li { margin: 0; }
.megamenu-links a {
  font-size: 13px; color: var(--ink-muted); display: block;
  padding: 3px 0; letter-spacing: 0; text-transform: none;
}
.megamenu-links a:hover { color: var(--indigo); }
.megamenu-links a::after { display: none !important; }

/* ─── NAV CHEVRON ─── */
.nav-chevron {
  font-size: 10px; display: inline-block;
  transition: transform .25s ease; margin-left: 3px;
  vertical-align: middle;
}
.nav-item.open > a .nav-chevron { transform: rotate(180deg); }

/* ─── MOBILE MEGAMENU ─── */
@media (max-width: 900px) {
  .nav-links a::after { display: none !important; }
  .nav-item {
    display: flex; flex-direction: column; width: 100%;
  }
  .nav-item > a {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 44px; padding: 10px 0 !important;
    width: 100%;
  }
  .megamenu {
    position: static; transform: none; min-width: 0;
    grid-template-columns: 1fr; gap: 0;
    border: none; box-shadow: none; border-radius: 0;
    padding: 0;
    display: none; opacity: 1; visibility: visible; pointer-events: auto;
    max-height: 60vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  .nav-item.open .megamenu { display: grid; }
  .megamenu-group {
    padding: 0;
    border-bottom: none;
  }
  .megamenu-group:last-child { border-bottom: none; }
  .megamenu-group {
    padding: 0; margin: 0; border-radius: 0;
  }
  .megamenu-group:hover { background: none; }
  .nav-links .megamenu-title {
    min-height: 40px; display: flex; align-items: center;
    padding: 6px 0; margin: 0;
    font-family: var(--f-display); font-size: 18px;
    text-transform: none; letter-spacing: 0; font-weight: 500;
    color: var(--ink-muted);
  }
  .megamenu-desc,
  .nav-links a.megamenu-desc { display: none !important; }
  .megamenu-links { display: none; }
}

/* ─── PILLAR CARDS (3 service areas on homepage) ─── */
.pillar-cards {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px;
  margin-top: 48px;
}
.pillar-card {
  background: var(--white); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 32px 28px;
  position: relative; overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.pillar-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s;
}
.pillar-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(45,43,107,.08); }
.pillar-card:hover::before { transform: scaleX(1); }

.pillar-card-title {
  font-family: var(--f-display); font-weight: 600; font-size: 20px;
  color: var(--ink); margin-bottom: 8px;
}
.pillar-card-subtitle { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin-bottom: 12px; }
.pillar-card-tags {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em;
  color: var(--ink-muted); margin-bottom: 16px;
}
.pillar-card-link {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold);
}
.pillar-card-desc {
  font-size: 13px; color: var(--ink-soft); line-height: 1.7;
  margin-bottom: 14px;
}
.pillar-card-highlights {
  list-style: none; padding: 0; margin: 0 0 14px 0;
  display: flex; flex-direction: column; gap: 6px;
}
.pillar-card-highlights li {
  font-size: 12px; color: var(--ink-soft); line-height: 1.5;
  padding-left: 16px; position: relative;
}
.pillar-card-highlights li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--gold); font-weight: 600; font-size: 11px;
}
.pillar-card-geo {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 12px;
}
@media (max-width: 768px) {
  .pillar-cards { grid-template-columns: 1fr; }
}

/* ─── HERO MINI-CARDS ─── */
.hero-minicards {
  background: var(--white); border-top: 1px solid var(--border-light);
  padding: 32px 0;
}
.minicards-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.minicard {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 20px 24px;
}
.minicard-title {
  font-family: var(--f-display); font-weight: 600; font-size: 17px;
  color: var(--ink); margin-bottom: 6px;
}
.minicard-tags {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em;
  color: var(--ink-muted);
}
@media (max-width: 768px) {
  .minicards-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ─── SERVICE CARDS (6 numbered cards) ─── */
.services-detail-grid,
.services-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.service-card {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 28px;
  position: relative; overflow: hidden;
  transition: transform .3s, box-shadow .3s;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .4s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(45,43,107,.08); }
.service-card:hover::before { transform: scaleX(1); }
.service-num {
  font-family: var(--f-mono); font-size: 28px; font-weight: 300;
  color: var(--gold); margin-bottom: 12px;
}
.service-name {
  font-family: var(--f-display); font-weight: 600; font-size: 19px;
  color: var(--ink); margin-bottom: 8px;
}
.service-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 12px; }
.service-details {
  list-style: none; padding: 0; margin: 0 0 16px 0;
  border-top: 1px solid var(--border-light); padding-top: 14px;
}
.service-details li {
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.65;
  padding: 5px 0 5px 20px; position: relative;
}
.service-details li::before {
  content: '→'; position: absolute; left: 0; color: var(--gold); font-size: 12px;
}
.service-card[id] { scroll-margin-top: 100px; }
.service-tags {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em;
  color: var(--ink-muted);
}
@media (max-width: 768px) {
  .services-detail-grid,
  .services-grid { grid-template-columns: 1fr; }
}

/* ─── MODEL CARDS (cooperation) ─── */
.model-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 48px; }
.model-card {
  background: var(--white); border: 1px solid var(--border-light);
  border-radius: 12px; padding: 36px 28px; text-align: center;
  position: relative;
}
.model-highlight {
  background: var(--indigo); color: rgba(255,255,255,.9);
  border-color: var(--indigo);
}
.model-badge {
  position: absolute; top: 16px; right: 16px;
  background: var(--gold); color: var(--ink);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .15em;
  padding: 4px 10px; border-radius: 3px; text-transform: uppercase;
}
.model-icon { margin-bottom: 20px; min-height: 110px; display: flex; align-items: center; justify-content: center; }
.model-name {
  font-family: var(--f-display); font-weight: 600; font-size: 22px;
  color: var(--ink); margin-bottom: 10px;
}
.model-highlight .model-name { color: var(--white); }
.model-desc { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }
.model-highlight .model-desc { color: rgba(255,255,255,.75); }
.model-highlight .model-icon img { filter: brightness(0) invert(1); }
@media (max-width: 768px) {
  .model-grid { grid-template-columns: 1fr; }
}

/* ─── PROCESS STEPS ─── */
.process-list { margin-top: 48px; }
.process-item {
  display: flex; gap: 32px; align-items: flex-start;
  padding: 32px 0; border-bottom: 1px solid var(--border-light);
}
.process-item:last-child { border-bottom: none; }
.process-num {
  font-family: var(--f-mono); font-size: 32px; font-weight: 300;
  color: var(--gold); min-width: 48px;
}
.process-title {
  font-family: var(--f-display); font-weight: 600; font-size: 20px;
  color: var(--ink); margin-bottom: 6px;
}
.process-desc { font-size: 14px; color: var(--ink-soft); line-height: 1.7; }

/* ─── PORTRAIT BANNER ─── */
.portrait-banner {
  background: var(--ink); overflow: hidden;
}
.portrait-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; min-height: 440px;
}
.portrait-img-col { overflow: hidden; }
.portrait-img-col img { width: 100%; height: 100%; object-fit: cover; display: block; }
.portrait-text-col {
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 64px;
}
.portrait-quote {
  font-family: var(--f-display); font-style: italic; font-size: 26px;
  font-weight: 400; color: rgba(255,255,255,.9); line-height: 1.4;
  margin: 0 0 32px 0; border: none; padding: 0;
}
.portrait-author {
  font-family: var(--f-body); font-size: 15px; color: rgba(255,255,255,.6);
  line-height: 1.5;
}
.portrait-author span { font-size: 13px; color: rgba(255,255,255,.35); }
@media (max-width: 768px) {
  .portrait-inner { grid-template-columns: 1fr; }
  .portrait-text-col { padding: 40px 24px; }
  .portrait-quote { font-size: 20px; }
}

/* ─── BLOG ─── */
.blog-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.blog-card {
  background: var(--white); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 28px; display: flex;
  flex-direction: column; transition: transform .3s, box-shadow .3s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(45,43,107,.08); }
.blog-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.blog-tag {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--gold); font-weight: 500;
}
.blog-date { font-size: 12px; color: var(--ink-muted); }
.blog-title {
  font-family: var(--f-display); font-weight: 600; font-size: 18px;
  color: var(--ink); line-height: 1.3; margin-bottom: 8px;
}
.blog-excerpt { font-size: 13px; color: var(--ink-soft); line-height: 1.6; flex: 1; }
.blog-link {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); margin-top: 16px;
}
.blog-filter-btn {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; background: transparent;
  border: 1px solid var(--border); color: var(--ink-muted);
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
  transition: all .2s;
}
.blog-filter-btn.active,
.blog-filter-btn:hover { background: var(--indigo); color: var(--white); border-color: var(--indigo); }
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* ─── ABOUT ─── */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  margin-top: 48px; align-items: start;
}
.about-photo {
  width: 100%; max-width: 280px; border-radius: 12px;
  display: block; margin-bottom: 24px;
}
.about-text p { font-size: 15px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 16px; }
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--f-display); font-size: 40px; font-weight: 600;
  color: var(--indigo); line-height: 1;
}
.stat-label { font-size: 13px; color: var(--ink-muted); margin-top: 6px; }
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* ─── BREADCRUMBS ─── */
.breadcrumbs {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em;
  color: var(--ink-muted); margin-bottom: 24px;
}
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--indigo); }
.breadcrumbs .sep { margin: 0 6px; opacity: .4; }
.breadcrumbs .current { color: var(--ink-soft); }

/* ─── PILLAR HERO (subpage headers) ─── */
.pillar-hero {
  padding: 140px 0 64px; border-bottom: 1px solid var(--border-light);
}
@media (max-width: 768px) {
  .pillar-hero { padding: 110px 0 40px; }
}

/* ─── ARTICLE ─── */
.article-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 2000; display: flex; justify-content: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.article-overlay.open { opacity: 1; pointer-events: auto; }
.article-panel {
  width: 100%; max-width: 680px; background: var(--white);
  height: 100vh; overflow-y: auto; padding: 40px 48px;
}
.article-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 32px;
}
.article-close {
  background: none; border: none; font-size: 28px;
  color: var(--ink-muted); cursor: pointer;
}
.article-back-label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted);
}
.article-body h2 {
  font-family: var(--f-display); font-weight: 600; font-size: 22px;
  color: var(--ink); margin: 32px 0 12px; line-height: 1.3;
}
.article-body p { margin-bottom: 16px; font-size: 15px; line-height: 1.8; color: var(--ink-soft); }

/* ─── OFERTA SECTION ─── */
.oferta-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start;
}
.oferta-block { margin-bottom: 36px; }
.oferta-block:last-child { margin-bottom: 0; }
.oferta-heading {
  font-family: var(--f-display); font-weight: 600; font-size: 22px;
  margin-bottom: 12px; color: var(--ink);
}
.oferta-text {
  font-size: 15px; color: var(--ink-soft); line-height: 1.8;
}
.oferta-card {
  background: var(--bg); border: 1px solid var(--border-light);
  border-radius: 8px; padding: 32px; margin-bottom: 20px;
}
.oferta-card-label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--indigo); margin-bottom: 16px;
}
.oferta-benefits { display: flex; flex-direction: column; gap: 14px; }
.oferta-benefit { display: flex; align-items: flex-start; gap: 12px; }
.oferta-benefit-arrow {
  color: var(--gold); font-weight: 700; font-size: 16px;
  margin-top: 1px; flex-shrink: 0;
}
.oferta-benefit-text {
  font-size: 14px; color: var(--ink-soft); line-height: 1.7;
}
.oferta-benefit-text strong { color: var(--ink); }
.oferta-cta-card {
  background: var(--indigo); border-radius: 8px; padding: 32px;
  color: rgba(255,255,255,.9);
}
.oferta-cta-label {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--gold-light); margin-bottom: 12px;
}
.oferta-cta-title {
  font-family: var(--f-display); font-weight: 500; font-size: 22px;
  color: #fff; margin-bottom: 12px; line-height: 1.3;
}
.oferta-cta-desc {
  font-size: 14px; line-height: 1.7; margin-bottom: 20px; opacity: .8;
}
.oferta-cta-btn {
  background: var(--gold); color: var(--ink); font-size: 11px;
}
@media (max-width: 768px) {
  .oferta-grid { grid-template-columns: 1fr; }
}

/* ─── COOKIE ─── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--ink); color: rgba(255,255,255,.7);
  padding: 16px 24px; display: flex; justify-content: center;
  align-items: center; gap: 20px; font-size: 13px; z-index: 9999;
  transform: translateY(100%); transition: transform .4s;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-btn {
  background: var(--gold); color: var(--ink); border: none;
  padding: 8px 20px; border-radius: 4px; cursor: pointer;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase;
}

/* ─── MEGAMENU BADGE ─── */
.megamenu-badge {
  display: inline-block; font-family: var(--f-mono); font-size: 9px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  background: var(--gold); color: white; padding: 2px 7px;
  border-radius: 3px; margin-left: 6px; vertical-align: middle;
  line-height: 1.4;
}

/* ─── FOOTER COLUMNS ─── */
.footer-cols {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 32px; font-size: 11px; line-height: 1.8;
}
.footer-cols-title {
  font-family: var(--f-body); font-weight: 600; font-size: 11px;
  color: rgba(255,255,255,.55); letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: 10px;
}
.footer-cols a {
  display: block; color: rgba(255,255,255,.4); text-decoration: none;
  letter-spacing: .04em; transition: color .15s;
}
.footer-cols a:hover { color: rgba(255,255,255,.7); }
.footer-cols p {
  color: rgba(255,255,255,.4); margin: 0; letter-spacing: .04em;
}
@media (max-width: 768px) {
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
}

/* ─── HOMEPAGE TOOLS GRID ─── */
.hp-tools-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 20px; margin-top: 36px;
}
.hp-tools-grid .hp-tool { grid-column: span 2; }
.hp-tools-grid .hp-tool:nth-child(4) { grid-column: 2 / span 2; }
.hp-tools-grid .hp-tool:nth-child(5) { grid-column: 4 / span 2; }

.hp-tool {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column;
  overflow: hidden; transition: box-shadow .25s, border-color .25s;
}
.hp-tool:hover { border-color: var(--gold); box-shadow: 0 8px 32px rgba(45,43,107,.08); }

.hp-tool-img {
  height: 170px; overflow: hidden;
}
.hp-tool-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.hp-tool-body { padding: 20px 20px 24px; flex: 1; display: flex; flex-direction: column; }
.hp-tool-body h3 { font-size: 16px; margin: 0 0 6px; color: var(--indigo); }
.hp-tool-body p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin: 0 0 12px; flex: 1; }

.hp-tool-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.hp-tool-header h3 { margin: 0; }

.hp-tool-badge {
  font-family: var(--f-mono); font-size: 8px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--gold); color: white; padding: 2px 6px;
  border-radius: 3px; white-space: nowrap;
}

.hp-tool-cta { font-size: 13px; color: var(--indigo); font-weight: 500; }

/* Tablet: 2 columns, 5th centered */
@media (max-width: 1024px) {
  .hp-tools-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-tools-grid .hp-tool { grid-column: span 1; }
  .hp-tools-grid .hp-tool:nth-child(5) { grid-column: 1 / -1; max-width: calc(50% - 10px); justify-self: center; }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
  .hp-tools-grid { grid-template-columns: 1fr; }
  .hp-tools-grid .hp-tool,
  .hp-tools-grid .hp-tool:nth-child(4),
  .hp-tools-grid .hp-tool:nth-child(5) { grid-column: 1; max-width: none; }
}
