/* =====================================================
   RR PHYSIOTHERAPY HEADER
   HEADER.CSS
===================================================== */


/* =====================================================
   VARIABLES
===================================================== */

:root {
    --rr-primary: #8F6E6E;
    --rr-primary-light: #B99C9C;
    --rr-dark: #161616;
    --rr-text: #444444;
    --rr-white: #ffffff;
    --rr-light: #F8F8F8;
    --rr-border: #EAEAEA;
}


/* =====================================================
   CONTAINER
===================================================== */

.rr-container {
    width: min(100% - 80px, 1540px);
    margin: 0 auto;
}


/* =====================================================
   MAIN HEADER
===================================================== */

.rr-header {
    width: 100%;
    position: relative;
    z-index: 9999;
    background: var(--rr-white);
}


/* =====================================================
   TOP ANNOUNCEMENT BAR
===================================================== */

.rr-topbar {
    width: 100%;
    background: var(--rr-dark);
    color: var(--rr-white);
    height: 40px;

    display: flex;
    align-items: center;
}

.rr-topbar p {
    margin: 0;
    padding: 0;

    /* font-family: "Poppins", sans-serif; */
    font-size: 13px;
    font-weight: 400;

}


/* =====================================================
   MAIN NAVBAR
===================================================== */

.rr-navbar {
    width: 100%;
    height: 90px;

    background: var(--rr-white);

    border-bottom: 1px solid var(--rr-border);

    display: flex;
    align-items: center;

    transition:
        box-shadow 0.3s ease,
        height 0.3s ease;
}


/* =====================================================
   NAVBAR INNER
===================================================== */

.rr-navbar-inner {
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =====================================================
   LOGO
===================================================== */

.rr-logo {
    display: flex;
    align-items: center;

    text-decoration: none;

    flex-shrink: 0;
}

.rr-logo img {
    width: 185px;
    height: 51px;

    display: block;

    object-fit: contain;

    transition: width 0.3s ease;
}


/* =====================================================
   NAVIGATION
===================================================== */

.rr-nav {
    display: flex;
    align-items: center;

    gap: 34px;

    margin-left: auto;
}


/* =====================================================
   NAV LINKS
===================================================== */

.rr-nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 34px 0;

    color: var(--rr-dark);

    /* font-family: "Poppins", sans-serif; */

    font-size: 14px;
    font-weight: 500;

    text-decoration: none;

    transition: color 0.3s ease;
}


/* Underline */

.rr-nav-link::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 23px;

    width: 0;
    height: 2px;

    background:radial-gradient(
            circle at 85% 15%,
            rgba(101, 198, 183, 0.16),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #0A3539 0%,
            #124E52 58%,
            #176761 100%
        );

    transition: width 0.3s ease;
}


/* Hover */

.rr-nav-link:hover {
    color: var(--rr-primary);
}

.rr-nav-link:hover::after {
    width: 100%;
}


/* =====================================================
   DROPDOWN ARROW
===================================================== */

.rr-dropdown-toggle i {
    font-size: 11px;

    transition: transform 0.3s ease;
}


/* =====================================================
   DROPDOWN
===================================================== */

.rr-dropdown {
    position: relative;
}


/* Dropdown Menu */

.rr-dropdown-menu {
    position: absolute;

    top: calc(100% - 5px);
    left: -20px;

    width: 250px;

    padding: 12px 0;

    background: var(--rr-white);

    border: 1px solid var(--rr-border);

    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;

    z-index: 10000;
}


/* Dropdown Links */

.rr-dropdown-menu a {
    display: block;

    padding: 11px 20px;

    color: var(--rr-text);

    /* font-family: "Poppins", sans-serif; */

    font-size: 13px;

    text-decoration: none;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}


.rr-dropdown-menu a:hover {
    background: var(--rr-light);

    color: var(--rr-primary);
}


/* Show Dropdown */

.rr-dropdown:hover .rr-dropdown-menu {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);
}


.rr-dropdown:hover .rr-dropdown-toggle i {
    transform: rotate(180deg);
}


