/* navbar.css */
/* ------------------------------------------ */
@import url("https://fonts.googleapis.com/css2?family=Montserrat+Alternates:wght@400;500&display=swap");

:root {
    --header-height: 3.5rem;
    --white-color: hsl(0, 0%, 100%);
    --black-color: hsl(0, 0%, 0%);
    --active-color: hsl(0, 100%, 50%);
    --body-font: "Montserrat Alternates", sans-serif;
    --h1-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --font-regular: 400;
    --font-medium: 500;
    --z-tooltip: 10;
    --z-fixed: 100;
}

@media screen and (min-width: 1150px) {
    :root {
        --normal-font-size: 1rem;
    }
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    font-family: var(--body-font); /* Applied globally */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--white-color);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

.container {
    max-width: 1120px;
    margin-inline: 1.5rem;
    width: 100%;
}

.header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background-color:#ecf8fd;
    z-index: var(--z-fixed);
    text-decoration: none;
    color: rgb(10, 10, 75);
}

.nav {
    position: relative;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    color: var(--white-color);
    font-weight: var(--font-medium);
    font-size: 30px;
    text-decoration: none; /* Added */
}

.para {
    color: rgb(52,50,104);
    text-shadow: -0.7px -0.7px 0 white,  
                 0.7px -0.7px 0 white,  
                -0.7px  0.7px 0 white,  
                 0.7px  0.7px 0 white;
}

.middle {
    -webkit-text-stroke: 0.7px rgb(41, 4, 175);
    -webkit-text-fill-color: transparent;
    text-shadow: -0.7px -0.7px 0 rgb(241, 177, 0),  
                 0.7px -0.7px 0 yellow,  
                -0.7px  0.7px 0 yellow,  
                 0.7px  0.7px 0 yellow;
    display: inline-block;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.gada {
    color: rgb(255, 0, 0);
}

.nav__close,
.nav__toggle {
    display: flex;
    /* color: var(--white-color); */
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile view adjustments */
@media screen and (max-width: 1023px) {
    .nav__menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        background-color:#ecf8fd;
        width: 100%;
        height: calc(100vh - var(--header-height));
        padding: 2rem 1.5rem;
        display: flex;
        flex-direction: column;
        transition: left 0.4s;
        z-index: var(--z-fixed);
    }

    .nav__item {
        transform: translateX(-150px);
        transition: transform 0.4s ease-out;
        pointer-events: none;
        text-decoration: none; /* Added */
    }

    .nav__item:nth-child(1) { transition-delay: 0.1s; }
    .nav__item:nth-child(2) { transition-delay: 0.2s; }
    .nav__item:nth-child(3) { transition-delay: 0.3s; }
    .nav__item:nth-child(4) { transition-delay: 0.4s; }
    .nav__item:nth-child(5) { transition-delay: 0.5s; }
    .nav__item:nth-child(6) { transition-delay: 0.5s; }

    .nav__toggle {
        margin-right: 1rem;
    }

    .nav__close {
        position: absolute;
        top: 0.5rem; /* Adjusted for better positioning */
        right: 1rem; /* Consistent right alignment */
        font-size: 1.5rem;
    }
}
li .nav__item{
    text-decoration: none;
}
.nav__list {
    display: flex;
    flex-direction: column;
    row-gap: 2rem;
    text-align: left;
    text-decoration: none;
}

.nav__link {
    position: relative;
    /* color: var(--white-color); */
    color: rgb(6, 9, 56);
    font-size: var(--h1-font-size);
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    transition: opacity 0.4s, color 0.4s;
    cursor: pointer;
    text-decoration: none; /* Reinforced */
}

.nav__link.active {
    color: var(--active-color);
    font-weight: bolder;
}

.nav__link.active span::after {
    background-color: var(--active-color);
}

.nav__link i {
    font-size: 2rem;
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.nav__link span {
    position: relative;
    transition: margin 0.4s;
}

.nav__link span::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    /* background-color: var(--white-color); */
    background-color: rgb(8, 8, 66);
    transition: width 0.4s ease-out;
}

.nav__link:hover span {
    margin-left: 2.5rem;
}

.nav__link:hover i {
    opacity: 1;
    visibility: visible;
}

.nav__link:hover span::after {
    width: 100%;
}

.nav__list:has(.nav__link:hover) .nav__link:not(:hover) {
    opacity: 0.4;
}

.show-menu {
    left: 0;
}

.show-menu .nav__item {
    transform: translateX(0);
    pointer-events: auto;
}

/* Desktop view */
@media screen and (min-width: 1024px) {
    .container {
        margin-inline: auto;
    }

    .nav {
        padding: 0 20px;
        height: calc(var(--header-height) + 2rem);
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }

    .nav__link {
        font-size: var(--normal-font-size);
    }

    .nav__link i {
        font-size: 1.5rem;
    }

    .nav__list {
        flex-direction: row;
        column-gap: 3.5rem;
    }

    .nav__menu {
        display: flex;
        align-items: center;
        column-gap: 3.5rem;
    }

    .nav__logo {
        margin-left: 0;
    }
}

/* Tablet view */
@media screen and (min-width: 768px) and (max-width: 1200px) {
    .nav__social {
        display: none;
    }
}

/* Small mobile screens */
@media screen and (max-width: 767px) {
    .container {
        margin-inline: 1rem;
    }

    .nav__logo {
        font-size: 24px;
        margin-left: 1rem;
    }

    .nav__menu {
        padding: 1.5rem 1rem;
    }
}