/* ============================================================
   OCS Mega Menu Navigation — Premium Design System (CCS Palette)
   Package: OCS Elementor Extensions
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700;800&display=swap');

.ocs-mega-nav-wrapper *,
.ocs-mega-nav-wrapper *::before,
.ocs-mega-nav-wrapper *::after {
    box-sizing: border-box;
}

.ocs-mega-nav-wrapper {
    --ocs-accent:       #e02020;
    --ocs-accent-hover: #c81818;
    --ocs-accent-light: #fff0f0;
    --ocs-header-bg:    #ffffff;
    --ocs-mega-bg:      #ffffff;
    --ocs-text-dark:    #1e293b;
    --ocs-text-muted:   #64748b;
    --ocs-border:       #f1f5f9;
    --ocs-nav-h:        72px;
    --ocs-shadow:       0 20px 40px -15px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.08);
    --ocs-radius:       18px;
    --ocs-transition:   0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --ocs-font:         'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Header Container */
.ocs-mega-header {
    display: flex;
    align-items: center;
    height: var(--ocs-nav-h);
    background: var(--ocs-header-bg);
    padding: 0 28px;
    border-radius: 14px;
    border: 1px solid var(--ocs-border);
    position: relative;
    font-family: var(--ocs-font);
    z-index: 9999;
}

/* Logo */
.ocs-mega-logo {
    flex-shrink: 0;
    margin-right: 32px;
}
.ocs-mega-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.ocs-mega-logo img {
    display: block;
    max-height: 46px;
    width: auto;
}
.ocs-logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--ocs-accent);
}

/* Nav Menu Links */
.ocs-mega-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.ocs-nav-item {
    position: relative;
}

.ocs-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ocs-text-dark);
    text-decoration: none;
    border-radius: 8px;
    transition: all var(--ocs-transition);
    line-height: 1;
}
.ocs-nav-link:hover,
.ocs-nav-item.ocs-mega-open > .ocs-nav-link {
    color: var(--ocs-accent);
    background: var(--ocs-accent-light);
}

.ocs-nav-link .ocs-chevron {
    transition: transform var(--ocs-transition);
    opacity: 0.6;
}
.ocs-nav-item.ocs-mega-open > .ocs-nav-link .ocs-chevron {
    transform: rotate(180deg);
}

/* Right Icons (Search & Menu) */
.ocs-mega-right-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.ocs-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    background: #f8fafc;
    color: var(--ocs-text-dark);
    transition: all var(--ocs-transition);
}
.ocs-icon-btn:hover {
    background: var(--ocs-accent-light);
    color: var(--ocs-accent);
}

.ocs-search-btn {
    background: var(--ocs-accent);
    color: #ffffff;
}
.ocs-search-btn:hover {
    background: var(--ocs-accent-hover);
    color: #ffffff;
}

.ocs-burger-btn {
    flex-direction: column;
    gap: 4px;
    background: #f1f5f9;
}
.ocs-burger-bar {
    display: block;
    width: 16px;
    height: 2px;
    background: var(--ocs-text-dark);
    border-radius: 2px;
}

/* Mega Panel Dropdown Container */
.ocs-mega-panel {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    width: min(1000px, 95vw);
    background: var(--ocs-mega-bg);
    border-radius: var(--ocs-radius);
    box-shadow: var(--ocs-shadow);
    border: 1px solid #e2e8f0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ocs-transition), visibility var(--ocs-transition);
    z-index: 9998;
    overflow: hidden;
}

/* Invisible gap bridge to guarantee continuous mouse hover state */
.ocs-mega-panel::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.ocs-has-mega {
    position: static;
}
.ocs-mega-header {
    position: relative;
}

/* Open Panel CSS Trigger */
.ocs-nav-item.ocs-mega-open > .ocs-mega-panel,
.ocs-nav-item:hover > .ocs-mega-panel,
.ocs-mega-panel:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}


/* Inner Grid Layout */
.ocs-mega-inner {
    display: grid;
    grid-template-columns: 220px 1fr 210px;
    min-height: 360px;
}