/* =====================================================
   APPOINTMENT BUTTON
===================================================== */

.rr-appointment-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 8px;

    min-height: 44px;

    padding: 0 22px;

    background:radial-gradient(
            circle at 85% 15%,
            rgba(101, 198, 183, 0.16),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #0A3539 0%,
            #124E52 58%,
            #176761 100%
        );

    color: var(--rr-white);

    /* font-family: "Poppins", sans-serif; */

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}


.rr-appointment-btn:hover {
    background: var(--rr-dark);

    color: var(--rr-white);

    transform: translateY(-2px);
}


/* =====================================================
   MOBILE MENU BUTTON
===================================================== */

.rr-menu-btn {
    display: none;

    width: 44px;
    height: 44px;

    padding: 8px;

    background: transparent;

    border: 0;

    cursor: pointer;
}


.rr-menu-btn span {
    display: block;

    width: 26px;
    height: 2px;

    margin: 5px auto;

    background: var(--rr-dark);

    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}


/* =====================================================
   STICKY HEADER
===================================================== */

/*
   This class is added automatically by JavaScript
   after the user starts scrolling.
*/

.rr-header.is-sticky {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    width: 100%;

    background: var(--rr-white);

    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);

    animation: rrHeaderSlideDown 0.35s ease;
}


/* Sticky Animation */

@keyframes rrHeaderSlideDown {

    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }

}


/* =====================================================
   STICKY NAVBAR
===================================================== */

.rr-header.is-sticky .rr-navbar {
    height: 78px;
}


/* Smaller logo when sticky */

.rr-header.is-sticky .rr-logo img {
    width: 150px;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 1100px) {

    .rr-container {
        width: min(100% - 40px, 1540px);
    }


    .rr-nav {
        gap: 20px;
    }


    .rr-appointment-btn {
        padding: 0 16px;
    }

}


/* =====================================================
   TABLET / MOBILE
===================================================== */

@media (max-width: 900px) {

    .rr-container {
        width: min(100% - 30px, 1540px);
    }


    .rr-navbar {
        height: 75px;
    }


    /* Hide Desktop Navigation */

    .rr-nav {
        position: absolute;

        top: 100%;

        left: 0;
        right: 0;

        width: 100%;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 0;

        margin: 0;

        padding: 15px 30px 25px;

        background: var(--rr-white);

        border-top: 1px solid var(--rr-border);

        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);

        opacity: 0;
        visibility: hidden;

        transform: translateY(-10px);

        transition:
            opacity 0.3s ease,
            visibility 0.3s ease,
            transform 0.3s ease;
    }


    /* Open Mobile Menu */

    .rr-nav.rr-nav-open {
        opacity: 1;

        visibility: visible;

        transform: translateY(0);
    }


    .rr-nav-link {
        width: 100%;

        padding: 15px 0;

        border-bottom: 1px solid var(--rr-border);
    }


    .rr-nav-link::after {
        display: none;
    }


    /* Dropdown */

    .rr-dropdown {
        width: 100%;
    }


    .rr-dropdown-menu {
        position: static;

        width: 100%;

        padding: 0;

        border: 0;

        box-shadow: none;

        opacity: 1;

        visibility: visible;

        transform: none;

        display: none;
    }


    .rr-dropdown.rr-dropdown-open .rr-dropdown-menu {
        display: block;
    }


    .rr-dropdown-menu a {
        padding: 10px 15px;

        background: var(--rr-light);

        border-bottom: 1px solid var(--rr-border);
    }


    /* Appointment */

    .rr-appointment-btn {
        display: none;
    }


    /* Menu Button */

    .rr-menu-btn {
        display: block;
    }


    /* Logo */

    .rr-logo img {
        width: 145px;
    }


    /* Sticky */

    .rr-header.is-sticky .rr-navbar {
        height: 70px;
    }

    .rr-header.is-sticky .rr-logo img {
        width: 135px;
    }

}


/* =====================================================
   SMALL MOBILE
===================================================== */

