/* careers.css - Complete version with perfect button animation */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.careers-hero {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("../assets/material/Careers-banner.png");
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  background-size: cover;
  background-position: center;
}

.careers-hero h1 {
  font-size: 3.5rem;
  font-family: "Lustria", serif;
  margin-bottom: 1rem;
}

.careers-hero p {
  font-size: 1.3rem;
  font-weight: 300;
}

/* Why Work With Us */
.why-section {
  padding: 5rem 0;
  background: #fafafa;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-family: "Lustria", serif;
  color: #111;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: #b5a46d;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.benefit-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 20px rgba(181, 164, 109, 0.2);
}

.benefit-icon {
  font-size: 3rem;
  color: #b5a46d;
  margin-bottom: 1rem;
  display: block;
}

.benefit-icon i {
  display: inline-block !important;
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure FA 6 solid icons work */
.benefit-icon .fa-solid {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

.benefit-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #111;
}

.benefit-card p {
  color: #666;
  font-size: 0.95rem;
}

/* Our Brands */
.brands-section {
  padding: 5rem 0;
  background: white;
}

.brands-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.brand-item {
  position: relative;
  height: 400px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.brand-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.brand-item:hover img {
  transform: scale(1.05);
}

.brand-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 2rem;
  color: white;
}

.brand-overlay h3 {
  font-size: 2rem;
  font-family: "Lustria", serif;
  margin-bottom: 0.5rem;
}

.brand-overlay p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Application Form */
.application-form {
  max-width: 700px;
  margin: 3rem auto;
  background: white;
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #111;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #b5a46d;
}

/* ===== PERFECT BUTTON ANIMATION ===== */
.btn-submit {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: white;
  border: 2px solid #000000;
  padding: 1rem 3rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-submit:hover:not(:disabled) {
  background: #222222;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Normal button text - centered perfectly */
.btn-submit .btn-text {
  position: relative;
  z-index: 2;
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
  display: block;
}

/* Success indicator - perfectly centered and sized */
.btn-submit .success-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
  width: 90%;
  justify-content: center;
}

/* SVG Checkmark - perfect size */
.btn-submit .success-indicator svg {
  width: 24px;
  height: 24px;
  min-width: 24px;
  color: #4caf50;
  background: white;
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  flex-shrink: 0;
}

/* Success message text - compact and centered */
.btn-submit .success-message-text {
  font-size: 13px;
  color: #155724;
  background: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  flex: 1;
  min-width: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  word-break: break-word;
}

/* ===== SUCCESS STATE - PERFECT FIT ===== */
.btn-submit.success {
  background: white !important;
  border-color: #4caf50 !important;
  color: #155724 !important;
  box-shadow: 0 0 25px rgba(76, 175, 80, 0.25) !important;
  transform: scale(0.98);
}

/* Hide the normal button text smoothly */
.btn-submit.success .btn-text {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-8px);
  pointer-events: none !important;
}

/* Show the success indicator perfectly */
.btn-submit.success .success-indicator {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(-50%, -50%) scale(1);
}

/* ===== SMOOTH ANIMATIONS ===== */
@keyframes buttonSuccessPulse {
  0% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.3);
  }
  50% {
    transform: scale(1);
    box-shadow: 0 0 0 12px rgba(76, 175, 80, 0);
  }
  100% {
    transform: scale(0.98);
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

@keyframes checkmarkPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  60% {
    transform: scale(1.1) rotate(5deg);
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes messageSlideIn {
  0% {
    opacity: 0;
    transform: translateX(-8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations */
.btn-submit.success {
  animation: buttonSuccessPulse 1.2s ease-in-out;
}

.btn-submit.success .success-indicator svg {
  animation: checkmarkPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
}

.btn-submit.success .success-message-text {
  animation: messageSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s both;
}

/* ===== RESET ANIMATION ===== */
.btn-submit.reset {
  animation: buttonReset 0.5s ease forwards !important;
}

@keyframes buttonReset {
  0% {
    background: white;
    border-color: #4caf50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
  }
  100% {
    background: #000000;
    border-color: #000000;
    box-shadow: none;
    transform: none;
  }
}

.btn-submit.reset .btn-text {
  animation: textReappear 0.4s ease 0.2s both !important;
}

@keyframes textReappear {
  0% {
    opacity: 0;
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Disabled state */
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  /* Stack vertically on mobile */
  .btn-submit .success-indicator {
    flex-direction: column;
    gap: 8px;
    width: 85%;
  }

  .btn-submit .success-indicator svg {
    width: 28px;
    height: 28px;
    padding: 6px;
  }

  .btn-submit .success-message-text {
    font-size: 12px;
    padding: 6px 8px;
    line-height: 1.2;
    white-space: normal;
    max-width: 100%;
  }

  /* Adjust button height for mobile */
  .btn-submit {
    min-height: 52px;
    padding: 0.8rem 1.5rem;
  }

  .btn-submit.success {
    min-height: 100px;
    padding: 1rem;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .btn-submit .success-indicator {
    gap: 6px;
    width: 90%;
  }

  .btn-submit .success-indicator svg {
    width: 26px;
    height: 26px;
    padding: 5px;
  }

  .btn-submit .success-message-text {
    font-size: 11px;
    padding: 5px 6px;
  }

  .btn-submit {
    min-height: 48px;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }

  .btn-submit.success {
    min-height: 90px;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .btn-submit .success-indicator {
    gap: 5px;
  }

  .btn-submit .success-message-text {
    font-size: 10px;
    padding: 4px 5px;
  }

  .btn-submit.success {
    min-height: 85px;
  }
}

/* ===== RTL SUPPORT ===== */
body[dir="rtl"] .btn-submit .success-indicator {
  flex-direction: row-reverse;
}

body[dir="rtl"] .btn-submit .success-message-text {
  animation-name: messageSlideInRTL;
}

@keyframes messageSlideInRTL {
  0% {
    opacity: 0;
    transform: translateX(8px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== APPLICATION FORM LAYOUT ===== */
/* Application Form - 3-column layout on desktop */
@media (min-width: 992px) {
  .application-form {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem;
    align-items: start;
    padding: 3rem;
  }

  /* First column: Full Name + Phone Number */
  .form-group:nth-child(1) {
    /* Full Name */
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0.5rem;
  }

  .form-group:nth-child(3) {
    /* Phone Number */
    grid-column: 1;
    grid-row: 2;
    margin-bottom: 0;
  }

  /* Second column: Email + Position of Interest */
  .form-group:nth-child(2) {
    /* Email */
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0.5rem;
  }

  .form-group:nth-child(4) {
    /* Position of Interest */
    grid-column: 2;
    grid-row: 2;
    margin-bottom: 0;
  }

  /* Third column: Why join us + CV Upload (stacked vertically) */
  .form-group:nth-child(5) {
    /* Why join us */
    grid-column: 3;
    grid-row: 1;
    margin-bottom: 0.5rem;
  }

  .form-group:nth-child(6) {
    /* CV Upload */
    grid-column: 3;
    grid-row: 2;
    margin-bottom: 0;
  }

  /* Submit button */
  .btn-submit {
    grid-column: 1 / span 3;
    grid-row: 3;
    margin-top: 1.5rem;
  }

  /* Remove extra margins from all form groups */
  .form-group {
    margin-bottom: 0;
  }

  /* Ensure consistent input heights for perfect alignment */
  .form-group input,
  .form-group select {
    height: 48px;
  }

  /* CV Upload Container - Compact Design */
  .cv-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  /* File input - Hidden but functional */
  input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  /* Custom file upload button - Perfectly Centered White Text */
  .custom-file-button {
    background: #b5a46d;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  .custom-file-button:hover {
    background: #9a8a5a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(181, 164, 109, 0.3);
  }

  .custom-file-button:active {
    transform: translateY(0);
  }

  /* File name display - Compact and Clean */
  .file-name {
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    min-height: 1rem;
    padding: 0.2rem 0;
    font-family: "Lato", sans-serif;
    letter-spacing: 0.2px;
    line-height: 1.3;
    text-align: center;
    transition: color 0.3s ease;
  }

  .file-name.has-file {
    color: #2d5016;
    font-weight: 500;
  }

  /* Remove file hint styles since we're removing it */
  .file-hint {
    display: none;
  }

  /* Reduce label spacing for tighter vertical rhythm */
  .form-group label {
    margin-bottom: 0.4rem;
  }
}

/* Large desktop screens - maintain tight spacing */
@media (min-width: 1400px) {
  .application-form {
    max-width: 1300px;
    gap: 1.2rem;
    padding: 3.5rem;
  }

  .form-group input,
  .form-group select {
    height: 50px;
  }
}

/* Mobile view - keep single column and show all fields */
@media (max-width: 991px) {
  .application-form {
    max-width: 700px;
    display: block;
  }

  .form-group {
    margin-bottom: 1.5rem;
    display: block !important;
    width: 100% !important;
  }

  /* Show email and phone on mobile */
  .form-group:nth-child(2),
  .form-group:nth-child(3) {
    display: block !important;
  }

  /* Mobile file input styling */
  .cv-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .custom-file-button {
    background: #b5a46d;
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-align: center;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    line-height: 1;
  }

  .custom-file-button:hover {
    background: #9a8a5a;
  }

  .file-name {
    color: #666;
    font-size: 0.8rem;
    font-weight: 400;
    min-height: 1rem;
    padding: 0.2rem 0;
    text-align: center;
    transition: color 0.3s ease;
  }

  .file-name.has-file {
    color: #2d5016;
    font-weight: 500;
  }

  .file-hint {
    display: none;
  }
}

/* Testimonials Section */
.testimonials-section {
  padding: 5rem 0;
  background: #f9f5ec;
}

/* Make EVERYTHING in Careers sections use Lato font */
.careers-hero,
.careers-hero *,
.careers-hero h1,
.careers-hero p,
.careers-hero span,
.careers-hero div {
  font-family: "Lato", sans-serif !important;
}

.why-section,
.why-section *,
.why-section .section-subtitle,
.why-section .section-title,
.why-section h3,
.why-section p,
.why-section span,
.why-section div {
  font-family: "Lato", sans-serif !important;
}

.application-section,
.application-section *,
.application-section .section-subtitle,
.application-section .section-title,
.application-section .form-label,
.application-section input,
.application-section select,
.application-section button,
.application-section span,
.application-section div {
  font-family: "Lato", sans-serif !important;
}

.brands-section,
.brands-section *,
.brands-section .section-subtitle,
.brands-section .section-title,
.brands-section h3,
.brands-section p,
.brands-section span,
.brands-section div {
  font-family: "Lato", sans-serif !important;
}

.testimonials-section,
.testimonials-section *,
.testimonials-section .section-subtitle,
.testimonials-section .section-title,
.testimonials-section h3,
.testimonials-section p,
.testimonials-section span,
.testimonials-section div {
  font-family: "Lato", sans-serif !important;
}

/* Override any font-alt classes */
.careers-hero .font-alt,
.why-section .font-alt,
.application-section .font-alt,
.brands-section .font-alt,
.testimonials-section .font-alt {
  font-family: "Lato", sans-serif !important;
}

.label-title-edit-careers {
  font-weight: 400;
  font-size: 0.85rem;
  padding: 0.5rem 0rem;
  color: #b5a46d;
}

.section-title-careers {
  font-size: 2.5rem !important;
  font-weight: 700 !important;
}

@media (max-width: 768px) {
  #MARGIN_mobile {
    margin-bottom: 0 !important;
  }
}

/* Success message styles (keep for backup but hide) */
.success-message {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  padding: 15px;
  margin: 20px 0;
  display: none !important;
  text-align: center;
  font-weight: 500;
}

.success-message.show {
  display: flex !important;
}

.success-message i {
  margin-right: 10px;
  color: #28a745;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RTL styles for success message */
body[dir="rtl"] .success-message i {
  margin-right: 0;
  margin-left: 10px;
}

.success-title {
  display: block;
  font-weight: 600;
  margin-bottom: 5px;
}

.success-detail {
  font-size: 14px;
  opacity: 0.9;
}

/* RTL styles */
body[dir="rtl"] .success-message {
  text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
  .careers-hero h1 {
    font-size: 2.5rem;
  }

  .careers-hero p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .brands-container {
    grid-template-columns: 1fr;
  }

  .brand-item {
    height: 300px;
  }

  .application-form {
    padding: 2rem 1.5rem;
  }

  .section-title-careers {
    font-size: 2rem !important;
  }
}

/* Additional responsive adjustments */
@media (max-width: 480px) {
  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .careers-hero {
    height: 60vh;
  }

  .careers-hero h1 {
    font-size: 2rem;
  }

  .careers-hero p {
    font-size: 1rem;
  }

  .brand-overlay {
    padding: 1.5rem;
  }

  .brand-overlay h3 {
    font-size: 1.5rem;
  }
}

/* Ensure form inputs are visible */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
  background: white;
  color: #333;
}

/* Style for textarea if added later */
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #e0e0e0;
  border-radius: 5px;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  resize: vertical;
  min-height: 120px;
  transition: border-color 0.3s;
}

.form-group textarea:focus {
  outline: none;
  border-color: #b5a46d;
}

/* Consistent spacing */
.consistent-spacing {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

.consistent-spacing-for-menu {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

/* Focus states for accessibility */
.btn-submit:focus {
  outline: 2px solid #b5a46d;
  outline-offset: 2px;
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid #b5a46d;
  outline-offset: -1px;
}

/* Print styles */
@media print {
  .application-form,
  .btn-submit,
  .cv-upload-container {
    break-inside: avoid;
  }

  .btn-submit {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
  }
}

/* ===== CRITICAL FIXES FOR BUTTON DISPLAY ===== */
/* Ensure button text doesn't get hidden by parent overflow */
.btn-submit .btn-text,
.btn-submit .success-indicator {
  overflow: visible !important;
}

/* Make sure the success indicator is properly centered */
.btn-submit .success-indicator {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Force proper display states */
.btn-submit.success .success-indicator {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.btn-submit.success .btn-text {
  display: none !important;
}

/* Smooth transitions for mobile */
@media (hover: none) and (pointer: coarse) {
  .btn-submit {
    -webkit-tap-highlight-color: transparent;
  }

  .btn-submit:active {
    transform: scale(0.98);
  }
}

/* === Form layout overrides: 3-up desktop, stacked mobile === */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 992px) {
  .application-form {
    max-width: 1200px;
    display: block;
  }
  .form-group {
    margin-bottom: 0;
  }
}

@media (max-width: 991.98px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group {
    margin-bottom: 1.5rem;
  }
}
