/* --- 1. GLOBAL RESET --- */
*, *::before, *::after {
	box-sizing: border-box;
}

a, 
a:link, 
a:visited, 
a:hover, 
a:active {
  color: inherit;
}

html, body, p, h1, h2, h3 {
	margin: 0;
	padding: 0;
	color: #454140;
}

body {
	position: relative;
    width: 100%;
    min-height: 100vh;
    z-index: 1000;
	overflow-x: hidden; 
}

/* --- 2. LAYOUT CONTAINERS --- */
.content-wrapper {
	width: 90%; 
	max-width: 56.25rem; 
	margin: 0 auto;
}

/* --- 3. TYPOGRAPHY & GRADIENTS --- */
h1 { font-size: 3rem; margin-bottom: 0.5rem; }
h2 { font-size: 2rem; margin-top: 1rem; margin-bottom: 0.5rem; }
p { font-size: 1.25rem; line-height: 1.6; }

.gradient-text {
	background: linear-gradient(to right, rgb(101, 139, 88), rgb(204, 140, 115));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	padding: 0.1em 0.2em; 
	line-height: 1.2; 
}

button {
	display: flex;
	align-items: center; 
	justify-content: center; 
}

/* --- 4. MEDIA QUERIES --- */
@media only screen and (min-width: 48.8125rem) {
	#logo { display: block; margin: 0 auto; max-width: 30%; height: auto; padding: 0; }
	#weddingheading {
		background-image: url("JessFC_LOGO/JessFC_banner_notext.jpg");
		background-position: center;
		background-repeat: no-repeat;
		background-size: cover;
		width: 100%;
		height: 100vh;
	}
	#weddingheading h1 { font-size: 8rem; }
	#weddingheading h2 { font-size: 2.5rem; margin-top:-1.5rem; }
	#map { width: 60%; height: 50vh; }
}

@media only screen and (max-width: 48.75rem) {
	#logo { width: 100%; height: auto; display: block; margin: 0 auto; padding: 0; }
	#map { width: 100%; height: 40vh; }
	/* --- Grouped Container Layouts --- */
	#dietary1, #dietary2, #accommodation-wrapper, #music-wrapper { margin-top: 25%; }
}

/* --- 5. SECTIONS --- */
#weddingheading {
	position: fixed;
	z-index: -99;
	top: 0;
	width: 100%;
	height: 100vh;
	display: flex; 
	flex-direction: column; 
	justify-content: center; 
	align-items: center; 
	text-align: center; 
}

#FCNJ { display: flex; gap: 0.7rem; justify-content: center; align-items: center; font-size: 4rem; font-weight: 800; margin-bottom: 0; }
#subtext { margin-top: -1rem; transform: translateX(-1rem); font-size: 3rem; }
#introduction { text-align: center; padding-top: 4rem; background-color: white; min-height: 50vh; }

#wedding-details {
	background-color: rgb(101, 139, 88);
	padding: 4rem 0; 
	overflow: hidden;
	background-image: url("JessFC_LOGO/blomme_JessFC.png"), url("JessFC_LOGO/blomme_JessFC2.png");
	background-position: left center, right center;
	background-repeat: no-repeat, no-repeat;
	background-size: 30vw auto, 30vw auto;
	margin-bottom: -2px;
}

#detail-text-container { display: flex; text-align: center; justify-content: center; }
#detail-text {
	width: 100%;
	background-color: white;
	border-radius: 1rem;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#langimg { width: 20%; }
#date {
    font-size: 2.5rem;
    padding-top: 1rem;
}

#map-container { width: 100%; display: flex; justify-content: center; align-items: center; }
#map { margin: 1.5rem auto 0 auto; border-radius: 15px; overflow: hidden; border: 1px solid #ccc; width: 100%; }
#map iframe { width: 100%; height: 100%; border: none; }

