/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

p {
    margin-bottom: 1em;
}

a {
    color: #1da1f2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    padding-left: 1.5em;
}

nav {
    background: #333;
    position: relative;
    border-bottom: 2px solid #fff;
    z-index: 2;
}


.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
    position: static;
}

.logo {
    display: inline-block;
    position: relative;
    font-size: 1.5em;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    margin-right: 1em;
    vertical-align: middle;
    order: 1;
    padding: 0.25em 0.5em;
    z-index: 999;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    order: 2;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
}

.nav-menu {
    /* ... your nav-menu styles ... */
    order: 3;
}

nav ul {
    position: static;
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

nav li a {
    color: #fff;
    padding: 1em 1em;
}


nav a:hover {
    text-decoration: none;
    color: #f2faff;
}

/* Dropdown menu - CSS only */
nav li {
    position: static;
    display: inline-block;
}

nav li ul li {
    display: block;
    margin: 0;
    white-space: nowrap;
    padding: 0.5em 1em;
    text-align: left;
}

nav li ul a {
    color: #333;
    display: block;
}

nav li ul a:hover {
    color: #666;
    text-decoration: none;
}

.nav-outer-cover {
    visibility: hidden;
    width: 100%;
    height: 120%;
    margin-top: -20%;
    background: rgba(0, 0, 0, 0.0);
    position: fixed;
    z-index: -999;
    transition: all 0.3s ease-in;
}

.nav-outer-cover.show {
    visibility: visible;
    background: rgba(0, 0, 0, 0.5);
}

.search-container {
    position: relative;
    display: inline-block;
}

.search-icon {
    position: relative;
    width: 12px;
    height: 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: #000;
}

.search-icon:before {
    content: "";
    position: absolute;
    top: 12px;
    left: 5px;
    width: 1px;
    height: 6px;
    background-color: currentColor;
    transition: transform 0.3s ease;
    transform: rotate(-45deg);
}

.search-icon.close {
    width: 21px;
    height: 21px;
}

.search-icon.close:before {
    top: 10px;
    width: 21px;
    height: 1px;
    transition: transform 0.3s ease;
    transform: rotate(-45deg);
}

.search-icon.close:after {
    content: "";
    position: absolute;
    top: 10px;
    width: 21px;
    height: 1px;
    background-color: currentColor;
    transition: transform 0.3s ease;
    transform: rotate(45deg);
}

.search-icon:hover {
    background-color: #ccc;
}

/* Dropdown Menu - Arrow */
.arrow {
    position: relative;
    display: inline-block;
    color: #fff;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.arrow::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 10px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transition: all 0.3s ease;
}

.arrow.up::after {
    transform: translate(-50%, -50%) rotate(-135deg);
}

.arrow:focus {
    outline: none;
}

.arrow:focus::after {
    transform: translate(-50%, -50%) rotate(-135deg);
}

.arrow.active {
    transform: rotate(180deg);
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 2em;
}

article {
    margin-bottom: 2em;
}


header {
    background-image: url("images/bg-image.webp");
    padding: 2em;
    text-align: center;
    left: 0;
    position: absolute;
    /* Add this line */
    top: 2em;
    /* Add this line */
    width: 100%;
    /* Add this line */
    margin-bottom: 24px;
    overflow: hidden;
    background-position: center;
    background-size: cover;
    height: 50vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

header h1 {
    margin-bottom: 0.5em;
    font-size: 3em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #fff;
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
}

header p {
    text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    color: #fff;
}

section {
    margin-top: 50vh;
}

footer {
    background-color: #f0f0f0;
    padding: 3em 2em;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.newsletter {
    max-width: 500px;
}

.newsletter h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    color: #333;
}

.newsletter p {
    font-size: 1em;
    color: #777;
    margin-bottom: 2em;
}

.newsletter input[type="email"] {
    border: none;
    border-radius: 0.5em;
    padding: 1em;
    font-size: 1em;
    width: 100%;
    margin-bottom: 1em;
}

.newsletter button[type="submit"] {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 0.5em;
    padding: 1em 2em;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.newsletter button[type="submit"]:hover {
    background-color: #0069d9;
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: block;
    margin-right: 1em;
    color: #333;
    font-size: 1.5em;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #007bff;
}

@media screen and (max-width: 768px) {
    nav-content {
        justify-content: space-between;
        position: relative;
    }

    .hamburger-menu {
        position: absolute;
        display: flex;
        right: 0;
        margin-right: 15px;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        z-index: 999;
    }

    .hamburger-menu span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #fff;
        transition: all 0.3s;
        /* Add this line */
    }

    .hamburger-menu.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        /* Add this line */
    }

    .hamburger-menu.open span:nth-child(2) {
        opacity: 0;
        /* Add this line */
    }

    .hamburger-menu.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        /* Add this line */
    }

    .nav-menu {
        /* Remove display: none; */
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        list-style-type: none;
        text-align: left;
        z-index: 1;
        opacity: 0;
        transition: opacity 0.3s, max-height 0.3s;
        /* Add max-height transition */
        max-height: 0;
        /* Add this line */
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        /* Add this line for smoother scrolling on iOS */
    }

    .nav-menu li {
        display: none;
        position: relative;
        flex-direction: column;
        width: 100%;
        border-bottom: 1px solid #f2faff;
    }

    .nav-menu li.show {
        display: flex;
    }

    .nav-menu li:first-child {
        border-top: 2px solid #f2faff;
    }

    .nav-menu li a {
        display: flex;
        position: relative;
        width: 100%;
        padding: 1em;
    }

    .nav-menu.show {
        /* Remove display: block; */
        opacity: 1;
        max-height: 100vh;
        /* Add this line */
    }

    .nav-menu li ul {
        display: block;
        flex-direction: column;
        background-color: rgba(130, 130, 130, 0.4);
        opacity: 0;
        max-height: 0;
        transition: all 0.3s;
    }

    .nav-menu li div.dropdown {
        display: flex;
        flex-direction: row;
    }

    .nav-menu li ul.show {
        display: flex;
        opacity: 1;
        max-height: 100vh;
    }

    .nav-menu li ul li {
        padding: 1em;
        display: none;
    }

    .nav-menu li ul li.show {
        display: flex;
    }

    .nav-menu li ul li a {
        padding: 0;
        border: 0;
    }

    .nav-menu li ul li:first-child a {
        border-top: 0;
    }

    .nav-menu a {
        color: white;
    }

    .nav-menu li:last-child {
        margin-bottom: 0;
    }

    .arrow {
        padding: 10px 20px;
        font-size: 16px;
    }

    footer {
        background-color: #f0f0f0;
        padding: 3em 2em;
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        flex-direction: column;
    }

    .social-icons {

        flex-direction: row;
        width: 100%;
        justify-content: space-evenly;
        margin-top: 2em;
    }


}

