diff --git a/src/app/careers/page.tsx b/src/app/careers/page.tsx index 7c8d878..08e6886 100644 --- a/src/app/careers/page.tsx +++ b/src/app/careers/page.tsx @@ -33,7 +33,7 @@ export default function CareersPage() { - + {/* */} diff --git a/src/app/globals.css b/src/app/globals.css index a496e47..0776606 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -5058,7 +5058,7 @@ body { [class^="icon-"], [class*=" icon-"], .why-choose-two__icon span { - font-family: inherit !important; + /* font-family: inherit !important; */ font-style: normal; font-weight: normal; font-variant: normal; @@ -9996,8 +9996,8 @@ body { .contact-popup-content .close-btn { position: absolute; - top: 20px; - right: 20px; + top: 10px; + right: 10px; background: #f3f4f6; border: none; width: 35px; @@ -11989,27 +11989,27 @@ body { .about-us-image-area .icon-box i { color: #fff; font-size: 38px !important; -} + } -.about-us-image-area .working-area { + .about-us-image-area .working-area { padding: 25px 16px 10px !important; -} + } -.about-us-image-area .icon-box h4 { + .about-us-image-area .icon-box h4 { color: #fff; margin-top: 14px; font-size: 14px; margin-bottom: 1px; -} + } -.about-us-image-area .icon-box p { + .about-us-image-area .icon-box p { font-family: var(--secondary-font); color: #fff; position: relative; font-size: 12px !important; -} + } .banner-area { padding-left: 15px !important; @@ -16518,3 +16518,1159 @@ h4.service-details__dynamic-content-erp { color: #FFF; animation: fadeIn 0.3s ease; } + +/* ============================================================ + CAREERS CONTACT POPUP — CareersContactPopup.tsx + ============================================================ */ + +/* Card title as button */ +.cp-card-title-btn { + background: none; + border: none; + padding: 0; + margin: 0; + cursor: pointer; + font-family: inherit; + font-size: inherit; + font-weight: inherit; + color: inherit; + line-height: inherit; + text-align: left; + transition: color 0.3s ease; + display: inline; +} + +.cp-card-title-btn:hover { + color: #3779b9; +} + +/* ── Overlay ── */ +.cp-overlay { + position: fixed; + inset: 0; + z-index: 99999; + background: rgba(10, 14, 26, 0.75); + backdrop-filter: blur(6px); + -webkit-backdrop-filter: blur(6px); + display: flex; + align-items: center; + justify-content: center; + padding: 16px; + animation: cpFadeIn 0.25s ease; +} + +@keyframes cpFadeIn { + from { + opacity: 0; + } + + to { + opacity: 1; + } +} + +/* ── Modal Container (Single Panel) ── */ +/* ── Modal Container (Single Panel - Optimized) ── */ +.cp-modal { + width: 100%; + max-width: 700px; + max-height: 95vh; + background: #111827; + border-radius: 20px; + overflow-y: auto; + box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); + animation: cpSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); + position: relative; + scrollbar-width: thin; + scrollbar-color: #3779b9 #1f2937; +} + +.cp-modal::-webkit-scrollbar { + width: 4px; +} + +.cp-modal::-webkit-scrollbar-track { + background: #1f2937; +} + +.cp-modal::-webkit-scrollbar-thumb { + background: #3779b9; + border-radius: 10px; +} + +@keyframes cpSlideUp { + from { + opacity: 0; + transform: translateY(40px) scale(0.97); + } + + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +.cp-close-btn { + position: absolute; + top: 15px; + right: 15px; + width: 32px; + height: 32px; + border-radius: 50%; + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + color: rgba(255, 255, 255, 0.6); + font-size: 14px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.25s ease; + z-index: 10; +} + +.cp-close-btn:hover { + background: #ef4444; + border-color: #ef4444; + color: #fff; + transform: rotate(90deg); +} + +.cp-form-inner { + padding: 35px 40px 30px; +} + +.cp-form-header { + text-align: center; + margin-bottom: 30px; +} + +.cp-form-title { + font-size: 26px !important; + font-weight: 800 !important; + color: #fff !important; + margin: 0 0 4px !important; +} + +.cp-form-subtitle { + font-size: 13px !important; + color: rgba(255, 255, 255, 0.4) !important; + margin: 0 !important; +} + +/* Alert */ +.cp-alert { + display: flex; + align-items: center; + gap: 10px; + padding: 10px 14px; + border-radius: 8px; + font-size: 13px; + font-weight: 500; + margin-bottom: 20px; + animation: fadeIn 0.3s ease; +} + +.cp-alert--success { + background: rgba(34, 197, 94, 0.1); + border: 1px solid rgba(34, 197, 94, 0.2); + color: #4ade80; +} + +.cp-alert--danger { + background: rgba(239, 68, 68, 0.1); + border: 1px solid rgba(239, 68, 68, 0.2); + color: #f87171; +} + +/* Form Layout */ +.cp-row { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 15px; + margin-bottom: 15px; +} + +.cp-field { + display: flex; + flex-direction: column; + gap: 6px; +} + +.cp-field--full { + margin-bottom: 15px; +} + +.cp-label { + font-size: 12px !important; + font-weight: 700 !important; + color: rgba(255, 255, 255, 0.6) !important; + text-transform: uppercase; + letter-spacing: 0.5px; + margin: 0 !important; +} + +.cp-label span { + color: #f87171; + margin-left: 2px; +} + +.cp-optional { + color: rgba(255, 255, 255, 0.3) !important; + font-weight: 400 !important; + text-transform: none !important; + font-size: 11px !important; +} + +.cp-input { + width: 100%; + background: rgba(255, 255, 255, 0.03) !important; + border: 1px solid rgba(255, 255, 255, 0.08) !important; + border-radius: 10px !important; + padding: 10px 14px !important; + font-size: 14px !important; + color: #fff !important; + transition: all 0.25s ease !important; + outline: none !important; + box-sizing: border-box; +} + +.cp-input::placeholder { + color: rgba(255, 255, 255, 0.25) !important; +} + +.cp-input:focus { + border-color: #3779b9 !important; + background: rgba(55, 121, 185, 0.05) !important; + box-shadow: 0 0 0 3px rgba(55, 121, 185, 0.1) !important; +} + +.cp-input--error { + border-color: #ef4444 !important; +} + +.cp-select { + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important; + background-repeat: no-repeat !important; + background-position: right 14px center !important; + padding-right: 35px !important; + cursor: pointer; +} + +.cp-select option { + background: #1f2937; + color: #fff; +} + +.cp-error { + font-size: 11px !important; + color: #f87171 !important; + margin-top: 2px !important; +} + +/* Textarea */ +.cp-textarea { + width: 100%; + background: rgba(255, 255, 255, 0.03) !important; + border: 1px solid rgba(255, 255, 255, 0.08) !important; + border-radius: 10px !important; + padding: 10px 14px !important; + font-size: 14px !important; + color: #fff !important; + transition: all 0.25s ease !important; + outline: none !important; + resize: none; + box-sizing: border-box; + font-family: inherit; + min-height: 85px; +} + +.cp-textarea::placeholder { + color: rgba(255, 255, 255, 0.25) !important; +} + +.cp-textarea:focus { + border-color: #3779b9 !important; + background: rgba(55, 121, 185, 0.05) !important; +} + +/* File Upload */ +.cp-file-upload { + width: 100%; +} + +.cp-file-hidden { + display: none; +} + +.cp-file-label { + display: flex; + align-items: center; + justify-content: space-between; + background: rgba(255, 255, 255, 0.03); + border: 1px dashed rgba(255, 255, 255, 0.1); + border-radius: 10px; + padding: 10px 15px; + cursor: pointer; + transition: all 0.25s ease; + gap: 12px; +} + +.cp-file-label:hover { + border-color: #3779b9; + background: rgba(55, 121, 185, 0.05); +} + +.cp-file-content { + display: flex; + align-items: center; + gap: 10px; + flex: 1; + min-width: 0; +} + +.cp-file-content i { + font-size: 16px; + color: #3779b9; + flex-shrink: 0; +} + +.cp-file-name { + font-size: 13px; + color: rgba(255, 255, 255, 0.4); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.cp-file-browse { + background: #3779b9; + color: #fff; + font-size: 11px; + font-weight: 700; + padding: 6px 12px; + border-radius: 6px; + text-transform: uppercase; + flex-shrink: 0; +} + +/* ReCAPTCHA container */ +.cp-captcha { + margin-top: 5px; + display: flex; + justify-content: center; + transform: scale(0.9); + transform-origin: center; +} + +/* Submit Button */ +.cp-submit-btn { + width: 100%; + background: linear-gradient(135deg, #3779b9 0%, #1d5fa3 100%); + color: #fff; + border: none; + border-radius: 12px; + padding: 13px 25px; + font-size: 14px; + font-weight: 800; + letter-spacing: 0.8px; + text-transform: uppercase; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + transition: all 0.3s ease; + box-shadow: 0 5px 15px rgba(55, 121, 185, 0.3); + margin-top: 5px; +} + +.cp-submit-btn:hover:not(:disabled) { + transform: translateY(-2px); + box-shadow: 0 8px 25px rgba(55, 121, 185, 0.45); +} + +.cp-submit-btn:disabled { + opacity: 0.7; + cursor: not-allowed; +} + +.cp-submit-btn i { + font-size: 14px; +} + +/* ── Responsive ── */ + +/* ── Modal Container (Single Panel - Optimized) ── */ +.cp-modal { + width: 100%; + max-width: 720px; + background: #111827; + border-radius: 20px; + box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); + animation: cpSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); + position: relative; + overflow: hidden; + display: flex; + flex-direction: column; +} + +/* Internal scroll only if needed */ +.cp-form-inner { + padding: 35px 45px 30px; + overflow-y: auto; + max-height: 92vh; + scrollbar-width: thin; + scrollbar-color: #3779b9 #1f2937; +} + +.cp-form-inner::-webkit-scrollbar { + width: 4px; +} + +.cp-form-inner::-webkit-scrollbar-track { + background: #1f2937; +} + +.cp-form-inner::-webkit-scrollbar-thumb { + background: #3779b9; + border-radius: 10px; +} + +@keyframes cpSlideUp { + from { + opacity: 0; + transform: translateY(40px) scale(0.97); + } + + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +.cp-close-btn { + position: absolute; + top: 15px; + right: 15px; + width: 32px; + height: 32px; + border-radius: 50%; + background: rgba(255, 255, 255, 0.05); + border: 1px solid rgba(255, 255, 255, 0.1); + color: rgba(255, 255, 255, 0.6); + font-size: 14px; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + z-index: 100; + transition: all 0.25s ease; +} + +.cp-close-btn:hover { + background: #ef4444; + border-color: #ef4444; + color: #fff; + transform: rotate(90deg); +} + +.cp-form-header { + text-align: center; + margin-bottom: 30px; +} + +.cp-form-title { + font-size: 26px !important; + font-weight: 800 !important; + color: #fff !important; + margin: 0 0 4px !important; +} + +.cp-form-subtitle { + font-size: 13px !important; + color: rgba(255, 255, 255, 0.4) !important; + margin: 0 !important; +} + +/* Alert */ +.cp-alert { + display: flex; + align-items: center; + gap: 10px; + padding: 10px 14px; + border-radius: 8px; + font-size: 13px; + font-weight: 500; + margin-bottom: 20px; + animation: fadeIn 0.3s ease; +} + +.cp-alert--success { + background: rgba(34, 197, 94, 0.1); + border: 1px solid rgba(34, 197, 94, 0.2); + color: #4ade80; +} + +.cp-alert--danger { + background: rgba(239, 68, 68, 0.1); + border: 1px solid rgba(239, 68, 68, 0.2); + color: #f87171; +} + +/* Form Layout */ +.cp-row { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 15px; + margin-bottom: 15px; +} + +.cp-field { + display: flex; + flex-direction: column; + gap: 6px; +} + +.cp-field--full { + margin-bottom: 15px; +} + +.cp-label { + font-size: 12px !important; + font-weight: 700 !important; + color: rgba(255, 255, 255, 0.6) !important; + text-transform: uppercase; + letter-spacing: 0.5px; + margin: 0 !important; +} + +.cp-label span { + color: #f87171; + margin-left: 2px; +} + +.cp-optional { + color: rgba(255, 255, 255, 0.3) !important; + font-weight: 400 !important; + text-transform: none !important; + font-size: 11px !important; +} + +.cp-input { + width: 100%; + background: rgba(255, 255, 255, 0.03) !important; + border: 1px solid rgba(255, 255, 255, 0.08) !important; + border-radius: 10px !important; + padding: 10px 14px !important; + font-size: 14px !important; + color: #fff !important; + transition: all 0.25s ease !important; + outline: none !important; + box-sizing: border-box; +} + +.cp-input::placeholder { + color: rgba(255, 255, 255, 0.25) !important; +} + +.cp-input:focus { + border-color: #3779b9 !important; + background: rgba(55, 121, 185, 0.05) !important; + box-shadow: 0 0 0 3px rgba(55, 121, 185, 0.1) !important; +} + +.cp-input--error { + border-color: #ef4444 !important; +} + +.cp-select { + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important; + background-repeat: no-repeat !important; + background-position: right 14px center !important; + padding-right: 35px !important; + cursor: pointer; +} + +.cp-select option { + background: #1f2937; + color: #fff; +} + +.cp-error { + font-size: 11px !important; + color: #f87171 !important; + margin-top: 2px !important; +} + +/* Textarea */ +.cp-textarea { + width: 100%; + background: rgba(255, 255, 255, 0.03) !important; + border: 1px solid rgba(255, 255, 255, 0.08) !important; + border-radius: 10px !important; + padding: 10px 14px !important; + font-size: 14px !important; + color: #fff !important; + transition: all 0.25s ease !important; + outline: none !important; + resize: none; + box-sizing: border-box; + font-family: inherit; + min-height: 85px; +} + +.cp-textarea::placeholder { + color: rgba(255, 255, 255, 0.25) !important; +} + +.cp-textarea:focus { + border-color: #3779b9 !important; + background: rgba(55, 121, 185, 0.05) !important; +} + +/* File Upload */ +.cp-file-upload { + width: 100%; +} + +.cp-file-hidden { + display: none; +} + +.cp-file-label { + display: flex; + align-items: center; + justify-content: space-between; + background: rgba(255, 255, 255, 0.03); + border: 1px dashed rgba(255, 255, 255, 0.1); + border-radius: 10px; + padding: 10px 15px; + cursor: pointer; + transition: all 0.25s ease; + gap: 12px; +} + +.cp-file-label:hover { + border-color: #3779b9; + background: rgba(55, 121, 185, 0.05); +} + +.cp-file-content { + display: flex; + align-items: center; + gap: 10px; + flex: 1; + min-width: 0; +} + +.cp-file-content i { + font-size: 16px; + color: #3779b9; + flex-shrink: 0; +} + +.cp-file-name { + font-size: 13px; + color: rgba(255, 255, 255, 0.4); + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.cp-file-browse { + background: #3779b9; + color: #fff; + font-size: 11px; + font-weight: 700; + padding: 6px 12px; + border-radius: 6px; + text-transform: uppercase; + flex-shrink: 0; +} + +/* ReCAPTCHA container */ +.cp-captcha { + margin-top: 5px; + display: flex; + justify-content: center; + transform: scale(0.9); + transform-origin: center; +} + +/* Submit Button */ +.cp-submit-btn { + width: 100%; + background: linear-gradient(135deg, #3779b9 0%, #1d5fa3 100%); + color: #fff; + border: none; + border-radius: 12px; + padding: 13px 25px; + font-size: 14px; + font-weight: 800; + letter-spacing: 0.8px; + text-transform: uppercase; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + transition: all 0.3s ease; + box-shadow: 0 5px 15px rgba(55, 121, 185, 0.3); + margin-top: 5px; +} + +.cp-submit-btn:hover:not(:disabled) { + transform: translateY(-2px); + box-shadow: 0 8px 25px rgba(55, 121, 185, 0.45); +} + +.cp-submit-btn:disabled { + opacity: 0.7; + cursor: not-allowed; +} + +.cp-submit-btn i { + font-size: 14px; +} + +/* ── Careers Popup Optimized (Dark Theme & No-Scroll) ── */ +.careers-popup-optimized { + background: #1a1f2b !important; + max-width: 600px !important; + border-radius: 24px !important; + box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6) !important; + overflow: hidden !important; + border: 1px solid rgba(255, 255, 255, 0.08) !important; +} + +.careers-popup-optimized .form-panel { + padding: 25px 40px 20px !important; + background: #1a1f2b !important; +} + +.careers-popup-optimized .form-header { + text-align: center; + margin-bottom: 20px; +} + +.careers-popup-optimized .form-title { + font-size: 24px !important; + font-weight: 800 !important; + color: #fff !important; + margin: 0 0 4px !important; +} + +.careers-popup-optimized .form-subtitle { + font-size: 13px !important; + color: rgba(255, 255, 255, 0.5) !important; + margin: 0 !important; +} + +.careers-popup-optimized .form-label-custom { + font-size: 10px !important; + font-weight: 800 !important; + color: rgba(255, 255, 255, 0.7) !important; + text-transform: uppercase; + letter-spacing: 0.6px; + margin-bottom: 4px; + display: block; +} + +.careers-popup-optimized .form-label-custom span { + color: #ef4444; +} + +.careers-popup-optimized .optional-label { + color: rgba(255, 255, 255, 0.3) !important; + font-weight: 500 !important; + text-transform: none !important; +} + +/* Tighten grid gaps */ +.careers-popup-optimized .row.g-3 { + --bs-gutter-y: 10px; + --bs-gutter-x: 15px; +} + +.careers-popup-optimized .form-input { + padding: 10px 14px !important; + border: 1.5px solid rgba(255, 255, 255, 0.08) !important; + background: rgba(255, 255, 255, 0.03) !important; + color: #fff !important; + font-weight: 500 !important; + border-radius: 10px !important; +} + + +.careers-popup-optimized .form-input:focus { + border-color: #3779b9 !important; + background: rgba(55, 121, 185, 0.05) !important; + box-shadow: 0 0 0 4px rgba(55, 121, 185, 0.1) !important; +} + +.careers-popup-optimized .form-textarea { + min-height: 60px !important; + background: rgba(255, 255, 255, 0.03) !important; + border: 1.5px solid rgba(255, 255, 255, 0.08) !important; +} + +/* File Upload Popup Styling */ +.careers-popup-optimized .file-upload-styled { + width: 100%; +} + +.careers-popup-optimized .file-hidden-input { + display: none; +} + +.careers-popup-optimized .file-upload-label { + display: flex; + align-items: center; + justify-content: space-between; + background: rgba(255, 255, 255, 0.02); + border: 1.5px dashed rgba(255, 255, 255, 0.1); + border-radius: 10px; + padding: 8px 12px; + cursor: pointer; + transition: 0.25s; +} + +.careers-popup-optimized .file-upload-label:hover { + border-color: #3779b9; + background: rgba(255, 255, 255, 0.05); +} + +.careers-popup-optimized .file-content { + display: flex; + align-items: center; + gap: 10px; + color: rgba(255, 255, 255, 0.6); +} + +/* ── Careers Popup Optimized (Dark Theme & No-Scroll) ── */ +.careers-popup-optimized { + background: #1a1f2b !important; + max-width: 600px !important; + border-radius: 24px !important; + box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6) !important; + overflow: hidden !important; + border: 1px solid rgba(255, 255, 255, 0.08) !important; + display: flex !important; + flex-direction: column !important; +} + +.careers-popup-optimized .form-panel { + padding: 30px 45px 25px !important; + background: #1a1f2b !important; + overflow: hidden !important; + /* Force no scroll on panel */ +} + +.careers-popup-optimized .form-header { + text-align: center; + margin-bottom: 25px; +} + +.careers-popup-optimized .form-title { + font-size: 26px !important; + font-weight: 800 !important; + color: #fff !important; + margin: 0 0 4px !important; +} + +.careers-popup-optimized .form-subtitle { + font-size: 14px !important; + color: rgba(255, 255, 255, 0.5) !important; + margin: 0 !important; +} + +.careers-popup-optimized .form-label-custom { + font-size: 11px !important; + font-weight: 800 !important; + color: rgba(255, 255, 255, 0.7) !important; + text-transform: uppercase; + letter-spacing: 0.6px; + margin-bottom: 6px; + display: block; +} + +.careers-popup-optimized .form-label-custom span { + color: #ef4444; +} + +.careers-popup-optimized .optional-label { + color: rgba(255, 255, 255, 0.3) !important; + font-weight: 400 !important; + text-transform: none !important; +} + +/* Tighten grid gaps */ +.careers-popup-optimized .row.g-3 { + --bs-gutter-y: 12px; + --bs-gutter-x: 15px; +} + +.careers-popup-optimized .form-input { + padding: 12px 16px !important; + border: 1.5px solid rgba(255, 255, 255, 0.08) !important; + background: rgba(255, 255, 255, 0.03) !important; + color: #fff !important; + font-weight: 500 !important; + border-radius: 12px !important; +} + +.careers-popup-optimized .form-input:focus { + border-color: #3779b9 !important; + background: rgba(55, 121, 185, 0.05) !important; + box-shadow: 0 0 0 4px rgba(55, 121, 185, 0.1) !important; +} + +.careers-popup-optimized .form-textarea { + min-height: 80px !important; + background: rgba(255, 255, 255, 0.03) !important; + border: 1.5px solid rgba(255, 255, 255, 0.08) !important; +} + +/* File Upload Popup Styling */ +.careers-popup-optimized .file-upload-styled { + width: 100%; +} + +.careers-popup-optimized .file-hidden-input { + display: none; +} + +.careers-popup-optimized .file-upload-label { + display: flex; + align-items: center; + justify-content: space-between; + background: rgba(255, 255, 255, 0.02); + border: 1.5px dashed rgba(255, 255, 255, 0.1); + border-radius: 12px; + padding: 10px 15px; + cursor: pointer; + transition: 0.25s; +} + +.careers-popup-optimized .file-upload-label:hover { + border-color: #3779b9; + background: rgba(255, 255, 255, 0.05); +} + +.careers-popup-optimized .file-content { + display: flex; + align-items: center; + gap: 10px; + color: rgba(255, 255, 255, 0.6); +} + +.careers-popup-optimized .file-name-text { + font-size: 13px; + font-weight: 500; +} + +.careers-popup-optimized .file-browse-btn { + background: #3779b9; + color: #fff; + font-size: 11px; + font-weight: 700; + padding: 6px 14px; + border-radius: 8px; + text-transform: uppercase; +} + +/* Captcha alignment */ +.careers-popup-optimized .g-recaptcha-container { + transform: scale(0.9); + margin: 10px 0 !important; +} + +/* Submit Button Override */ +.careers-popup-optimized .submit-btn { + padding: 16px !important; + margin-top: 10px !important; + font-size: 15px !important; + border-radius: 12px !important; + display: flex; + align-items: center; + justify-content: center; + gap: 10px; + background: linear-gradient(135deg, #3779b9 0%, #1d5fa3 100%) !important; + font-weight: 700 !important; + text-transform: uppercase !important; + letter-spacing: 1px !important; +} + +/* Multi-Viewport Optimization (Absolute No-Scroll) */ + +/* 1920-1600-1540-1440 */ +@media (max-width: 1920px) { + .careers-popup-optimized { + max-width: 600px !important; + } +} + +@media (max-width: 1440px) { + .careers-popup-optimized { + max-width: 580px !important; + } +} + +/* 1360-1200 */ +@media (max-width: 1360px) { + .careers-popup-optimized { + max-width: 550px !important; + } + + .careers-popup-optimized .form-panel { + padding: 25px 40px 20px !important; + } +} + +/* 1024-992 */ +@media (max-width: 1024px) { + .careers-popup-optimized { + max-width: 520px !important; + } + + .careers-popup-optimized .form-panel { + padding: 20px 35px 15px !important; + } + + .careers-popup-optimized .form-title { + font-size: 24px !important; + } +} + +/* 768px - Tablet */ +@media (max-width: 768px) { + .careers-popup-optimized { + max-width: 600px !important; + width: 90% !important; + } + + .careers-popup-optimized .form-panel { + padding: 15px 30px 10px !important; + } + + .careers-popup-optimized .form-header { + margin-bottom: 15px; + } + + .careers-popup-optimized .form-input { + padding: 10px 14px !important; + } + + .careers-popup-optimized .form-textarea { + min-height: 60px !important; + } + + .careers-popup-optimized .g-recaptcha-container { + transform: scale(0.8); + margin: 5px 0 !important; + } + + .contact-popup-content .close-btn { + position: absolute; + top: 10px !important; + right: 10px !important; + background: #f3f4f6; + border: none; + width: 25px !important; + height: 25px !important; + border-radius: 50%; + font-size: 16px !important; + cursor: pointer; + color: #1a1f2b; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.3s; + z-index: 100; + } +} + +/* 500-475px */ +@media (max-width: 500px) { + .careers-popup-optimized { + width: 95% !important; + } + + .careers-popup-optimized .form-panel { + padding: 12px 20px 8px !important; + } + + .careers-popup-optimized .form-title { + font-size: 20px !important; + } + + .careers-popup-optimized .form-subtitle { + font-size: 12px !important; + } + + .careers-popup-optimized .form-label-custom { + font-size: 9px !important; + margin-bottom: 3px; + } + + .careers-popup-optimized .mt-3 { + margin-top: 8px !important; + } +} + +/* 425px */ +@media (max-width: 425px) { + .careers-popup-optimized .form-panel { + padding: 10px 15px 5px !important; + } + + .careers-popup-optimized .g-recaptcha-container { + transform: scale(0.75); + } +} + +/* 320px - Small Mobile */ +@media (max-width: 320px) { + .careers-popup-optimized .form-panel { + padding: 8px 12px 5px !important; + } + + .careers-popup-optimized .form-title { + font-size: 18px !important; + } + + .careers-popup-optimized .form-subtitle { + display: none; + } + + .careers-popup-optimized .form-label-custom { + display: none; + } + + /* Hide labels, placeholders only to save vertical space */ + .careers-popup-optimized .form-input { + padding: 8px 12px !important; + font-size: 12px !important; + } + + .careers-popup-optimized .form-textarea { + min-height: 50px !important; + font-size: 12px !important; + } + + .careers-popup-optimized .g-recaptcha-container { + transform: scale(0.65); + margin: 3px 0 !important; + } + + .careers-popup-optimized .submit-btn { + padding: 12px !important; + font-size: 13px !important; + margin-top: 5px !important; + } +} \ No newline at end of file diff --git a/src/components/careers/CareersContactPopup.tsx b/src/components/careers/CareersContactPopup.tsx new file mode 100644 index 0000000..41a7fa5 --- /dev/null +++ b/src/components/careers/CareersContactPopup.tsx @@ -0,0 +1,361 @@ +"use client"; + +import React, { useEffect, useState, useRef } from "react"; +import { createPortal } from "react-dom"; +import ReCAPTCHA from "react-google-recaptcha"; +import axios from "axios"; + +interface CareersContactPopupProps { + isOpen: boolean; + onClose: () => void; + defaultPosition?: string; +} + +const positions = [ + { value: "Frontend Developer", label: "Website Development" }, + { value: "Backend Developer", label: "Social Media Marketing" }, + { value: "Full Stack Developer", label: "Search Engine Optimization" }, + { value: "UI/UX Designer", label: "Mobile App Development" }, + { value: "SEO Specialist", label: "UI/UX Designing" }, + { value: "Digital Marketing Executive", label: "Graphic Designing" }, + { value: "Other", label: "Other" }, +]; + +const CareersContactPopup: React.FC = ({ + isOpen, + onClose, + defaultPosition = "", +}) => { + const [mounted, setMounted] = useState(false); + const [formData, setFormData] = useState({ + name: "", + email: "", + phone: "", + position: defaultPosition, + message: "", + }); + const [resumeFile, setResumeFile] = useState(null); + const [resumeBase64, setResumeBase64] = useState(null); + const [formErrors, setFormErrors] = useState({}); + const [captchaToken, setCaptchaToken] = useState(null); + const [alert, setAlert] = useState({ show: false, type: "", message: "" }); + const [isSubmitting, setIsSubmitting] = useState(false); + const fileInputRef = useRef(null); + + useEffect(() => { + setMounted(true); + }, []); + + // Sync position when defaultPosition changes (new card clicked) + useEffect(() => { + setFormData((prev) => ({ ...prev, position: defaultPosition })); + }, [defaultPosition]); + + // Close on ESC + useEffect(() => { + const handleEsc = (e: KeyboardEvent) => { + if (e.key === "Escape") onClose(); + }; + if (isOpen) { + window.addEventListener("keydown", handleEsc); + document.body.style.overflow = "hidden"; + } + return () => { + window.removeEventListener("keydown", handleEsc); + document.body.style.overflow = ""; + }; + }, [isOpen, onClose]); + + const handleChange = ( + e: React.ChangeEvent + ) => { + const { name, value } = e.target; + setFormData((prev) => ({ ...prev, [name]: value })); + }; + + const handleFileChange = (e: React.ChangeEvent) => { + if (e.target.files && e.target.files.length > 0) { + const file = e.target.files[0]; + if (file.size > 5 * 1024 * 1024) { + setFormErrors((prev: any) => ({ ...prev, resume: "File size should be less than 5MB." })); + setResumeFile(null); + setResumeBase64(null); + return; + } + const allowedTypes = [ + "application/pdf", + "application/msword", + "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + ]; + if (!allowedTypes.includes(file.type)) { + setFormErrors((prev: any) => ({ ...prev, resume: "Only PDF and Word documents are allowed." })); + setResumeFile(null); + setResumeBase64(null); + return; + } + setResumeFile(file); + setFormErrors((prev: any) => ({ ...prev, resume: undefined })); + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => { + setResumeBase64(reader.result as string); + }; + } + }; + + const handleCaptchaChange = (token: string | null) => { + setCaptchaToken(token); + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + const errors: any = {}; + if (!formData.name.trim()) errors.name = "Name is required."; + if (!formData.email.trim()) errors.email = "Email is required."; + if (!formData.phone.trim()) errors.phone = "Phone is required."; + if (!formData.position.trim()) errors.position = "Please select a position."; + if (!captchaToken) errors.captcha = "Please verify the CAPTCHA."; + // Resume is OPTIONAL — no validation + + setFormErrors(errors); + if (Object.keys(errors).length > 0) return; + + setIsSubmitting(true); + + const emailData: any = { + name: formData.name, + email: formData.email, + phone: formData.phone, + position: formData.position, + message: `Position: ${formData.position}

Phone: ${formData.phone}

Message: ${formData.message || "No additional message."}`, + to: "info@metatroncubesolutions.com", + senderName: "Metatroncube Careers Application", + recaptchaToken: captchaToken, + }; + + if (resumeBase64 && resumeFile) { + emailData.attachments = [ + { + filename: resumeFile.name, + path: resumeBase64, + }, + ]; + } + + try { + const res = await axios.post("https://mailserver.metatronnest.com/send", emailData, { + headers: { "Content-Type": "application/json" }, + }); + setAlert({ + show: true, + type: "success", + message: res?.data?.message || "Application submitted successfully!", + }); + setFormData({ name: "", email: "", phone: "", position: defaultPosition, message: "" }); + setResumeFile(null); + setResumeBase64(null); + if (fileInputRef.current) fileInputRef.current.value = ""; + setCaptchaToken(null); + setFormErrors({}); + } catch (error) { + console.error("Error sending application:", error); + setAlert({ + show: true, + type: "danger", + message: "Failed to submit application. Please try again later.", + }); + } finally { + setIsSubmitting(false); + } + }; + + // Auto-hide alert + useEffect(() => { + if (alert.show) { + const t = setTimeout(() => setAlert((p) => ({ ...p, show: false })), 5000); + return () => clearTimeout(t); + } + }, [alert.show]); + + const handleReset = () => { + setFormData({ name: "", email: "", phone: "", position: defaultPosition, message: "" }); + setResumeFile(null); + setResumeBase64(null); + if (fileInputRef.current) fileInputRef.current.value = ""; + setCaptchaToken(null); + setFormErrors({}); + setAlert({ show: false, type: "", message: "" }); + }; + + const handleClose = () => { + handleReset(); + onClose(); + }; + + if (!mounted || !isOpen) return null; + + const modalContent = ( +
+
e.stopPropagation()}> + + {/* ── CLOSE BUTTON ── */} + + + {/* ── FORM PANEL ── */} +
+
+

Apply Now

+
+ + {alert.show && ( +
+ + {alert.message} +
+ )} + +
+
+
+ + + {formErrors.name && {formErrors.name}} +
+
+ + + {formErrors.email && {formErrors.email}} +
+
+ +
+
+ + + {formErrors.phone && {formErrors.phone}} +
+
+ + + {formErrors.position && {formErrors.position}} +
+
+ +
+ +
+ + +
+ {formErrors.resume && {formErrors.resume}} +
+ +
+ +