/* Mobile Optimization CSS - Photography Tools */

/* בסיס רספונסיבי */
:root {
  --mobile-breakpoint: 768px;
  --tablet-breakpoint: 1024px;
  --mobile-padding: 16px;
  --mobile-font-size: 14px;
  --mobile-line-height: 1.5;
}

/* בסיס מובייל */
@media (max-width: 768px) {
  body {
    font-size: var(--mobile-font-size);
    line-height: var(--mobile-line-height);
    padding: var(--mobile-padding);
  }

  .container {
    max-width: 100%;
    padding: 0 var(--mobile-padding);
    margin: 0 auto;
  }

  /* Header מובייל */
  .header {
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .logo {
    font-size: 1.5rem;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 8px;
  }

  .main-nav a {
    padding: 12px 16px;
    font-size: 16px;
    border-radius: 8px;
  }

  /* תוכן ראשי */
  .main-content {
    padding: 20px 0;
  }

  .hero-section {
    padding: 30px 0;
    text-align: center;
  }

  .hero-section h1 {
    font-size: 2rem;
    margin-bottom: 16px;
  }

  .hero-section p {
    font-size: 1rem;
    line-height: 1.6;
  }

  /* כרטיסיות */
  .card, .glass-card {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 12px;
  }

  .cards-grid, .tools-grid, .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* כפתורים */
  .btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    margin-bottom: 12px;
  }

  .btn-group {
    flex-direction: column;
    gap: 12px;
  }

  /* טפסים */
  .form-group {
    margin-bottom: 20px;
  }

  .form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* גלריית תמונות */
  .photo-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .photo-item {
    border-radius: 8px;
    overflow: hidden;
  }

  .photo-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* זיהוי פנים */
  .face-detection-area {
    padding: 16px;
    border-radius: 12px;
  }

  .upload-area {
    padding: 40px 20px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 12px;
  }

  /* תוצאות */
  .results-section {
    margin-top: 20px;
  }

  .result-item {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f8f9fa;
  }

  /* פוטר */
  .footer {
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
  }

  /* אנימציות מובייל */
  .fade-in, .slide-up, .scale-in {
    animation-duration: 0.3s;
  }

  /* הסתרת אלמנטים במובייל */
  .desktop-only {
    display: none !important;
  }

  .mobile-hidden {
    display: none !important;
  }

  /* תפריט נייד */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .mobile-menu.active {
    transform: translateX(0);
  }

  .mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
  }

  /* אופטימיזציה לביצועים */
  * {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  img, video {
    max-width: 100%;
    height: auto;
  }

  /* מצב לילה במובייל */
  @media (prefers-color-scheme: dark) {
    body {
      background: #1a1a1a;
      color: #ffffff;
    }

    .glass-card {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.1);
    }

    .btn-primary {
      background: #007bff;
    }

    .form-input {
      background: rgba(255, 255, 255, 0.1);
      color: #ffffff;
      border-color: rgba(255, 255, 255, 0.2);
    }
  }
}

/* טאבלט */
@media (min-width: 769px) and (max-width: 1024px) {
  .container {
    max-width: 90%;
  }

  .cards-grid, .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .photo-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .btn {
    width: auto;
    min-width: 120px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* אופטימיזציה לביצועים */
@media (max-width: 768px) {
  /* הפחתת אנימציות למובייל */
  *, *::before, *::after {
    animation-duration: 0.1s !important;
    animation-delay: 0s !important;
    transition-duration: 0.1s !important;
  }

  /* חיסכון בסוללה */
  .parallax, .complex-animation {
    display: none;
  }

  /* אופטימיזציה לגלילה */
  body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

/* נגישות במובייל */
@media (max-width: 768px) {
  /* גדלי מינימום למגע */
  button, a, input, select, textarea {
    min-height: 44px;
    min-width: 44px;
  }

  /* ניגודיות משופרת */
  .btn:focus, .form-input:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
  }

  /* טקסט קריא */
  body {
    font-size: 16px;
    line-height: 1.6;
  }

  h1, h2, h3 {
    line-height: 1.3;
  }
} 