/* ═══════════════════════════════════════════
   Lazio Mega Menu — Style-matched to live site
   ═══════════════════════════════════════════ */

/* ── Root Container ── */
.lazio-mega-menu {
  display: flex;
  width: 100%;
  font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Standalone: full container styling for test page / standalone use */
.lazio-mega-menu--standalone {
  width: 992px;
  background: #ffffff;
  border: 1px solid var(--slate-gray);
  border-top: 5px solid var(--lazio-orange);
  box-shadow: 0 0 10px 4px var(--lazio-orange-t-3);
  padding: 30px;
}

/* ── Sidebar ── */
.lazio-mega-menu__sidebar {
  width: 340px;
  flex-shrink: 0;
  background: var(--whisper-gray);
  padding: 0;
  display: flex;
  flex-direction: column;
}

.lazio-mega-menu__heading {
  padding: 30px 0 0 25px;
  margin: 0;
  /* Inherits theme h5 styles: Poppins, uppercase, semibold, slate-gray, text-s */
}

.lazio-mega-menu__divider {
  margin: 0;
  padding: 10px 0;
  border: none;
  border-top: 1px solid var(--whisper-gray);
}

/* ── Tabs ── */
.lazio-mega-menu__tabs {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.lazio-mega-menu__tab {
  display: grid;
  grid-template-columns: 90px 170px 80px;
  align-items: center;
  padding: 23px 0 25px 0;
  text-decoration: none;
  color: var(--iron);
  border-left: 5px solid transparent;
  transition: border-left-color 0.5s ease;
  position: relative;
}

.lazio-mega-menu__tab:hover,
.lazio-mega-menu__tab.is-active {
  border-left-color: var(--lazio-orange);
}

/* Tab icon */
.lazio-mega-menu__tab-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.lazio-mega-menu__tab-icon svg {
  width: 40px;
  height: 40px;
  stroke: var(--lazio-orange-t-1);
  transition: stroke 0.5s ease, fill 0.5s ease;
}

.lazio-mega-menu__tab:hover .lazio-mega-menu__tab-icon svg,
.lazio-mega-menu__tab.is-active .lazio-mega-menu__tab-icon svg {
  stroke: var(--lazio-orange);
}

.lazio-mega-menu__tab-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Tab text */
.lazio-mega-menu__tab-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lazio-mega-menu__tab-text h2 {
  margin: 0;
  font-size: var(--text-ml);
  color: var(--iron);
  white-space: nowrap;
  line-height: 1.2;
}

.lazio-mega-menu__tab-text small {
  text-transform: uppercase;
  font-size: var(--text-s);
  color: var(--slate-gray);
  white-space: nowrap;
  line-height: 1.3;
}

/* Chevron */
.lazio-mega-menu__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  color: var(--lazio-orange);
}

.lazio-mega-menu__chevron svg {
  width: 15px;
  height: 15px;
}

.lazio-mega-menu__tab:hover .lazio-mega-menu__chevron,
.lazio-mega-menu__tab.is-active .lazio-mega-menu__chevron {
  opacity: 1;
}

/* Overview button — matches Bricks "primary" button */
.lazio-mega-menu__overview-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 270px;
  align-self: center;
  margin: 20px 0;
  padding: 10px 20px;
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-s);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--iron);
  text-decoration: none;
  border: 1px solid var(--iron);
  background: transparent;
  transition: all 0.2s ease;
}

.lazio-mega-menu__overview-btn:hover {
  background: var(--iron);
  color: var(--cream);
}

/* Arrow SVG inside buttons/links */
.lazio-mega-menu__arrow-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-left: 4px;
  flex-shrink: 0;
}

/* ── Panels ── */
.lazio-mega-menu__panels {
  flex: 1;
  min-width: 0;
}

.lazio-mega-menu__panel {
  display: none;
  flex-direction: column;
  background: var(--cream);
  padding: 20px;
  border: 1px solid;
  height: 100%;
  box-sizing: border-box;
}

.lazio-mega-menu__panel.is-active {
  display: flex;
}

/* Panel heading block */
.lazio-mega-menu__panel-header {
  display: flex;
  flex-direction: column;
  height: 7.2em;
  padding: 10px;
  row-gap: 1.3rem;
  border-bottom: 1px solid var(--iron-t-2);
  margin-bottom: 0;
}