@media (max-width: 575px) {

    .rr-container {
        width: calc(100% - 30px);
    }


    .rr-topbar {
        height: 35px;
    }


    .rr-topbar p {
        font-size: 10px;

        white-space: nowrap;

        overflow: hidden;

        text-overflow: ellipsis;
    }


    .rr-navbar {
        height: 68px;
    }


    .rr-logo img {
        width: 130px;
    }


    .rr-nav {
        padding-left: 20px;
        padding-right: 20px;
    }


    .rr-header.is-sticky .rr-navbar {
        height: 65px;
    }

}

.rr-header {
    position: sticky;
    top: 0;
    left: 0;

    width: 100%;

    z-index: 9999;

    background: #ffffff;

    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ==========================================
   RR PHYSIOTHERAPY - MOBILE MENU FIX
========================================== */

/* Hamburger button: hidden on desktop */

.rr-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;

    width: 42px;
    height: 42px;
    padding: 10px;

    border: none;
    border-radius: 8px;
    background: transparent;

    cursor: pointer;
    flex-shrink: 0;
    z-index: 10002;
}

.rr-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;

    border-radius: 4px;
    background: #183c3e;

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

/* ==========================================
   MOBILE NAVIGATION
========================================== */

@media screen and (max-width: 768px) {

    /* Navbar layout */

    .rr-navbar-inner {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 10px;
    }

    /* Logo */

    .rr-logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .rr-logo img {
        max-width: 110px;
        height: auto;
        display: block;
    }

    /* Hide appointment button on small screens */

    .rr-navbar-inner > .rr-appointment-btn {
        display: none;
    }

    /* Show hamburger */

    .rr-menu-btn {
        display: flex;
        margin-left: auto;
    }

    /* Mobile navigation dropdown */

    .rr-navbar-inner > .rr-nav {
        display: none;

        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        width: 100%;
        max-height: calc(100vh - 75px);
        overflow-y: auto;

        padding: 10px 16px 16px;

        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;

        background: #ffffff;

        border-top: 1px solid #e9eeee;
        border-radius: 0 0 12px 12px;

        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);

        z-index: 10001;
    }

    /* Display menu when JavaScript adds class */

    .rr-navbar-inner > .rr-nav.rr-nav-open {
        display: flex !important;
    }

    /* Navigation links */

    .rr-navbar-inner > .rr-nav > .rr-nav-link,
    .rr-navbar-inner > .rr-nav > .rr-dropdown > .rr-nav-link {
        display: flex;
        align-items: center;

        width: 100%;
        min-height: 46px;
        padding: 12px 10px;

        color: #183c3e;
        font-size: 14px;
        font-weight: 500;

        text-decoration: none;
        border-bottom: 1px solid #edf1f1;
    }

    /* Services dropdown wrapper */

    .rr-navbar-inner > .rr-nav > .rr-dropdown {
        display: block;
        width: 100%;
    }

    /* Remove the final border */

    .rr-navbar-inner > .rr-nav > .rr-nav-link:last-child {
        border-bottom: none;
    }

    /* Link hover */

    .rr-navbar-inner > .rr-nav > .rr-nav-link:hover,
    .rr-navbar-inner > .rr-nav > .rr-dropdown > .rr-nav-link:hover {
        color: #087c7c;
        background: #f3f9f8;
    }

    /* Hamburger transforms into X */
/* ==========================================
   PREMIUM HAMBURGER TO CLOSE ANIMATION
========================================== */

@media screen and (max-width: 768px) {

    .rr-navbar-inner .rr-menu-btn {
        gap: 6px !important;
    }

    .rr-navbar-inner .rr-menu-btn span {
        width: 22px !important;
        height: 2px !important;
        border-radius: 3px !important;

        transform-origin: center;
        transition:
            transform 0.25s ease,
            opacity 0.2s ease;
    }

    /* First line */

    .rr-navbar-inner .rr-menu-btn.rr-menu-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
    }

    /* Middle line */

    .rr-navbar-inner .rr-menu-btn.rr-menu-active span:nth-child(2) {
        opacity: 0 !important;
    }

    /* Third line */

    .rr-navbar-inner .rr-menu-btn.rr-menu-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg) !important;
    }
    }
}
/* Smaller phones */

