/* Your existing styles with responsive improvements */

html {
  background: url('engage.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  font-family: handlee, sans-serif;
  
  /* Add smooth scrolling */
  scroll-behavior: smooth;
}   

/* Preserve all your existing link styles */
a{
    color: aliceblue;
}
a:visited{
    color: aliceblue;
}
a:hover{
    color: #c5cbe1;
}
a:active{
    color: #54645dc6;
}

/* Enhanced responsive title */
#title{
    color: aliceblue;
    text-align: center;
    font-size: clamp(28px, 6vw, 48px); /* Responsive font size */
    font-weight: bold;
    text-shadow: 6px 6px 4px #ae6e55;
    padding: clamp(50px, 15vw, 100px); /* Responsive padding */
    margin-top: 0px;
    margin-bottom: auto;
}

/* Mobile-first navigation */
nav{
    font-size: clamp(16px, 4vw, 24px); /* Responsive font size */
    font-weight: bold;
    text-align: center;
    text-shadow: 3px 3px 2px #ae6e55;
    text-decoration: none;
    color: aliceblue;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: space-evenly;
    gap: 10px; /* Add gap for better spacing */
    transition: color 0.5s;
    padding-bottom: clamp(30px, 10vw, 60px);
    padding-left: 10px;
    padding-right: 10px;
}

/* Navigation links - make them touch-friendly */
nav a {
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 44px; /* Touch-friendly minimum size */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav a:hover {
    background-color: rgba(174, 110, 85, 0.3);
    transform: translateY(-2px);
}

/* Preserve your header styling */
header{
    background-color: #54645dc6;
    border: #ae6e55;
    border-style: outset;
    border-width: 10px;
    box-shadow: 10px 10px 30px #353d33;
}

/* Enhanced button responsiveness */
button{
    color: aliceblue;
    background-color: #54645dc6;
    text-shadow: 3px 3px 2px #ae6e55;
    font-weight: bold;
    font-family: handlee, sans-serif;
    transition: background-color 0.5s;
    border: #ae6e55;
    border-style: outset;
    border-width: 5px;
    
    /* Make buttons touch-friendly */
    min-height: 44px;
    min-width: 44px;
    font-size: clamp(14px, 3vw, 16px);
}

#rsvpButton{
    display: block;
    margin: 20% auto;
    padding: 10px 20px;
    box-shadow: 4px 4px 12px #c5cbe1;
}

#userSubmit, #rsvpSubmit{
    display: block;
    margin: 5% auto;
    padding: 12px 20px;
    box-shadow: 4px 4px 12px #c5cbe1;
}

button:hover{
    color: #c5cbe1;
    background-color: #ae6e55;
    transform: translateY(-2px);
}

button:active{
    background-color: #353d33;
    border: #ae6e55;
    border-style: inset;
    border-width: 5px;
    transform: translateY(0);
}

/* Enhanced footer responsiveness */
.special{
    background-color: #54645dd1;
    text-align: center;
    color: aliceblue;
    margin-bottom: 0;
    text-shadow: 3px 3px 2px #ae6e55;
    line-height: 1.5;
    backdrop-filter: blur(2px);
    font-size: clamp(16px, 4vw, 20px);
    letter-spacing: 0.5px;
    border: #ae6e55;
    border-style: outset;
    border-width: 10px;
    padding: clamp(20px, 5vw, 40px);
}

#specialPara{
    max-width: 90%; /* More mobile-friendly width */
    margin: 0 auto 20px;
    padding: 0 10px;
}

/* Preserve contact styling with mobile improvements */
#contactHeader, #rsvpHeader{
    color: aliceblue;
    font-size: clamp(28px, 8vw, 48px);
    font-weight: bold;
    text-shadow: 6px 6px 4px #ae6e55;
    display: flex;
    justify-content: center;
    text-align: center;
    padding: clamp(50px, 15vw, 100px);
    margin-top: 0px;
}

/* Enhanced form container responsiveness */
#divContact, #rsvpBox1{
    margin: 2% auto;
    background-color: #54645dc6;
    border: #ae6e55;
    border-style: outset;
    border-width: 10px;
    max-width: 95%; /* Prevent overflow on mobile */
    padding: 20px;
}