.lazio-mega-menu__panel-header-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1em;
}

.lazio-mega-menu__panel-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--iron);
  flex-shrink: 0;
  padding: 5px;
  box-sizing: border-box;
}

.lazio-mega-menu__panel-icon svg {
  width: 100%;
  height: 100%;
  stroke: var(--cream);
}

.lazio-mega-menu__panel-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lazio-mega-menu__panel-header h2 {
  margin: 0;
  white-space: nowrap;
  line-height: 45px;
}

.lazio-mega-menu__panel-desc {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-style: italic;
  color: var(--iron);
  line-height: 1.5;
}

/* ── Children grid ── */
.lazio-mega-menu__children {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  flex: 1;
}

.lazio-mega-menu__child {
  display: grid;
  grid-template-rows: 1.2em 1fr;
  padding: 15px 0;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.lazio-mega-menu__child:hover {
  background: var(--iron-t-3);
}

.lazio-mega-menu__child h3 {
  margin: 0;
  font-size: var(--text-m);
  color: var(--iron);
  line-height: 1.2;
  padding-left: 1.2em;
}

.lazio-mega-menu__child p {
  margin: 0.5em 0 1em 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-style: italic;
  line-height: 1.5;
  color: var(--iron);
  padding-left: 1em;
  border-left: 3px solid var(--lazio-orange);
}

/* ── Panel footer (Services) ── */
.lazio-mega-menu__panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding: 0.75em 1em;
  background: var(--lazio-orange-t-2);
}

.lazio-mega-menu__panel-footer span {
  font-family: 'Crimson Pro', Georgia, serif;
  color: var(--iron);
}

.lazio-mega-menu__panel-footer a {
  display: inline-flex;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-m);
  font-weight: 600;
  color: var(--lazio-orange);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  transition: text-decoration 0.15s ease;
}

.lazio-mega-menu__panel-footer a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════
   Resources variant: Book panel
   ═══════════════════════════════════════════ */
.lazio-mega-menu__book {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  height: 100%;
}

.lazio-mega-menu__book-cover {
  flex-shrink: 0;
}

.lazio-mega-menu__book-cover img {
  height: 350px;
  width: auto;
  object-fit: contain;
  box-shadow: 0 0 40px 5px var(--iron);
  margin: 30px;
}

.lazio-mega-menu__book-info {
  display: flex;
  flex-direction: column;
  gap: 1em;
  flex: 1;
}

.lazio-mega-menu__book-eyebrow {
  /* h5 tag inherits theme styles: Poppins, uppercase, semibold, slate-gray, text-s */
  color: var(--lazio-orange);
}

.lazio-mega-menu__book-title {
  margin: 0;
  font-size: var(--text-l);
}

.lazio-mega-menu__book-desc {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-style: italic;
  font-size: var(--text-m);
  line-height: 1.65;
  color: var(--slate-gray);
  padding-right: 20px;
}

.lazio-mega-menu__book-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

/* Primary = Bricks primary button: iron border, transparent bg, uppercase */
.lazio-mega-menu__book-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-s);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.lazio-mega-menu__book-btn--primary {
  background: transparent;
  color: var(--iron);
  border: 1px solid var(--iron);
}

.lazio-mega-menu__book-btn--primary:hover {
  background: var(--iron);
  color: var(--cream);
}

/* Secondary = Bricks secondary button: background fill style + icon */
.lazio-mega-menu__book-btn--secondary {
  background: var(--iron);
  color: var(--cream);
  border: 1px solid var(--iron);
}

.lazio-mega-menu__book-btn--secondary:hover {
  background: transparent;
  color: var(--iron);
}

