:root {
    --primary-color: #0052cc;
    --primary-hover: #003d99;
    --bg-color: #f4f7fa;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #d1d5db;
    --white: #ffffff;
    --error: #e11d48;
    --radius: 16px;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Noto Sans Devanagari', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem;
    position: relative;
    background: url('../images/bg.gif') center/cover no-repeat fixed; /*url('bg.gif') center/cover no-repeat fixed;*/
    background-color: #002e7a;
    z-index: 0;
}

@media (min-width: 1024px) {
    body {
        padding: 3rem 1.5rem;
    }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 30, 80, 0.5);
    z-index: -1;
    pointer-events: none;
    animation: breathOverlay 8s ease-in-out infinite alternate;
}

@keyframes breathOverlay {
    0% {
        background: rgba(0, 30, 80, 0.4);
        backdrop-filter: blur(2px);
    }

    100% {
        background: rgba(0, 30, 80, 0.65);
        backdrop-filter: blur(5px);
    }
}

.layout-wrapper {
    display: flex;
    max-width: 1400px;
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    position: relative;
}

@media (min-width: 1024px) {
    .layout-wrapper {
        flex-direction: row;
    }
}

.instructions-panel {
    background: linear-gradient(180deg, #0047b3 0%, #002e7a 100%);
    color: var(--white);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .instructions-panel {
        padding: 4rem 3rem;
        flex: 0 0 400px;
        gap: 2.5rem;
    }
}

.instructions-panel::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    pointer-events: none;
}

.logo-container {
    text-align: center;
    z-index: 1;
}

    .logo-container img {
        width: 70px;
        height: 70px;
        object-fit: contain;
        margin-bottom: 1rem;
        background: white;
        padding: 10px;
        border-radius: 50%;
        box-shadow: 0 8px 16px rgba(0,0,0,0.1);
        transition: var(--transition-smooth);
    }

@media (min-width: 1024px) {
    .logo-container img {
        width: 90px;
        height: 90px;
        padding: 12px;
        margin-bottom: 1.5rem;
    }
}

.logo-container img:hover {
    transform: scale(1.05) rotate(5deg);
}

.logo-container h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .logo-container h2 {
        font-size: 1.6rem;
    }
}

.logo-container p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.guidelines {
    background: rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

@media (min-width: 1024px) {
    .guidelines {
        padding: 2rem;
    }
}

.guidelines h3 {
    margin-bottom: 1rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.8rem;
}

.guidelines ul {
    list-style-type: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guidelines li {
    font-size: 0.85rem;
    line-height: 1.5;
    position: relative;
    padding-left: 1.8rem;
}

    .guidelines li::before {
        content: '→';
        position: absolute;
        left: 0;
        color: #60a5fa;
        font-weight: bold;
    }

.form-container {
    flex: 1;
    padding: 2.5rem 1.5rem;
    background: transparent;
    overflow-y: auto;
    max-height: 90vh;
    scroll-behavior: smooth;
}

@media (min-width: 1024px) {
    .form-container {
        padding: 4rem;
    }
}

/* WIDER VISIBLE SCROLLBAR */
.form-container::-webkit-scrollbar {
    width: 16px; /* Increased width */
}

.form-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.form-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    border: 4px solid rgba(255, 255, 255, 0.85); /* Thicker border padding */
}

    .form-container::-webkit-scrollbar-thumb:hover {
        background: var(--primary-hover);
    }

.form-header {
    margin-bottom: 2.5rem;
}

    .form-header h3 {
        color: var(--primary-color);
        font-size: 1.3rem;
        font-weight: 700;
        position: relative;
        display: inline-block;
    }

@media (min-width: 768px) {
    .form-header h3 {
        font-size: 1.5rem;
    }
}

.form-header h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        margin-bottom: 2rem;
    }
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.full-width {
    grid-column: 1 / -1;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .full-width {
        margin-bottom: 2rem;
    }
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition-smooth);
}

.input-group:focus-within label {
    color: var(--primary-color);
}

.required {
    color: var(--error);
}

/* MATCHED HEIGHT FOR TEXT INPUTS AND SELECT BOXES */
input[type="text"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type="date"],
select {
    width: 100%;
    height: 50px; /* Force strict height */
    padding: 0 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
    box-sizing: border-box;
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}

textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: rgba(255, 255, 255, 0.9);
    transition: var(--transition-smooth);
    box-sizing: border-box;
    resize: vertical;
}

    input:hover:not([readonly]),
    select:hover,
    textarea:hover {
        border-color: #a78bfa;
        background-color: var(--white);
    }

    input:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        background-color: var(--white);
        box-shadow: 0 4px 12px rgba(0, 82, 204, 0.1);
        transform: translateY(-2px);
    }

input[readonly] {
    background-color: rgba(244, 247, 250, 0.8);
    cursor: not-allowed;
    color: var(--text-muted);
}

.form-section-title {
    width: 100%;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .form-section-title {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }
}

.form-section-title h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: block;
    width: 100%;
}

.radio-options {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
    flex-wrap: wrap;
}

    .radio-options.vertical {
        flex-direction: column;
        gap: 1rem;
    }

.custom-radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
}

    .custom-radio input {
        display: none;
    }

.radio-mark {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: var(--transition-smooth);
}

.custom-radio:hover .radio-mark {
    border-color: var(--primary-color);
}

.custom-radio input:checked + .radio-mark {
    border-color: var(--primary-color);
}

    .custom-radio input:checked + .radio-mark::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        width: 10px;
        height: 10px;
        background: var(--primary-color);
        border-radius: 50%;
        animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

@keyframes popIn {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.6);
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

    .custom-checkbox:hover {
        border-color: var(--primary-color);
        background: rgba(255, 255, 255, 0.9);
    }

    .custom-checkbox input {
        display: none;
    }

.checkmark {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    position: relative;
    transition: var(--transition-smooth);
    margin-top: 2px;
}

.custom-checkbox input:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

    .custom-checkbox input:checked + .checkmark::after {
        content: '✓';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 14px;
        font-weight: bold;
    }

.decl-text {
    color: var(--text-main);
    font-weight: 500;
}

/* SEPARATED BUTTON AND INPUT */
.geo-flex {
    display: flex;
    gap: 12px; /* Distinct gap pushing button right */
    align-items: center;
}

    .geo-flex input {
        flex-grow: 1; /* Pushes button all the way right */
        width: auto;
    }

.btn-secondary {
    padding: 0;
    width: 50px;
    height: 50px; /* Same height as input */
    flex-shrink: 0;
    background: var(--bg-color);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-secondary:hover {
        background: #e2e8f0;
        border-color: var(--text-muted);
        transform: translateY(-2px);
    }

.spin .icon {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* BIGGER FILE UPLOAD SECTION */
.file-upload-box {
    border: 2px dashed var(--border-color);
    padding: 2.5rem 1.5rem; /* Increased inner space */
    text-align: center;
    border-radius: 10px;
    background: rgba(250, 250, 250, 0.6);
    transition: var(--transition-smooth);
    margin-top: 0.5rem;
    cursor: pointer;
    overflow: hidden;
}

@media (min-width: 768px) {
    .file-upload-box {
        padding: 3rem;
    }
}

.file-upload-box:hover {
    border-color: var(--primary-color);
    background: rgba(0, 82, 204, 0.03);
}

/* BIGGER CHOOSE FILE BUTTON */
input[type="file"]::file-selector-button {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
    font-family: inherit;
    transition: var(--transition-smooth);
}

    input[type="file"]::file-selector-button:hover {
        background: var(--primary-color);
        color: var(--white);
    }

.submit-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 10px 20px rgba(0, 82, 204, 0.2);
    width: 100%;
}

@media (min-width: 768px) {
    .submit-wrapper {
        margin-top: 3rem;
        justify-content: flex-end;
    }

    .btn-primary {
        padding: 1.2rem 3rem;
        width: auto;
    }
}

.btn-primary .arrow {
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 82, 204, 0.3);
}

    .btn-primary:hover .arrow {
        transform: translateX(5px);
    }

.btn-primary:active {
    transform: translateY(0);
}

.scroll-down-btn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    box-shadow: 0 8px 20px rgba(0, 82, 204, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: translateY(0);
}

    .scroll-down-btn:hover {
        background-color: var(--primary-hover);
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(0, 82, 204, 0.5);
    }

    .scroll-down-btn.hidden {
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        pointer-events: none;
    }

/* Animations */
.fade-in {
    animation: fadeInOuter 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInOuter {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-item {
    opacity: 0;
    animation: staggerFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