/* Mobile-friendly form labels */
label {
    display: block;
    margin-top: 5%;
    margin-bottom: 5px;
    font-weight: bold;
    color: aliceblue;
    text-shadow: 3px 3px 2px #ae6e55;
    text-align: center;
    font-size: clamp(14px, 3.5vw, 16px);
}

/* Responsive form inputs */
input, textarea {
    width: min(90%, 400px); /* Responsive width with max */
    max-width: 400px;
    padding: 12px;
    margin: 5px auto 15px;
    border: 2px solid #ae6e55;
    border-radius: 4px;
    display: block;
    font-size: 16px; /* Prevents zoom on iOS */
    box-sizing: border-box;
}

/* Specific textarea sizing */
#userMessage, #rsvpMessage {
    width: min(90%, 600px);
    max-width: 600px;
    height: 100px;
    resize: vertical; /* Allow vertical resize only */
    min-height: 80px;
}

/* Preserve success message styling */
#successMessage {
    background-color: #ae6e55;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    margin: 20px auto;
    max-width: 90%;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

#successMessage.show {
    opacity: 1;
    transform: translateY(0);
}

/* RSVP specific responsive styles */
h2{
    display: flex;
    justify-content: center;
    text-align: center;
    margin-top: 2%;
    color: aliceblue;
    font-weight: bold;
    text-shadow: 3px 3px 2px #ae6e55;
    font-size: clamp(18px, 5vw, 24px);
    padding: 0 10px;
}

.important-para{
    color: aliceblue;
    width: min(90%, 600px);
    text-align: center;
    font-size: clamp(16px, 4vw, 20px);
    text-shadow: 2px 2px 4px #ae6e55;
    letter-spacing: 0.5px;
    margin: 10px auto;
    line-height: 1.6;
}

.notice-box{
    border: 5px #ae6e55;
    padding: clamp(15px, 5vw, 20px);
    margin: 20px auto;
    width: fit-content;
    max-width: 95%;
    box-sizing: border-box;
    box-shadow: 4px 4px 12px #c5cbe1;
    border-radius: 8px;
    border-style: outset;
    border-width: 5px; 
}

#instrucEmph{
    font-weight: bolder;
    font-style: italic;
    line-height: 1.5;
    backdrop-filter: blur(2px);
}

/* Enhanced radio button responsiveness */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 5vw, 20px);
    margin: 30px auto;
    padding: 0 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background-color: rgba(174, 110, 85, 0.2);
    border-radius: 8px;
    min-width: 120px;
    justify-content: center;
    transition: all 0.3s ease;
}

.radio-option:hover {
    background-color: rgba(174, 110, 85, 0.4);
    transform: translateY(-2px);
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
}

.radio-option label {
    margin: 0;
    font-size: clamp(14px, 3.5vw, 16px);
    cursor: pointer;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Stack navigation vertically on very small screens */
    nav {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding-bottom: 30px;
    }
    
    nav a {
        width: 80%;
        max-width: 200px;
    }
    
    /* Adjust background attachment for mobile performance */
    html {
        background-attachment: scroll;
    }
    
    /* Larger touch targets for mobile */
    button {
        min-height: 48px;
        min-width: 120px;
        font-size: 16px;
    }
    
    /* Better mobile form spacing */
    #divContact, #rsvpBox1 {
        margin: 10px;
        padding: 15px;
        border-width: 5px;
    }
    
    /* Stack radio buttons vertically on very small screens */
    .radio-group {
        flex-direction: column;
        width: 100%;
    }
    
    .radio-option {
        width: 80%;
        max-width: 250px;
    }
    
    /* Adjust text areas for mobile */
    #userMessage, #rsvpMessage {
        width: 95%;
        height: 120px;
    }
}

/* Medium screens (tablets) */
@media (min-width: 769px) and (max-width: 1024px) {
    nav {
        gap: 15px;
        padding: 0 20px 40px;
    }
    
    #divContact, #rsvpBox1 {
        max-width: 85%;
        margin: 2% auto;
    }
    
    input, textarea {
        width: min(70%, 500px);
    }
    
    #userMessage, #rsvpMessage {
        width: min(80%, 700px);
    }
}

/* Large screens - preserve your original design */
@media (min-width: 1025px) {
    /* Your original styles work perfectly here */
    input, textarea {
        width: 30%;
    }
    
    #userMessage, #rsvpMessage {
        width: 1000px;
    }
    
    .important-para {
        width: 60%;
    }
    
    .notice-box {
        max-width: 80%;
    }
}