﻿/* SANIDHYA CP FOUNDATION - MAIN NAVBAR */

.main-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 1050;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

    /* Navbar */
    .main-header .navbar {
        width: 100%;
        min-height: 55px;
        padding: 4px 0;
        position: relative;
    }

        /* Navbar container */
        .main-header .navbar > .container,
        .main-header .navbar > .container-fluid {
            width: 100%;
            max-width: 100%;
            display: flex;
            align-items: center;
            flex-wrap: nowrap;
            padding-left: 22px;
            padding-right: 22px;
        }

/* Brand / Logo */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 0;
    margin-left: 0;
    margin-right: 0px;
    margin-bottom:20px;
    text-decoration: none;
    flex-shrink: 0;
}

/* Logo image */
.brand-logo {
    width: 45px;
    height: 45px;
    max-width: 45px;
    max-height: 45px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Old brand icon support */
.brand-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #167d6b;
    color: #ffffff;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Brand text */
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    white-space: nowrap;
    text-align: center;
    padding: 10px 0;
    margin-left:0;
    margin-top:10px
}

    .brand-text strong {
        color: #183b38;
        font-size: 16px;
        font-weight: 700;
        line-height: 1;
    }

    .brand-text small {
        color: #6d7f7c;
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 1.1px;
        text-transform: uppercase;
        line-height: 1.1;
    }

/* Navbar collapse */
.navbar-collapse {
    flex-grow: 1;
    min-width: 0;
}

/* Navigation */
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

    .navbar-nav .nav-link {
        color: #344743;
        font-size: 14px;
        font-weight: 700;
        padding: 10px 9px !important;
        position: relative;
        transition: color 0.25s ease;
        white-space: nowrap;
    }

        /* Navigation hover */
        .navbar-nav .nav-link:hover,
        .navbar-nav .nav-link:focus {
            color: #167d6b;
        }

        /* Nav underline */
        .navbar-nav .nav-link::before {
            content: "";
            position: absolute;
            left: 9px;
            right: 9px;
            bottom: 4px;
            height: 2px;
            background-color: #167d6b;
            border-radius: 10px;
            transform: scaleX(0);
            transform-origin: center;
            transition: transform 0.25s ease;
        }

        .navbar-nav .nav-link:hover::before,
        .navbar-nav .nav-link:focus::before {
            transform: scaleX(1);
        }

    /* Dropdown arrow */
    .navbar-nav .dropdown-toggle {
        display: flex;
        align-items: center;
    }

        .navbar-nav .dropdown-toggle::after {
            margin-left: 6px;
        }

/* Dropdown menu */
.dropdown-menu {
    border: none;
    border-radius: 14px;
    padding: 10px;
    min-width: 255px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.10);
    margin-top: 10px;
}

.dropdown-item {
    border-radius: 8px;
    color: #40534f;
    font-size: 17px;
    font-weight: 700;
    padding: 10px 14px;
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: #eef8f5;
        color: #167d6b;
        padding-left: 18px;
    }

/* Language selector */
.language-selector {
    margin-left: 10px !important;
    flex-shrink: 0;
}

.language-toggle-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid #b8ccc7;
    border-radius: 22px;
    background-color: #ffffff;
    color: #183b38;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

    .language-toggle-button i {
        color: #167d6b;
        font-size: 16px;
    }

    .language-toggle-button:hover {
        border-color: #167d6b;
        background-color: #eef8f5;
        color: #106b5c;
    }

    .language-toggle-button:focus {
        outline: 3px solid rgba(22, 125, 107, 0.22);
        border-color: #167d6b;
    }

/* Share Your Story */
.navbar-cta {
    margin-left: 10px;
    margin-right: 0;
    flex-shrink: 0;
}

.btn-share-story {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 17px;
    border-radius: 50px;
    background: #167d6b;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

    .btn-share-story:hover,
    .btn-share-story:focus {
        background: #106b5c;
        color: #ffffff;
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(22, 125, 107, 0.25);
    }

/* Mobile menu button */
.navbar-toggler {
    border: none;
    padding: 7px;
    box-shadow: none !important;
}

    .navbar-toggler:focus {
        box-shadow: none !important;
    }

/* Cerebral Palsy mega menu */
.mega-menu {
    left: 0;
    right: 0;
    width: 100%;
    margin-top: 0;
    padding: 28px 0;
    border: none;
    border-top: 1px solid #eeeeee;
    border-radius: 0 0 16px 16px;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.10);
}

