/* =============================================
   Navbar Split con Logo Centrado - Royal Masajes
   ============================================= */

/* ── Variables ── */
:root {
    --rm-topbar-h: 52px;
    --rm-nav-h:    80px;
    --rm-nav-h-sm: 90px;
    --rm-primary:  #cc6b8e;
    --rm-dark:     #1a1a1a;
    --rm-text:     #555;
    --rm-border:   rgba(0,0,0,0.08);
}

/* ── Ocultar navbar original del template si quedase ── */
.container-fluid.sticky-top { display: none !important; }

/* ────────────────────────────────────────
   TOPBAR — fijo en top:0, independiente
   ──────────────────────────────────────── */
.rm-topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    height: var(--rm-topbar-h);
    background: var(--rm-dark);
    display: flex;
    align-items: center;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.rm-topbar.topbar-hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.rm-topbar__inner {
    width: 100%;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Social */
.rm-topbar__social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rm-topbar__social a {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.rm-topbar__social a:hover {
    background: var(--rm-primary);
    border-color: var(--rm-primary);
    color: #fff;
}

/* Promo centro */
.rm-topbar__promo {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #ccc;
    letter-spacing: 0.5px;
    text-align: center;
    flex: 1;
}

.rm-topbar__promo i { color: var(--rm-primary); margin-right: 5px; }

/* Contacto derecha */
.rm-topbar__contact {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rm-topbar__contact span {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.rm-topbar__contact span i { color: var(--rm-primary); }

.rm-topbar__search {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.rm-topbar__search:hover {
    background: var(--rm-primary);
    border-color: var(--rm-primary);
    color: #fff;
}

/* ────────────────────────────────────────
   NAVBAR — fijo en top: var(--rm-topbar-h)
   Baja junto al topbar cuando hace scroll
   ──────────────────────────────────────── */
.rm-navbar {
    position: fixed;
    top: var(--rm-topbar-h);   /* justo debajo del topbar */
    left: 0;
    width: 100%;
    z-index: 9999;
    height: var(--rm-nav-h);
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    overflow: visible;
    transition:
        top    0.35s ease,
        height 0.35s ease,
        box-shadow 0.35s ease;
}

/* Al hacer scroll: topbar sube, navbar sube a top:0 y se compacta */
.rm-navbar.scrolled {
    top: 0;
    height: var(--rm-nav-h-sm);
    box-shadow: 0 3px 20px rgba(0,0,0,0.12);
    overflow: hidden;
}

/* ── Inner layout centrado ── */
.rm-navbar__inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

/* ── Menús laterales ── */
.rm-nav-left,
.rm-nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.rm-nav-left  { justify-content: flex-end;  padding-right: 36px; }
.rm-nav-right { justify-content: flex-start; padding-left: 36px; }

.rm-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rm-nav-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--rm-text);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    position: relative;
    transition: color 0.25s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.rm-nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--rm-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.rm-nav-link:hover,
.rm-nav-link.active { color: var(--rm-primary); text-decoration: none; }

.rm-nav-link:hover::after,
.rm-nav-link.active::after { transform: scaleX(1); }

/* ── Logo centrado ── */
.rm-nav-brand {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rm-logo-img {
    margin-top: -5rem;
    max-height: 15rem;
    width: auto;
    transform: translateY(135px);
    display: block;
    transition: max-height 0.35s ease, transform 0.35s ease, margin-top 0.35s ease;
}

.rm-navbar.scrolled .rm-logo-img {
    max-height: 85px;
    margin-top: 0;
    transform: translateY(0);
}

/* ── Dropdown ── */
.rm-dropdown { position: relative; }

.rm-dropdown-toggle .fa-chevron-down {
    font-size: 10px;
    transition: transform 0.25s ease;
}

.rm-dropdown:hover .rm-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.rm-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    min-width: 170px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 100;
}

.rm-dropdown:hover .rm-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.rm-dropdown-menu li a {
    display: block;
    padding: 9px 18px;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
    color: var(--rm-text);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}

.rm-dropdown-menu li a:hover {
    color: var(--rm-primary);
    padding-left: 24px;
}

.rm-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #fff;
}

/* ── Botón hamburguesa ── */
.rm-toggler {
    display: none;
    background: none;
    border: none;
    border-radius: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    margin-left: auto;
    padding: 0;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: none;
}

.rm-toggler-icon {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    position: relative;
}

.rm-toggler-icon span {
    display: block;
    height: 1.5px;
    min-height: 1.5px;
    background-color: black;
    border-radius: 1px;
    transition: all 0.3s ease-in-out;
}

.rm-toggler-icon .line-1 {
    width: 100%;
}
.rm-toggler-icon .line-2 {
    width: 70%;
}
.rm-toggler-icon .line-3 {
    width: 40%;
}

.rm-toggler.open .rm-toggler-icon .line-1 {
    width: 100%;
    transform: translateY(7px) rotate(45deg);
}
.rm-toggler.open .rm-toggler-icon .line-2 {
    opacity: 0;
    transform: translateX(-10px);
}
.rm-toggler.open .rm-toggler-icon .line-3 {
    width: 100%;
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Menú móvil ── */
.rm-mobile-menu {
    display: none;
    background: #fff;
    border-top: 1px solid var(--rm-border);
    padding: 12px 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    position: fixed;
    top: calc(var(--rm-topbar-h) + var(--rm-nav-h));
    left: 0;
    width: 100%;
    z-index: 9998;
    transition: top 0.35s ease;
}

.rm-mobile-menu.open { display: block; }

.rm-navbar.scrolled ~ .rm-mobile-menu,
.rm-mobile-menu.scrolled-menu {
    top: var(--rm-nav-h-sm);
}

.rm-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rm-mobile-list li a {
    display: block;
    padding: 11px 24px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--rm-text);
    text-decoration: none;
    border-bottom: 1px solid var(--rm-border);
    transition: color 0.2s, background 0.2s;
}

.rm-mobile-list li a:hover { color: var(--rm-primary); background: #fdf5f8; }

/* ── Compensar header fijo en el body ── */
body {
    padding-top: calc(var(--rm-topbar-h) + var(--rm-nav-h)) !important;
    margin-top: 0 !important;
}

/* ── Wrapper visual (solo para agrupación HTML, sin position) ── */
.rm-header-wrap {
    display: contents; /* los hijos actúan como si fueran hijos directos del body */
}

/* ────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────── */
@media (max-width: 991px) {
    :root {
        --rm-nav-h: 76px;
        --rm-nav-h-sm: 76px;
    }

    .rm-navbar { overflow: hidden; }

    .rm-nav-left,
    .rm-nav-right { display: none; }
    .rm-toggler { display: flex; align-items: center; justify-content: center; }
    .rm-nav-brand { margin-right: auto; }
    .rm-logo-img {
        width: 92px;
        height: 76px;
        max-width: 92px;
        max-height: 76px;
        margin-top: 0;
        transform: none;
        object-fit: contain;
    }
    .rm-navbar.scrolled .rm-logo-img {
        width: 92px;
        height: 76px;
        max-width: 92px;
        max-height: 76px;
        margin-top: 0;
        transform: none;
    }
    .rm-navbar__inner { justify-content: space-between; padding: 0 16px; }
    .rm-topbar__inner { padding: 0 16px; }
    .rm-topbar__promo { display: none; }
}

@media (max-width: 575px) {
    :root {
        --rm-nav-h: 70px;
        --rm-nav-h-sm: 70px;
    }

    .rm-topbar__contact span { display: none; }
    .rm-logo-img {
        width: 84px;
        height: 68px;
        max-width: 84px;
        max-height: 68px;
    }
    .rm-navbar.scrolled .rm-logo-img {
        width: 84px;
        height: 68px;
        max-width: 84px;
        max-height: 68px;
    }
    body { padding-top: calc(var(--rm-topbar-h) + var(--rm-nav-h)) !important; }
}