/* --- 6. SVG CURVES --- */
.curved-separator { width: 100%; height: 100px; display: block; }
#top { margin-top: 100vh; }
#flip { transform: scaleY(-1); margin-bottom: -100px; fill: #FFFFFF; }

/* --- 7. RSVP SHAPES & FORMS --- */
#RSVP-container { width: 100%; position: relative; margin-top: -2px;}
#top-gn { background-color: rgb(101, 139, 88); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 60%); z-index: 10; min-height: 20vh; margin-top: -2px;}
#bottom-pk { background-color: rgb(194,126,101); margin-top: -5rem; padding: 1rem; }
#body-pk { background-color: rgb(194,126,101); display: flex; padding-top: 2rem; padding-bottom: 4rem; align-content: center; }
#RSVP-header { width: 100%; padding: 4rem; text-align: center; margin-bottom: 2rem; }

#RSVP-header.gradient-text {
	background: linear-gradient(to right, rgb(255, 255, 240), rgb(130, 163, 122));
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent; 
	padding: 0.2em 0.2em; line-height: 1.2;
}

#form-container {
	background-color: #ffffff;
	border-radius: 1.5rem; 
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1); 
	padding: 3rem 4rem; 
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 35rem; 
	margin: 0 auto;
}

#find-invite { width: 100%; display: flex; flex-direction: column; align-items: center; margin-top: 1rem; }
#find-invite label { margin-bottom: 1rem; color: #454140; font-size: 1.25rem; }
#input-button-group { display: flex; flex-direction: column; align-items: center; width: 100%; }

#fname {
	font-family: inherit; 
	width: 100%;
	padding: 1rem;
	border: 1px solid #d5c4c2; 
	border-radius: 0.5rem;
	font-size: 1.1rem;
	text-align: center;
	margin-bottom: 2rem;
	outline: none;
	transition: border-color 0.3s ease;
}

#fname:focus { border-color: rgb(101, 139, 88); }

button[form="find-invite"] {
	background-color: rgb(101, 139, 88); 
	color: rgb(255, 255, 240);
	font-size: 1.1rem;
	text-transform: uppercase;
	letter-spacing: 2px;
	height: 3.5rem;
	border-radius: 2rem; 
	padding: 0 3rem;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
}

button[form="find-invite"]:hover {
	background-color: rgb(80, 115, 68); 
	transform: translateY(-3px); 
	box-shadow: 0 5px 15px rgba(101, 139, 88, 0.4); 
}

/* --- Loading Spinner --- */
.spinner {
    display: inline-block; width: 1.5rem; height: 1.5rem;
    border: 3px solid rgba(255, 255, 240, 0.3); 
    border-radius: 50%; border-top-color: rgb(255, 255, 240); 
    animation: spin 1s ease-in-out infinite; margin-left: 0.75rem; 
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
button:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }

/* Mobile Formatting */
@media only screen and (max-width: 48.75rem) {
    #weddingheading {
        position: relative; z-index: 1; width: 100vw; aspect-ratio: 1 / 1.4; 
        background-image: url("JessFC_LOGO/JessFC_bannerphone_notext.jpg");
        background-size: 100% auto; background-position: center top; background-repeat: no-repeat;
        height: auto; display: flex; flex-direction: column; justify-content: flex-start; 
        padding-top: 16rem; top: 0 !important; margin-top: 0 !important;
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0% 100%);
    }

    #weddingheading h1 {font-size: 3rem;display: block !important;padding-top: 2rem;}
    #weddingheading h2 { font-size: 1.4rem; margin-top: 0; display: block !important; }
    #FCNJ { font-size: 2.2rem; }
    #subtext { font-size: 1.3rem; transform: none; }
    
    #introduction { margin-top: -3rem !important; padding-top: 5rem; background-color: white; position: relative; z-index: 0; }
    #top { margin-top: 0 !important; position: relative; z-index: 2; }
    #form-container { padding: 2rem 1.5rem; }
    #RSVP-header { padding: 2rem 1rem; }
    #body-pk {
    min-height: 50vh;
    margin-top: -2px;
}

    #top svg, #bottom svg, .flipped-separator svg, body > svg, main svg, form svg, div[class] svg, svg:last-of-type {
        display: none !important; visibility: hidden !important; height: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
    }

    #slideshow-container, .slideshow, #slideshow { overflow-x: hidden !important; max-width: 100vw; }
    html, body { max-width: 100vw; overflow-x: hidden; margin: 0; padding: 0; }
    #body-pk, footer, .footer-container, #rsvp-section { margin-bottom: 0 !important; padding-bottom: 2rem !important; }

    #map-container { width: 100%; max-width: 400px; margin: 2.5rem auto 0 auto; padding: 0 1rem; box-sizing: border-box; }
    #map { position: relative; width: 100%; height: 240px; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); border: 1px solid rgba(69, 65, 64, 0.15); }
    #map iframe { width: 100% !important; height: 100% !important; border: 0 !important; display: block !important; }

    #langimg { width: 50%; }
    #date { font-size: 1.5rem; }
}

