/* ==========================================================================
   OFFCANVAS / SIDEBAR STYLES (GOLD STANDARD)
   Pulled from callscribe AI.html — exact parity
   ========================================================================== */

/* ---- Base resets ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

html,
body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* ============================================================
   TABLET + MOBILE  (≤ 991px)
============================================================ */
@media (max-width: 991px) {

    .container,
    .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    section {
        overflow-x: hidden !important;
    }
}

/* ============================================================
   TABLET & INTERMEDIATE DEVICES (769px - 1200px)
   (iPad Air, Pro, Surface Pro, etc.)
============================================================ */
@media (min-width: 769px) and (max-width: 1200px) {
    .banner-area {
        padding-top: 140px !important;
        padding-bottom: 80px !important;
        min-height: 85vh !important;
    }

    .banner-area .container {
        margin-top: 240px !important;
        /* Drastically push down to align with particle center on tall tablets */
    }

    .section-title {
        font-size: 52px !important;
        line-height: 1.2 !important;
    }

    .grow-with-us {
        padding-top: 60px !important;
    }

    .who-we-are {
        padding-top: 80px !important;
    }

    .tp-testimonial-two {
        padding-top: 60px !important;
    }
}

/* ============================================================
   MOBILE  (≤ 768px)
============================================================ */
@media (max-width: 768px) {

    /* ── 1. HERO ── */
    .banner-area {
        padding-top: 100px !important;
        padding-bottom: 60px !important;
        min-height: 80vh !important;
    }

    .banner-area .container {
        margin-top: 120px !important;
        /* Move overall text down */
    }

    .section-title {
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 10px !important;
    }

    #typewriter-line1 {
        display: block !important;
    }

    #typewriter-line2 {
        display: block !important;
        margin-top: -5px !important;
        /* Decrease space further */
    }

    #cursor1,
    #cursor2 {
        display: none !important;
        /* Hide cursors on mobile if they cause layout shift */
    }

    .banner-area h1.section-title {
        font-size: 32px !important;
        line-height: 1.0 !important;
        height: auto !important;
    }

    .banner-area p.fade-in-delayed {
        margin-top: 15px !important;
        /* Reduced gap between title and paragraph */
        font-size: 16px !important;
        line-height: 1.5 !important;
    }

    /* ── 6. GROW WITH US (BRAND AREA) ── */
    .grow-with-us {
        padding-top: 40px !important;
        padding-bottom: 20px !important;
    }

    .grow-with-us .section-title {
        font-size: 32px !important;
        margin-bottom: 10px !important;
    }

    .grow-with-us p {
        margin-left: 0 !important;
        text-align: center !important;
        margin-bottom: 30px !important;
        font-size: 15px !important;
    }

    .logo-marquee-wrapper {
        padding: 0 !important;
    }

    .partner-cta-box {
        margin-top: 30px !important;
        padding: 30px 20px !important;
    }

    /* ── 2. GLOBAL SECTION & HEADING OVERRIDES ── */
    section {
        overflow-x: hidden !important;
    }

    .container,
    .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
        max-width: 100% !important;
    }

    h2 {
        font-size: 24px !important;
        line-height: 1.3 !important;
        word-break: break-word;
    }

    .offcanvas__logo img {
        width: 130px !important;
    }
}

/* ============================================================
   SMALL MOBILE  (≤ 480px)
============================================================ */
@media (max-width: 480px) {
    h2 {
        font-size: 20px !important;
    }
}

/* ==========================================================================
   CUSTOM HEADER & STICKY STYLES
   ========================================================================== */
#header-sticky {
    background-color: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    box-shadow: none;
    position: relative;
    z-index: 1000;
}

#header-sticky.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#header-sticky.header-sticky .main-menu ul li a {
    color: #000;
}

@media (max-width: 1200px) {
    .tp-header-demo-btn {
        display: none !important;
    }

    .tp-header-right {
        justify-content: flex-end !important;
    }

    .offcanvas-btn.d-xl-none {
        margin-left: 0 !important;
    }
}

