/* Custom styles for Bootstrap-based registration form */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Override Bootstrap variables */
:root {
    --bs-primary: #1e3a8a;
    --bs-primary-rgb: 30, 58, 138;
    --bs-secondary: #3b82f6;
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #CDCDCD;
}

/* Banner in Card */
.banner-container {
    width: 100%;
    border-radius: 12px 12px 0 0;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Form Header */
.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #28a745;
    margin: 0;
}


/* Main Content Section */
.main-content-section {
    background: transparent;
    padding: 2rem 0;
    position: relative;
}

/* Header customization */
.bg-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
}

/* Responsive banner styles */
@media (max-width: 768px) {
    .banner-container {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .banner-container {
        height: 220px;
    }
}

/* Card customization */
.card {
    border-radius: 12px !important;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.card-body {
    padding: 2rem !important;
}

/* Form customization */
.form-control, .form-select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

/* Required field indicator */
.text-danger {
    color: #dc2626 !important;
    font-weight: 600;
}

/* Button customization */
.btn-primary {
    background: #28A745;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    background: #1e7e34;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state for button */
.btn-primary .spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Checkbox customization */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
    accent-color: #3b82f6;
}

.form-check-label {
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}

/* Newsletter section */
.bg-light {
    background-color: #f8fafc !important;
    border: 1px solid #e2e8f0;
}

/* Knowledge partner section */
.knowledge-partner {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #0ea5e9;
}

.knowledge-partner h3 {
    color: #0c4a6e;
}

.knowledge-partner h4 {
    color: #075985;
}

.knowledge-partner p {
    color: #0c4a6e;
    line-height: 1.6;
}

.knowledge-partner a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
}

.knowledge-partner a:hover {
    text-decoration: underline;
}

/* Footer customization */
.bg-dark {
    background-color: #1f2937 !important;
}

.text-primary {
    color: #3b82f6 !important;
}

/* International Telephone Input Styling */
.iti {
    width: 100%;
}

.iti__country-list {
    z-index: 1050;
}

.iti__flag {
    background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@19.2.16/build/img/flags.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .iti__flag {
        background-image: url("https://cdn.jsdelivr.net/npm/intl-tel-input@19.2.16/build/img/flags@2x.png");
    }
}

/* Form validation styles */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #28A745;
    background-color: #28A745;
    color: white;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.was-validated .form-select:valid,
.form-select.is-valid {
    border-color: #28A745;
    background-color: #28A745;
    color: white;
}

.was-validated .form-select:invalid,
.form-select.is-invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

/* Success message */
.alert-success {
    background: linear-gradient(135deg, #28A745 0%, #1e7e34 100%);
    border: none;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.alert-success .alert-heading {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.alert-success p {
    margin: 0;
    opacity: 0.9;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.5rem !important;
    }
    
    .main-content-section {
        padding: 2rem 0;
    }
    
    .knowledge-partner {
        padding: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .card-body {
        padding: 1rem !important;
    }
    
    .main-content-section {
        padding: 1.5rem 0;
    }
    
    .knowledge-partner {
        padding: 1rem !important;
    }
}

/* Animation for form elements */
.form-control, .form-select {
    transition: all 0.3s ease;
}

.form-control:hover, .form-select:hover {
    border-color: #9ca3af;
}

/* Focus states */
.form-control:focus, .form-select:focus {
    transform: translateY(-1px);
}

/* Custom scrollbar for select elements */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-border {
    animation: spin 1s linear infinite;
}

/* Accessibility improvements */
.form-control:focus, .form-select:focus, .btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Success message styles */
.success-container {
    animation: fadeInUp 0.6s ease-out;
}

.success-icon {
    animation: bounceIn 0.8s ease-out;
}

.registration-details {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%) !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Print styles */
@media print {
    .btn, .bg-primary, .bg-dark {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}
