/* CHANDANA GROUPS - COMMON CSS Header + Footer + Global Styles */
/* ---------- GLOBAL ---------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #142c52;
    background: #ffffff;
    line-height: 1.6;
}

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

a {
    text-decoration: none;
}

/* COMMON CONTAINER */
.cg-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
}

/* HEADER */
.cg-header,
.main-header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
    background: #ffffff;
    border-bottom: 3px solid #176dcc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Header container */
.cg-header-container {
    width: 100%;
    max-width: 1400px;
    min-height: 88px;
    margin: 0 auto;
    padding: 8px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

/* LOGO */
.cg-brand,
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.cg-brand img,
.brand-logo img {
    width: 65px !important;
    height: 52px !important;
    object-fit: contain !important;
}

.cg-brand span,
.brand-logo span {
    font-size: 26px;
    color: #222;
    font-weight: 400;
}

.cg-brand strong,
.brand-logo strong {
    color: #1769b5;
    font-weight: 800;
}

/* NAVIGATION */
.cg-nav,
.main-header .navbar-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
}

/* Navigation links */
.cg-nav a,
.main-header .nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: #092957 !important;
    font-size: 16px;
    font-weight: 600;
    padding: 29px 15px !important;
    transition: color 0.2s ease;
}

.cg-nav a:hover,
.main-header .nav-link:hover {
    color: #176dcc !important;
}

/* Active link */
.cg-nav a.active::after,
.main-header .nav-link.active::after {
    content: "";
    position: absolute;
    height: 3px;
    left: 15px;
    right: 15px;
    bottom: 14px;
    background: #092957;
    border-radius: 4px;
}

/* DROPDOWN */
.cg-dropdown {
    position: relative;
}

.cg-dropdown>a {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cg-dropdown-menu,
.main-header .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    padding: 8px 0;
    display: none;
    z-index: 10000;
}

.cg-dropdown:hover .cg-dropdown-menu {
    display: block;
}

.main-header .dropdown-menu.show {
    display: block;
}

.cg-dropdown-menu a,
.main-header .dropdown-item {
    display: block;
    width: 100%;
    padding: 10px 18px !important;
    color: #102c55 !important;
    font-size: 14px;
    white-space: nowrap;
}

.cg-dropdown-menu a:hover,
.main-header .dropdown-item:hover {
    background: #eef6ff;
    color: #176dcc !important;
}

/* CONTACT BUTTON */
.contact-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1976d2;
    color: #ffffff !important;
    padding: 13px 27px;
    border-radius: 7px;
    font-weight: 600;
    margin-left: 10px;
    white-space: nowrap;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.18);
}

.contact-button:hover {
    background: #125ca8;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* FOOTER */
.main-footer {
    background: #0b225c;
    color: #ffffff;
    padding: 55px 0 20px;
}

.main-footer .container,
.main-footer .cg-container {
    max-width: 1400px;
}

/* Footer grid */
.footer-grid {
    display: grid;
    grid-template-columns:
        1.4fr 1fr 1.2fr;
    gap: 45px;
}

/* Footer headings */
.main-footer h3 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
}

/* Footer text */
.main-footer p {
    color: #b9cbed;
    margin-top: 0;
}

.main-footer a {
    color: #b9cbed;
    transition: color 0.2s ease;
}

.main-footer a:hover {
    color: #ffffff;
}

/* Footer quick links */
.main-footer .footer-links a {
    display: block;
    margin: 9px 0;
}

/* NEWSLETTER */
.newsletter {
    display: flex;
    width: 100%;
}

.newsletter input {
    width: 100%;
    height: 44px;
    border: 1px solid #536fa4;
    background: #17366f;
    color: #ffffff;
    padding: 0 12px;
    outline: none;
}

.newsletter input::placeholder {
    color: #b9cbed;
}

.newsletter input:focus {
    border-color: #1976d2;
}

