/* Navigation trigger button */
        .nav-trigger {
            top: 20px;
            left: 0;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.2s ease;
            width: fit-content;
            color: #54595F;
            font-weight: 600;
        }

        .nav-trigger:hover {
            transform: scale(1.025);
            color: #54595F;
        }

        /* Animated hamburger when panel is open */
        .nav-trigger.activated .hamburger span:nth-child(1) {
            transform: rotate(45deg);
            top: 8px;
        }

        .nav-trigger.activated .hamburger span:nth-child(2) {
            opacity: 0;
        }

        .nav-trigger.activated .hamburger span:nth-child(3) {
            transform: rotate(-45deg);
            top: 8px;
        }

        /* Navigation panel - Desktop default */
        .nav-panel {
            position: fixed;
            z-index: 9999;
            top: 0;
            left: -100%;
            width: 62.5%;
            height: 100vh;
            background: rgba(255, 255, 255, 0.95);
            border-right: 1px solid rgba(255, 255, 255, 0.3);
            transition: left 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        }

        .nav-panel.expanded {
            left: 0;
        }

        /* Panel header with close button */
        .panel-header {
            position: absolute;
            top: 0;
            right: 0;
            display: flex;
            align-items: center;
            gap: 12px;
            padding-right: 16px;
            padding-top: 8px;
            z-index: 10;
        }

        .panel-title {
            color: #333;
            font-size: 18px;
            font-weight: 600;
            margin: 0;
        }

        /* Close button inside panel */
        .panel-dismiss {
            border: 1px solid white;
            border-radius: 100%;
            padding: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            background: white;
        }

        .panel-dismiss:hover {
            background: #6EC1E4;
            color: white;
        }

        .dismiss-icon {
            width: 12px;
            height: 12px;
            position: relative;
        }

        .dismiss-icon::before,
        .dismiss-icon::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 16px;
            height: 2px;
            background: #333;
            border-radius: 1px;
            transition: all 0.3s ease;
        }

        .dismiss-icon::before {
            transform: translate(-50%, -50%) rotate(45deg);
        }

        .dismiss-icon::after {
            transform: translate(-50%, -50%) rotate(-45deg);
        }

        /* Content frame container */
        .content-frame {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            height: 100vh;
            background-color: white;
        }
        
        .content-frame iframe {
            width: 100%;
            height: 100%;
            border: none;
            /* Prevent iframe from being refreshed */
            pointer-events: auto;
        }

        /* Prevent iframe reload issues */
        .nav-panel.expanded .content-frame iframe {
            /* Ensure iframe stays stable when panel is open */
            position: absolute;
            top: 0;
            left: 0;
        }

        /* Mobile styles */
        @media screen and (max-width: 768px) {
            .content-frame iframe{
                top: 0;
                height: 85%; /* Adjusted height for tablets */
            }
        }

        @media screen and (max-width: 480px) {
            .content-frame iframe{
                top: 0;
                height: 85%; /* Smaller height for mobile phones */
            }
        }

        /* Very small screens */
        @media screen and (max-width: 320px) {
            .content-frame iframe{
                top: 0;
                height: 90%; /* Even smaller for very small screens */
            }
        }
        
        .nav-panel.fullwidth {
            width: 100% !important;
            transition: all 0.3s ease-in-out;
            background: white !important;
        }

        /* Ensure panel header stays white when expanded */
        .nav-panel.fullwidth .panel-header {
            background: white !important;
        }

        /* Ensure buttons stay white when panel is expanded */
        .nav-panel.fullwidth .panel-dismiss {
            background: white !important;
            border: 1px solid #ddd;
        }

        .nav-panel.fullwidth .panel-dismiss:hover {
            background: #6EC1E4 !important;
            color: white;
        }

        /* Hide chatbar when panel is open */
        #lor_chatbar {
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

        .panel-active #lor_chatbar {
            opacity: 0;
            visibility: hidden;
        }

        /* Responsive design */
        /* Tablet devices (768px to 1024px) */
        @media (max-width: 1024px) and (min-width: 769px) {
            .nav-panel {
                width: 100%;
            }
        }

        /* Mobile devices (768px and below) */
        @media (max-width: 768px) {
            .nav-panel {
                width: 100%;
            }

            .panel-title {
                font-size: 16px;
            }
        }