.modal-overlay {
    background: var(--overlay);
    border-radius: var(--radius);
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    top: 50%;
    left: 50%;
    position: absolute;
    z-index: 1000;
    display: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: block;
}

#contactModal {
    width: 420px;
    height: 580px;
}

#contactForm {
    padding: 0 1rem;
    width: 100%;
    height: 75%;
    margin-bottom: 3rem;
}

.pot {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

#response {
    background: var(--overlay);
    border-radius: var(--radius);
    width: 420px;
    height: 7rem;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
    top: 50%;
    left: 50%;
    position: absolute;
    z-index: 1000;
    display: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 1rem;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

#response.active {
    display: flex;
}

/* Blur background when modal is open */
body.modal-open>*:not(#contactModal) {
    filter: blur(5px);
    transition: filter 0.3s ease;
}

.close-btn {
    width: 2rem;
    height: 2rem;
    padding: 1rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    line-height: 0;

    cursor: pointer;

    background-color: var(--bg);
    color: var(--text);
    border: none;
    border-radius: 50%;

    top: 0.5rem;
    right: 0.5rem;

    position: absolute;
}

.close-btn:hover {
    background-color: var(--primary);
    color: var(--text-dark);
}

/* Heading */
#contact-header {
    text-align: center;
    margin-top: 1rem;
    color: var(--text);
    height: 10%;
}

/* Labels */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text);
    height: 7%;
}

/* Inputs and textareas */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    height: 12%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid #ccc;
    border-radius: var(--radius);
    font-size: 14px;
    box-sizing: border-box;
}

/* Textarea specific */
textarea {
    resize: vertical;
    height: 20%;
}

/* Button styling */
#contactForm button {
    width: 100%;
    height: 12%;
    padding: 0.5rem;
    background-color: var(--overlay);
    color: var(--text);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
}

#contactForm button:hover {
    background-color: var(--primary);
    color: var(--text-dark);
}

/* Contact info below form */
.contact-info {
    text-align: center;
    margin-top: 3rem;
    color: var(--text);
    height: 7%;
}

.contact-info a {
    color: var(--primary);
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Contact Now */
#contact-options {
    display: inline-flex;
    gap: 2.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
}

#contact-now {
    margin: 1rem 0;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    background: var(--overlay);
    color: var(--text);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

#contact-now:hover {
    background-color: var(--primary);
    color: var(--text-dark);
}

#vCard {
    margin-top: 1rem;
    width: 150px;
    height: 150px;
    cursor: pointer;
}

#QRCodeModal {
    width: 420px;
    height: 500px;
}

#vCard-Modal {
    margin-top: 1rem;
    width: 100%;
    height: auto;
}

/*mobile styling*/
@media (max-width: 675px) {

    .modal-overlay {
        width: 70%;
        height: 75%;
    }

    #contact-header {
        font-size: medium;
        font-weight: bold;
        margin: 0;
        height: 5%;
    }

    #response {
        width: 70%;
        height: 75%;
    }

    .label {
        margin: 0;
    }

    #contactForm {
        margin-bottom: 2rem;
    }
}

/*small mobile styling*/
@media (max-width: 250px) {

    .modal-overlay {
        width: 70%;
        height: 90%;
    }

    #contact-header {
        font-size: medium;
        font-weight: bold;
        margin: 0;
        height: 5%;
    }

    #response {
        width: 70%;
        height: 90%;
    }

    .label {
        margin: 0;
    }

    #contactForm {
        margin-bottom: 2rem;
    }
}