/* Accessibility Utility Styles */
#enter-gallery-btn, .exit-gallery-btn {
    position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
#enter-gallery-btn:focus, .exit-gallery-btn:focus {
    position: relative; left: 0; width: auto; height: auto; padding: 0.75rem 1.5rem;
    background-color: rgb(101, 139, 88); color: white; border-radius: 2rem; border: none;
    margin: 1rem auto; cursor: pointer; display: block; z-index: 1001; text-align: center;
}

/* --- DEFINITIVE DESKTOP FORM CARD UNROLL & SQUEEZE --- */
@media screen and (min-width: 769px) {
#card, #rsvp-form {
        display: flex !important;
        flex-direction: column !important;
        height: 39.47rem !important; 
        overflow: hidden !important;
        padding-top: 1.5rem !important; /* Reduced to pull content up */
        justify-content: center;
        align-items: center;
		/*test*/
    }

    /* Compress the step containers */
    form#rsvp-form div[id^="step-"] {
        display: flex !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-bottom: 0.25rem !important; 
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        gap: 0.25rem !important;
    }

    /* Tighten headers and radio buttons */
    #card h2.heading2 {
        margin: 0.2rem 0 !important;
        font-size: 1.4rem !important;
    }
    #names, #response {
        margin-bottom: 0.5rem !important;
    }

    /* Force text inputs and labels onto the same line */
    #dietary1, #dietary2, #accommodation-wrapper, #music-wrapper {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    /* Hide wizard buttons and redundant headers */
    .next-btn, .back-btn, #step-6 h2, #accommodation-instruction {
        display: none !important;
    }

    /* Compress the final submit button */
    #submit-rsvp-button {
        display: flex !important;
        margin: 0.5rem auto 0 auto !important;
        height: 3rem !important; 
    }
}

/* RSVP CSS */
@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

#form-container:has(#card) {
    max-width: 58rem !important;
    background: transparent !important; 
    box-shadow: none !important;
    padding: 0 !important;              
    border: none !important;  
}
#card {
    display: flex;
    flex-direction: column;
    background-image: url("../JessFC_LOGO/JessFC_RSVPCard.jpg");
    

    background-size: cover;      
    background-position: center; 
    
    background-repeat: no-repeat;
    width: 100%;
    max-width: 56rem;
    height: 39.47rem;
    align-items: center;
    border-radius: 1.5rem; 
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.7), 
        0 4px 6px rgba(0, 0, 0, 0.08),            
        0 25px 50px rgba(0, 0, 0, 0.15),          
        0 15px 25px rgba(101, 139, 88, 0.1);      
    align-items: baseline;
}

html, body, p, h1, h2, h3 { color: #454140; }

#card h1 {
    background: linear-gradient(to bottom left, rgb(101,139,88), rgb(194,126,101));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    color: transparent; padding: 1em 1em 0.1em 1em; line-height: 1.2; padding-bottom: 1rem;
}

