/*
   PREMIUM MEGA MENU — UX Optimised
   Soy.Marketing 2025
*/

/* ── Nav root ─────────────────────────────────────────────────────────────── */
.hatch-menu {
    display: block;
    width: 100%;
    position: relative;   /* anchor for all absolute submenus */
    z-index: 1000;
}

.hatch-menu > ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    padding: 0;
    margin: 0;
    list-style: none;
}

/* All <li> are static so submenus anchor to .hatch-menu, not the <li> */
.hatch-menu > ul > li {
    position: static;
    padding: 10px 0;
}

.hatch-menu > ul > li > a {
    text-decoration: none;
    color: #111;
    font-size: 13.5px; /* Increased from 12.5px for UX / readability */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    padding: 6px 0;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.hatch-menu > ul > li:hover > a,
.hatch-menu > ul > li.active-parent > a {
    color: #ff5100;
}

.hatch-menu > ul > li.has-submenu > a::after {
    content: " ▾";
    font-size: 9px;
    vertical-align: middle;
    margin-left: 2px;
    opacity: 0.6;
}


/* ── Submenu panel — base (small menus) ───────────────────────────────────── */
.hatch-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 24px 28px;
    z-index: 5000;
    box-shadow: 0 20px 50px rgba(0,0,0,0.10);
    border-top: 3px solid #ff5100;
    border-radius: 0 0 8px 8px;
    min-width: 200px;
}

/* ── Articles mega submenu — full-width, capped height ──────────────────── */
.hatch-submenu.articles {
    left: 0;
    width: 100%;
    transform: none;
    padding: 0;           /* padding moves inside .articles-mega-inner */
    box-sizing: border-box;
}

/* ── Articles inner layout: auto-flow 3 columns ───────────────────────────── */
.articles-mega-inner {
    column-count: 3;
    column-gap: 32px;
    padding: 28px 32px;
    box-sizing: border-box;
}

/* Prevent a category block from splitting across columns */
.articles-mega-inner .category-group {
    break-inside: avoid;
    page-break-inside: avoid; /* Safari fallback */
}

/* ── Category columns (no longer wrapped in .submenu-column) ─────────────── */
.articles-mega-inner .category-group {
    margin-bottom: 22px;
    break-inside: avoid;
    page-break-inside: avoid;
}
.articles-mega-inner .category-group:last-child {
    margin-bottom: 0;
}

/* Category heading */
.hatch-submenu .submenu-title {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: #ff5100;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    text-align: left;
}
.hatch-submenu .submenu-title a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.hatch-submenu .submenu-title a:hover {
    opacity: 0.75;
}

/* Sub-links list */
.hatch-submenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 5px;
}
.hatch-submenu ul li {
    margin-bottom: 7px;
    display: block;
}
.hatch-submenu ul li:last-child {
    margin-bottom: 0;
}
.hatch-submenu ul li a {
    font-size: 13px; /* Slightly increased for readability balance */
    color: #555;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.18s ease, padding-left 0.18s ease;
    line-height: 1.4;
}
.hatch-submenu ul li a::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background 0.18s ease;
}
.hatch-submenu ul li a:hover {
    color: #111;
    padding-left: 4px;
}
.hatch-submenu ul li a:hover::before {
    background: #ff5100;
}

/* "Ver todos" — small muted link at bottom of sub-list */
.hatch-submenu ul li.see-all-link {
    display: block;
    margin-top: 6px;
    border-top: 1px dashed #eee;
    padding-top: 6px;
}
.hatch-submenu ul li.see-all-link a {
    font-size: 11px !important;
    color: #999 !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    display: flex !important;
    align-items: center;
    gap: 3px;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    transition: color 0.15s ease;
}
.hatch-submenu ul li.see-all-link a::before {
    display: none;
}
.hatch-submenu ul li.see-all-link a:hover {
    color: #ff5100 !important;
    background: none !important;
    transform: none !important;
}


/* ── Flat category chips (leaf nodes with no subcategories) ───────────────── */
.flat-cats-group {
    margin-top: 8px;
}
.flat-cats-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.cat-chip {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #555 !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}
.cat-chip:hover {
    background: #ff5100;
    color: #fff !important;
}

/* ── Featured article panel ───────────────────────────────────────────────── */
.mega-featured {
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mega-featured__label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #ff5100;
    margin: 0;
}

.mega-featured__img-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 16/9;
}
.mega-featured__img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.mega-featured__img-link:hover img {
    transform: scale(1.04);
}

.mega-featured__title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
    margin: 0;
}
.mega-featured__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.18s ease;
}
.mega-featured__title a:hover {
    color: #ff5100;
}

.mega-featured__cta {
    font-size: 11.5px;
    font-weight: 700;
    color: #ff5100;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.15s ease;
}
.mega-featured__cta:hover {
    gap: 8px;
}


/* ── Active states ────────────────────────────────────────────────────────── */
.hatch-submenu.active {
    display: block !important;
}

@keyframes hFadeUpCenter {
    from { opacity: 0; transform: translate(-50%, 8px); }
    to   { opacity: 1; transform: translate(-50%, 0);  }
}
.hatch-submenu:not(.articles).active {
    animation: hFadeUpCenter 0.22s ease-out forwards;
}

@keyframes hFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}
.hatch-submenu.articles.active {
    animation: hFadeUp 0.22s ease-out forwards;
}


/* ── Overlay ──────────────────────────────────────────────────────────────── */
.hatch-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.08);
    z-index: 999;
    backdrop-filter: blur(1px);
}
.hatch-menu-overlay.active {
    display: block;
}


/* ── Generic small submenus flex container ────────────────────────────────── */
.hatch-submenu .submenu-columns-container {
    display: flex;
    gap: 32px;
    flex-wrap: nowrap;
}
.hatch-submenu .submenu-column {
    min-width: 140px; /* ensure enough space for columns */
}
.hatch-submenu.podcast .submenu-column {
    border-right: 1px solid #f2f2f2;
    padding-right: 32px;
}
.hatch-submenu.podcast .submenu-column:last-child {
    border-right: none;
    padding-right: 0;
}
.hatch-submenu .submenu-columns-container .submenu-column ul li a.apple-podcast {
    white-space: nowrap;
}

/* ── Sticky refinements (controlled via style.css .h-is-sticky) ───────────── */