/* Left Sidebar Categories */
.ocs-mega-cats {
    background: #fff8f8;
    border-right: 1px solid #fee2e2;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ocs-mega-cat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    color: var(--ocs-text-dark);
    transition: all var(--ocs-transition);
}
.ocs-mega-cat-item:hover,
.ocs-mega-cat-item.active {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(224, 32, 32, 0.06);
    color: var(--ocs-accent);
}

.ocs-cat-icon-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ocs-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ocs-accent);
    flex-shrink: 0;
}
.ocs-mega-cat-item:hover .ocs-cat-icon-wrap,
.ocs-mega-cat-item.active .ocs-cat-icon-wrap {
    background: var(--ocs-accent);
    color: #ffffff;
}

.ocs-cat-text strong {
    font-size: 13.5px;
    font-weight: 700;
    display: block;
    line-height: 1.2;
}
.ocs-cat-sub {
    font-size: 11px;
    color: var(--ocs-text-muted);
    margin-top: 1px;
    display: block;
}

.ocs-cat-arrow {
    margin-left: auto;
    font-size: 16px;
    color: #cbd5e1;
}
.ocs-mega-cat-item:hover .ocs-cat-arrow {
    color: var(--ocs-accent);
}

.ocs-mega-columns-wrapper {
    flex: 1;
    position: relative;
    border-right: 1px solid var(--ocs-border);
}

.ocs-mega-section {
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

.ocs-mega-section.active {
    display: block;
    opacity: 1;
}


.ocs-mega-col-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f1f5f9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--ocs-text-muted);
    text-transform: uppercase;
}
.ocs-col-symbol {
    font-size: 14px;
    color: var(--ocs-accent);
}

.ocs-mega-col-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ocs-mega-col-links li a {
    display: block;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    transition: all var(--ocs-transition);
}
.ocs-mega-col-links li a:hover {
    color: var(--ocs-accent);
    background: var(--ocs-accent-light);
    padding-left: 12px;
}

/* Centered View All Topics Button */
.ocs-mega-bottom-center {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 14px;
    padding-top: 12px;
}
.ocs-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    border-radius: 50px;
    background: #ffffff;
    border: 1px solid #fee2e2;
    font-size: 13px;
    font-weight: 700;
    color: var(--ocs-accent);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(224, 32, 32, 0.04);
    transition: all var(--ocs-transition);
}
.ocs-view-all-btn:hover {
    background: var(--ocs-accent);
    border-color: var(--ocs-accent);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(224, 32, 32, 0.25);
}


/* Right Promo Box */
.ocs-mega-promo {
    padding: 20px 16px;
    background: #fffafa;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ocs-promo-card {
    text-align: center;
}
.ocs-promo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(224, 32, 32, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}
.ocs-promo-headline {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--ocs-text-dark);
    margin: 0 0 6px 0;
}
.ocs-promo-text {
    font-size: 12px;
    color: var(--ocs-text-muted);
    line-height: 1.4;
    margin: 0 0 14px 0;
}
.ocs-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--ocs-accent);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--ocs-transition);
}
.ocs-promo-btn:hover {
    background: var(--ocs-accent-hover);
    transform: translateY(-1px);
}

/* Footer Link Bar */
.ocs-mega-footer {
    padding: 10px;
    background: #fafafa;
    border-top: 1px solid var(--ocs-border);
    text-align: center;
}
.ocs-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 20px;
    border-radius: 50px;
    background: #ffffff;
    border: 1px solid var(--ocs-border);
    font-size: 13px;
    font-weight: 700;
    color: var(--ocs-accent);
    text-decoration: none;
    transition: all var(--ocs-transition);
}
.ocs-view-all-btn:hover {
    background: var(--ocs-accent);
    border-color: var(--ocs-accent);
    color: #ffffff;
}



/* ============================================================
   MIDDLE: 3 COLUMNS
   ============================================================ */
.ocs-mega-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 0;
    border-right: 1px solid rgba(0,0,0,0.06);
}

.ocs-mega-col {
    padding: 22px 20px;
    border-right: 1px solid rgba(0,0,0,0.06);
}
.ocs-mega-col:last-child {
    border-right: none;
}

