/* 
 * Y Community - Enhanced Main Unified CSS
 * קובץ CSS מרכזי משופר עם נגישות מתקדמת וביצועים מיטובים
 * גרסה 3.0 - 2025
 */

/* ========================================
   ACCESSIBILITY & PERFORMANCE FIRST
   ======================================== */

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

/* High contrast support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000000 !important;
    --background-color: #ffffff !important;
    --text-color: #000000 !important;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #4a9eff;
    --background-color: #121212;
    --text-color: #ffffff;
    --border-color: #333333;
  }
}

/* ========================================
   DESIGN SYSTEM VARIABLES
   ======================================== */

:root {
  /* Brand Colors - Y Community */
  --brand-primary: #013024;
  --brand-accent: #a0df50;
  --brand-black: #000000;
  --brand-white: #ffffff;
  
  /* Colors - עיצוב מודרני */
  --primary-color: var(--brand-primary);
  --primary-dark: #001a15;
  --primary-light: var(--brand-accent);
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --error-color: #dc3545;
  --info-color: #17a2b8;
  
  /* Background colors */
  --background-primary: var(--brand-white);
  --background-secondary: #f8f9fa;
  --background-dark: var(--brand-primary);
  
  /* Text colors */
  --text-primary: var(--brand-black);
  --text-secondary: #6c757d;
  --text-muted: #6c757d;
  --text-light: var(--brand-white);
  
  /* Gradients */
  --gradient-hero: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
  --gradient-primary: linear-gradient(135deg, var(--brand-primary) 0%, #026b4a 100%);
  
  /* Shadows */
  --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-heavy: 0 8px 16px rgba(0,0,0,0.2);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Border & shadows */
  --border-color: #dee2e6;
  --border-radius: 8px;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  
  /* Typography */
  --font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;
  
  /* Z-index system */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-primary);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Skip navigation link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: var(--z-modal);
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Focus indicators */
:focus {
  outline: 3px solid var(--brand-accent) !important;
  outline-offset: 2px !important;
}

/* Better focus for buttons */
button:focus,
.btn:focus,
a:focus {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(160, 223, 80, 0.25);
}

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

/* ========================================
   TYPOGRAPHY SYSTEM
   ======================================== */

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

h1 { font-size: var(--font-size-xxl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-base); }
h5 { font-size: var(--font-size-sm); }
h6 { font-size: var(--font-size-xs); }

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

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

a:hover {
  color: var(--brand-accent);
  text-decoration: underline;
}

/* Brand text styling */
.brand-text {
  color: var(--brand-accent);
  font-weight: 700;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

/* Grid system */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--spacing-md) / 2);
}

.col {
  flex: 1;
  padding: 0 calc(var(--spacing-md) / 2);
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
  background: var(--background-primary);
  box-shadow: var(--shadow-light);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  transition: var(--transition-normal);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-primary);
}

/* ========================================
   BUTTONS SYSTEM
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-normal);
  user-select: none;
  min-height: 44px; /* Accessibility - minimum touch target */
  box-shadow: var(--shadow-medium);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button variants */
.btn-primary {
  background: var(--brand-accent);
  color: var(--brand-primary);
  border-color: var(--brand-accent);
}

.btn-primary:hover:not(:disabled) {
  background: #8bc34a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
  color: var(--brand-primary);
  text-decoration: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: var(--background-primary);
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-heavy);
  text-decoration: none;
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.2rem;
}

.btn-icon {
  font-size: 1.2em;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding-top: 80px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--background-primary);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* CTA Buttons */
.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero-note {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  margin-top: 1rem;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
  background: var(--brand-primary);
  color: var(--background-primary);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-links {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-accent);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   LOADING STATES
   ======================================== */

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  transition: opacity 0.3s ease;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--spacing-md);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loading-text {
  color: var(--text-secondary);
  margin: 0;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet styles */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
    justify-content: center;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
  }
}

/* Mobile styles */
@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
  }
}

