@import url('https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --saffron: #F57C00;
    --deep-orange: #ec7000;
    --royal-green: #ffb601;
    --dark-green: #0D5C25;
    --golden-yellow: #F6B100;
    --cream-white: #FFFDF8;
    --light-beige: #F6F1E8;
    --border-cream: #E8DDCC;
    --text-dark: #3C2F1F;
    --text-muted: #7A6D5A;
    --success-green: #1B7A34;
    --gradient-saffron: linear-gradient(135deg, #FF8A00 0%, #F57C00 50%, #E66800 100%);
    --card-shadow: 0 8px 25px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.02);
    --focus-glow: 0 0 0 3px rgba(245, 124, 0, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PT Serif", "Noto Sans Devanagari", "Noto Serif Devanagari", serif;
    background: #FCFAF6;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(246, 177, 0, 0.02) 2%, transparent 2.5%),
        radial-gradient(circle at 100% 100%, rgba(27, 122, 52, 0.02) 1.8%, transparent 2%);
    background-size: 40px 40px, 60px 60px;
    position: relative;
}

body::before {
    content: "✽✽";
    font-size: 140px;
    color: rgba(232, 221, 204, 0.2);
    position: fixed;
    bottom: 0;
    left: 0;
    pointer-events: none;
    font-family: serif;
    transform: rotate(-15deg);
    line-height: 1;
}

body::after {
    content: "✤✤";
    font-size: 180px;
    color: rgba(232, 221, 204, 0.2);
    position: fixed;
    top: 0;
    right: 0;
    pointer-events: none;
    font-family: serif;
    transform: rotate(10deg);
}

.page-container {
    margin: 0 auto;
    position: relative;
    z-index: 2;
    border-radius: 76px;
    border: 10px solid transparent;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(to right, #f97b00 0%, #018510 50%, #f97b00 100%) border-box;
}

.luxury-card {
    background: var(--cream-white);
    border: 1px solid var(--border-cream);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.luxury-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
}

.section-badge {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    background: var(--saffron);
    margin-right: 14px;
    flex-shrink: 0;
}

.section-badge-green {
    background: var(--royal-green);
}

.section-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
    border-bottom: 2px dashed #0000003d;
    padding-bottom: 0.8rem;
}

.section-title {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-dark);
    margin-right: 20px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-cream), transparent);
}

.flourish {
    font-size: 1.1rem;
    color: var(--golden-yellow);
    margin-left: 12px;
    margin-right: 8px;
}

.form-control,
.form-select {
    height: 48px;
    border: 1px solid #DCD6CA;
    border-radius: 10px;
    background-color: #FFFFFF;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Icon fields: padding on wrapper children only */
.input-icon-wrapper .form-control,
.input-icon-wrapper .form-select {
    width: 100%;
    height: 48px;
    padding-left: 42px;
    padding-right: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--saffron);
    box-shadow: var(--focus-glow);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    padding-right: 12px;
    background-image: none;
}

/* ── Stable icon field layout ── */
.form-field {
    display: flex;
    flex-direction: column;
}

.form-field-label,
.form-field > label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.input-icon-wrapper {
    position: relative;
    width: 100%;
    flex-shrink: 0;
}

.input-icon-wrapper > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--saffron);
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: none;
    line-height: 1;
    width: 1.25rem;
    text-align: center;
}

/* Title + name combined control */
.input-icon-wrapper--title-name .title-name-control {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 48px;
    border: 1px solid #DCD6CA;
    border-radius: 10px;
    background-color: #FFFFFF;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-icon-wrapper--title-name .title-name-control:focus-within {
    border-color: var(--saffron);
    box-shadow: var(--focus-glow);
}

.input-icon-wrapper--title-name .title-name-control:has(.is-invalid) {
    border-color: #dc3545;
}

.input-icon-wrapper--title-name .title-name-select {
    flex: 0 0 auto;
    width: auto;
    min-width: 88px;
    max-width: 110px;
    height: 100%;
    border: none;
    border-radius: 0;
    border-right: 1px solid #DCD6CA;
    padding: 0 10px 0 3px;
    background-position: right 8px center;
    box-shadow: none;
}

.input-icon-wrapper--title-name .title-name-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: 100%;
    border: none;
    border-radius: 0;
    padding: 0 12px 0 10px;
    box-shadow: none;
}

.input-icon-wrapper--title-name .title-name-select:focus,
.input-icon-wrapper--title-name .title-name-input:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.input-icon-wrapper--title-name .title-name-select.is-invalid,
.input-icon-wrapper--title-name .title-name-input.is-invalid {
    background-image: none;
}

.input-icon-wrapper--title-name > i {
    z-index: 3;
}

.input-icon-wrapper--title-name .title-name-control {
    padding-left: 42px;
}

@media (max-width: 576px) {
    .input-icon-wrapper--title-name .title-name-select {
        min-width: 55px;
        max-width: 55px;
        padding-right: 10px;
        font-size: 0.8rem;
    }
}

.form-field .invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.35;
}

.form-field .invalid-feedback.d-block {
    display: block;
}

/* Legacy support if old markup remains */
.input-icon {
    position: relative;
}

.input-icon > label {
    display: block;
}

label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

.upload-card {
    background: var(--light-beige);
    border-radius: 18px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    border: 1px solid #e3d9cb;
    transition: all 0.2s;
    height: 100%;
}

.upload-card i {
    font-size: 2.6rem;
    color: var(--saffron);
}

.upload-card.green-icon i {
    color: var(--royal-green);
}

.btn-upload-sm {
    display: inline-block;
    cursor: pointer;
    background: white;
    border: 1px solid var(--saffron);
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--saffron);
    padding: 6px 18px;
    transition: 0.2s;
}

.btn-upload-sm:hover {
    background: var(--saffron);
    color: white;
}

