/*Header*/

#toggle-container img {
    max-width: 300px;
    height: auto;
    width: 100%;
}

#headerContent {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: #542432;
}

nav>menu>li>a:hover {
    background-color: #724f5a;
}


nav li {
    position: relative;
    display: block;
    cursor: pointer;
}

nav a {
    background: #542432;
    color: #FFF;
    padding: 20px 40px;
    box-sizing: border-box;
    position: relative;
}

nav>menu {
    display: flex;
}

nav>menu>li {
    pointer-events: all;
    opacity: 1;
}

/*Loader*/

#loader-content {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 16, 16, 0.5);
    z-index: 100;
}

.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100;
    width: 50px;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(farthest-side, #ccc 94%, #0000) top/8px 8px no-repeat,
        conic-gradient(#0000 30%, #ccc);
    -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 8px), #000 0);
    animation: l13 1s infinite linear;
}

@keyframes l13 {
    100% {
        transform: rotate(1turn)
    }
}

/*Body*/

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: "Rubik", sans-serif;
    padding: 0;
    color: #333;
}

main {
    flex: 1;
    padding: 20px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: space-between;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 5px;
    width: 100%;
}

/*Footer*/

footer {
    background-color: #542432;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: auto;
    text-align: center;
    flex-shrink: 0;
}

/*Decoration*/

b {
    color: #542432;
    font-weight: bold;
}

a {
    color: #542432;
}

button:hover,
a:hover {
    background-color: #724f5a;
}

a:focus {
    color: #452454;
}

button,
input[type="submit"],
input[type="button"] {
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #542432;
    color: white;
    cursor: pointer;
    text-align: center;
}


input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="textarea"],
textarea,
select {
    border-radius: 5px;
    border: 1px solid #ccc;
    background-color: #ffffff;
    padding: 5px;
    box-sizing: border-box;
}

input[type="radio"] {
    height: 17px;
    width: 17px;
    background-color: #ffffff;
    border: #542432 2px solid;
    border-radius: 50%;
}

input[type="radio"]:hover {
    background-color: #ccc;
}

input[type="radio"]:checked {
    background-color: #542432;
}

.error {
    background-color: rgba(255, 0, 4, 0.203) !important;
    border-color: rgba(129, 0, 2, 0.507) !important;
}

::placeholder {
    color: grey;
    opacity: 0.5;
}

::-ms-input-placeholder {
    color: grey;
    opacity: 0.5;
}

th {
    font-weight: bold;
    white-space: nowrap;

}

td {
    border: 1px solid #ccc;
}

td,
th {
    padding-right: 10px;
}

table {
    margin-bottom: 10px;
    width: 100%;
    border-collapse: collapse;
}

fieldset {
    margin: 0 auto;
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fff;
}

legend {
    font-weight: bold;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
}

.row-click {
    cursor: pointer;
}

.row-click:hover {
    background-color: #cccccc68;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="password"]:focus,
input[type="textarea"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #542432;
}

input[type="button"]:focus,
input[type="submit"]:focus,
button:focus {
    border: 1px solid #542432;
    background-color: #542432e1;
}

.hidden {
    display: none;
}

.clickable {
    cursor: pointer;
}

.past {
    position: relative;
}

.past::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(53, 53, 53, 0.39);
    pointer-events: none;
}

/*Custom Select*/

.custom-select {
    position: relative;
    display: inline-block;
    width: 100%;
}

.custom-select select {
    background-color: #ffffff;
    border: 1px solid #ccc;
    -webkit-appearance: button;
    appearance: button;
    outline: none;
    width: 100%;
}

/* Custom Checkbox */

input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 1px solid #542432;
    border-radius: 3px;
}

.checkbox::after {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    width: 100%;
    height: 100%;
    background-color: #542432;
    border-color: #542432;
    color: #fff;
    border: 1px solid #542432;
    content: "✓";
    text-align: center;
    font-size: 12px;
}

input[type="checkbox"]:checked+.checkbox::after {
    display: block;
}

/* Styling for the popup */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.popup {
    display: none;
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/*Middle Section Box*/

.box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 75%;
    margin: 0 auto;
    background-color: rgba(84, 36, 50, 0.06);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.box p {
    margin-bottom: 10px;
}

.box h1 {
    color: #542432;
    font-weight: bold;
    font-size: 30px;
    text-align: center;
}

/* For tablets and larger screens */
@media only screen and (min-width: 768px) {

    .container {
        flex-direction: row;
    }

    /*Main nav*/

    #toggle-container a {
        display: flex;
    }

    #nav-toggle {
        display: none;
    }

    nav>menu>li>a {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    nav a {
        width: 190px;
    }

    menu li a {
        white-space: nowrap;
        display: block;
    }

    nav>menu>li>a {
        height: 102px;
    }

    nav li>menu {
        position: absolute;
        pointer-events: none;
    }

    li:hover>menu {
        pointer-events: initial;
    }

    li:hover>menu>li,
    menu:hover>li {
        opacity: 1;
    }

    nav>menu>li li menu {
        transform: translateX(100%);
        top: 0;
        right: 0;
        z-index: 1000;
    }

    nav>menu>li>a+menu:after {
        content: '';
        position: absolute;
        border: 10px solid transparent;
        border-top: 10px solid white;
        left: 12px;
        top: -55px;
    }

    nav li>menu>li>a+menu:after {
        content: '';
        position: absolute;
        border: 10px solid transparent;
        border-left: 10px solid white;
        top: 20px;
        left: -180px;
        transition: opacity 0.6, transform 0s;
    }

    nav>menu>li>menu>li {
        transition: opacity 0.3s;
        opacity: 0;
        z-index: 1000;
    }

    li>menu>li>menu>li {
        transition: opacity 0.6s;
        opacity: 0;
        z-index: 1000;
    }
}

/* For mobile devices */
@media only screen and (max-width: 768px) {

    .container {
        flex-direction: column;
    }

    #toggle-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        height: 100px;
    }

    #toggle-container img {
        max-width: 300px;
        height: auto;
    }

    #toggle-container div {
        flex: 1;
        text-align: center;
    }

    #nav-toggle {
        background-color: #55323c;
        height: 50px;
        width: 50px;
    }

    #nav-toggle:focus {
        border: 1px solid #ffffff;
    }

    #headerContent {
        height: 100px;
    }

    #main-nav {
        display: none;
    }

    #main-nav.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100px;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    nav a {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    nav>menu {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: absolute;
        width: 100%;
    }

    nav>menu>li {
        width: 100%;
    }

    nav>menu>li:hover>menu,
    nav>menu>li.active>menu,
    nav>menu>li>menu>li:hover>menu,
    nav>menu>li>menu>li.active>menu,
    nav>menu>li>menu>li>menu>li:hover>menu,
    nav>menu>li>menu>li>menu>li.active>menu {
        display: block;
    }

    nav>menu>li>menu,
    nav>menu>li>menu>li>menu,
    nav>menu>li>menu>li>menu>li>menu {
        display: none;
    }

    .box {
        width: 100%;
    }
}