/* ========================================
   UTILITIES
   ======================================== */

/* Display utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Spacing utilities */
.m-0 { margin: 0 !important; }
.p-0 { padding: 0 !important; }
.mt-1 { margin-top: var(--spacing-xs) !important; }
.mb-1 { margin-bottom: var(--spacing-xs) !important; }
.pt-1 { padding-top: var(--spacing-xs) !important; }
.pb-1 { padding-bottom: var(--spacing-xs) !important; }

/* Text utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.text-muted { color: var(--text-muted) !important; }

/* Focus States */
.btn:focus {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .cta-buttons {
    display: none;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
} 

/* ===========================================
   CONTACT PAGE SPECIFIC STYLES
   =========================================== */

/* Hero Section for Contact */
.hero-section {
  background: var(--brand-gradient-primary);
  padding: 4rem 0;
  color: var(--brand-white);
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.hero-title .icon {
  font-size: 3rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-subtitle {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 3rem;
  opacity: 0.95;
}

.stats-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary-light);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Contact Methods */
.contact-methods {
  padding: 4rem 0;
  background: #f8fafc;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin-bottom: 3rem;
}

.methods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.method-card {
  background: var(--brand-white);
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.method-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
  border-color: var(--brand-primary-light);
}

.method-icon {
  width: 80px;
  height: 80px;
  background: var(--brand-gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--brand-white);
  box-shadow: 0 8px 25px rgba(1, 48, 36, 0.3);
}

.method-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin-bottom: 1rem;
}

.method-card p {
  color: var(--brand-gray-600);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.method-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--brand-primary-light-10);
  color: var(--brand-primary-dark);
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid var(--brand-primary-light-20);
}

.method-link:hover {
  background: var(--brand-primary-light);
  color: var(--brand-white);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(160, 223, 80, 0.4);
}

/* Contact Form Section */
.contact-form-section {
  padding: 4rem 0;
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--brand-white);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--brand-gray-200);
}

.form-header {
  text-align: center;
  margin-bottom: 3rem;
}

.form-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin-bottom: 1rem;
}

.form-header p {
  color: var(--brand-gray-600);
  font-size: 1.1rem;
}

.contact-form {
  /* Form styles already defined in main.css */
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: var(--brand-primary-dark);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 1rem;
  border: 2px solid var(--brand-gray-300);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: var(--brand-white);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-footer {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--brand-gray-200);
}

.privacy-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--brand-gray-600);
}

.privacy-notice input[type="checkbox"] {
  margin-top: 0.25rem;
  transform: scale(1.2);
}

.privacy-notice a {
  color: var(--brand-primary-dark);
  text-decoration: none;
  font-weight: 600;
}

.privacy-notice a:hover {
  text-decoration: underline;
}

/* FAQ Preview */
.faq-preview {
  padding: 4rem 0;
  background: #f8fafc;
}

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

.faq-item {
  background: var(--brand-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary-light);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.faq-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-primary-dark);
  margin-bottom: 1rem;
}

.faq-item p {
  color: var(--brand-gray-600);
  line-height: 1.6;
}

.faq-cta {
  text-align: center;
}

/* Enhanced Footer */
.footer {
  background: var(--brand-primary-dark);
  color: var(--brand-white);
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--brand-primary-light);
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section ul li a:hover {
  color: var(--brand-primary-light);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-white);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--brand-primary-light);
  transform: translateY(-2px);
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.contact-info i {
  width: 20px;
  color: var(--brand-primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* Responsive Design for Contact */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .hero-title .icon {
    font-size: 2.5rem;
  }
  
  .stats-row {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .methods-grid {
    grid-template-columns: 1fr;
  }
  
  .form-container {
    padding: 2rem 1rem;
    margin: 0 1rem;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-footer {
    flex-direction: column;
    text-align: center;
  }
  
  .privacy-notice {
    flex-direction: column;
    text-align: left;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
}

/* Animation Classes */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loading States */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.btn:disabled:hover {
  transform: none !important;
} 