/* Accessible visually-hidden file input (kept in DOM, focusable, not display:none) */
.file-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.doc-preview {
    margin-top: 0.75rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed #dcd6ca;
    overflow: hidden;
}

.doc-preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.doc-preview .pdf-icon {
    font-size: 3rem;
    color: var(--saffron);
}

.doc-preview .preview-filename {
    font-size: 0.75rem;
    color: var(--text-muted);
    word-break: break-all;
    padding: 0.5rem;
}

.signature-canvas {
    width: 100%;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 20px;
    touch-action: none;
    cursor: crosshair;
    background: #fff;
}

.footer-action-bar {
    background: white;
    border-radius: 80px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    padding: 0.8rem 2rem;
    border-top: 3px solid transparent;
    position: relative;
    margin-top: 3rem;
}

.btn-custom-outline-orange {
    border: 2px solid var(--saffron);
    background: white;
    border-radius: 50px;
    height: 40px;
    padding: 0 32px;
    font-weight: 700;
    color: var(--saffron);
}

.btn-custom-outline-green {
    border: 2px solid #ee7200;
    background: white;
    border-radius: 50px;
    height: 40px;
    padding: 0 32px;
    font-weight: 700;
    color: #ec7000;
}

.btn-submit-gradient {
    background: var(--gradient-saffron);
    border: none;
    border-radius: 50px;
    height: 40px;
    padding: 0 30px;
    font-weight: 700;
    color: white;
    transition: all 0.25s;
}

.btn-submit-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(245, 124, 0, 0.35);
    color: white;
}

.btn-custom-outline-orange:hover,
.btn-custom-outline-green:hover {
    transform: translateY(-2px);
}

.more-pankh {
    position: absolute;
    top: -245px;
    left: 0;
    width: 100%;
    pointer-events: none;
}

.more-pankh img {
    width: 100%;
}

.heading {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
}

.para {
    font-size: 16px;
    line-height: 20px;
    color: #000000;
    text-align: center;
    margin-bottom: 5px !important;
}

.life {
    font-weight: 700;
    font-size: 41px;
    color: #018510 !important;
    text-transform: uppercase;
    padding-top: 18px;
    margin-bottom: 5px;
}

.form-tagline {
    font-weight: 600;
    font-size: 1.35rem;
    color: var(--text-dark);
    margin: 0 0 8px;
    line-height: 1.4;
}

.header-dis {
    display: flex;
    flex-direction: column;
    align-items: center;
}

@keyframes float-logo {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0px); }
}

.floating-logo {
    animation: float-logo 4s ease-in-out infinite;
}

.bg-glow-radial {
    background: radial-gradient(ellipse at 50% 20%, rgba(246, 177, 0, 0.08), transparent 70%);
    width: 150px;
}

.bg-glow-radial img {
    width: 100%;
}

.text-saffron {
    color: var(--saffron);
}

.custom-check-green:checked {
    background-color: var(--royal-green);
    border-color: var(--royal-green);
}

.occupation-type-group {
    width: 100%;
}

.occupation-type-group > .form-field-label {
    margin-bottom: 10px;
}

.occupation-type-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
}

.occupation-type-option {
    margin: 0;
    min-width: 0;
}

.occupation-type-option .form-check-input {
    border: 2px solid var(--royal-green);
    margin-top: 0.2rem;
}

.occupation-type-option .form-check-input[type="radio"] {
    border-radius: 50%;
}

.occupation-type-option .form-check-input:checked {
    background-color: var(--royal-green);
    border-color: var(--royal-green);
}

.occupation-type-option .form-check-label {
    color: var(--text-dark, #2c2c2c);
    cursor: pointer;
}

.occupation-type-group .invalid-feedback.d-block {
    display: block;
}

.flash-error {
    border-radius: 12px;
    border-left: 4px solid #dc3545;
}

.child-row {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px dashed var(--border-cream);
}

.child-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

@media (max-width: 992px) {
    .header-three-col {
        text-align: center;
    }

    .section-title {
        font-size: 16px;
    }

    .footer-action-bar .d-flex {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        width: 100%;
    }

    .footer-action-bar .btn {
        width: 100%;
    }

    .section-badge {
        width: 25px;
        height: 25px;
        font-size: 12px;
    }

    .more-pankh {
        top: -80px;
    }

    .footer-action-bar {
        margin-top: 0;
    }

    .page-container {
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    .life {
        font-size: 32px;
    }
    .p-4 {
        padding: 0.6rem !important;
    }
    .input-icon-wrapper--title-name .title-name-control {
        padding-left: 36px;
    }
    .header-three-col{
        margin-bottom:0 !important;
    }
    .header-three-col.g-4{
        --bs-gutter-y: 0rem;
    }
}

/* Mobile custom date picker (no native Cancel/Clear buttons) */
.mobile-date-input {
    cursor: pointer;
    caret-color: transparent;
}

.mobile-date-modal .modal-title {
    font-family: var(--font-serif, "PT Serif", serif);
    color: var(--green-dark, #0d5c25);
    font-weight: 700;
}

.mobile-date-modal .modal-header {
    padding: 1.25rem 1.25rem 0;
}

.mobile-date-modal .modal-header .btn-close {
    position: absolute;
    margin: 0;
    padding: 0.5rem;
    right: 0;
    top: 0;
}

.mobile-date-modal .form-select {
    border-color: var(--border-cream, #e8dcc8);
}

.mobile-date-modal .modal-footer .mobile-date-clear-btn {
    min-width: min-content;
    max-width: max-content;
    padding: 5px 10px;
    font-size: 12px;
}

.mobile-date-modal .modal-footer .mobile-date-set-btn {
    min-width: min-content;
    max-width: max-content;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    height: fit-content;
}