.special-decor-container {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    background-color: #87a8ef2e;
    display: flex;
    flex-direction: column;
}

.special-decor-container .hero-section {
    position: relative;
}

.special-decor-container .hero-section .hero-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    min-height: 489px;
    max-height: 70dvh;
    filter: brightness(0.89);
}

.special-decor-container .hero-section .hero-content {
    position: absolute;
    top: 26%;
    left: 50%;
    transform: translate(-50%, -26%);
    max-width: 89%;
    max-height: calc(100% - 8.9rem);
    overflow: hidden;
    color: white;
    text-align: center;
    padding: 2.2rem 1.66rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.66rem;
}

/* --- Animated Title Hover Effect --- */
.special-decor-container .hero-section .hero-content .title-section {
    display: grid;
    min-width: 89dvw;
    place-items: center;
    overflow: hidden;
    text-align: center;
    color: #555;
}

.special-decor-container .hero-section .hero-content .title-section h2 {
    grid-area: 1 / 1;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease;
    font-size: clamp(1.4rem, calc(41px + (36 - 20) * (100vw - 768px) / (1920 - 768)), 2.6rem);
    font-weight: 700;
    letter-spacing: 1.41px;
    text-transform: uppercase;
}

.special-decor-container .hero-section .hero-content .title-initial {
    transform: translateY(0);
}

.special-decor-container .hero-section .hero-content .title-hover {
    transform: translateY(100%);
    opacity: 0;
}

.special-decor-container .hero-section .hero-content .title-section:hover .title-initial {
    transform: translateY(-100%);
    opacity: 0;
}

.special-decor-container .hero-section .hero-content .title-section:hover .title-hover {
    transform: translateY(0);
    opacity: 1;
}

.special-decor-container .hero-section .hero-content .description {
    font-size: clamp(14px, calc(4px + (36 - 20) * (100vw - 768px) / (1920 - 768)), 18px);
    font-weight: 400;
    max-width: 600px;
    line-height: 1.6;
}

.special-decor-container .hero-section .hero-content .home-page-redirect{
    text-decoration: none;
    font-size: 0.89rem;
    letter-spacing: 1.14px;
}

.special-decor-container .form-section{
    z-index: 2;
    width: 890px;
    max-width: 89%;
    margin: -8.9rem auto 4.1rem auto;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 6.6rem 1.66rem 2.2rem 1.66rem;
    background-color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.26);
}

/* --- General Form Input Styles --- */

input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    min-width: 0;
    font-size: 1.08rem;
    padding: 12px 14px;
    border-radius: 4px;
    border: 1.5px solid #555;
    background: #55555504;
    color: #555;
    transition: border-color 0.3s;
    resize: vertical;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23555%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right .7em top 50%;
    background-size: .65em auto;
    padding-right: 1.66em;
    cursor: pointer;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
    border-color: #555;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: #777777;
}

label{
    color: #555;
}

.section-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 26px;
}
.section-title {
    font-size: 2.1rem;
    font-weight: 700;
    color: #389fbe;
    letter-spacing: 0.01em;
    line-height: 1.18;
    position: relative;
    text-align: center;
    z-index: 2;
}

hr{
    opacity: 0;
    margin: 41px 0;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(141px, 1fr));
    gap: 14px;
    width: 100%;
}
.card {
    min-height: 80px;
    font-size: 1.08rem;
    padding: 18px 10px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    border: 1px solid #747474;
    color: #555;
    transition: border-color 0.3s, background 0.3s, transform 0.2s;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 2px 8px rgba(44,44,88,0.04);
}

.card p {
    color: #555;
    font-size: 1.08rem;
    margin: 0;
}

.card:hover {
    transform: scale(1.04) skew(2deg);
}

.card.selected {
    border: 2px solid #6cd0ee;
    color: #2e829c;
    transform: scale(1.04);
}
.card.selected p{
    color: #2e829c;
    transform: scale(1.04);
}

.card-input {
    width: 100%;
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.41);
    color: #555;
    padding: 8px;
    border-radius: 4px;
}

