/* Custom Elementor Widget: Corporate Header Styles */

/* -------------------------------------------------------------
 * 1. Base Reset & Structure
 * ------------------------------------------------------------- */
.cg-corporate-header {
    width: 100%;
    font-family: 'Inter', 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.cg-corporate-header * {
    box-sizing: border-box;
}

.cg-header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 4%;
    width: 100%;
}

/* Sticky Header Behavior */
.cg-header-sticky-yes {
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Glassmorphism Styles */
.cg-header-glass-enabled .cg-main-header {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* -------------------------------------------------------------
 * 2. Top Bar Styles
 * ------------------------------------------------------------- */
.cg-top-bar {
    background-color: #154683;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cg-top-bar-inner {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.cg-top-bar-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.cg-top-bar-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.cg-top-bar-link:hover {
    color: #6DC05A;
}

.cg-top-bar-separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.3);
    user-select: none;
}

/* -------------------------------------------------------------
 * 3. Main Header Styles
 * ------------------------------------------------------------- */
.cg-main-header {
    background-color: #ffffff;
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.03);
}

.cg-main-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.cg-header-logo {
    display: flex;
    align-items: center;
}

.cg-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.cg-logo-img {
    max-height: 80px;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.cg-logo-img:hover {
    transform: scale(1.02);
}

.cg-site-title {
    font-size: 24px;
    font-weight: 700;
    color: #154683;
    letter-spacing: -0.5px;
}

/* -------------------------------------------------------------
 * 4. Desktop Navigation Styles
 * ------------------------------------------------------------- */
.cg-header-nav-desktop {
    display: block;
}

.cg-nav-menu-container {
    display: block;
}

.cg-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 30px;
}

.cg-nav-menu > li {
    position: relative;
    padding: 10px 0;
}

.cg-nav-menu > li > a {
    color: #154683;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.cg-nav-menu > li > a:hover {
    color: #6DC05A;
}

/* Dropdown Menu Arrow Indicator */
.cg-nav-menu > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.cg-nav-menu > li.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Dropdown Sub-menu */
.cg-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    background-color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    list-style: none;
    padding: 12px 0;
    margin: 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cg-nav-menu > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.cg-nav-menu .sub-menu li {
    padding: 0;
}

.cg-nav-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: #154683;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cg-nav-menu .sub-menu a:hover {
    background-color: rgba(109, 192, 90, 0.06);
    color: #6DC05A;
    padding-left: 24px;
}

.cg-no-menu-placeholder {
    color: #888888;
    font-size: 14px;
    font-style: italic;
    border: 1px dashed #cccccc;
    padding: 5px 15px;
    border-radius: 4px;
}

/* -------------------------------------------------------------
 * 5. Actions Panel (CTA Buttons & Search)
 * ------------------------------------------------------------- */
.cg-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cg-cta-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cg-cta-btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 4px;
    background-color: #6DC05A !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}

.cg-cta-btn:hover {
    background-color: #154683 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109, 192, 90, 0.2);
}

.cg-cta-btn:active {
    transform: translateY(0);
}

/* Search Trigger Button */
.cg-search-trigger {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none !important;
    padding: 0 !important;
}

.cg-search-trigger svg {
    fill: #154683 !important;
    transition: fill 0.3s ease, stroke 0.3s ease;
    width: 18px !important;
    height: 18px !important;
    display: block;
}

.cg-search-trigger:hover {
    background-color: #6DC05A !important;
    transform: translateY(-2px);
}

.cg-search-trigger:hover svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* -------------------------------------------------------------
 * 6. Hamburger Menu Toggle
 * ------------------------------------------------------------- */
.cg-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10001;
}

.cg-menu-toggle-line {
    width: 100%;
    height: 2px;
    background-color: #154683;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
}

.cg-menu-toggle.active .line-1 {
    transform: translateY(7px) rotate(45deg);
}

.cg-menu-toggle.active .line-2 {
    opacity: 0;
}

.cg-menu-toggle.active .line-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* -------------------------------------------------------------
 * 7. Mobile Drawer Navigation Styles
 * ------------------------------------------------------------- */
.cg-mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 10000;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    padding-top: 80px; /* Space for sticky header */
}

.cg-mobile-drawer.active {
    right: 0;
}

