/* Extracted from keystoneapp/templates/base/base.html */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.site-wrapper {
    overflow-x: hidden;
}

/* Announcement Banner Styles */

        .announcements-wrapper {

            position: relative;

            z-index: 1000;

        }

        

        .announcement-banner {

            padding: 12px 0;

            color: white;

            font-size: 0.95rem;

        }

        

        .announcement-banner .container {

            max-width: 1200px;

            margin: 0 auto;

            padding: 0 15px;

        }

        

        .announcement-content {

            display: flex;

            align-items: center;

            gap: 15px;

        }

        

        .announcement-icon {

            font-size: 1.25rem;

            flex-shrink: 0;

        }

        

        .announcement-text {

            flex: 1;

            display: flex;

            flex-wrap: wrap;

            align-items: center;

            gap: 8px;

        }

        

        .announcement-text strong {

            margin-right: 8px;

        }

        

        .announcement-message {

            opacity: 0.95;

        }

        

        .announcement-link {

            color: white;

            text-decoration: underline;

            font-weight: 500;

            margin-left: 10px;

        }

        

        .announcement-link:hover {

            opacity: 0.8;

        }

        

        .announcement-close {

            background: rgba(255,255,255,0.2);

            border: none;

            color: white;

            width: 28px;

            height: 28px;

            border-radius: 50%;

            cursor: pointer;

            display: flex;

            align-items: center;

            justify-content: center;

            flex-shrink: 0;

            transition: background 0.2s;

        }

        

        .announcement-close:hover {

            background: rgba(255,255,255,0.3);

        }

        

        /* Announcement Types */

        .announcement-info { background: linear-gradient(90deg, #3b82f6, #2563eb); }

        .announcement-warning { background: linear-gradient(90deg, #f59e0b, #d97706); }

        .announcement-success { background: linear-gradient(90deg, #10b981, #059669); }

        .announcement-danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

        .announcement-maintenance { background: linear-gradient(90deg, #f59e0b, #d97706); }

        .announcement-update { background: linear-gradient(90deg, #8b5cf6, #7c3aed); }

        .announcement-promo { background: linear-gradient(90deg, #ec4899, #db2777); }

        

        /* Floating Announcement */

        .announcement-floating {

            position: fixed;

            bottom: 20px;

            right: 20px;

            max-width: 350px;

            background: white;

            border-radius: 12px;

            box-shadow: 0 10px 40px rgba(0,0,0,0.15);

            padding: 20px;

            z-index: 9999;

            animation: slideInRight 0.5s ease;

        }

        

        @keyframes slideInRight {

            from { transform: translateX(100%); opacity: 0; }

            to { transform: translateX(0); opacity: 1; }

        }

        

        .announcement-floating .floating-icon {

            width: 48px;

            height: 48px;

            border-radius: 50%;

            display: flex;

            align-items: center;

            justify-content: center;

            color: white;

            font-size: 1.25rem;

            margin-bottom: 12px;

        }

        

        .announcement-floating.announcement-info .floating-icon { background: #3b82f6; }

        .announcement-floating.announcement-warning .floating-icon { background: #f59e0b; }

        .announcement-floating.announcement-success .floating-icon { background: #10b981; }

        .announcement-floating.announcement-danger .floating-icon { background: #ef4444; }

        .announcement-floating.announcement-maintenance .floating-icon { background: #f59e0b; }

        .announcement-floating.announcement-update .floating-icon { background: #8b5cf6; }

        .announcement-floating.announcement-promo .floating-icon { background: #ec4899; }

        

        .floating-content strong {

            display: block;

            font-size: 1.1rem;

            color: #1e293b;

            margin-bottom: 8px;

        }

        

        .floating-content p {

            color: #64748b;

            font-size: 0.9rem;

            margin-bottom: 12px;

            line-height: 1.5;

        }

        

        .floating-link {

            color: #3b82f6;

            font-weight: 500;

            text-decoration: none;

        }

        

        .floating-link:hover {

            text-decoration: underline;

        }

        

        .floating-close {

            position: absolute;

            top: 10px;

            right: 10px;

            background: #f1f5f9;

            border: none;

            width: 28px;

            height: 28px;

            border-radius: 50%;

            cursor: pointer;

            color: #64748b;

            display: flex;

            align-items: center;

            justify-content: center;

        }

        

        .floating-close:hover {

            background: #e2e8f0;

        }

        

        /* Modal Announcement */

        .announcement-modal-overlay {

            position: fixed;

            top: 0;

            left: 0;

            right: 0;

            bottom: 0;

            background: rgba(0,0,0,0.6);

            display: flex;

            align-items: center;

            justify-content: center;

            z-index: 99999;

            padding: 20px;

            animation: fadeIn 0.3s ease;

        }

        

        @keyframes fadeIn {

            from { opacity: 0; }

            to { opacity: 1; }

        }

        

        .announcement-modal {

            background: white;

            border-radius: 16px;

            max-width: 480px;

            width: 100%;

            overflow: hidden;

            animation: scaleIn 0.3s ease;

        }

        

        @keyframes scaleIn {

            from { transform: scale(0.9); opacity: 0; }

            to { transform: scale(1); opacity: 1; }

        }

        

        .announcement-modal .modal-header {

            padding: 24px 24px 16px;

            text-align: center;

            position: relative;

        }

        

        .announcement-modal .modal-icon {

            width: 64px;

            height: 64px;

            border-radius: 50%;

            display: flex;

            align-items: center;

            justify-content: center;

            color: white;

            font-size: 1.75rem;

            margin: 0 auto 16px;

        }

        

        .announcement-modal.announcement-info .modal-icon { background: #3b82f6; }

        .announcement-modal.announcement-warning .modal-icon { background: #f59e0b; }

        .announcement-modal.announcement-success .modal-icon { background: #10b981; }

        .announcement-modal.announcement-danger .modal-icon { background: #ef4444; }

        .announcement-modal.announcement-maintenance .modal-icon { background: #f59e0b; }

        .announcement-modal.announcement-update .modal-icon { background: #8b5cf6; }

        .announcement-modal.announcement-promo .modal-icon { background: #ec4899; }

        

        .announcement-modal .modal-header h3 {

            margin: 0;

            color: #1e293b;

            font-size: 1.5rem;

            font-weight: 600;

        }

        

        .announcement-modal .modal-close {

            position: absolute;

            top: 16px;

            right: 16px;

            background: #f1f5f9;

            border: none;

            width: 32px;

            height: 32px;

            border-radius: 50%;

            cursor: pointer;

            color: #64748b;

            display: flex;

            align-items: center;

            justify-content: center;

        }

        

        .announcement-modal .modal-close:hover {

            background: #e2e8f0;

        }

        

        .announcement-modal .modal-body {

            padding: 0 24px 24px;

            color: #475569;

            line-height: 1.6;

            text-align: center;

        }

        

        .announcement-modal .modal-footer {

            padding: 16px 24px 24px;

            display: flex;

            gap: 12px;

            justify-content: center;

        }

        

        .announcement-modal .modal-btn {

            padding: 12px 24px;

            border-radius: 8px;

            font-weight: 500;

            cursor: pointer;

            text-decoration: none;

            display: inline-block;

            border: none;

            font-size: 0.95rem;

        }

        

        .announcement-modal .modal-btn.primary {

            background: #3b82f6;

            color: white;

        }

        

        .announcement-modal .modal-btn.primary:hover {

            background: #2563eb;

        }

        

        .announcement-modal .modal-btn.secondary {

            background: #f1f5f9;

            color: #475569;

        }

        

        .announcement-modal .modal-btn.secondary:hover {

            background: #e2e8f0;

        }

        

        /* Responsive */

        @media (max-width: 768px) {

            .announcement-content {

                flex-direction: column;

                text-align: center;

                gap: 10px;

            }

            

            .announcement-text {

                justify-content: center;

            }

            

            .announcement-floating {

                left: 20px;

                right: 20px;

                max-width: none;

            }

        }

        

        /* Hidden state for dismissed announcements */

        .announcement-hidden {

            display: none !important;

        }

/* Shared navbar and mega-menu rules moved from base.html */
/* Fix for mega menu disappearing too fast */
    @media (min-width: 992px) {
        /* Ensure dropdown stays visible during transition */
        .nav-item.dropdown.position-static .mega-menu-custom {
            margin-top: 0 !important;
            padding-top: 15px;
        }
        
        /* Create invisible bridge between nav link and dropdown */
        .nav-item.dropdown.position-static::after {
            content: "";
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            height: 20px;
            background: transparent;
        }
        
        /* Keep dropdown visible while hovering anywhere in nav-item */
        .nav-item.dropdown.position-static:hover > .mega-menu-custom,
        .nav-item.dropdown.position-static:focus-within > .mega-menu-custom {
            display: block !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        
        /* Ensure mega menu has proper z-index */
        .mega-menu-custom {
            z-index: 1050;
        }
    }

    .navbar-main .nav-link-primary {
        color: rgba(255, 255, 255, 0.92) !important;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .navbar-main .navbar-brand {
        min-width: 0;
        max-width: 340px;
        flex: 0 1 auto;
        margin-right: 0.75rem !important;
        font-weight: 700 !important;
    }

    .navbar-main .navbar-logo-img {
        display: block !important;
        width: 44px !important;
        height: 44px !important;
        max-height: 44px !important;
        min-width: 44px;
        object-fit: contain;
        flex-shrink: 0;
        visibility: visible;
        opacity: 1;
    }

    .navbar-main .navbar-brand-text {
        display: inline-block;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1.15rem !important;
        font-weight: 700 !important;
        letter-spacing: 0 !important;
        line-height: 1.35;
        padding-bottom: 2px;
        color: #fff !important;
    }

    .navbar-main .navbar-brand-text-white {
        color: #fff !important;
        font-weight: 700 !important;
    }

    .navbar-main .navbar-quote-btn {
        background: transparent !important;
        border: 0 !important;
        color: rgba(255, 255, 255, 0.92) !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .navbar-main .navbar-quote-btn:hover,
    .navbar-main .navbar-quote-btn:focus {
        color: var(--theme-accent, #30cfd0) !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .navbar-main .nav-link-primary:hover,
    .navbar-main .nav-link-primary:focus {
        color: var(--theme-accent, #30cfd0) !important;
    }

    .navbar-main .nav-link-primary > i,
    .navbar-main .btn-contact-cta > i,
    .navbar-main .dropdown-menu .dropdown-item > i,
    .service-menu-title > i,
    .service-menu-heading span > i {
        width: 1.25rem;
        min-width: 1.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 0 !important;
        line-height: 1;
        text-align: center;
    }

    .navbar-main .dropdown-toggle::after {
        align-self: center;
        margin-left: 0.2rem;
        vertical-align: middle;
    }

    .navbar-main .dropdown-menu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .services-mega-menu {
        width: min(760px, calc(100vw - 32px));
        background: #232526;
        border-radius: 16px !important;
    }

    .service-menu-title,
    .service-menu-heading {
        color: #30cfd0;
        font-size: 0.95rem;
        font-weight: 700;
        letter-spacing: 0;
    }

    .service-menu-title i,
    .service-menu-heading i {
        color: #f7971e;
    }

    .service-menu-column {
        min-width: 0;
    }

    .service-menu-list .dropdown-item {
        white-space: normal;
        line-height: 1.35;
        padding: 8px 10px;
        display: block;
    }

    .services-menu-footer {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .services-menu-footer a {
        color: #fff;
        font-weight: 700;
    }

    .services-menu-footer a:hover {
        color: #30cfd0;
    }

    @media (max-width: 991.98px) {
        .navbar-main .container-fluid {
            padding-left: 14px !important;
            padding-right: 14px !important;
        }

        .navbar-main .navbar-brand {
            max-width: calc(100% - 62px);
            margin-right: 0.25rem !important;
        }

        .navbar-main .navbar-logo-img {
            width: 40px !important;
            height: 40px !important;
            max-height: 40px !important;
            min-width: 40px;
        }

        .navbar-main .navbar-brand-text {
            font-size: 1rem !important;
            letter-spacing: 0 !important;
            line-height: 1.4;
            padding-bottom: 2px;
        }

        .services-mega-menu {
            width: 100% !important;
            border-radius: 0 !important;
        }

        .service-menu-column {
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
            flex: 0 0 100% !important;
            max-width: 100% !important;
            width: 100% !important;
        }

        .service-menu-heading {
            width: 100%;
            display: grid;
            grid-template-columns: max-content 1.25rem;
            align-items: center;
            justify-content: start;
            gap: 12px;
            padding: 14px 18px;
            background: transparent;
            border: 0;
            color: #fff;
            text-align: left;
        }

        .service-menu-heading span {
            display: grid;
            grid-template-columns: 1.25rem max-content;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
        }

        .service-menu-heading span i {
            justify-self: center;
        }

        .navbar-main #mainNavbar .navbar-nav {
            align-items: stretch !important;
        }

        .navbar-main #mainNavbar .nav-item {
            width: 100%;
        }

        .navbar-main #mainNavbar .nav-link-primary,
        .navbar-main #mainNavbar .btn-contact-cta {
            width: 100%;
            display: flex !important;
            align-items: center;
            justify-content: flex-start;
            gap: 0.6rem;
            min-height: 48px;
            text-align: left;
        }

        .navbar-main #mainNavbar .nav-item.ms-lg-3 {
            padding-left: 16px;
            padding-right: 16px;
        }

        .navbar-main #mainNavbar .dropdown-toggle::after {
            margin-left: auto !important;
            margin-top: 0 !important;
            float: none !important;
        }

        .navbar-main #mainNavbar .dropdown-menu .dropdown-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            min-height: 44px;
        }

        .service-menu-heading .bi-chevron-down {
            width: 1.25rem;
            min-width: 1.25rem;
            margin-left: 0;
            justify-self: start;
            transition: transform 0.2s ease;
        }

        .service-menu-heading[aria-expanded="true"] .bi-chevron-down {
            transform: rotate(180deg);
        }

        .service-menu-list .dropdown-item {
            display: block !important;
            padding-left: 34px !important;
        }

        .services-menu-footer {
            padding: 14px 18px;
        }
    }

    @media (min-width: 992px) and (max-width: 1199.98px) {
        .navbar-main .navbar-brand {
            max-width: 270px;
        }

        .navbar-main .navbar-brand-text {
            font-size: 1rem !important;
            line-height: 1.4;
        }

        .navbar-main .navbar-logo-img {
            width: 38px !important;
            height: 38px !important;
            max-height: 38px !important;
            min-width: 38px;
        }

        .navbar-main .nav-link-primary {
            font-size: 0.92rem;
            padding-left: 0.5rem !important;
            padding-right: 0.5rem !important;
        }

    }

    @media (max-width: 380px) {
        .navbar-main .navbar-brand-text-white {
            display: none;
        }
    }