.hamburger-icon rect {
    fill: #333333 !important;
}

/* PREMIUM MEGA-MENU STYLES */
.has-dropdown.tp-megamenu {
    position: relative;
}

.has-dropdown.tp-megamenu::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 40px;
    background: transparent;
    z-index: 998;
}

.tp-megamenu .custom-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: white;
    width: auto;
    min-width: 900px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    margin-top: -26px;
    height: 395px;
}

.tp-megamenu:hover .custom-mega-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mega-menu-flex {
    display: flex;
    min-height: 420px;
}

.mega-menu-sidebar {
    flex: 0 0 220px;
    background: #f8f9fa;
    padding: 25px 0;
    border-right: 1px solid #eee;
}

.pane-label-top {
    padding: 0 25px 20px 25px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1.5px;
    margin-left: 8px;
}

.mega-sidebar-item {
    padding: 10px 20px;
    margin: 4px 15px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    text-transform: uppercase;
}

.mega-sidebar-item:hover,
.mega-sidebar-item.active {
    background: rgba(230, 25, 50, 0.08);
    color: #e61932;
}

.mega-content-area {
    flex: 1;
    padding: 20px 40px 40px;
    background: #fff;
    min-width: 300px;
}

.mega-content-pane {
    display: none;
    animation: megaFadeIn 0.3s ease;
}

.mega-content-pane.active {
    display: block;
}

.mega-content-title {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.mega-content-divider {
    border: 0;
    border-top: 2px solid #d1d1d1;
    height: 0;
    margin: 15px 0 20px;
    width: 100%;
    display: block;
}

.mega-solution-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 320px;
    overflow-y: auto;
}

.mega-solution-link {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    padding: 4px 0;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.mega-solution-link:hover {
    color: #e61932;
    transform: translateX(5px);
}

@keyframes megaFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* OFFCANVAS MOBILE MENU STYLES */
.offcanvas__area {
    position: fixed;
    right: -100%;
    top: 0;
    width: 320px;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: right 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.offcanvas__area.opened,
.offcanvas__area.offcanvas-opened {
    right: 0;
}

.offcanvas__menu ul li.has-children>a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.offcanvas__wrapper {
    padding: 30px;
    position: relative;
}

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

.mobile-menu-item {
    border-bottom: 1px solid #eee;
}

.toggle-menu,
.toggle-submenu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    font-weight: 700;
    color: #333;
    cursor: pointer;
}

.sub-menu,
.inner-submenu {
    display: none;
    list-style: none;
    padding: 0;
    background: #fdfdfd;
}

.sub-menu.active,
.inner-submenu.active {
    display: block;
}

.sub-menu li,
.inner-submenu li {
    border-bottom: 1px solid #f0f0f0;
}

.sub-menu li a,
.offcanvas__menu ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.toggle-menu.active {
    color: #e61932 !important;
    background: #fff5f6 !important;
}

.offcanvas-close-btn {
    background: #e61932 !important;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(230, 25, 50, 0.3);
    transition: all 0.3s ease;
}

.offcanvas-close-btn:hover {
    transform: rotate(90deg);
    background: #cc162b !important;
}

.mobile-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 40px;
    padding-top: 20px;
    justify-content: center;
}

.offcanvas__social {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: none !important;
    /* Forces removal of the horizontal line */
    padding-bottom: 0 !important;
}

.offcanvas__social a {
    width: 35px !important;
    height: 35px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    border: none !important;
    border-radius: 4px !important;
    transition: 0.3s !important;
    box-shadow: none !important;
}

.social-icon-circle:hover {
    background: #e61932;
    border-color: #e61932;
    color: #fff;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.toggle-menu.active .toggle-icon,
.toggle-submenu.active .toggle-icon {
    transform: rotate(180deg);
}

.body-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 99;
}

.body-overlay.opened {
    opacity: 1;
    visibility: visible;
}