.cg-mobile-drawer-inner {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Mobile Menu Navigation */
.cg-mobile-menu-wrap {
    width: 100%;
}

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

.cg-mobile-menu li {
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.cg-mobile-menu li a {
    display: block;
    padding: 15px 0;
    color: #154683;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.cg-mobile-menu li a:hover {
    color: #6DC05A;
}

/* Mobile Sub-menu Toggle */
.cg-mobile-menu .sub-menu {
    list-style: none;
    padding: 0 0 10px 15px;
    margin: 0;
    display: none;
}

.cg-mobile-menu li.menu-item-has-children.open-submenu > .sub-menu {
    display: block;
}

.cg-mobile-menu li.menu-item-has-children > a {
    padding-right: 40px;
}

.cg-mobile-menu-toggle-sub {
    position: absolute;
    right: 0;
    top: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cg-mobile-menu-toggle-sub::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-right: 2px solid #154683;
    border-bottom: 2px solid #154683;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.cg-mobile-menu-toggle-sub.active::after {
    transform: rotate(-135deg);
}

.cg-mobile-menu .sub-menu li a {
    padding: 10px 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    opacity: 0.85;
}

/* Mobile CTA & Top Links */
.cg-mobile-cta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.cg-mobile-cta .cg-cta-btn {
    width: 100%;
}

.cg-mobile-top-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 20px;
    margin-top: 10px;
}

.cg-mobile-top-link {
    color: #666666;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cg-mobile-top-link:hover {
    color: #6DC05A;
}

/* Overlay Background when mobile menu is open */
.cg-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.cg-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* -------------------------------------------------------------
 * 8. Search Overlay Styling
 * ------------------------------------------------------------- */
.cg-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(21, 70, 131, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cg-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cg-search-overlay-close {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.cg-search-overlay-close:hover {
    transform: scale(1.1) rotate(90deg);
}

.cg-search-overlay-content {
    width: 100%;
    max-width: 650px;
    padding: 0 30px;
    text-align: center;
}

.cg-search-title {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.cg-search-overlay-form-wrap form {
    position: relative;
    width: 100%;
}

.cg-search-overlay-form-wrap input[type="search"] {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 3px solid rgba(255, 255, 255, 0.15);
    padding: 15px 60px 15px 0;
    color: #ffffff;
    font-size: 22px;
    font-weight: 500;
    outline: none;
    transition: border-bottom-color 0.3s ease;
}

.cg-search-overlay-form-wrap input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.cg-search-overlay-form-wrap input[type="search"]:focus {
    border-bottom-color: #6DC05A;
}

.cg-search-overlay-form-wrap button[type="submit"],
.cg-search-overlay-form-wrap input[type="submit"] {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    padding: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.cg-search-overlay-form-wrap button[type="submit"]:hover,
.cg-search-overlay-form-wrap input[type="submit"]:hover {
    color: #6DC05A;
}

/* -------------------------------------------------------------
 * 9. Responsive Breakpoints
 * ------------------------------------------------------------- */

/* Intermediate Desktop styling to prevent crowded layout wrapping */
@media (min-width: 1025px) and (max-width: 1360px) {
    .cg-nav-menu {
        gap: 15px;
    }
    .cg-nav-menu > li > a {
        font-size: 13px;
        letter-spacing: 0.3px;
    }
    .cg-logo-img {
        max-height: 65px;
    }
    .cg-cta-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    .cg-header-actions {
        gap: 10px;
    }
}

/* Tablet & Mobile Layout Toggle */
@media (max-width: 1024px) {
    .cg-header-nav-desktop {
        display: none;
    }
    
    .cg-cta-container {
        display: none;
    }
    
    .cg-menu-toggle {
        display: flex;
    }
    
    .cg-top-bar {
        display: none; /* Hide on mobile/tablet to save space, shown in drawer */
    }

    .cg-logo-img {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .cg-logo-img {
        max-width: 120px;
    }
    
    .cg-search-trigger {
        padding: 5px;
    }
    
    .cg-search-overlay-close {
        top: 20px;
        right: 20px;
    }
    
    .cg-search-title {
        font-size: 22px;
    }
    
    .cg-search-overlay-form-wrap input[type="search"] {
        font-size: 18px;
    }
    
    .cg-mobile-drawer {
        width: 280px;
    }
}

/* -------------------------------------------------------------
 * 10. Header Cart Icon Styles
 * ------------------------------------------------------------- */
.cg-header-cart-wrapper {
    display: flex;
    align-items: center;
}

.cg-header-cart-btn {
    display: none;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none !important;
    padding: 0 !important;
}

.cg-header-cart-btn.cg-cart-visible {
    display: flex !important;
}

.cg-header-cart-btn svg {
    fill: #154683 !important;
    transition: fill 0.3s ease, stroke 0.3s ease;
    width: 18px !important;
    height: 18px !important;
    display: block;
}

.cg-header-cart-btn:hover {
    background-color: #6DC05A !important;
    transform: translateY(-2px);
}

.cg-header-cart-btn:hover svg {
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

.cg-cart-count {
    position: absolute;
    top: -1px;
    right: -1px;
    background-color: #6DC05A;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(109, 192, 90, 0.4);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1.5px solid #ffffff;
    line-height: 1;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cg-header-cart-btn:hover .cg-cart-count {
    background-color: #154683;
    color: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 2px 5px rgba(21, 70, 131, 0.3);
}

