/**
 * Join Us Landing Page Styles
 * Version: 1.3.0 (Strict Mix: 1.1.0 Layout + Original Buttons + Brand Colors)
 */

:root {
  --join-us-overlay-bg: rgba(0, 0, 0, 0.7);
  --join-us-modal-bg: var(--color-white);
  --join-us-card-border: var(--color-gray-200);
  --join-us-card-hover: var(--color-info);
  --space-7: 1.75rem; /* 28px */
  --brand-blue: #3189bf; /* The EXACT brand color */
}

/* --- Global Page Polish --- */
body {
  background-color: #f1f5f9; /* Slate-100: Darker than before for better contrast with white card */
}

/* Header */
.platform-join-us-header {
  background: transparent !important;
  padding: 0.5rem 0 !important; /* Ultra compact padding for 100vh fit */
  position: relative;
  z-index: 10; /* Ensure header stays above cards */
}

.platform-join-us-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
}

.platform-join-us-logo {
  width: 200px !important;
  height: auto !important;
  max-width: 200px !important;
  max-height: 120px !important;
  object-fit: contain;
}

.platform-join-us-tagline {
  display: none;
}

@media (max-width: 768px) {
  .platform-join-us-header-inner {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }

  .platform-join-us-logo {
    width: 80px;
    max-width: 80px;
  }

  .platform-join-us-tagline {
    font-size: 0.875rem;
  }
}

/* Container */
.platform-join-us-container {
  width: 90vw !important;
  max-width: 90vw !important;
  margin: 0 auto;
  padding: 0 var(--space-4);
  direction: rtl;
}

/* Badge styling */
.join-us-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: var(--brand-blue);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
  font-family: Helvetica, Arial, sans-serif !important;
  width: fit-content;
  white-space: nowrap;
}

.join-us-badge-dark {
  background: rgba(255, 255, 255, 0.9);
  color: #1e40af;
  border: none;
  backdrop-filter: blur(4px);
}

/* Main title */
.join-us-main-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem !important;
  font-family: Verdana, Geneva, sans-serif !important;
}

@media (min-width: 1024px) {
  .join-us-main-title {
    font-size: 2.75rem;
  }
}

/* Highlight spans */
.join-us-highlight {
  color: var(--brand-blue);
}

.join-us-highlight-dark {
  color: #ffffff;
}

/* Right column (employee) - uniform dark title color */
.join-us-right .join-us-main-title .join-us-highlight {
  color: inherit; /* Inherit parent dark color instead of blue */
}

.join-us-dark-column .join-us-highlight-dark {
  color: #ffffff;
}

/* Subtitle - Typography Polish */
.join-us-subtitle {
  font-size: 1.15rem; /* Slightly larger */
  color: #4b5563;
  margin-bottom: 1rem; /* Compact for 100vh fit */
  margin-top: 0; /* Reset for alignment */
  font-family: Helvetica, Arial, sans-serif !important;
  max-width: 95%;
}

/* Ensure consistent spacing in both columns */
.join-us-right .join-us-subtitle,
.join-us-dark-column .join-us-subtitle {
  margin-top: 0 !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.4 !important;
}

/* --- Layout Architecture --- */

/* The Card Wrapper */
.join-us-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  margin: -50px auto 30px auto; /* Negative top for logo overlap, tight bottom gap */
  margin-top: var(--space-4);

  /* Unified Card Look */
  gap: 0;
  background: white;
  border-radius: 24px;

  /* Stronger, more prominent shadow per request */
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.25);

  overflow: hidden;
}

.join-us-column {
  padding: 1.5rem 2.5rem !important; /* Aggressive compact padding for 100vh fit */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: auto !important; /* Let content dictate height */
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

/* Right Column (White/Employee) */
.join-us-right {
  background: linear-gradient(
    180deg,
    #f8fafc 0%,
    #ffffff 100%
  ) !important; /* Subtle Slate-50 to White gradient */
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.25) !important; /* Strong shadow */
}

/* Yellow Badge for Right Column */
.join-us-right .join-us-badge {
  background-color: #f9c017 !important;
  color: #111827 !important;
}

/* Left Column (Dark/Organization) - HIGH-CONTRAST GRADIENT */
.join-us-dark-column {
  /* High-contrast blue gradient */
  background: linear-gradient(135deg, #5db2e6 0%, #103e63 100%) !important;
  color: white !important;
  position: relative;
}

.join-us-dark-column::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.1;
  pointer-events: none;
  background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
  z-index: 0;
}

.join-us-dark-column > * {
  position: relative;
  z-index: 1;
}

.join-us-dark-column .join-us-main-title,
.join-us-dark-column .join-us-subtitle,
.join-us-dark-column .benefit-title,
.join-us-dark-column .benefit-desc {
  color: #ffffff;
}

/* Benefits List */
.join-us-benefits {
  list-style: none;
  padding: 0;
  margin-bottom: 1rem !important; /* Compact for 100vh fit */
}

.join-us-benefits li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 0.4rem !important; /* Aggressive compact spacing for 100vh fit */
  gap: var(--space-3);
}

/* Icons */
.join-us-benefits li::before {
  content: "✓";
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #ffffff;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.join-us-dark-column .join-us-benefits li::before {
  background: white !important;
  color: #f9c017 !important;
  border: 2px solid #f9c017 !important;
  backdrop-filter: blur(4px);
}

