@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap');

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
:root {
    --bg-color: #F3F2EC;
    --txt-color: #263238;
    --header-bg: #2F5F48;
    --txt-color2: #E5F2D2;
}

body {
    background-color: var(--bg-color);
    padding: 0 2rem;
}

/* General styles for header */
header {
    margin: 1rem 0;
    background-color: var(--header-bg);
    width: 100%;
    border-radius: 48px;
    padding: .5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* For positioning the hamburger icon */
}

.navlinks {
    display: flex;
    gap: 1.5rem;
}
.navlinks a {
    color: var(--txt-color2);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: color 0.3s ease, background-color 0.3s ease, border 0.3s ease;
    cursor: pointer;
    padding: 0.5rem 1rem; /* Add padding for better spacing */
    border-radius: 20px; /* Rounded corners */
    border: 2px solid transparent; /* Initial border */
    font-family: 'Arial', sans-serif;
}

.navlinks a:hover,
.navlinks a.active {
    color: var(--header-bg); /* Text color on hover or active */
    background-color: var(--txt-color2); /* Background color on hover or active */
    border: 2px solid var(--txt-color2); /* Border color on hover or active */
}



#logo {
    width: 70px;
    max-width: 100px;
    height: auto;
    margin: 0 1rem;
}

/* Hamburger icon styles */
#nav-icon2 {
    display: none; /* Hidden by default */
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

#nav-icon2 span {
    display: block;
    position: absolute;
    height: 4px;
    width: 50%;
    background: var(--txt-color2);
    opacity: 1;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

#nav-icon2 span:nth-child(even) {
    left: 50%;
    border-radius: 0 9px 9px 0;
}

#nav-icon2 span:nth-child(odd) {
    left: 0px;
    border-radius: 9px 0 0 9px;
}

#nav-icon2 span:nth-child(1), #nav-icon2 span:nth-child(2) {
    top: 0px;
}

#nav-icon2 span:nth-child(3), #nav-icon2 span:nth-child(4) {
    top: 12px;
}

#nav-icon2 span:nth-child(5), #nav-icon2 span:nth-child(6) {
    top: 24px;
}

/* Open state for hamburger animation */
#nav-icon2.open span:nth-child(1), #nav-icon2.open span:nth-child(6) {
    transform: rotate(45deg);
}

#nav-icon2.open span:nth-child(2), #nav-icon2.open span:nth-child(5) {
    transform: rotate(-45deg);
}

#nav-icon2.open span:nth-child(1) {
    left: 5px;
    top: 5px;
}

#nav-icon2.open span:nth-child(2) {
    left: calc(50% - 5px);
    top: 5px;
}

#nav-icon2.open span:nth-child(3),
#nav-icon2.open span:nth-child(4) {
    left: -50%;
    opacity: 0;
}

#nav-icon2.open span:nth-child(5) {
    left: 5px;
    top: 24px;
}

#nav-icon2.open span:nth-child(6) {
    left: calc(50% - 5px);
    top: 24px;
}

/* Styles for the mobile menu */
#mobile-menu {
    display: none; /* Hidden by default */
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--header-bg);
    padding: 1rem;
    border-radius: 8px;
    flex-direction: column;
    gap: 1rem;
    margin-top: -2rem;
    padding-top: 2rem;
    z-index: -1;
}

#mobile-menu a {
    color: var(--txt-color2);
    text-decoration: none;
}

/* Toggle the menu when the hamburger is clicked */
#nav-icon2.open + #mobile-menu {
    display: flex;
}


.header {
    margin-top: 7rem;
    font-family: "Lora", serif;
    font-optical-sizing: auto;
    font-weight: 700;
}
h1.head {
    color: var(--header-bg);
    text-align: center;
}
p.subhead {
    text-align: center;
    margin: 1.5rem auto;
    color: var(--header-bg);
    font-family: "Lora", serif;
    font-optical-sizing: auto;
    font-weight: 500;
}
.buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.buttons button {
    border: none;
    border-radius: 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 1rem 0.5rem;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
}
.firstbtn {
    padding: 0.5rem 2rem;
    background-color: var(--header-bg);
    color: var(--txt-color2);
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for both background and text color */
}
.firstbtn, .secondbtn {
    display: flex;
    align-items: center;
}
.firstbtn img, .secondbtn img {
    width: 31px;
    max-width: 65px;
    margin-left: 10px;
}
.secondbtn {
    background-color: transparent;
    padding: 1rem 2rem;
    color: var(--header-bg);
    border: 2px solid var(--header-bg);
    transition: background-color 0.3s ease, color 0.3s ease; /* Smooth transition for both background and text color */
}

.secondbtn:hover {    
    border: 2px solid var(--header-bg);
}
.firstbtn:hover {
    background-color: transparent;
    border: 2px solid var(--header-bg);
    color: var(--header-bg);
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: var(--header-bg);
    margin: 7rem 0 2rem 0;
    font-family: 'Area Trial', sans-serif;
}
.smlinks a, .copy p {
    color: var(--header-bg);
    text-decoration: none;
    margin-left: .5rem;
}

/* Large Screens (1024px and above) */
@media (min-width: 1024px) {
    body {
        padding: 0 5rem;
    }
    header a.logo {
        font-size: 1.5rem; /* Larger font size for large screens */
    }
    #logo {
        width: 85px; /* Slightly larger logo for large screens */
    }
    header a {
        margin: 0 2.5rem;
    }
    .header h1 {
        font-size: 64px;
    }
    .buttons button {
        font-size: 16px;
    }
    .firstbtn img, .secondbtn img {
        width: 40px;
    }
    footer {
        margin: 11rem 0 2rem 0;
    }
}

/* Medium Screens (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    body {
        padding: 0 4rem;
    }
    #logo {
        width: 55px; /* Adjust logo size for medium screens */
    }  
    header a.logo {
        font-size: 1.3rem; /* Default font size for small screens */
    }
    .firstbtn img, .secondbtn img {
        width: 36px;
    }
    footer {
        margin: 11rem 0 2rem 0;
    }
}

/* Small Screens (600px - 768px) */
@media (max-width: 768px) {
    /* body {
        padding: 0 2rem;
    } */
     
    header a.logo {
        font-size: 1.2rem; /* Default font size for small screens */
    }
    p, footer a {
        font-size: 1rem;
    }
    .firstbtn img, .secondbtn img {
        width: 34px;
    }
}

/* Extra Small Screens (375px - 600px) */
@media (max-width: 600px) {
    header .logo {
        font-size: 1rem;
    }
    p, footer a {
        font-size: .9rem;
    }
    .copyright, .smlinks {
        margin: 0.5rem 0;
    }
    .smlinks a {
        margin-left: 0;
    }
    footer {
        margin: 11rem 0 2rem 0;
    }
    /* Hide default nav links and show hamburger */
    .navlinks {
        display: none;
    }

    #logo {
        margin-right: auto; /* Align logo to the left */
    }

    #nav-icon2 {
        display: block; /* Show hamburger icon */
        margin-left: auto; /* Align hamburger to the right */
    }
}

@media (max-width: 375px) {
    header .logo {
        font-size: 0.7rem;
    }
    p {
        font-size: .8rem;
    }
}