@media screen and (max-width: 380px) {

    .rr-navbar-inner {
        gap: 6px;
    }

    .rr-logo img {
        max-width: 100px;
    }

    .rr-menu-btn {
        width: 38px;
        height: 38px;
    }
}

/* Accessibility */

.rr-menu-btn:focus-visible {
    outline: 2px solid #168080;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .rr-menu-btn span {
        transition: none;
    }
}


/* ==========================================
   FIX: MOBILE HAMBURGER ICON VISIBILITY
========================================== */

@media screen and (max-width: 768px) {

    .rr-navbar-inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative;
    }

    /* Make hamburger visible on mobile */

    .rr-navbar-inner .rr-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;

        align-items: center !important;
        justify-content: center !important;
        flex-direction: column !important;

        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        flex-shrink: 0 !important;

        margin-left: auto !important;
        padding: 10px !important;

        position: relative !important;
        z-index: 10010 !important;

        background: #ffffff !important;
        border: none !important;
        border-radius: 6px !important;

        cursor: pointer !important;
    }

    /* Hamburger lines */

    .rr-navbar-inner .rr-menu-btn span {
        display: block !important;

        width: 22px !important;
        min-width: 22px !important;
        height: 2px !important;

        margin: 0 !important;
        padding: 0 !important;

        background-color: #183c3e !important;
        border-radius: 4px !important;

        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Hide appointment button on mobile */

    .rr-navbar-inner > .rr-appointment-btn {
        display: none !important;
    }

    /* Keep logo visible */

    .rr-navbar-inner .rr-logo {
        display: flex !important;
        align-items: center;
        flex-shrink: 1;
        min-width: 0;
    }

    .rr-navbar-inner .rr-logo img {
        display: block;
        max-width: 110px;
        height: auto;
    }
}


/* ========================================
   RR PHYSIOTHERAPY ACTIVE NAVIGATION
======================================== */

/* Navigation links */
.rr-nav .rr-nav-link {
    position: relative;
    display: inline-block;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Hover color */
.rr-nav .rr-nav-link:hover {
    color: #495c89;
}

/* Active page */
.rr-nav .rr-nav-link.active {
    color: #495c89 !important;
    font-weight: 600;
}

/* Underline effect */
.rr-nav .rr-nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 3px;
    width: 0;
    height: 2px;
    background-color: #495c89;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Hover underline */
.rr-nav .rr-nav-link:hover::after {
    width: 100%;
}

/* Active underline */
.rr-nav .rr-nav-link.active::after {
    width: 100%;
}

/* Keep active link highlighted on hover */
.rr-nav .rr-nav-link.active:hover {
    color: #495c89 !important;
}

/* Header layout */
.rr-navbar {
    width: 100%;
    background-color: #ffffff;
    position: relative;
    z-index: 1000;
}

.rr-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 110px;
    gap: 30px;
}

/* Logo */
.rr-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.rr-logo img {
    display: block;
    width: 145px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin-left: 30px;
}

/* Navigation */
.rr-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-left: auto;
}

/* Appointment button */
.rr-appointment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    white-space: nowrap;
}

/* =====================================
   FIX ACTIVE NAVIGATION UNDERLINE
===================================== */

.rr-nav .rr-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 0;
    line-height: 1.4;
    text-decoration: none;
}

/* Active link color */
.rr-nav .rr-nav-link.active {
    color: #17645f !important;
    font-weight: 600;
}

/* Underline positioning */
.rr-nav .rr-nav-link::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;

    /* Adjust this value to move the line */
    bottom: 0;

    width: 100%;
    height: 2px;

    background-color: #17645f;
    border-radius: 2px;

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.25s ease;
}

/* Hover effect */
.rr-nav .rr-nav-link:hover::after {
    transform: scaleX(1);
}

/* Active page underline */
.rr-nav .rr-nav-link.active::after {
    transform: scaleX(1);
}