/* ============================================================================
 * Mega menu — раскрывающаяся панель под навигацией header
 * ========================================================================= */

.h-mega {
    position: fixed;
    top: var(--hlife-header-bottom, 96px);
    left: 0;
    right: 0;
    background: var(--hlife-color-bg, #fff);
    border-top: 1px solid var(--hlife-color-border, #e5e7eb);
    box-shadow: 0 8px 24px -8px rgba(26, 43, 73, 0.1);
    z-index: 99;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    max-height: calc(100vh - var(--hlife-header-bottom, 96px));
    overflow-y: auto;
}

.h-mega[hidden] {
    display: none;
}

[data-mega-open="true"] .h-mega:not([hidden]),
.h-mega[data-mega-open="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.h-mega__inner {
    max-width: var(--hlife-container-max, 1200px);
    margin-inline: auto;
    padding: 32px clamp(1rem, 4vw, 2rem);
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 48px;
}

.h-mega__inner--single {
    grid-template-columns: 1fr;
}

.h-mega__title {
    font-family: var(--hlife-font-display, "Playfair Display"), serif;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hlife-color-muted, #6b7280);
    margin: 0 0 16px 0;
}

/* === Featured cards === */
.h-mega__featured {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.h-mega__featured-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.h-mega__featured-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 4px;
    background: var(--hlife-color-sand-light, #F4F1EA);
    margin-bottom: 8px;
}

.h-mega__featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.h-mega__featured-card:hover .h-mega__featured-media img {
    transform: scale(1.06);
}

.h-mega__featured-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--hlife-color-navy, #1A2B49), var(--hlife-color-charcoal, #333));
    color: rgba(255, 255, 255, 0.2);
    font-family: var(--hlife-font-display, "Playfair Display"), serif;
    font-size: 36px;
    font-weight: 400;
}

.h-mega__featured-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--hlife-color-navy, #1A2B49);
}

[data-theme="dark"] .h-mega__featured-name {
    color: var(--hlife-color-text, #f3f4f6);
}

/* === Regions === */
.h-mega__regions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.h-mega__region-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hlife-color-muted, #6b7280);
    margin: 0 0 8px 0;
    font-weight: 500;
}

.h-mega__region-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.h-mega__link {
    display: block;
    padding: 4px 0;
    color: var(--hlife-color-text, #1f2937);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s, padding 0.15s;
}

.h-mega__link:hover {
    color: var(--hlife-color-emerald, #2E7D32);
    padding-left: 6px;
}

/* === Services grid === */
.h-mega__services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.h-mega__service {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.h-mega__service:hover {
    background: var(--hlife-color-sand-light, #F4F1EA);
}

[data-theme="dark"] .h-mega__service:hover {
    background: rgba(255, 255, 255, 0.04);
}

.h-mega__service-icon {
    flex-shrink: 0;
    font-size: 24px;
    line-height: 1;
}

.h-mega__service-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.h-mega__service-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--hlife-color-navy, #1A2B49);
}

[data-theme="dark"] .h-mega__service-name {
    color: var(--hlife-color-text, #f3f4f6);
}

.h-mega__service-count {
    font-size: 11px;
    color: var(--hlife-color-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* === Holidays grid === */
.h-mega__holidays {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 4px;
}

.h-mega__holiday {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    transition: background 0.15s, transform 0.15s;
}

.h-mega__holiday:hover {
    background: var(--hlife-color-sand-light, #F4F1EA);
    transform: translateX(2px);
}

[data-theme="dark"] .h-mega__holiday:hover {
    background: rgba(255, 255, 255, 0.04);
}

.h-mega__holiday-icon {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 1024px) {
    .h-mega {
        display: none !important;
    }
}