/* Custom Icons */
.join-us-dark-column .join-us-benefits li:nth-child(1)::before {
  content: "";
  background-color: white !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F9C017'%3E%3Cpath d='M13 2L3 14h8l-1 8 10-12h-8l1-8z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  border: 2px solid #f9c017 !important;
}
.join-us-dark-column .join-us-benefits li:nth-child(2)::before {
  content: "";
  background-color: white !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F9C017' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='3' fill='%23F9C017'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px;
  border: 2px solid #f9c017 !important;
}
.join-us-dark-column .join-us-benefits li:nth-child(3)::before {
  content: "";
  background-color: white !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23F9C017'%3E%3Cpath d='M12 1C8.676 1 6 3.676 6 7v2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V11c0-1.1-.9-2-2-2h-2V7c0-3.324-2.676-6-6-6zm0 2c2.276 0 4 1.724 4 4v2H8V7c0-2.276 1.724-4 4-4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px;
  border: 2px solid #f9c017 !important;
}

.benefit-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.35rem; /* Slightly more space */
  font-family: Verdana, Geneva, sans-serif !important;
}

.benefit-desc {
  font-size: 0.95rem;
  color: #6b7280;
  font-family: Helvetica, Arial, sans-serif !important;
}

/* --- Buttons Strict Re-styling --- */

/* Right Button (Employees) - Primary */
.platform-btn-primary {
  background-color: #f9c017 !important;
  color: #111827 !important;
  border: 2px solid #f9c017 !important; /* Border matches BG - invisible but takes space */
  box-shadow: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: Helvetica, Arial, sans-serif !important;
}

.platform-btn-primary:hover {
  background-color: transparent !important;
  color: #111827 !important;
  border: 2px solid #f9c017 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Left Button (Organizations) - Outline */
.platform-btn-outline {
  background-color: #ffffff !important;
  color: #3189bf !important;
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: Helvetica, Arial, sans-serif !important;
}

.platform-btn-outline:hover {
  background-color: transparent !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  transform: none !important;
}

/* Force buttons to same height/container logic from Original */
.join-us-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.join-us-button-wrapper {
  margin-top: auto;
  padding-top: var(--space-6);
}

/* --- Modal & Utilities --- */
.join-us-modal {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  inset-inline-end: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.join-us-modal-overlay {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  inset-inline-end: 0;
  background: var(--join-us-overlay-bg);
  backdrop-filter: blur(4px);
}

.join-us-modal-content {
  position: relative;
  background: white;
  padding: var(--space-7);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 10000;
  box-shadow: var(--shadow-lg);
}

.join-us-modal-close {
  position: absolute;
  top: var(--space-4);
  inset-inline-end: var(--space-4);
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--platform-muted);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-fast);
}

.join-us-modal-close:hover {
  background: var(--color-gray-100);
  color: var(--platform-text);
}

.join-us-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-5);
  text-align: center;
  color: var(--platform-text);
  font-family: Verdana, Geneva, sans-serif !important;
}

/* Orgs Grid */
.join-us-orgs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  padding: var(--space-4) 0;
}

.join-us-org-card {
  background: white;
  border: 1px solid var(--platform-border, #e5e7eb);
  border-radius: 8px;
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 200px;
}

.join-us-org-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.join-us-org-logo {
  width: 100%;
  height: 120px;
  object-fit: contain;
  margin-bottom: auto;
}

.join-us-org-name {
  color: var(--platform-text);
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: var(--space-3);
  text-decoration: underline;
  font-family: Heebo, sans-serif;
  align-self: stretch;
}

.join-us-no-orgs {
  text-align: center;
  padding: var(--space-6);
  color: var(--platform-muted);
  grid-column: 1 / -1;
}

/* Form inputs & messages */
.platform-field {
  margin-bottom: 1rem;
}
.input-field {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-family: Heebo, sans-serif;
}
.input-field:focus {
  border-color: #3b82f6;
  outline: 2px solid rgba(59, 130, 246, 0.2);
}

.join-us-form-message {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
}
.join-us-form-message.success {
  background: var(--color-success-light);
  color: var(--color-success-dark);
  border: 1px solid var(--color-success);
}
.join-us-form-message.error {
  background: var(--color-error-light);
  color: var(--color-error-red);
  border: 1px solid var(--color-error);
}

/* --- Mobile Logic (The Switcher) --- */
.mobile-intent-switch {
  display: none; /* Hidden on Desktop */
}

/* Responsive - Mobile Specific Overrides */
@media (max-width: 768px) {
  .platform-join-us-container {
    padding: 0; /* Full width on mobile */
  }

  .join-us-two-column {
    display: block; /* Stack standard div behavior (controlled by JS toggle) */
    box-shadow: none; /* No big shadow on mobile */
    background: transparent;
    border-radius: 0;
    margin-top: 0;
  }

  /* Re-apply individual card styling for mobile only */
  .join-us-column {
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: auto !important;
    margin-bottom: 1rem;
  }

  .join-us-right {
    background: white;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 2px 10px 8px 0 rgba(0, 0, 0, 0.25) !important;
    border-radius: 16px !important;
  }

  /* Mobile Intent Switcher */
  .mobile-intent-switch {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    margin: 0 1rem 1.5rem 1rem;
  }

  .intent-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 8px;
    font-weight: 700;
    font-family: Helvetica, Arial, sans-serif !important;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .intent-btn.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  /* Hide/Show based on data-view attribute (Logic from previous step) */
  .platform-join-us-container[data-view="employees"] .join-us-left {
    display: none !important;
  }

  .platform-join-us-container[data-view="orgs"] .join-us-right {
    display: none !important;
  }

  .join-us-main-title {
    font-size: 1.5rem !important;
  }

  .join-us-subtitle {
    font-size: 1rem !important;
  }

  .join-us-orgs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .join-us-orgs-grid {
    grid-template-columns: 1fr;
  }
}