h2#rsvp-deadline {
    padding-bottom: 0.5rem;
	text-align: center;
}

#title { margin-bottom: 0rem; }

#and-text p {
	padding-bottom: 0;
	margin-bottom: 0;
}

/* --- CONTROL CONTAINER LAYOUTS --- */
#names, #response {
	display: flex;
	flex-direction: row;
	/* align-items: center; */
	/* justify-content: center; */
	gap: 1.5rem;
	/* margin-bottom: 1.5rem; */
	padding: 0 1rem 0 1rem;
	width: 100%;
	justify-content: space-evenly;
}
.checkbox-item, .radio-item { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
#names label, #response label { font-size: 1.3rem; cursor: pointer; }
label, p { font-size: 1.3rem; }
input[type="text"] { border: none; outline: none; border-bottom: 2px solid #454140; background-color: transparent; font-size: 1.3rem; color: #454140; }
#diet, #music, #accommodation { height: 1.8rem; }

/* --- ACCESSIBILITY CUSTOM BOX ENGINE --- */
.checkbox-item input[type="checkbox"], .radio-item input[type="radio"] {
  -webkit-appearance: none; appearance: none; background-color: transparent;
  margin: 0; font: inherit; width: 1.15em; height: 1.15em;
  border: 0.1em solid #454140; border-radius: 0.1em; display: grid; place-content: center; cursor: pointer;
}

.checkbox-item input[type="checkbox"]::before, .radio-item input[type="radio"]::before {
  content: ""; width: 0.65em; height: 0.65em;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0); transform-origin: bottom left; transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em rgb(101, 139, 88); background-color: CanvasText;
}

.checkbox-item input[type="checkbox"]:checked::before, .radio-item input[type="radio"]:checked::before { transform: scale(1); }
.checkbox-item input[type="checkbox"]:focus, .radio-item input[type="radio"]:focus { outline: none; }

#text-inputs input[type="text"] { max-width: 25rem; }
#text-inputs label { text-shadow: 0px 0px 2px rgb(255, 255, 240), 0px 0px 5px rgb(255, 255, 240), 0px 0px 10px rgb(255, 255, 240), 0px 0px 20px rgba(255, 255, 240, 0.8); }

button[form="rsvp-form"] {
    background-color: rgb(101, 139, 88); color: rgb(255, 255, 240); font-size: 1.1rem;
    text-transform: uppercase; letter-spacing: 2px; height: 3.5rem; border-radius: 2rem; 
    padding: 0 3rem; border: none; cursor: pointer; transition: all 0.3s ease;
}

button[form="rsvp-form"]:hover { background-color: rgb(80, 115, 68); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(101, 139, 88, 0.4); }

.spinner { display: inline-block; width: 1.5rem; height: 1.5rem; border: 3px solid rgba(255, 255, 240, 0.3); border-radius: 50%; border-top-color: rgb(255, 255, 240); animation: spin 1s ease-in-out infinite; margin-left: 0.75rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }
button:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; }
#submit-rsvp-button { 
    display: flex; 
    margin: 0; 
}

/* --- Transitions --- */
@keyframes fadeSlideUp { 0% { opacity: 0; transform: translateY(20px); } 100% { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeSlideUp 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
#success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 4rem;
    width: 100%;
}

/* --- DEFINITIVE DESKTOP FORM CARD UNROLL & SQUEEZE --- */
@media screen and (min-width: 769px) {
    #card, #rsvp-form {
        display: flex !important;
        flex-direction: column !important;
        height: 39.47rem !important; 
        overflow: hidden !important;
        padding-top: 1.5rem !important;
        justify-content: center !important; 
        align-items: center !important; 
    }

/*     #card h1 {
        padding-bottom: 0 !important; /* Enforcing your h1 adjustment 
    } */

    /* Zero out all margins and gaps between steps */
    form#rsvp-form div[id^="step-"] {
        display: flex !important;
        position: relative !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        margin-bottom: 0 !important; 
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
        gap: 0 !important;
    }

    #card h2.heading2 {
        margin: 0 !important;
        font-size: 1.3rem !important; 
    }
    
    #names, #response {
        margin-bottom: 0.25rem !important; 
    }

    /* Restore and compress accommodation text */
    #accommodation-instruction {
        display: block !important;
    }
    
    #accommodation-instruction p {
        font-size: 1.3rem !important; /* Matches your other labels */
        margin: 0 !important;
    }

    /* Hide wizard buttons and redundant headers */
    .next-btn, .back-btn, #step-6 h2 {
        display: none !important;
    }

    /* Compress the final submit button */
    #submit-rsvp-button {
        display: flex !important;
        margin: 0.5rem auto 0 auto !important;
        height: 2.8rem !important; 
    }
}