.card span{
    color: #333;
    font-size: 13px;
    font-weight: 700;
    word-break: keep-all;
    white-space: nowrap;
}

.conditional-input {
    width: 100%;
    margin-top: 8px;
    width: 100%;
    background: rgba(255,255,255,0.09);
    border: 1.5px solid rgba(255,255,255,0.41);
    color: #555;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 1rem;
}

.custom-checkbox {
    display: inline-block;
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    font-size: 16px;
    user-select: none;
}
.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    border: 1px solid #555;
    border-radius: 4px;
    transition: border-color 0.14s ease;
}

.custom-checkbox input:checked ~ .checkmark {
    border-color: #00a2ff;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    color: #00a2ff;
    border: solid #00a2ff;
    border-width: 0 3px 3px 0;
    border-radius: 1px;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox.checkbox-error .checkmark {
    border-color: #555;
    background-color: rgba(255, 0, 0, 1);
}

/* --- Scroll fade-in animations --- */

.section{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.animated-section {
    will-change: opacity, transform, filter;
    opacity: 0.35;
    transform: scale(0.98) perspective(900px) rotateX(8deg) translateY(60px);
    filter: blur(4px) brightness(0.93);
    transition:
        opacity 0.8s cubic-bezier(0.4,0,0.2,1),
        transform 0.8s cubic-bezier(0.4,0,0.2,1),
        filter 0.8s cubic-bezier(0.4,0,0.2,1);
}
.animated-section.in-view {
    opacity: 1;
    transform: scale(1) perspective(900px) rotateX(0deg) translateY(0);
    filter: blur(0) brightness(1);
}
.animated-section.out-above {
    opacity: 0;
    transform: scale(0.97) perspective(900px) rotateX(-12deg) translateY(-80px);
    filter: blur(8px) brightness(0.89);
}
.animated-section.out-below {
    opacity: 0;
    transform: scale(0.97) perspective(900px) rotateX(12deg) translateY(80px);
    filter: blur(8px) brightness(0.89);
}

/* --- Fade Animation Classes --- */
.fade-target {
    transition: opacity 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease, border-width 0.4s ease;
    overflow: hidden;
    opacity: 1;
    max-height: 500px; /* Arbitrary large height to accommodate content */
}

.fade-hidden {
    opacity: 0;
    max-height: 0;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-width: 0 !important;
    pointer-events: none;
}

/* --- 'Your Booking' Section --- */

.section.booking-section, .booking-row {
    width: 100%;
    margin: 0 auto;
}

.booking-row{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* --- Responsive & Polished SECTION 1: Celebrant Details --- */
.section1-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.section1-row label {
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 2px;
    letter-spacing: 0.01em;
}
/* Telephone row: label on top, fields side by side, number field grows */
.section1-row .tel-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.section1-row .tel-row label {
    margin-bottom: 0;
    min-width: 0;
    font-weight: 500;
}
.section1-row .tel-fields {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
}
.section1-row .tel-prefix {
    width: calc(13ch + 16px);
    flex: 0 1 auto;
    font-size: 0.95rem;
}
.section1-row .tel-number {
    flex: 1 1 auto;
    min-width: 10ch;
}

/* --- Responsive & Polished SECTION 2: Celebration Details --- */
.section2-celebration {
    align-items: center;
    gap: 1.2rem;
}
.card-input {
    margin-top: 10px;
    width: 100%;
    background: rgba(255,255,255,0.09);
    border: 1.5px solid rgba(255,255,255,0.41);
    color: #555;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 1rem;
}

/* --- Responsive & Polished SECTION 3: Flower Style Row Layout --- */
.section3-flowers-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 2.2rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 2.2rem auto;
}
.section3-flowers-row .section3-flowers {
    flex: 1 1 0%;
    margin: 0;
}
/* --- Responsive & Polished SECTION 3: Flower Style --- */
.section3-flowers {
    max-width: 700px;
    width: 100%;
    margin: 0 auto 2.2rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
}

/* --- Souvenir Section --- */

.souvenir-inputs{
    margin-top: 14px;
}

@media screen and (max-width: 541px) {
    .special-decor-container .hero-section .hero-content {
        max-height: 100%;
        padding: 0;
    }

    .special-decor-container .form-section{
        margin-top: -4.44rem;
    }
}

/* --- Tarot Section --- */
.tarot-description {
    text-align: center;
    margin-bottom: 20px;
}

.tarot-details {
    margin-top: 20px;
}

.tarot-details h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: #555;
}

.tarot-details .section1-row {
    margin-bottom: 10px;
}

/* --- Add-ons Details --- */
.addons-details {
    width: 100%;
    max-width: 666px;
    margin: 20px auto 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.conditional-input-wrapper {
    display: flex;
    flex-direction: column;
}

/* --- Form Footer --- */
.footer-wrapper {
    width: 100%;
    margin-top: 4.1rem;
    padding-top: 0.89rem;
    border-top: 1px solid #eee;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
}

.form-footer .left-section .pricing-section p {
    margin: 0;
    color: #555;
}

.form-footer .left-section .pricing-section #total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2e829c;
}

.form-footer .right-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.form-footer .terms-section {
    font-size: 0.9rem;
}

#open-terms-modal {
    color: #00a2ff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

#open-terms-modal:hover {
    color: #0070e0;
    text-decoration: underline;
}