@media screen and (min-width: 769px) {
    .nav-menu>li>ul {
        position: absolute;
        top: 100%;
        left: 0;
    }

    .dropdown-menu {
        position: absolute;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: white;
        margin-top: 14px;
    }

    .dropdown-menu ul {
        display: flex;
        justify-content: space-around;
        margin: 0 auto;
        overflow: scroll;
        visibility: hidden;
        opacity: 0;
        max-height: 0vh;
        text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease-in-out;
    }

    .dropdown-menu ul.show {
        padding: 1em;
        visibility: visible;
        opacity: 1;
        max-height: 100vh;
        text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    }

    .dropdown-menu ul li {
        display: flex;
        text-align: center;
        /* background: url(images/accessories-bg-square.webp); */
        background-size: contain;
        background-position: center;
        background-repeat: no-repeat;
        height: 150px;
        width: 150px;
        margin: 0 12px;
        font-size: 16px;
        padding: 0;
        margin: 0;
        align-items: end;
        justify-content: center;
        color: #fff;
        overflow: hidden;
    }

    .dropdown-menu ul li.show {
        display: flex;
    }

    .dropdown-menu ul li a {
        color: #fff;
    }

    .dropdown-menu ul.show li a {
        display: flex;
        flex-direction: column;
        justify-content: center;
        background-color: rgba(0, 0, 0, 0.2);
        width: 100%;
        height: 100%;
        padding: 12px 0;
        color: #fff;
        transition: all 0.6s ease-in-out;
    }

    .dropdown-menu ul.show li:hover a {
        background-color: rgba(29, 161, 242, 0.3);
    }

    .nav-search {
        position: absolute;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: white;
        margin-top: 14px;
        padding: 12px;
        overflow: scroll;
        visibility: hidden;
        opacity: 0;
        max-height: 0vh;
        text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease-in-out;
    }

    .nav-search.show {
        visibility: visible;
        opacity: 1;
        max-height: 100vh;
        text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.1);
    }

    .nav-search input {
        max-width: 800px;
        display: block;
        margin: 0 auto !important;
        border-radius: 24px !important;
        padding-left: 24px !important;
    }

    .arrow {
        padding: 6px 0px;
        margin-left: -16px;
        font-size: 6px;
        padding-left: 24px;
    }

    .arrow:after {
        width: 6px;
        height: 6px;
    }

    .social-icons {
        flex-direction: column;
    }

    footer {
        align-items: center;
    }
}

/* Form elements */
label, input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-bottom: 1em;
}

input[type="submit"],
button {
    cursor: pointer;
    background-color: #1da1f2;
    color: #fff;
    padding: 0.75em 1em;
    border: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover,
button:hover {
    background-color: #0c7abf;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.clearfix::before,
.clearfix::after {
    content: "";
    display: table;
}

.clearfix::after {
    clear: both;
}

.float-left {
    float: left;
}

.float-right {
    float: right;
}