main {
    background-image: url("../assets/background.webp");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

.nav-items {
    background-color: #EEE9ED;
    color: #947962;
    font-size: 14px;
    font-weight: 500;
}

.nav-items:hover {
    background-color: #FEF5F3;
    color: #FF8D74;
}

.m-nav-items.active {
    background-color: #FEF5F3;
    color: #FF8D74;
}

.nav-items.active {
    background-color: #FEF5F3;
    color: #FF8D74;
}

.review-text-bg {
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.started-btn {
    background-image: linear-gradient(120deg, #F9E9E5, #FFFFFF);
    background-size: 200% 100%;
    background-position: 100% 0;
    transition: background-position .5s ease;
}

.started-btn:hover {
    background-position: 0 0;
    cursor: pointer;
}

/* Responsive heights for testimonial section */
@media (max-width: 640px) {
    .phone-img {
        max-width: 350px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    /*#testimonial-container {min-height: 200px;}*/
    .phone-img {max-width: 400px;}
}

@media (min-width: 1025px) {
    .phone-img {max-width: 600px;}
}

@media (min-width: 1440px) {
    .phone-img {
        max-width: 700px;
        align-self: center;
    }
}

/* Ensure testimonial content area has consistent height */
#testimonial-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@media (max-width: 640px) {
    /*#testimonial-container {*/
    /*    min-height: 180px;*/
    /*}*/
}

@media (min-width: 1025px) {
    /*#testimonial-container {*/
    /*    min-height: 150px;*/
    /*}*/
    h2 {
        font-size: 3.75rem !important;
    }
}

.feature-card {
    background-image: linear-gradient(160deg, #FFFFFF, #F8E3DF);
    background-size: 200% 100%;
    background-position: 0 0;
    /* start on the left half */
    transition: background-position .5s ease;
}

.feature-card:hover {
    background-position: 100% 0;
    color: #FF8D74;
    cursor: pointer;
}

.feature-card h3,
.feature-card p {
    transition: color .5s ease;
}

.services-tile-container {
    background: linear-gradient(160deg, #fdf8f7, #faece8, 67%, #faece8);
}

/* Prevent horizontal overflow */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* Ensure all containers respect viewport width */
.max-w-7xl {
    max-width: 100vw;
}

/* Prevent any element from exceeding viewport width */
img,
video,
iframe,
object,
embed {
    max-width: 100%;
    height: auto;
}

.testimonial-section h2 {
    background: -webkit-linear-gradient(271deg, #947962 1.7%, #27263C 52.07%, #FF8D74 100%), #27263C;
    background: linear-gradient(271deg, #947962 1.7%, #27263C 52.07%, #FF8D74 100%), #27263C;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-size: 1.5rem;
}

@media (max-width: 640px) {
    h2 {
        font-size: 1.875rem !important;
    }
}

.quick-link {
    color: #947962;
    font-size: 14px;
    font-weight: 500;
}

.quick-link:hover {
    color: #FF8D74;
}

.quick-link:active {
    color: #FF8D74;
}

/* POPUP MODAL STYLES */
.popup-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) max(1.25rem, env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px));
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Allow the overlay itself to scroll even when body has touch-action: none */
    touch-action: pan-y;
}

#featuredPopupOverlay {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Centers modal card */
.popup-wrap {
    position: relative;
    width: min(750px, calc(100vw - 2rem));
    margin-left: auto;
    margin-right: auto;
    /* Use fixed vertical margins so the card doesn't float freely */
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.popup-container {
    background-color: #FEFBF9;
    background-image: url("../assets/services-bg.png");
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    width: 100%;
    max-width: 750px;
    overflow: visible;
    max-height: none;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

@media (max-width: 800px) {
    .popup-wrap {
        width: min(750px, calc(100vw - 1.25rem));
    }

    .popup-container {
        max-width: 100%;
    }
}

.popup-overlay.show .popup-container {
    transform: scale(1) translateY(0);
}

.popup-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
    flex: 0 1 auto;
}

/* Top-right of modal: anchored to card corner, ~half inside / half outside */
.popup-container .popup-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.75rem;
    height: 2.75rem;
    transform: translate(30%, -30%);
    z-index: 30;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(148, 121, 98, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.popup-container .popup-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: translate(30%, -30%) scale(1.06);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.popup-close i {
    color: #947962;
    font-size: 1rem;
}

.popup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.popup-header h2 {
    color: #27263C;
    margin-bottom: 0.5rem;
}

/* Hide scrollbars in WebKit browsers (Chrome, Safari, Edge) */
.popup-overlay::-webkit-scrollbar,
.popup-container::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbars in Firefox */
.popup-overlay,
.popup-container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: #27263C;
    font-size: 0.875rem;
}

.form-input,
.form-textarea,
.form-select {
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #FF8D74;
    box-shadow: 0 0 0 3px rgba(255, 141, 116, 0.1);
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #EF4444;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    color: #EF4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.popup-submit-btn {
    background: linear-gradient(120deg, #f5a897, #FFFFFF);
    background-size: 200% 100%;
    background-position: 100% 0;
    transition: all 0.3s ease;
    border: none;
    border-radius: 2rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: #27263C;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 200px;
    margin: 0 auto;
    margin-top: 20px;
}

.popup-submit-btn:hover {
    background-position: 0 0;
}

.popup-submit-btn:active {
    transform: translateY(0);
}

.popup-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 640px) {
    .popup-overlay {
        align-items: flex-start;
        justify-content: center;
        /* Ensure safe-area padding on notch phones */
        padding-top: max(1rem, env(safe-area-inset-top, 1rem));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 1rem));
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .popup-form {
        gap: 0.75rem;
    }

    .popup-wrap {
        width: 100%;
        /* Fixed margins so the card stays anchored, not floating */
        margin-top: 0.75rem;
        margin-bottom: 1rem;
    }

    .popup-content {
        padding: 1.5rem;
    }

    .popup-header h2 {
        font-size: 1.5rem;
    }

    .form-input,
    .form-textarea,
    .form-select {
        /* 16px minimum prevents iOS auto-zoom on focus */
        font-size: 1rem;
        padding: 0.75rem 0.875rem;
        width: 100%;
        box-sizing: border-box;
    }

    .popup-submit-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
        width: 100%;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        padding: 1.25rem 1rem;
    }

    .popup-container .popup-close {
        width: 2.5rem;
        height: 2.5rem;
        transform: translate(30%, -30%);
    }

    .popup-container .popup-close:hover {
        transform: translate(30%, -30%) scale(1.06);
    }

    .popup-close i {
        font-size: 0.875rem;
    }
    .hero-shape {
        background-image: url('../assets/hero-shape-1.png'); background-size: contain; background-position: center 50px; background-repeat: no-repeat;
    }
}

/* Phone number formatting */
.form-input[type="tel"] {
    font-family: monospace;
}

/* Date and Time input styling - make entire field clickable */
.form-input[type="date"],
.form-input[type="time"] {
    cursor: pointer;
    position: relative;
    /* Prevent iOS Safari from collapsing or overriding the field width */
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* Remove default date/time input styling and make entire field clickable */
.form-input[type="date"]::-webkit-calendar-picker-indicator,
.form-input[type="time"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
    cursor: pointer;
}

/* For Firefox */
.form-input[type="date"]::-moz-calendar-picker-indicator,
.form-input[type="time"]::-moz-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
    cursor: pointer;
}






/* ANIMATION STYLE START HERE */
/* Make sure the pills area can host an absolutely-positioned overlay */
.pills-box {
    position: relative;
    transition: opacity 200ms ease;
}

/* Overlay that holds the falling clones; same box as pills-box */
.pills-animator {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
    /* padding-right: 40px; */
}

.pills-animator.fade-out {
    opacity: 0;
    transition: opacity 200ms ease;
}

.falling-pill {
    position: absolute;
    display: inline-block;
    /* REMOVE all 'right: ...' rules */
    /* Optional: enforce left origin explicitly */
    left: 0;
    /* will-change is applied inline during the drop in JS and cleared on finish to avoid sticky compositor blur */
}

/* Default: no cap on mobile */
.form-grid {
    max-height: none;
    overflow: visible;
}

/* Optional: keep inner-form scrolling on big screens if you want */
@media (min-width: 1025px) {
    .form-grid {
        max-height: 60vh;
        overflow-y: auto;
    }

}

/* Keep Contact Get Feature form layout stable when conditional rows appear */
#contact-feature-form.form-grid {
    max-height: none;
    overflow: visible;
}

/* Keep button size stable when dynamic fields appear */
#contact-feature-form .popup-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 2rem !important;
    box-sizing: border-box;
    line-height: 1;
    flex-shrink: 0;
    white-space: nowrap;
}

#contact-feature-form .popup-submit-btn .btn-text,
#contact-feature-form .popup-submit-btn .btn-loading {
    line-height: 1;
}