/* --- WIZARD DESIGN LAYOUT --- */
.step-card { display: none; width: 100%; flex-direction: column; align-items: center; gap: 1.5rem; }
.step-card.active-step { display: flex; animation: fadeSlideUp 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; }
.btn-group { display: flex; flex-direction: row; gap: 1rem; justify-content: center; width: 100%; margin-top: 1.5rem; }
.form-btn { font-family: "quicksand", sans-serif !important; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; height: 3.5rem; border-radius: 2rem; padding: 0 2rem; border: none; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; justify-content: center; }
.primary-btn { background-color: rgb(101, 139, 88); color: rgb(255, 255, 240); }
.primary-btn:hover { background-color: rgb(80, 115, 68); transform: translateY(-3px); box-shadow: 0 5px 15px rgba(101, 139, 88, 0.4); }
.secondary-btn { background-color: transparent; color: rgb(101, 139, 88); border: 2px solid rgb(101, 139, 88); }
.secondary-btn:hover { background-color: rgba(101, 139, 88, 0.05); transform: translateY(-3px); }
.form-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* --- Grouped Container Layouts --- */
#dietary1, #dietary2, #accommodation-wrapper, #music-wrapper {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1rem;
	padding: 0 2em 0 2rem;
}

/* --- Grouped Desktop Unroll Squeeze (min-width: 769px) --- */
@media screen and (min-width: 769px) {
    #dietary1, #dietary2, #accommodation-wrapper, #music-wrapper {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        margin-bottom: 0 !important;
    }
}

/* --- CUSTOM ALERT MODAL STYLES --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(69, 65, 64, 0.4); /* Backdrop fade matching your text color */
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.modal-card {
  background-color: #ffffff;
  border-radius: 1.5rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 28rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: modalFadeIn 0.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.modal-card h2 {
  margin: 0 !important;
  color: rgb(101, 139, 88) !important; /* Elegant sage green accent */
  font-size: 1.8rem !important;
}

.modal-card p {
  font-size: 1.15rem;
  line-height: 1.5;
  color: #454140;
}

#modal-close-btn {
  height: 3rem !important;
  padding: 0 2.5rem !important;
  font-size: 1rem !important;
  margin-top: 0.5rem;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

#rsvp-form {
    width: 100%;
}

#head-bar {
    display: flex;             /* Use Flexbox */
    align-items: center;       /* Centers items vertically */
    justify-content: space-between; /* Pushes logo left, links right */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
    background-color: rgba(101, 139, 88, 0.7);
}

#logo-left img {
    height: 3.5rem;              /* Control logo size */
    width: auto;
}

#header-right {
    display: flex;             /* Makes the links flex items */
    gap: 0.5rem;                 /* Proper spacing between links */
}

/* Remove floats and simplify link styling */
#head-bar a {
    display: inline-block;     /* Forces the browser to respect the padding height */
    text-decoration: none;
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;  /* Generous vertical and horizontal padding */
    color: white;
    transition: all 0.3s ease;
	font-weight: bold;
}

#head-bar a:hover {
    background-color: rgb(80, 115, 68); 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(101, 139, 88, 0.4); 
}