#form-submit-btn {
    background-color: #e6f7ff;
    border: 1px solid #bae7ff;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    max-width: 254px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    transition: all 0.3s ease;
}


#form-submit-btn p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #003087;
    margin: 0;
    transition: transform 0.2s;
}

#form-submit-btn:hover p {
    transform: scale(1.04);
}

/* --- Terms & Conditions Modal Styling --- */
#terms-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.04); 
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1);
}


#terms-modal .modal-content, #terms-modal > div {
    color: #2e829c;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.26);
    padding: 4.1rem 2.8rem 2.8rem 2.8rem;
    max-width: 89vw;
    width: 890px;
    margin: 0 auto;
    position: relative;
    overflow-y: auto;
    max-height: 86vh;
    letter-spacing: 0.01em;
    backdrop-filter: blur(22px);
    background-color: #ffffffb2;
}

#terms-modal p, #terms-modal li {
    color: #2e829c;
    font-size: 1.08rem;
    line-height: 2.1;
    margin-bottom: 1.2em;
    letter-spacing: 0.01em;
}

#terms-modal .modal-content b {
    display: block;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #184857;
    letter-spacing: 0.02em;
}

#close-terms-modal {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #a2d2ff;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

#terms-modal h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    color: #184857;
    text-align: center;
}

#terms-modal p, #terms-modal li {
    color: #2e829c;
    font-size: 1rem;
    line-height: 1.6;
}

#close-terms-modal {
    position: absolute;
    top: 0.66rem;
    right: 0.89rem;
    font-size: 2rem;
    color: #2e829c;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

@media (max-width: 600px) {
    .form-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .form-footer .right-section {
        align-items: center;
    }

    /* Keep .tel-fields in a row even on mobile */
    .section1-row .tel-fields {
        flex-direction: row;
        gap: 10px;
    }
    .section1-row .tel-prefix {
        width: 13ch;
        flex: 0 1 auto;
        font-size: 0.9rem;
    }
    .section1-row .tel-number {
        flex: 1 1 auto;
        min-width: 10ch;
    }

    .section1-details {
        max-width: 99vw;
        padding-left: 2vw;
        padding-right: 2vw;
    }

    .section1-row label {
        font-size: 0.98rem;
    }

    .section1-row input[type="text"],
    .section1-row input[type="email"],
    .section1-row textarea {
        font-size: 1rem;
        padding: 10px 10px;
    }

    .section1-row .tel-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
}

/* --- Back to Top Button --- */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background-color: #2e829c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: opacity 0.4s ease, transform 0.4s ease, background-color 0.3s;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.back-to-top-btn.visible {
    opacity: 0.8;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background-color: #184857;
    transform: translateY(-3px);
    opacity: 1;
}
