* {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    text-decoration: none;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --color-primary: #1d7996;
    --color-success: #00bf8e;
    --color-warning: #f7c94b;
    --color-danger: #23929E;
    --color-red: #f88d68;
    --color-danger-variant: rgba(247, 88, 66, 0.4);
    --color-white: #FFFFFF;
    --color-light: rgba(255, 255, 255, 0.7);
    --color-dark: #333;
    --color-black: #000;
    --color-bg: #0F3B49;
    --color-bg1:  #12495a;
    --color-bg2: #18637a;

    --container-width-lg: 80%;
    --container-width-md: 90%;
    --container-width-sm: 94%;

    --transition: all 400ms ease;
}


/* keyboard accessibility */
:focus-visible {
    outline: 2px solid var(--color-white);
    border-radius: 2px;
    transition: none !important;
}


body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.7;
    color: var(--color-white);
    background: var(--color-bg);
}

.container {
    width: var(--container-width-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    padding: 6rem 0;
}

.section h2 {
    text-align: center;
    margin-bottom: 4rem;
}

h1,
h2,
h3,
h4,
h5 {
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 2.4rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.3rem;
}

a {
    color: var(--color-white);
}

img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.btn {
    display: inline-block;
    background: var(--color-white);
    color: var(--color-black);
    padding: 1rem 2rem;
    border: 1px solid transparent;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 4px;
}

.btn-primary {
    background:  var(--color-primary);
    color: var(--color-white);
}

.btn-primary:focus-visible {
    outline: 3px solid var(--color-white);
    outline-offset: 4px;
}


/* ================ SKIP TO MAIN BUTTON =============== */
.skip_to_main {
    position: fixed;
    top: 50%;
    left: 0;
    transform: rotate(-90deg) translate(-35%, -150%);
    transform-origin: 0% -50%;
    background: transparent;
    font-size: 0.9rem;
    z-index: 12;
    border-radius: 0 0 10px 10px;
}

.skip_to_main:focus-visible {
    transform: rotate(-90deg) translate(-35%, -50%);
}


/* ================ NAVBAR =============== */
.nav {
    background: transparent;
    width: 100vw;
    height: 4rem;
    position: fixed;
    top: 0;
    z-index: 11;
}

/* Change navbar style on scroll using javascript */
.window-scroll {
    background: var(--color-bg1);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.nav__container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav button {
    display: none;
}

.pymcon__logo {
    width: 250px;
}

.pymcon__logo>a:focus-visible img {
    outline: 2px solid var(--color-white);
    border-radius: 5px;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__menu a {
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav__menu a:hover {
    color: var(--color-danger);
}


/* ============================ SMALL HEADER ======================== */
.small__header {
    position: relative;
    overflow: hidden;
}

.small__header__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 5rem;
    height: 100%;
}

.small__header__left p {
    margin: 1rem 0;
}


/* ======================== FOOTER ====================== */
.footer {
    background: var(--color-bg1);
    font-size: 0.9rem;
}

.footer__container {
    padding-top: 4rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5rem;
}

.footer__container>div h2 {
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
}

.footer__1 p {
    margin: 1rem 0 2rem;
}

.footer__logo>a:focus-visible img {
    outline: 2px solid var(--color-white);
    border-radius: 5px;
    outline-offset: 3px;
}

.footer ul li a:hover {
    text-decoration: underline;
}

.footer__socials {
    display: flex;
    gap: 1rem;
    font-size: 1.2rem;
    margin-top: 2rem;
}

.footer__socials li a:hover {
    color: var(--color-bg1);
    border-radius: 15%;
    background: var(--color-white);
}

.footer__copyright {
    text-align: center;
    margin-top: 1rem;
    padding: 1.2rem 0;
    border-top: 1px solid var(--color-bg2);
}




/* =================== MEDIA QUERIES (TABLETS) ========================= */

@media screen and (max-width: 1024px) {
    .section {
        padding: 4rem 0;
    }

    .container {
        width: var(--container-width-md);
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.4rem;
    }

    h4 {
        font-size: 1rem;
    }

    /* ======================== NAVBAR ============================ */
    .nav button {
        display: inline-block;
        background: transparent;
        font-size: 1.8rem;
        color: var(--color-white);
        cursor: pointer;
    }

    .nav button#close-menu-btn {
        display: none;
    }

    .pymcon__logo {
        width: 30%;
    }

    .nav__menu {
        position: fixed;
        top: 5rem;
        right: 5%;
        height: fit-content;
        width: 15rem;
        flex-direction: column;
        gap: 0;
        display: none;
    }

    .nav__menu li {
        width: 100%;
        height: 3.5rem;
        animation: animateNavItems 300ms linear forwards;
        transform-origin: top right;
        opacity: 0;

        border: 0.1px solid;
        border-color: var(--color-bg2);
    }

    .nav__menu li:nth-child(2) {
        animation-delay: 100ms;
    }

    .nav__menu li:nth-child(3) {
        animation-delay: 200ms;
    }

    .nav__menu li:nth-child(4) {
        animation-delay: 300ms;
    }

    .nav__menu li:nth-child(5) {
        animation-delay: 400ms;
    }

    .nav__menu li:nth-child(6) {
        animation-delay: 500ms;
    }

    .nav__menu li:nth-child(7) {
        animation-delay: 600ms;
    }

    .nav__menu li:nth-child(8) {
        animation-delay: 700ms;
    }


    @keyframes animateNavItems {
        0% {
            transform: rotateZ(-90deg) rotateX(90deg) scale(0.1);
        }

        100% {
            transform: rotateZ(0) rotateX(0) scale(1);
            opacity: 1;
        }
    }

    .nav__menu li a {
        background: var(--color-primary);
        box-shadow: -4rem 6rem 10rem rgba(0, 0, 0, 0.6);
        width: 100%;
        height: 100%;
        display: grid;
        place-items: center;
    }

    .nav__menu li a:hover {
        background: var(--color-bg2);
        color: var(--color-white);
    }


    /* =========================== small__header ========================== */
    .small__header__container {
        gap: 0;
    }


    /* ======================= FOOTER ======================== */
    .footer__container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}




/* =================== MEDIA QUERIES (PHONES) ========================= */
@media screen and (max-width: 600px) {
    .container {
        width: var(--container-width-sm);
    }


    /* ======================= NAVBAR ======================== */
    .pymcon__logo {
        width: 60%;
    }

    .nav__menu {
        right: 3%;
    }


    /* ======================= FOOTER ======================== */
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    
    /* ======================= SMALL HEADER ======================== */
    .small__header {
        height: 70vh;
        margin-top: 4rem;
    }

    .small__header__container {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 0;
    }

    .small__header__left p {
        margin-bottom: 1.3rem;
    }

    .small__header__right {
        grid-row: 1;
        z-index: -10;
    }

    .footer__logo {
        margin: 0 auto;
        width: 50%;
    }

    .footer__1 p {
        margin: 1rem auto;
    }

    .footer__socials {
        justify-content: center;
    }

}