.ocs-mega-col-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}
.ocs-col-symbol {
    font-size: 16px;
    color: var(--ocs-accent);
    opacity: 0.85;
}
.ocs-col-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #64748b;
    text-transform: uppercase;
}

.ocs-mega-col-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.ocs-mega-col-links li a {
    display: block;
    font-size: 13.5px;
    font-weight: 400;
    color: #374151;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color var(--ocs-transition), background var(--ocs-transition), padding-left var(--ocs-transition);
    line-height: 1.4;
}
.ocs-mega-col-links li a:hover {
    color: var(--ocs-accent);
    background: rgba(224,32,32,0.05);
    padding-left: 14px;
}

/* ============================================================
   RIGHT: PROMO CARD
   ============================================================ */
.ocs-mega-promo {
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ocs-promo-card {
    background: linear-gradient(145deg, #fff5f5 0%, #fff9f9 100%);
    border: 1px solid rgba(224,32,32,0.15);
    border-radius: 14px;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    justify-content: center;
    text-align: center;
}

.ocs-promo-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 4px;
}
.ocs-promo-icon svg {
    filter: drop-shadow(0 2px 6px rgba(224,32,32,0.2));
}

.ocs-promo-headline {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
    margin: 0;
}
.ocs-promo-headline span,
.ocs-promo-headline em {
    color: var(--ocs-accent);
    font-style: normal;
}

.ocs-promo-text {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.ocs-promo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 6px;
    padding: 10px 18px;
    background: var(--ocs-accent);
    color: #fff;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--ocs-transition), transform var(--ocs-transition), box-shadow var(--ocs-transition);
    box-shadow: 0 4px 14px rgba(224,32,32,0.35);
}
.ocs-promo-btn:hover {
    background: #c01010;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(224,32,32,0.45);
    color: #fff;
}

/* ============================================================
   MEGA FOOTER — View All Link
   ============================================================ */
.ocs-mega-footer {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
}

.ocs-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ocs-accent);
    text-decoration: none;
    padding: 6px 18px;
    border-radius: 50px;
    border: 1.5px solid rgba(224,32,32,0.3);
    transition: background var(--ocs-transition), border-color var(--ocs-transition), color var(--ocs-transition);
}
.ocs-view-all-btn:hover {
    background: var(--ocs-accent);
    border-color: var(--ocs-accent);
    color: #fff;
}
.ocs-view-all-btn svg {
    transition: stroke var(--ocs-transition);
}
.ocs-view-all-btn:hover svg {
    stroke: #fff;
}

/* ============================================================
   MOBILE / RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .ocs-mega-inner {
        grid-template-columns: 180px 1fr 160px;
    }
    --ocs-cat-w: 180px;
}

/* Search Popup Modal Overlay */
.ocs-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-in-out;
}
.ocs-search-modal.active {
    opacity: 1;
    visibility: visible;
}
.ocs-search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
}
.ocs-search-modal-content {
    position: relative;
    z-index: 2;
    background: #ffffff;
    width: min(600px, 90vw);
    padding: 36px 32px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.ocs-search-close-btn {
    position: absolute;
    top: 16px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}
.ocs-search-title {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px 0;
    text-align: center;
}
.ocs-search-input-wrap {
    display: flex;
    gap: 8px;
}
.ocs-search-field {
    flex: 1;
    padding: 12px 18px;
    border-radius: 50px;
    border: 1.5px solid #cbd5e1;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}
.ocs-search-field:focus {
    border-color: var(--ocs-accent);
}
.ocs-search-submit-btn {
    padding: 12px 24px;
    border-radius: 50px;
    background: var(--ocs-accent);
    color: #ffffff;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

/* Off-canvas Mobile Drawer */
.ocs-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease-in-out;
}
.ocs-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}
.ocs-mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 999999;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}
.ocs-mobile-drawer.active {
    right: 0;
}
.ocs-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}
.ocs-drawer-title {
    font-weight: 700;
    font-size: 18px;
}
.ocs-drawer-close-btn {
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
}
.ocs-drawer-nav-list {
    list-style: none;
    padding: 16px 24px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ocs-drawer-nav-list li a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: #1e293b;
    font-weight: 600;
    text-decoration: none;
}
.ocs-drawer-nav-list li a:hover {
    background: #fff0f0;
    color: #e02020;
}


