/* TalentPay Analytics Survey Website Styles */

/* CSS Custom Properties (Variables) - Updated for Professional Brand Colors */
:root {
  /* Primary Colors - Professional Blue Palette */
  --primary-light: #3B82F6;
  --primary-mid: #1E40AF;
  --primary-dark: #1E3A8A;
  
  /* Secondary Colors - Modern Gray Palette */
  --secondary-light: #F8FAFC;
  --secondary-mid: #E2E8F0;
  --secondary-dark: #64748B;
  
  /* Accent Colors - Professional */
  --accent-success: #10B981;
  --accent-warning: #F59E0B;
  --accent-error: #EF4444;
  --accent-info: #06B6D4;
  
  /* Neutral Colors - Modern Professional */
  --white: #FFFFFF;
  --black: #0F172A;
  --gray-50: #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  
  /* Brand Colors - Can be customized based on your logo */
  --brand-primary: #1E40AF;
  --brand-secondary: #3B82F6;
  --brand-accent: #10B981;
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-secondary: 'Georgia', serif;
  
  /* Font Sizes */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;
}

/* Reset and Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-md);
  color: var(--primary-dark);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

a {
  color: var(--primary-mid);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Navigation */
.navbar {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-md) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
}

.logo img {
  height: 50px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-toggle {
  display: none;
}

.nav-icon {
  display: none;
  font-size: var(--font-size-xl);
  cursor: pointer;
  color: var(--primary-dark);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  align-items: center;
}

.nav-menu li a {
  font-weight: 500;
  color: var(--gray-700);
  transition: color var(--transition-fast);
}

.nav-menu li a:hover,
.nav-menu li a[aria-current="page"] {
  color: var(--primary-mid);
  text-decoration: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: var(--white);
  padding: var(--spacing-3xl) 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  margin-bottom: var(--spacing-lg);
  font-size: var(--font-size-4xl);
}

.hero p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Features Section */
.features {
  padding: var(--spacing-3xl) 0;
  background-color: var(--secondary-light);
}

.features h2 {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.feature-item {
  background-color: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-lg);
}

.feature-title {
  color: var(--primary-dark);
  margin-bottom: var(--spacing-md);
}

.feature-desc {
  color: var(--gray-600);
  line-height: 1.6;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 2px solid transparent;
  font-size: var(--font-size-base);
}

.btn-primary {
  background-color: var(--brand-primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--brand-secondary);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background-color: var(--gray-400);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background-color: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-secondary:hover {
  background-color: var(--brand-primary);
  color: var(--white);
  text-decoration: none;
}

.cta-btn {
  background-color: var(--brand-accent);
  color: var(--white);
  padding: var(--spacing-lg) var(--spacing-2xl);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--font-size-lg);
  text-decoration: none;
  display: inline-block;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.cta-btn:hover {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

/* Survey Styles */
.survey-section {
  display: none;
  padding: var(--spacing-2xl) 0;
}

.survey-section.active {
  display: block;
}

/* Progress Bar */
#progressContainer {
  background-color: var(--gray-200);
  height: 8px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

#progressBar {
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-primary));
  height: 100%;
  width: 0%;
  transition: width var(--transition-normal);
}

/* Form Styles */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
  color: var(--primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  margin-right: var(--spacing-sm);
}

/* Consent Box */
.consent-box {
  background-color: var(--secondary-light);
  border: 2px solid var(--secondary-mid);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin: var(--spacing-lg) 0;
}

.consent-box legend {
  font-weight: 600;
  color: var(--primary-dark);
  padding: 0 var(--spacing-sm);
}

.consent-box .form-group {
  margin-bottom: var(--spacing-md);
}

.consent-box label {
  font-weight: 500;
  line-height: 1.5;
}

/* Rating Options */
.rating-options {
  display: flex;
  justify-content: space-between;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

.rating-option {
  flex: 1 1 0; /* Equal flex basis ensures equal width */
  text-align: center;
  min-width: 60px;
  max-width: 120px; /* Prevents buttons from becoming too wide */
}

.rating-option input[type="radio"] {
  display: none;
}

.rating-option label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* Full width of parent */
  height: 80px; /* Fixed height for consistency */
  padding: var(--spacing-md);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--white);
  font-size: var(--font-size-sm);
  line-height: 1.4;
  text-align: center;
  box-sizing: border-box; /* Include border in dimensions */
}

.rating-option input[type="radio"]:checked + label {
  background-color: var(--brand-primary);
  color: var(--white);
  border-color: var(--brand-primary);
}

.rating-option label:hover {
  border-color: var(--brand-secondary);
  background-color: var(--secondary-light);
}

/* Touch-friendly active state for mobile */
.rating-option label:active {
  transform: scale(0.95);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: space-between;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--gray-200);
}

/* Turnstile Wrapper */
.turnstile-wrapper {
  display: flex;
  justify-content: center;
  margin: var(--spacing-lg) 0;
}

/* Posts */
.post {
  background-color: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-xl);
}

.post h3 {
  color: var(--primary-dark);
  margin-bottom: var(--spacing-md);
}

/* Subscribe Form */
.subscribe-form {
  display: flex;
  gap: var(--spacing-md);
  max-width: 400px;
  margin-top: var(--spacing-md);
}

.subscribe-form input {
  flex: 1;
  padding: var(--spacing-md);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
}

