/**
 * DotIAM Baby Names — Header (header.css)
 * Total redesign — home.css jaisi design language (rose/peach/lavender/gold).
 * Sticky header (scroll pe fixed rehta hai), dynamic mega-dropdowns.
 * Saari classes "hd-" prefix ke saath.
 */

:root {
    --hd-ink:          #262231;
    --hd-ink-soft:     #625C71;

    --hd-rose:         #E15C79;
    --hd-rose-deep:    #B93555;
    --hd-rose-tint:    #FCE9EE;
    --hd-peach:        #F3945F;
    --hd-lavender:     #8873B8;
    --hd-lavender-deep:#5F4990;
    --hd-lavender-tint:#EEE8F8;
    --hd-gold:         #CC9A35;
    --hd-gold-deep:    #96701F;

    --hd-radius-md: 14px;
    --hd-radius-lg: 20px;
    --hd-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --hd-font-display: 'Quicksand', 'Poppins', sans-serif;
    --hd-font-body:    'Poppins', sans-serif;
    --hd-height: 72px;
}

/* ================================================
   Header — sticky, scroll pe fixed rehta hai
================================================ */
.hd-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(38,34,49,0.07);
    transition: box-shadow 0.25s var(--hd-ease);
}
.hd-header.hd-scrolled { box-shadow: 0 6px 24px rgba(38,34,49,0.08); }

.hd-container { max-width: 1400px; margin: 0 auto; padding: 0 28px; }
.hd-content { display: flex; align-items: center; justify-content: space-between; height: var(--hd-height); }

/* --- Logo --- */
.hd-logo a { display: flex; align-items: center; text-decoration: none; transition: transform 0.2s var(--hd-ease); }
.hd-logo a:hover { transform: scale(1.04); }
.hd-logo img { height: 38px; display: block; }

/* ================================================
   Nav — desktop
================================================ */
.hd-nav { display: flex; align-items: center; gap: 4px; }
.hd-dropdown {
    position: relative;
    /* niche invisible hover-zone — gap ke beech mouse hover na toote isliye */
    padding-bottom: 16px; margin-bottom: -16px;
}

.hd-nav-link {
    display: inline-flex; align-items: center; gap: 4px;
    font-family: var(--hd-font-body); font-weight: 600; font-size: 14.5px;
    color: var(--hd-ink-soft); text-decoration: none;
    padding: 10px 14px; border-radius: 50px;
    transition: color 0.2s var(--hd-ease), background 0.2s var(--hd-ease);
}
.hd-nav-link:hover, .hd-dropdown:hover .hd-nav-link { color: var(--hd-rose-deep); background: var(--hd-rose-tint); }
.hd-caret { font-size: 10px; transition: transform 0.2s var(--hd-ease); opacity: 0.7; }
.hd-dropdown:hover .hd-caret { transform: rotate(180deg); }

/* --- Mega dropdown panel --- */
.hd-mega {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(4px);
    background: #fff; border-radius: var(--hd-radius-lg);
    border: 1px solid rgba(38,34,49,0.08);
    box-shadow: 0 16px 40px rgba(38,34,49,0.14);
    padding: 18px; min-width: 300px;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.18s var(--hd-ease), transform 0.18s var(--hd-ease), visibility 0.18s;
    z-index: 50;
}
.hd-dropdown:hover .hd-mega,
.hd-dropdown:focus-within .hd-mega {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.hd-mega-label {
    font-family: var(--hd-font-display); font-weight: 700; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: .04em; color: var(--hd-rose-deep);
    margin-bottom: 12px;
}
.hd-mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hd-mega-item {
    display: flex; align-items: center; justify-content: center;
    font-family: var(--hd-font-display); font-weight: 700; font-size: 15px;
    color: var(--hd-ink); text-decoration: none;
    background: var(--hd-rose-tint); border-radius: 10px; padding: 10px 6px;
    transition: background 0.2s var(--hd-ease), color 0.2s var(--hd-ease), transform 0.2s var(--hd-ease);
}
.hd-mega-item:hover { background: var(--hd-rose); color: #fff; transform: translateY(-2px); }
.hd-mega-viewall {
    display: block; text-align: center; margin-top: 14px;
    font-family: var(--hd-font-display); font-weight: 700; font-size: 13px;
    color: var(--hd-lavender-deep); text-decoration: none; padding-top: 12px;
    border-top: 1px solid rgba(38,34,49,0.08);
}
.hd-mega-viewall:hover { color: var(--hd-rose-deep); }

/* ================================================
   Mobile menu toggle (hamburger)
================================================ */
.hd-toggle {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.hd-toggle span { width: 24px; height: 2.5px; background: var(--hd-ink); border-radius: 3px; transition: transform 0.25s var(--hd-ease), opacity 0.25s var(--hd-ease); }
.hd-toggle.hd-open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hd-toggle.hd-open span:nth-child(2) { opacity: 0; }
.hd-toggle.hd-open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ================================================
   Mobile menu panel
================================================ */
.hd-mobile-menu {
    display: none; position: fixed; top: var(--hd-height); left: 0; right: 0; bottom: 0;
    background: #fff; z-index: 999; overflow-y: auto;
    max-height: 0; opacity: 0;
    transition: max-height 0.3s var(--hd-ease), opacity 0.25s var(--hd-ease);
}
.hd-mobile-menu.hd-active { display: block; max-height: calc(100vh - var(--hd-height)); opacity: 1; }
.hd-mobile-content { padding: 20px 20px 40px; display: flex; flex-direction: column; gap: 8px; }

.hd-mobile-row { border-bottom: 1px solid rgba(38,34,49,0.06); }
.hd-mobile-link {
    display: flex; align-items: center; justify-content: space-between;
    font-family: var(--hd-font-body); font-weight: 600; font-size: 16px;
    color: var(--hd-ink); text-decoration: none; padding: 15px 4px;
}
.hd-mobile-link:hover { color: var(--hd-rose-deep); }
.hd-mobile-chevron { font-size: 12px; color: var(--hd-ink-soft); transition: transform 0.2s var(--hd-ease); background: none; border: none; padding: 8px; cursor: pointer; }
.hd-mobile-row.hd-open .hd-mobile-chevron { transform: rotate(180deg); }

.hd-mobile-sub {
    display: none; flex-wrap: wrap; gap: 8px; padding: 0 4px 16px;
}
.hd-mobile-row.hd-open .hd-mobile-sub { display: flex; }
.hd-mobile-sub a {
    font-family: var(--hd-font-display); font-weight: 700; font-size: 13.5px;
    color: var(--hd-rose-deep); background: var(--hd-rose-tint);
    text-decoration: none; padding: 7px 14px; border-radius: 50px;
}
.hd-mobile-sub a:hover { background: var(--hd-rose); color: #fff; }

/* ================================================
   RESPONSIVE
================================================ */
@media (max-width: 991px) {
    .hd-nav { display: none; }
    .hd-toggle { display: flex; }
}

@media (max-width: 480px) {
    :root { --hd-height: 64px; }
    .hd-container { padding: 0 16px; }
    .hd-logo img { height: 32px; }
    .hd-mobile-content { padding: 16px 16px 32px; }
}