.newsletter button {
    border: 0;
    background: #1976d2;
    color: #ffffff;
    padding: 0 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.newsletter button:hover {
    background: #2584df;
}

/* FOOTER BOTTOM */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 40px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-bottom a {
    display: inline;
    color: #b9cbed;
    margin-right: 12px;
}

.footer-bottom a:hover {
    color: #ffffff;
}

.footer-bottom span {
    color: #7185ac;
}

.footer-bottom p {
    margin: 0;
    color: #7185ac;
}

/* SOCIAL ICONS */
.footer-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    margin: 0;
}

.footer-social a:hover {
    background: #1976d2;
    color: #ffffff;
}

/* BOOTSTRAP NAVBAR SUPPORT */
.main-header .navbar {
    min-height: 88px;
    padding: 8px 0;
}

/* RESPONSIVE - TABLET */
@media (max-width: 991px) {
    .cg-header-container {
        min-height: 75px;
        padding: 8px 25px;
    }

    .cg-nav,
    .main-header .navbar-nav {
        gap: 0;
    }

    .cg-nav a,
    .main-header .nav-link {
        padding: 11px 15px !important;
    }

    .cg-nav a.active::after,
    .main-header .nav-link.active::after {
        display: none;
    }

    .contact-button {
        margin: 8px 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* RESPONSIVE - MOBILE */
@media (max-width: 767px) {
    .cg-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .cg-header-container {
        padding: 8px 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .cg-brand img,
    .brand-logo img {
        width: 52px !important;
        height: 42px !important;
    }

    .cg-brand span,
    .brand-logo span {
        font-size: 20px;
    }

    .cg-nav,
    .main-header .navbar-nav {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        margin-left: 0;
    }

    .cg-nav a,
    .main-header .nav-link {
        width: 100%;
        padding: 11px 10px !important;
    }

    .contact-button {
        width: 100%;
        margin: 8px 0;
    }

    .cg-dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-top: 1px solid #e5eaf1;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .newsletter {
        flex-direction: column;
        gap: 8px;
    }

    .newsletter button {
        height: 44px;
    }
}

/* VERY SMALL MOBILE */
@media (max-width: 480px) {
    .cg-header-container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .cg-brand span,
    .brand-logo span {
        font-size: 18px;
    }

    .main-footer {
        padding: 40px 0 20px;
    }

    /* CHANDANA HEADER - FINAL FIX */
    .cg-header {
        position: sticky;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
        background: #ffffff;
        border-bottom: 1px solid #dfe7f1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    /* Header container */
    .cg-header-container {
        width: 100%;
        max-width: 1400px;
        height: 88px;
        margin: 0 auto;
        padding: 0 40px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* LOGO */
    .cg-brand {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        text-decoration: none !important;
        white-space: nowrap;
        height: 70px;
    }

    .cg-brand img {
        width: 65px !important;
        height: 52px !important;
        max-width: 65px !important;
        max-height: 52px !important;
        min-width: 65px !important;
        min-height: 52px !important;
        object-fit: contain !important;
        display: block !important;
        border: 0 !important;
    }

    .cg-brand span {
        font-size: 26px !important;
        line-height: 1 !important;
        color: #222222 !important;
        font-weight: 400 !important;
    }

    .cg-brand strong {
        color: #1769b5 !important;
        font-weight: 800 !important;
    }

    /* DESKTOP NAVIGATION */
    .cg-nav {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 4px !important;
        margin-left: auto !important;
        height: 100%;
    }

    .cg-nav>a,
    .cg-dropdown>a {
        position: relative;
        display: flex !important;
        align-items: center !important;
        height: 100%;
        padding: 0 15px !important;
        color: #092957 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        white-space: nowrap;
        background: transparent !important;
    }

    .cg-nav>a:hover,
    .cg-dropdown>a:hover {
        color: #176dcc !important;
    }

    /* Active page */
    .cg-nav>a.active::after {
        content: "";
        position: absolute;
        left: 15px;
        right: 15px;
        bottom: 20px;
        height: 3px;
        background: #092957;
        border-radius: 4px;
    }

    /* DROPDOWN */
    .cg-dropdown {
        position: relative;
        height: 100%;
        display: flex;
        align-items: center;
    }

    .cg-dropdown>a {
        gap: 7px;
    }

    .cg-dropdown>a i {
        font-size: 11px;
    }

    /* Dropdown menu */
    .cg-dropdown-menu {
        position: absolute;
        top: 88px;
        left: 0;
        min-width: 235px;
        padding: 8px 0;
        background: #ffffff;
        border-radius: 6px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);
        display: none;
        z-index: 10000;
    }

    .cg-dropdown:hover .cg-dropdown-menu {
        display: block;
    }

    .cg-dropdown-menu a {
        display: block !important;
        padding: 11px 18px !important;
        color: #102c55 !important;
        font-size: 14px !important;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .cg-dropdown-menu a:hover {
        background: #eef6ff;
        color: #176dcc !important;
    }

    /* CONTACT BUTTON */
    .cg-nav .contact-button {
        height: auto !important;
        margin-left: 10px !important;
        padding: 13px 27px !important;
        border-radius: 7px !important;
        background: #1976d2 !important;
        color: #ffffff !important;
        font-weight: 600 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(25, 118, 210, 0.18);
    }

    .cg-nav .contact-button:hover {
        background: #125ca8 !important;
        color: #ffffff !important;
    }

    /* MOBILE BUTTON */
    .cg-mobile-button {
        display: none;
        width: 42px;
        height: 42px;
        border: 1px solid #d5dce5;
        border-radius: 5px;
        background: #ffffff;
        color: #092957;
        font-size: 20px;
        cursor: pointer;
    }

    /* Mobile menu */
    .cg-mobile-menu {
        display: none;
        background: #ffffff;
        border-top: 1px solid #e5eaf1;
        padding: 10px 20px;
    }

    .cg-mobile-menu a {
        display: block;
        padding: 12px 10px;
        color: #092957;
        font-weight: 600;
        border-bottom: 1px solid #eef1f5;
    }

    .cg-mobile-menu a:last-child {
        border-bottom: 0;
    }

    /* MOBILE */
    @media (max-width: 991px) {
        .cg-header-container {
            height: 75px;
            padding: 0 25px;
        }

        .cg-nav {
            display: none !important;
        }

        .cg-mobile-button {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .cg-mobile-menu.show {
            display: block;
        }

        .cg-brand img {
            width: 52px !important;
            height: 42px !important;
            max-width: 52px !important;
            max-height: 42px !important;
            min-width: 52px !important;
            min-height: 42px !important;
        }

        .cg-brand span {
            font-size: 21px !important;
        }
    }

    @media (max-width: 480px) {
        .cg-header-container {
            padding: 0 15px;
        }

        .cg-brand {
            gap: 8px !important;
        }

        .cg-brand img {
            width: 45px !important;
            height: 36px !important;
            max-width: 45px !important;
            max-height: 36px !important;
            min-width: 45px !important;
            min-height: 36px !important;
        }

        .cg-brand span {
            font-size: 18px !important;
        }
    }

    /* OUR COMPANIES DROPDOWN - FIX */
    .companies-dropdown {
        position: relative;
    }

    .companies-toggle {
        cursor: pointer;
    }

    .dropdown-arrow {
        font-size: 10px;
        margin-left: 5px;
        display: inline-block;
        transition: transform 0.2s ease;
    }

    .companies-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .companies-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 240px;
        margin: 0;
        padding: 8px 0;
        background: #ffffff;
        border: 1px solid #e1e7ef;
        border-radius: 7px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        z-index: 10000;
    }

    .companies-dropdown.open .companies-menu {
        display: block;
    }

    .companies-menu .dropdown-item {
        display: block;
        padding: 11px 18px;
        color: #102c55;
        font-size: 15px;
        font-weight: 500;
        white-space: nowrap;
    }

    .companies-menu .dropdown-item:hover {
        background: #eef6ff;
        color: #176dcc;
    }

    /* Mobile */
    @media (max-width: 991px) {
        .companies-menu {
            position: static;
            width: 100%;
            min-width: 0;
            border: 0;
            box-shadow: none;
            margin-top: 0;
        }
    }

    /* MOBILE HEADER FIX */
    @media (max-width: 768px) {

        /* Header */
        .site-header,
        .main-header {
            position: relative !important;
            z-index: 9999 !important;
            width: 100%;
        }

        /* Header inner */
        .header-container,
        .header-inner {
            width: 100%;
            min-height: 90px;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-sizing: border-box;
        }

        /* Logo */
        .header-brand {
            display: flex;
            align-items: center;
            max-width: calc(100% - 70px);
        }

        .header-logo {
            width: 70px;
            height: auto;
            object-fit: contain;
        }

        .header-company-name {
            font-size: 25px;
            white-space: nowrap;
        }

        /* Hamburger */
        .menu-btn {
            display: flex !important;
            align-items: center;
            justify-content: center;
            width: 54px;
            height: 54px;
            flex-shrink: 0;
            background: #ffffff;
            border: 1px solid #d7e0ea;
            border-radius: 10px;
            cursor: pointer;
            z-index: 10001;
        }

        /* Navigation MUST be hidden initially */
        .main-nav {
            display: none !important;
            position: absolute !important;
            top: 100% !important;
            left: 0 !important;
            width: 100% !important;
            background: #ffffff;
            padding: 15px 20px;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
            z-index: 10000;
        }

        /* Navigation when hamburger is clicked */
        .main-nav.open {
            display: block !important;
        }

        .main-nav ul {
            display: flex !important;
            flex-direction: column !important;
            width: 100%;
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .main-nav li {
            width: 100%;
            margin: 0;
        }

        .main-nav a {
            display: block;
            width: 100%;
            padding: 13px 10px;
            box-sizing: border-box;
            text-decoration: none;
            font-size: 16px;
        }

        /* Contact button */
        .main-nav .contact-btn {
            width: 100%;
            margin-top: 8px;
            text-align: center;
        }
    }

    /* FINAL MOBILE HEADER FIX CHANDANA GROUPS */
    @media (max-width: 991px) {

        /* Header */
        .cg-header {
            position: sticky !important;
            top: 0 !important;
            width: 100% !important;
            z-index: 99999 !important;
            background: #ffffff !important;
        }

        /* Header container */
        .cg-header-container {
            height: 75px !important;
            min-height: 75px !important;
            padding: 0 20px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: space-between !important;
            flex-wrap: nowrap !important;
        }

        /* Logo */
        .cg-brand {
            display: flex !important;
            align-items: center !important;
            gap: 8px !important;
            flex-shrink: 1 !important;
            min-width: 0 !important;
        }

        .cg-brand img {
            width: 48px !important;
            height: 40px !important;
            min-width: 48px !important;
            max-width: 48px !important;
            object-fit: contain !important;
        }

        .cg-brand span {
            font-size: 20px !important;
            white-space: nowrap !important;
        }

        /* Hide desktop navigation */
        .cg-nav {
            display: none !important;
        }

        /* Hamburger */
        .cg-mobile-button {
            display: flex !important;
            width: 52px !important;
            height: 52px !important;
            min-width: 52px !important;
            align-items: center !important;
            justify-content: center !important;
            margin-left: auto !important;
            background: #ffffff !important;
            border: 1px solid #d5dce5 !important;
            border-radius: 10px !important;
            color: #092957 !important;
            font-size: 24px !important;
            cursor: pointer !important;
            flex-shrink: 0 !important;
            z-index: 100000 !important;
        }

        /* Mobile menu */
        .cg-mobile-menu {
            display: none !important;
            position: absolute !important;
            top: 75px !important;
            left: 0 !important;
            width: 100% !important;
            background: #ffffff !important;
            padding: 10px 20px !important;
            border-top: 1px solid #e5eaf1 !important;
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) !important;
            z-index: 99998 !important;
        }

        /* Show menu after hamburger click */
        .cg-mobile-menu.show {
            display: block !important;
        }

        /* Menu links */
        .cg-mobile-menu a {
            display: block !important;
            width: 100% !important;
            padding: 13px 10px !important;
            color: #092957 !important;
            font-size: 16px !important;
            font-weight: 600 !important;
            border-bottom: 1px solid #eef1f5 !important;
        }

        .cg-mobile-menu a:last-child {
            border-bottom: none !important;
        }

        /* Companies dropdown inside mobile menu */
        .cg-mobile-menu .companies-dropdown {
            width: 100% !important;
        }

        .cg-mobile-menu .companies-menu {
            position: static !important;
            display: none !important;
            width: 100% !important;
            min-width: 0 !important;
            padding: 0 !important;
            border: none !important;
            box-shadow: none !important;
        }

        .cg-mobile-menu .companies-dropdown.open .companies-menu {
            display: block !important;
        }

        .cg-mobile-menu .companies-menu .dropdown-item {
            padding: 11px 20px !important;
            font-size: 15px !important;
        }

        /* Contact button inside mobile menu */
        .cg-mobile-menu .contact-button {
            width: 100% !important;
            margin: 10px 0 !important;
            text-align: center !important;
            justify-content: center !important;
        }
    }

    /* SMALL PHONES */
    @media (max-width: 480px) {
        .cg-header-container {
            height: 70px !important;
            min-height: 70px !important;
            padding: 0 15px !important;
        }

        .cg-brand img {
            width: 45px !important;
            height: 36px !important;
            min-width: 45px !important;
            max-width: 45px !important;
        }

        .cg-brand span {
            font-size: 18px !important;
        }

        .cg-mobile-button {
            width: 48px !important;
            height: 48px !important;
            min-width: 48px !important;
        }

        .cg-mobile-menu {
            top: 70px !important;
        }
    }

    /* RESPONSIVE HEADER / MOBILE MENU */
    @media (max-width: 768px) {

        /* Header */
        .site-header {
            position: sticky;
            top: 0;
            z-index: 9999;
            width: 100%;
            background: #ffffff;
        }

        .header-container {
            min-height: 75px;
            padding: 0 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* Logo */
        .logo {
            max-width: 230px;
            height: auto;
        }

        /* Hamburger */
        #menuBtn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 52px;
            height: 48px;
            padding: 0;
            border: 1px solid #d5dce5;
            border-radius: 8px;
            background: #ffffff;
            cursor: pointer;
            font-size: 28px;
        }

        /* Navigation hidden initially */
        #mainNav {
            display: none;
            width: 100%;
            background: #ffffff;
            border-top: 1px solid #eeeeee;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
        }

        /* Navigation when hamburger clicked */
        #mainNav.open {
            display: block;
        }

        #mainNav ul {
            width: 100%;
            margin: 0;
            padding: 10px 20px 15px;
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0;
            box-sizing: border-box;
        }

        #mainNav li {
            width: 100%;
        }

        #mainNav a {
            display: block;
            width: 100%;
            padding: 14px 10px;
            box-sizing: border-box;
            text-decoration: none;
            font-size: 16px;
        }

        /* Contact button */
        #mainNav .contact-btn,
        #mainNav .contact-link {
            width: 100%;
            margin-top: 5px;
            text-align: center;
        }

        /* Companies dropdown */
        .companies-dropdown {
            width: 100%;
        }

        .companies-dropdown .companies-toggle {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .companies-dropdown .dropdown-menu {
            position: static;
            width: 100%;
            box-shadow: none;
            border: none;
        }

        /* Prevent horizontal scrolling */
        html,
        body {
            width: 100%;
            max-width: 100%;
            overflow-x: hidden;
        }
    }

    /* TABLET */
    @media (min-width: 769px) and (max-width: 991px) {
        .header-container {
            padding: 0 25px;
        }

        #mainNav a {
            font-size: 15px;
        }

        .contact-main-grid {
            grid-template-columns: 1fr;
        }
    }

    /* SMALL MOBILE */
    @media (max-width: 480px) {
        .header-container {
            min-height: 68px;
            padding: 0 15px;
        }

        .logo {
            max-width: 205px;
        }

        #menuBtn {
            width: 48px;
            height: 44px;
            font-size: 25px;
        }
    }
}