/* Grid keeps two fields equal width without each claiming 100% (fixes phone landscape / narrow tablets). */
.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
}

.form-row-message {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.form-row > .form-group {
    min-width: 0;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .form-group {
        width: 100% !important;
        min-width: 0;
    }

    .form-input,
    .form-textarea,
    .form-select {
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Avoid iOS input zoom and cramped native date/time controls */
    .form-input[type="date"],
    .form-input[type="time"] {
        font-size: 1rem; /* 16px prevents iOS Safari zoom */
        min-height: 2.75rem;
        width: 100% !important;
        box-sizing: border-box;
        -webkit-appearance: none;
        appearance: none;
        /* Ensure the value text is never clipped */
        padding-right: 0.5rem;
    }
}

/* Full-field calendar hit area breaks date/time rendering on many mobile browsers */
@media (max-width: 640px), (pointer: coarse) {
    .form-input[type="date"]::-webkit-calendar-picker-indicator,
    .form-input[type="time"]::-webkit-calendar-picker-indicator {
        position: static;
        inset: auto;
        width: 1.25rem;
        height: 1.25rem;
        margin-left: 0.25rem;
        opacity: 0.65;
        cursor: pointer;
    }
}

body.modal-open {
    overflow: hidden;
    /* pan-y lets the popup overlay scroll on iOS while still locking page background scroll */
    touch-action: pan-y;
}

/* Legal / policy pages — matches site typography on light background */
.legal-copy .legal-list {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    color: rgba(39, 38, 60, 0.9);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legal-copy .legal-list li {
    padding-left: 0.25rem;
}

.legal-copy .legal-inline-link {
    color: #f38d6f;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.legal-copy .legal-inline-link:hover {
    color: #27263c;
}

/* ANIMATION STYLE ENDS HERE */