.subscribe-form button {
  padding: var(--spacing-md) var(--spacing-lg);
  background-color: var(--brand-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.subscribe-form button:hover {
  background-color: var(--brand-secondary);
}

/* Footer */
footer {
  background-color: var(--gray-900);
  color: var(--gray-300);
  padding: var(--spacing-xl) 0;
  text-align: center;
  margin-top: var(--spacing-3xl);
}

footer p {
  margin-bottom: 0;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Typography adjustments */
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-xl);
  }
  
  /* Container and spacing */
  .container {
    padding: 0 var(--spacing-md);
  }
  
  /* Navigation */
  .nav-icon {
    display: block;
  }
  
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    display: none;
  }
  
  .nav-toggle:checked ~ .nav-menu {
    display: flex;
  }
  
  /* Hero section */
  .hero {
    padding: var(--spacing-2xl) 0;
  }
  
  .hero h1 {
    font-size: var(--font-size-3xl);
  }
  
  .hero p {
    font-size: var(--font-size-base);
  }
  
  /* Features */
  .features {
    padding: var(--spacing-2xl) 0;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .feature-item {
    padding: var(--spacing-lg);
  }
  
  /* ENHANCED RATING OPTIONS FOR MOBILE */
  .rating-options {
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
  }
  
  .rating-option {
    flex: none;
    width: 100%;
    max-width: 100%; /* Override desktop max-width */
  }
  
  .rating-option label {
    width: 100%;
    height: 56px; /* Consistent height for mobile */
    padding: var(--spacing-lg);
    font-size: var(--font-size-base);
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding-left: 3.5rem;
    box-sizing: border-box;
  }
  
  /* Add visual radio button indicator */
  .rating-option label::before {
    content: '';
    position: absolute;
    left: var(--spacing-lg);
    width: 24px;
    height: 24px;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    background-color: var(--white);
    transition: all var(--transition-fast);
  }
  
  .rating-option input[type="radio"]:checked + label::before {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: inset 0 0 0 4px var(--white);
  }
  
  /* Forms */
  .form-group {
    margin-bottom: var(--spacing-xl);
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: var(--spacing-lg);
    min-height: 48px;
  }
  
  .form-group input[type="checkbox"],
  .form-group input[type="radio"] {
    min-height: auto;
    width: 20px;
    height: 20px;
  }
  
  /* Improved checkbox/radio touch targets */
  .form-group > div {
    padding: var(--spacing-sm) 0;
  }
  
  .form-group > div label {
    padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) var(--spacing-xl);
    position: relative;
    display: block;
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  
  .form-group > div input[type="checkbox"],
  .form-group > div input[type="radio"] {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  
  /* Form Actions */
  .form-actions {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .form-actions button {
    width: 100%;
    padding: var(--spacing-lg);
    font-size: var(--font-size-base);
    min-height: 48px;
  }
  
  /* Buttons */
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: var(--spacing-lg);
    font-size: var(--font-size-base);
    min-height: 48px;
  }
  
  .cta-btn {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-base);
    width: 100%;
    max-width: 100%;
  }
  
  /* Consent Box */
  .consent-box {
    padding: var(--spacing-lg);
  }
  
  .consent-box .form-group > div {
    margin: var(--spacing-md) 0;
  }
  
  /* Subscribe Form */
  .subscribe-form {
    flex-direction: column;
    max-width: 100%;
  }
  
  .subscribe-form input,
  .subscribe-form button {
    font-size: 16px; /* Prevents iOS zoom */
    min-height: 48px;
  }
  
  /* Survey sections */
  .survey-section {
    padding: var(--spacing-xl) 0;
  }
  
  /* Turnstile wrapper */
  .turnstile-wrapper {
    margin: var(--spacing-xl) 0;
  }
  
  /* Better spacing for section headers */
  .survey-section h2 {
    margin-bottom: var(--spacing-lg);
  }
  
  /* Posts */
  .post {
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
  }
}

/* Extra small devices (phones in portrait mode) */
@media (max-width: 480px) {
  :root {
    --font-size-4xl: 1.875rem;
    --font-size-3xl: 1.5rem;
    --font-size-2xl: 1.25rem;
  }
  
  .hero {
    padding: var(--spacing-xl) 0;
  }
  
  .rating-option {
    width: 100%;
    max-width: 100%;
  }
  
  .rating-option label {
    width: 100%;
    height: 56px; /* Maintain consistent height */
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 3rem;
    font-size: var(--font-size-sm);
    box-sizing: border-box;
  }
  
  .logo img {
    height: 40px;
  }
  
  .navbar {
    padding: var(--spacing-sm) 0;
  }
}

/* Landscape orientation optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: var(--spacing-lg) 0;
  }
  
  .survey-section {
    padding: var(--spacing-lg) 0;
  }
  
  .form-group {
    margin-bottom: var(--spacing-md);
  }
}

/* Mobile class for JavaScript detection */
.mobile .navbar {
  padding: var(--spacing-sm) 0;
}

.mobile .hero {
  padding: var(--spacing-xl) 0;
}

.mobile .features {
  padding: var(--spacing-xl) 0;
}

.mobile .feature-item {
  padding: var(--spacing-lg);
}

/* Print Styles */
@media print {
  .navbar,
  .cta-btn,
  .form-actions,
  footer {
    display: none;
  }
  
  .survey-section {
    display: block !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-light: #0066CC;
    --primary-mid: #004499;
    --primary-dark: #002266;
    --gray-300: #666666;
    --gray-600: #333333;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea {
    border-width: 3px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}