/* === Container Background === */
.container {
    background: url('../css/images/pattern3.jpg') center center / cover no-repeat;
    /* Adjust the path based on your CSS file location */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
}


/* === Main Heading Styles === */
.container h2 {
    font-size: 28px;
    font-weight: 700;
    color: #052374;
    background: rgba(5, 35, 116, 0.1);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.container h4 {
    font-size: 20px;
    font-weight: 600;
    color: #052374;
    background: rgba(5, 35, 116, 0.05);
    padding: 10px 15px;
    border-radius: 6px;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
    border-left: 4px solid #052374;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.container h4::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 15px;
    width: 40px;
    height: 2px;
    background-color: #970a26;
}

/* === Scroll Animation Trigger === */
.animate {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* === Form Layout === */
.container form .row.g-3 > div,
.container form .mb-3 {
    margin-bottom: 20px;
}

.form-select,
.form-control,
textarea.form-control {
    height: 45px;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 8px 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea.form-control {
    height: auto;
    min-height: 120px;
    line-height: 1.6;
    resize: vertical;
}

/* === Focus & Hover Effects === */
.form-select:focus,
.form-control:focus,
textarea.form-control:focus,
.form-select:hover,
.form-control:hover,
textarea.form-control:hover {
    border-color: #052374;
    box-shadow: 0 0 6px rgba(5, 35, 116, 0.4);
    outline: none;
}

/* === Custom Checkbox Group === */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    background: #f9f9f9;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-checkbox input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #052374;
    width: 16px;
    height: 16px;
}

.custom-checkbox span {
    font-size: 14px;
    color: #333;
}

.custom-checkbox:hover {
    background: #eef3fa;
    border-color: #052374;
}

.custom-checkbox input[type="checkbox"]:checked + span {
    font-weight: 600;
    color: #052374;
}

/* === Button Styles === */
button[type="submit"] {
    background-color: transparent;
    color: #052374;
    border: 2px solid #052374;
    padding: 10px 30px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    display: inline-block;
}

button[type="submit"]:hover {
    background-color: #052374;
    color: #fff;
    border-color: #052374;
}

/* === Button Spinner State === */
.btn-spinner.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.btn-spinner.loading::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
    transform: translateY(-50%);
}

@keyframes spinner {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* === Google Captcha & Button Alignment === */
.text-center .g-recaptcha {
    display: inline-block;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
}

/* === Login Prompt Section === */
.login-prompt {
    background: rgba(5, 35, 116, 0.05);
    padding: 20px 15px;
    border-radius: 8px;
    margin: 30px auto;
    width: 100%;
    max-width: 700px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-size: 16px;
    color: #052374;
    text-align: center;
}

.login-prompt p {
    margin: 0;
    font-weight: 500;
}

.login-prompt .login-link {
    color: #052374;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

.login-prompt .login-link:hover {
    color: #970a26;
    text-decoration: none;
}

/* === Responsive Optimizations === */
@media (max-width: 767px) {
    .container {
        padding: 20px;
        border-radius: 8px;
    }

    .container h2 {
        font-size: 22px;
        padding: 12px 15px;
    }

    .container h4 {
        font-size: 18px;
        padding: 8px 12px;
    }

    .container form .row.g-3 > div,
    .container form .mb-3 {
        margin-bottom: 15px;
    }

    .checkbox-group {
        gap: 10px;
    }

    .custom-checkbox {
        padding: 6px 12px;
    }

    .custom-checkbox span {
        font-size: 13px;
    }

    button[type="submit"] {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .text-center .g-recaptcha {
        transform: scale(0.85);
        transform-origin: center;
    }
}