/* ============================================================
   RESPONSIVE DESIGN SYSTEM (Desktop, Tablet, Mobile)
   ============================================================ */

/* Large Tablets (1024px to 1200px) */
@media (max-width: 1200px) {
    .ocs-mega-header {
        padding: 0 20px;
    }
    .ocs-mega-logo {
        margin-right: 20px;
    }
    .ocs-mega-nav-list {
        gap: 2px;
    }
    .ocs-nav-link {
        padding: 8px 12px;
        font-size: 13.5px;
    }
    .ocs-mega-panel {
        width: 95vw;
    }
    .ocs-mega-inner {
        grid-template-columns: 200px 1fr 180px;
    }
}

/* Medium Tablets & Mobile Landscape (768px to 991px) */
@media (max-width: 991px) {
    .ocs-mega-header {
        height: 64px;
        padding: 0 16px;
    }
    .ocs-mega-nav-list {
        display: none !important; /* Managed by Off-canvas Drawer */
    }
    .ocs-mega-logo {
        margin-right: 0;
    }
    .ocs-mega-logo img {
        max-height: 40px;
    }
    .ocs-mega-right-icons {
        margin-left: auto;
        gap: 6px;
    }
    .ocs-icon-btn {
        width: 38px;
        height: 38px;
    }
    .ocs-mobile-drawer {
        width: 85vw;
        max-width: 340px;
    }
}

/* Mobile Phones (up to 767px) */
@media (max-width: 767px) {
    .ocs-mega-header {
        padding: 0 12px;
        height: 60px;
    }
    .ocs-mega-logo img {
        max-height: 36px;
    }
    .ocs-logo-text {
        font-size: 18px;
    }

    /* Search Popup Modal Mobile */
    .ocs-search-modal-content {
        padding: 28px 20px;
        border-radius: 16px;
        width: 92vw;
    }
    .ocs-search-title {
        font-size: 17px;
        margin-bottom: 16px;
    }
    .ocs-search-input-wrap {
        flex-direction: column;
        gap: 10px;
    }
    .ocs-search-field {
        width: 100%;
        padding: 10px 16px;
        font-size: 14px;
    }
    .ocs-search-submit-btn {
        width: 100%;
        padding: 10px;
        border-radius: 50px;
    }

    /* Off-canvas Drawer Mobile */
    .ocs-drawer-header {
        padding: 16px 20px;
    }
    .ocs-drawer-nav-list {
        padding: 12px 16px;
    }
    .ocs-drawer-nav-list li a {
        padding: 12px;
        font-size: 15px;
    }
}

/* Extra Small Phones (up to 480px) */
@media (max-width: 480px) {
    .ocs-icon-btn {
        width: 34px;
        height: 34px;
    }
    .ocs-search-btn svg {
        width: 16px;
        height: 16px;
    }
    .ocs-burger-bar {
        width: 14px;
    }
}


@media (max-width: 640px) {
    .ocs-mega-panel {
        width: 98vw;
        left: 1vw;
        transform: translateY(8px);
        border-radius: 12px;
    }
    .ocs-nav-item.ocs-mega-open > .ocs-mega-panel {
        transform: translateY(0);
    }
    .ocs-mega-inner {
        grid-template-columns: 1fr;
    }
    .ocs-mega-columns {
        grid-template-columns: 1fr;
        border-right: none;
    }
    .ocs-mega-promo {
        display: none;
    }
    .ocs-mega-cats {
        border-right: none;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        gap: 6px;
    }
    .ocs-mega-cat-item {
        border-left: none;
        border-radius: 8px;
        padding: 8px 12px;
        flex: 0 0 auto;
    }
    .ocs-cat-arrow { display: none; }
    .ocs-cat-sub   { display: none; }
}

/* ============================================================
   ELEMENTOR EDITOR: keep panel visible for editing
   ============================================================ */
.elementor-editor-active .ocs-mega-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    position: relative;
    transform: none;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    margin-top: 8px;
    width: 100%;
    left: auto;
}
.elementor-editor-active .ocs-mega-nav-list,
.elementor-editor-active .ocs-nav-item {
    position: static;
}