/* Mega menu heading */
.mega-menu-title {
    color: #167d6b;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Mega menu links */
.mega-menu-link {
    display: block;
    color: #40534f;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    padding: 7px 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

    .mega-menu-link:hover,
    .mega-menu-link:focus {
        color: #167d6b;
        transform: translateX(4px);
    }

/* View all */
.mega-menu-view-all {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
}

    .mega-menu-view-all a {
        color: #167d6b;
        font-size: 16px;
        font-weight: 700;
        text-decoration: none;
    }

        .mega-menu-view-all a:hover,
        .mega-menu-view-all a:focus {
            text-decoration: underline;
        }

/* Medium desktop */
@media (min-width: 992px) and (max-width: 1199.98px) {

    .main-header .navbar > .container,
    .main-header .navbar > .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .navbar-brand {
        margin-right: 14px;
        gap: 7px;
    }

    .brand-logo {
        width: 55px;
        height: 55px;
        max-width: 55px;
        max-height: 55px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .brand-text small {
        font-size: 9px;
        letter-spacing: 0.8px;
    }

    .navbar-nav {
        gap: 0;
    }

        .navbar-nav .nav-link {
            font-size: 13px;
            padding: 10px 6px !important;
        }

    .language-selector {
        margin-left: 6px !important;
    }

    .language-toggle-button {
        padding: 7px 10px;
        font-size: 13px;
    }

    .navbar-cta {
        margin-left: 6px;
    }

    .btn-share-story {
        padding: 9px 13px;
        font-size: 13px;
    }
}

/* Tablet / Mobile */
@media (max-width: 991.98px) {

    .main-header .navbar {
        min-height: 72px;
        padding: 7px 0;
    }

        .main-header .navbar > .container,
        .main-header .navbar > .container-fluid {
            flex-wrap: wrap;
            padding-left: 15px;
            padding-right: 15px;
        }

    .navbar-brand {
        margin-right: 0;
        gap: 8px;
    }

    .brand-logo {
        width: 55px;
        height: 55px;
        max-width: 55px;
        max-height: 55px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        font-size: 10px;
        letter-spacing: 1px;
    }

    /* Mobile main menu */
    .navbar-collapse {
        width: 100%;
        flex-basis: 100%;
        background: #ffffff;
        margin-top: 12px;
        padding: 15px;
        border-radius: 14px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    }

    .navbar-nav {
        width: 100%;
        align-items: stretch !important;
        gap: 2px;
        flex-direction: column;
    }

        .navbar-nav .nav-link {
            width: 100%;
            font-size: 16px;
            padding: 11px 8px !important;
        }

            /* Remove desktop underline */
            .navbar-nav .nav-link::before {
                display: none;
            }

        /* Dropdown arrow on right */
        .navbar-nav .dropdown-toggle {
            justify-content: space-between;
        }

    /* Mobile dropdown */
    .dropdown-menu {
        box-shadow: none;
        border: 1px solid #eeeeee;
        border-radius: 10px;
        margin-top: 3px;
        margin-bottom: 8px;
        padding: 7px;
    }

    .dropdown-item {
        font-size: 16px;
        font-weight: 600;
        padding: 10px 12px;
    }

    /* Mobile mega menu */
    .mega-menu {
        position: static !important;
        width: 100%;
        padding: 15px;
        margin-top: 5px;
        margin-bottom: 8px;
        border: 1px solid #eeeeee;
        border-radius: 12px;
        box-shadow: none;
    }

    .mega-menu-title {
        margin-top: 12px;
        margin-bottom: 7px;
    }

    .mega-menu-link {
        padding: 7px 5px;
    }

    /* Mobile language */
    .language-selector {
        width: 100%;
        margin: 12px 0 0 !important;
    }

    .language-toggle-button {
        width: 100%;
    }

    /* Mobile story button */
    .navbar-cta {
        width: 100%;
        margin: 12px 0 0;
    }

    .btn-share-story {
        width: 100%;
    }
}

/* Small mobile */
@media (max-width: 575.98px) {

    .main-header .navbar {
        min-height: 65px;
        padding: 6px 0;
    }

        .main-header .navbar > .container,
        .main-header .navbar > .container-fluid {
            padding-left: 12px;
            padding-right: 12px;
        }

    .navbar-brand {
        gap: 7px;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
        max-width: 48px;
        max-height: 48px;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
        font-size: 19px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .brand-text small {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .navbar-collapse {
        margin-top: 8px;
        padding: 12px;
    }

    .navbar-nav .nav-link {
        font-size: 16px;
        padding: 10px 6px !important;
    }

    .mega-menu-title {
        font-size: 13px;
    }

    .mega-menu-link {
        font-size: 14px;
    }
}
