.main-container {
    max-width: 1330px;
    margin: 20px auto;
    padding: 0 15px;
}

/* MODIFIED: Explicitly stretch children to be equal height */
.form-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    min-height: 600px;
    align-items: stretch; /* This ensures children stretch to the container's height */
}

.form-section {
    flex: 1;
    padding: 40px;
    order: 1;
}

/* MODIFIED: Removed min-height to let flex parent control size */
.image-section {
    flex: 1;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
}

/* MODIFIED: Added styles to make this div full-height on desktop */
.image-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 45, 98, 0.9), rgba(0, 128, 128, 0.85));
    border-radius: 12px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    width: 90%;
    max-width: 570px;
}

.service-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-title {
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.form-subtitle {
    font-size: clamp(14px, 2.5vw, 16px);
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    font-size: clamp(14px, 2.5vw, 15px);
}

.form-label i {
    margin-right: 8px;
    color: var(--primary-color);
    font-size: clamp(14px, 2.5vw, 16px);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    font-size: clamp(14px, 2.5vw, 15px);
    transition: all 0.3s ease;
    width: 100%;
    border: 2px solid #d9d7d7;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(79, 14, 230, 0.25);
    outline: none;
}

/* Ensure column layout and full width by default */
.training-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Updated radio button styles */
.form-check {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
}

.form-check:hover {
    background-color: rgba(13, 89, 203, 0.1);
    border-color: var(--primary-color);
}

.form-check-input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.form-check-label {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    width: 100%;
    font-size: clamp(14px, 2.5vw, 15px);
    display: flex;
    align-items: center;
}

/* Create a custom radio button */
.form-check-label:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #fff;
    border: 2px solid #d9d7d7;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Create the indicator (dot) for radio button */
.form-check-label:after {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    height: 8px;
    width: 8px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* When the radio button is checked */
.form-check-input:checked ~ .form-check-label {
    color: #133970;
    font-weight: 600;
}

.form-check-input:checked ~ .form-check-label:before {
    background-color: #0d59cb;
    border-color: #0d59cb;
}

.form-check-input:checked ~ .form-check-label:after {
    transform: translateY(-50%) scale(1);
}

/* Add blue background to the entire radio button container when checked */
.form-check:has(.form-check-input:checked) {
    border-color: #0d59cb;
}

.submit-btn {
    background-color: #023457;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 30px;
    font-size: clamp(14px, 2.5vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    width: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(6, 68, 125, 0.3);
}

.submit-btn i {
    margin-right: 8px;
}

.response-note {
    background-color: #afddf3ff;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-top: 25px;
    font-size: clamp(12px, 2vw, 14px);
    color: var(--secondary-color);
}

.response-note i {
    color: var(--primary-color);
    margin-right: 8px;
}

.success-message {
    display: none;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: clamp(12px, 2vw, 14px);
}

.overlay-text {
    font-size: clamp(20px, 4vw, 32px);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.overlay-subtext {
    font-size: clamp(14px, 3vw, 18px);
    max-width: 90%;
    line-height: 1.6;
    margin: 0 auto;
}

.overlay-icon {
    font-size: clamp(40px, 6vw, 64px);
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.training-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 3L1 9L12 15L21 10.09V17H23V9M5 13.18V17.18L12 21L19 17.18V13.18L12 17L5 13.18Z'/%3E%3C/svg%3E") center/contain no-repeat;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: clamp(12px, 2vw, 14px);
    margin-top: 5px;
}

.is-invalid~.invalid-feedback {
    display: block;
}

.is-invalid {
    border-color: #dc3545;
}

.stats-row {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    gap: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: clamp(10px, 2vw, 12px);
    opacity: 0.9;
}

.training-types {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.training-tag {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: clamp(10px, 2vw, 12px);
    backdrop-filter: blur(5px);
}

/* Responsive styles */
@media (max-width: 992px) {
    .form-container {
        flex-direction: column;
        align-items: stretch; /* Still good to have */
    }

    .form-section {
        padding: 30px;
        order: 2;
    }

    /* MODIFIED: Add min-height back for the stacked layout */
    .image-section {
        min-height: 350px;
        order: 1;
    }

    /* MODIFIED: Reset margin and height for mobile view */
    .image-content {
        margin: 15px; /* Use smaller margin */
        height: auto; /* Reset height to auto */
    }

    .training-options {
        flex-direction: column;
    }
    
    .form-check {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-container {
        margin: 10px auto;
    }

    .form-section {
        padding: 20px;
    }

    .image-section {
        min-height: 300px;
    }

    .image-content {
        margin: 10px;
        padding: 20px;
    }
    
    .training-options {
        flex-direction: column;
    }
    
    .form-check {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 15px;
    }

    .image-section {
        min-height: 250px;
    }

    .image-content {
        margin: 5px;
        padding: 15px;
    }

    .stats-row {
        flex-direction: column;
        gap: 15px;
    }

    .training-types {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .training-options {
        flex-direction: column;
    }
    
    .form-check {
        width: 100%;
    }
}

/* MODIFIED: Add a media query for DESKTOP to apply the full height */
@media (min-width: 993px) {
    .image-content {
        height: 100%;
        margin: 20px; /* Reset margin to original value */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}