body {
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #e8e8ee;
    background: url('../media/photos/pool_edited.jpg') no-repeat ;
    background-size: cover;
    backdrop-filter: blur(50px);
}

header {
    height: 150px; 
    background-color: #020321;
    color: #ECF0F9;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.language-selector {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

@media (max-width: 550px) {
    .language-selector {
        flex-direction: column;
    }
}

.language-selector a {
    color: #ECF0F9;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #ECF0F9;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.language-selector a:hover {
    background-color: #ECF0F9;
    color: #020321;
}

.logo-container {
    text-align: center;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.header-text {
    text-align: left;
}

.header-text h1 {
    margin: 0;
    font-size: 1.5em;
}

.header-text p {
    margin: 5px 0 0;
    font-size: 1em;
}

.topnav {
    background-color: #020321;
    display: flex;
    overflow: hidden;
    justify-content: center;
    align-items: center;
}

.topnav a {
    float: left;
    display: flex;
    color: #ECF0F9;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
    justify-content: center;
    align-items: center;
}

.topnav a:hover {
    background-color: #ECF0F9;
    color: black;
}

.topnav a.active {
    background-color: #020321;
    color: #ECF0F9;
}

.topnav .icon {
    display: none;
}

@media screen and (max-width: 900px) {
    .topnav a:not(:first-child) {display: none;}
    .topnav a.icon {
        float: right;
        display: block;
    }
}

@media screen and (max-width: 900px) {
    .topnav.responsive {position: relative;}
    .topnav.responsive a.icon {
        position: absolute;
        right: 0;
        top: 0;
        display: block;
    }
    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
    .topnav {
        display: block;
    }
}

/*_________Content________________*/

.form-container {
    background: linear-gradient(#02032145, rgba(255, 255, 255, 0.237));
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

label {
    flex: 1 1 100%;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ECF0F9;
}

#message {
    width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
select {
    flex: 1 1 100%;
    padding: 10px;
    border: 1px solid #6c6c6c;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

input[type="radio"] {
    margin-right: 10px;
    margin-left: 20px;
    accent-color: rgba(2, 3, 33, 0.8);
}
input[type="checkbox"] {
    accent-color: rgba(2, 3, 33, 0.8);
}

input[type="file"] {
    color: #ECF0F9;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.radio-group label {
    margin: 0;
}

#locality, #county, #lastname, #blueprints {
    width: 100%;
    max-width: 400px;
}

.terms {
    display: flex;
    align-items: center;
    gap: 10px;
}
.terms a {
    color: #ECF0F9;
}
.terms a:hover {
    color: #020321;
}

button[type="submit"] {
    background-color: #ECF0F9;
    color: #020321;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button[type="submit"]:hover {
    background-color: rgba(2, 3, 33, 0.8);
    color: #ECF0F9;
}

/*____________Popup message_______________*/

.popup {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    animation: fadeIn 0.5s; /* Animation for fading in the background */
}

.popup-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 700px;
    border-radius: 8px;
    animation: slideDown 0.5s;
}

@keyframes fadeIn {
    from {background-color: rgba(0,0,0,0);}
    to {background-color: rgba(0,0,0,0.4);}
}

@keyframes slideDown {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

@keyframes fadeOut {
    from {background-color: rgba(0,0,0,0.4);}
    to {background-color: rgba(0,0,0,0);}
}

@keyframes slideUp {
    from {transform: translateY(0); opacity: 1;}
    to {transform: translateY(-50px); opacity: 0;}
}

/* Add a class for fading out */
.popup.fade-out {
    animation: fadeOut 0.5s forwards; /* Use forwards to keep the end state */
}

.popup-content.fade-out {
    animation: slideUp 0.5s forwards; /* Use forwards to keep the end state */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#hero {
    background-size: cover;
    background-attachment: fixed;
    color: #ECF0F9;
    text-align: center;
    padding: 150px 20px;
}

footer {
    background-color: rgba(2, 3, 33, 0.8);
    color: #B2BFC7;
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border-radius: 10px;
    margin: 20px;
    margin-bottom: 0;
}

footer p {
    margin: 0;
}