.lazio-mega-menu__book-btn--secondary i,
.lazio-mega-menu__book-btn--secondary svg {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════
   Resources variant: Blog panel
   ═══════════════════════════════════════════ */
.lazio-mega-menu__blog {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.lazio-mega-menu__blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lazio-mega-menu__blog-header h2 {
  margin: 0;
}

.lazio-mega-menu__blog-archive {
  display: inline-flex;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--lazio-orange);
  text-decoration: none;
  text-transform: uppercase;
}

.lazio-mega-menu__blog-archive:hover {
  text-decoration: underline;
}

.lazio-mega-menu__blog-divider {
  border: none;
  border-top: 1px solid var(--iron-t-1);
  margin: 0;
}

/* Posts grid */
.lazio-mega-menu__posts {
  display: flex;
  gap: 20px;
  flex: 1;
}

.lazio-mega-menu__post {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid var(--iron);
  background: var(--iron-t-3);
  height: 275px;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.lazio-mega-menu__post:hover {
  box-shadow: 0 4px 12px var(--iron-t-2);
}

.lazio-mega-menu__post-image {
  width: 100%;
  aspect-ratio: 3;
  overflow: hidden;
  position: relative;
}

.lazio-mega-menu__post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Category badge */
.lazio-mega-menu__post-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--lazio-orange);
  color: var(--cream);
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-s);
  font-weight: 600;
  text-transform: uppercase;
  padding: 5px;
  line-height: 1;
  z-index: 1;
}

/* Metadata row */
.lazio-mega-menu__post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 4px;
  font-family: 'Poppins', sans-serif;
  font-size: var(--text-s);
  font-weight: 600;
  color: var(--slate-gray);
  text-transform: uppercase;
}

.lazio-mega-menu__post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lazio-mega-menu__post-meta-item svg {
  width: 14px;
  height: 14px;
}

.lazio-mega-menu__post-title {
  margin: 10px 14px 0;
  font-size: var(--text-m);
  color: var(--iron);
  line-height: 1.4;
  letter-spacing: 0;
}

/* Blog footer */
.lazio-mega-menu__blog-footer {
  margin-top: auto;
  padding-top: 14px;
}

.lazio-mega-menu__blog-footer p {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-style: italic;
  color: var(--slate-gray);
}

/* ═══════════════════════════════════════════
   Mobile
   ═══════════════════════════════════════════ */
.lazio-mega-menu__mobile {
  display: none;
}

.lazio-mega-menu__mobile--hidden {
  display: none !important;
}

/* Services mobile */
.lazio-mega-menu--services .lazio-mega-menu__mobile {
  flex-direction: column;
  gap: 2em;
  background: var(--lazio-orange-t-3);
  padding: 35px 20px 40px;
}

.lazio-mega-menu__mobile-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  text-decoration: none;
  color: var(--iron);
}

.lazio-mega-menu__mobile-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lazio-mega-menu__mobile-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--lazio-orange);
}

.lazio-mega-menu__mobile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lazio-mega-menu__mobile-item h5 {
  margin: 0;
}

.lazio-mega-menu__mobile-item p {
  margin: 0;
  font-family: 'Crimson Pro', Georgia, serif;
  font-style: italic;
  font-size: var(--text-s);
  color: var(--slate-gray);
}

.lazio-mega-menu__mobile-divider {
  border: none;
  border-top: 1px solid var(--iron-t-2);
  margin: 0;
}

/* ═══════════════════════════════════════════
   Responsive — 991px (Bricks tablet portrait)
   ═══════════════════════════════════════════ */
@media (max-width: 991px) {
  .lazio-mega-menu {
    flex-direction: column;
  }

  .lazio-mega-menu--standalone {
    width: 100%;
    padding: 0;
    border: none;
    box-shadow: none;
  }

  .lazio-mega-menu__sidebar,
  .lazio-mega-menu__panels {
    display: none;
  }

  .lazio-mega-menu__mobile {
    display: flex;
  }

  /* Resources mobile — hidden entirely */
  .lazio-mega-menu--resources .lazio-mega-menu__mobile {
    display: none !important;
  }
}

@media (min-width: 992px) {
  .lazio-mega-menu__mobile {
    display: none !important;
  }
}

/* ── Tablet adjustments (between 768-991) ── */
@media (min-width: 768px) and (max-width: 991px) {
  .lazio-mega-menu__tab {
    grid-template-columns: 7vw 23vw 5vw;
  }

  .lazio-mega-menu__sidebar {
    width: 35vw;
  }

  .lazio-mega-menu__panel {
    width: 65vw;
  }

  .lazio-mega-menu__book-cover img {
    height: auto;
    width: 24vw;
    margin: 10px;
  }
}
