/* Responsive Styles (Desktop, Tablet, Mobile) */

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-copy {
    align-items: center;
  }

  .hero-description {
    margin-inline: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
    margin-inline: auto;
  }

  .hero-stage {
    min-height: 460px;
    margin-top: 24px;
    width: 100%;
  }

  .hero-laptop-cluster {
    max-width: 640px;
  }

  .hero-quick-nav {
    grid-template-columns: repeat(3, 1fr);
  }

  .before-after-stage {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 680px;
    margin-inline: auto;
  }

  .ba-pillar {
    width: 100%;
    align-items: center;
  }

  .ba-visual-stage {
    justify-content: center !important;
    min-height: auto;
  }

  .ba-img-paper {
    width: 100%;
    max-width: 440px;
    margin-inline: auto;
  }

  .ba-img-tablet {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
  }

  .ba-card {
    width: 100%;
    margin-top: -36px;
    padding-top: 52px;
  }

  .ba-transition-hub {
    margin: 16px auto;
    margin-top: 0;
  }

  .ba-transition-ribbon {
    width: 180px;
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .ba-transition-arrow {
    transform: rotate(90deg);
  }

  .ba-transition-hub:hover .ba-transition-arrow {
    transform: rotate(90deg) translateY(-4px);
  }

  .feature-row, .feature-row.reverse {
    grid-template-columns: 1fr;
    gap: 36px;
    text-align: center;
  }

  .feature-highlights {
    align-items: center;
  }

  .education-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .education-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .onboarding-steps {
    grid-template-columns: 1fr;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-section-wrapper {
    grid-template-columns: 1fr;
  }

  .feature-buttons {
    justify-content: center;
  }

  .feature-copy {
    align-items: center;
  }

  .contact-box {
    grid-template-columns: 1fr;
  }
}

/* Tablet Portrait & Large Phones (<= 768px) */
/* כותרת עם תפריט ☰ עד 1000px (טאבלט ומחשב נייד קטן): שישה קישורים + שני כפתורים לא נכנסים בשורה אחת */
@media (max-width: 1000px) {
  .nav-links, .nav-actions .btn-secondary {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  /* סגור כברירת מחדל; scripts/main.js פותח אותו בלחיצה על ☰ */
  .mobile-drawer {
    display: none;
    flex-direction: column;
    gap: 16px;
    background: #ffffff;
    padding: 20px;
    border-bottom: 1px solid var(--daata-border-subtle);
    box-shadow: var(--daata-shadow-md);
  }

  .mobile-drawer a {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--daata-navy);
    padding-block: 8px;
    border-bottom: 1px solid var(--daata-sky-light);
  }
}

@media (max-width: 768px) {
  .education-photo-frame {
    height: 260px;
  }

  .education-pillars {
    grid-template-columns: 1fr;
  }
  .hero-quick-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-devices-cluster {
    max-width: 520px;
    height: 380px;
    margin: 0 auto;
  }

  .device-laptop {
    width: 92%;
    top: 2%;
    left: 4%;
  }

  .hero-stage {
    min-height: auto;
    margin-top: 20px;
  }

  .hero-laptop-cluster {
    max-width: 520px;
  }

  .hero-card-alert {
    top: 2%;
    right: -2%;
    width: 32%;
    max-width: 170px;
    transform: rotate(3deg);
  }

  .hero-card-attendance {
    top: 34%;
    left: -4%;
    width: 31%;
    max-width: 165px;
    transform: rotate(-4deg);
  }

  .hero-card-ai {
    bottom: 2%;
    right: -2%;
    width: 33%;
    max-width: 175px;
    transform: rotate(-2deg);
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .chip-top-right {
    right: 0;
    top: -12px;
  }

  .chip-bottom-left {
    left: 0;
    bottom: -12px;
  }
}

/* Mobile Screens (<= 480px, including 390px) */
@media (max-width: 480px) {
  .floating-screen-chip {
    padding: 8px 12px;
    gap: 8px;
    border-radius: 14px;
  }

  .chip-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
  }

  .chip-title {
    font-size: 0.82rem;
  }

  .chip-sub {
    font-size: 0.72rem;
  }

  .app-window-header {
    padding: 10px 14px;
  }

  .window-title {
    font-size: 0.75rem;
  }

  .window-status-pill {
    display: none;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .hero-trust {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
    text-align: right;
  }

  .trust-badge {
    justify-content: flex-start;
  }

  .hero-stage {
    min-height: auto;
  }

  .hero-laptop-cluster {
    max-width: 350px;
    margin: 0 auto;
  }

  .hero-card-alert {
    top: 0%;
    right: -2%;
    width: 36%;
    max-width: 135px;
    transform: rotate(2.5deg);
  }

  .hero-card-attendance {
    top: 36%;
    left: -3%;
    width: 35%;
    max-width: 130px;
    transform: rotate(-3.5deg);
  }

  .hero-card-ai {
    bottom: 1%;
    right: -1%;
    width: 37%;
    max-width: 140px;
    transform: rotate(-1.5deg);
  }

  .hero-quick-nav {
    grid-template-columns: 1fr;
  }

  .ba-img-paper {
    max-width: 310px;
  }

  .ba-img-tablet {
    max-width: 340px;
  }

  .ba-card {
    margin-top: -24px;
    padding: 24px 18px;
    padding-top: 38px;
    border-radius: 22px;
  }

  .ba-card-title {
    font-size: 1.25rem;
  }

  .ba-list {
    gap: 12px;
  }

  .ba-list li {
    font-size: 0.92rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

/* Reduced Motion */
@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;
  }
}

/* מסכי טלפון צרים (360px ומטה): כפתור ההדגמה בראש הדף עלה על הלוגו */
@media (max-width: 400px) {
  .nav-actions .btn-primary {
    padding: 9px 12px;
    font-size: 0.82rem;
  }
  .brand-info small {
    display: none;
  }
}

/* «כניסה למערכת» בתפריט הנייד — מובחן מקישורי העמוד, כי הוא מוביל לאפליקציה עצמה */
.mobile-drawer .drawer-login {
  color: var(--daata-brand-blue);
  border-bottom: none;
}

/* מחשב נייד (1001–1200px): שישה קישורים + שני כפתורים לא נכנסו בשורה אחת, והקישורים נשברו לשתי שורות */
@media (min-width: 1001px) and (max-width: 1200px) {
  .nav-links {
    gap: 14px;
    font-size: 0.86rem;
  }
  .nav-links a {
    white-space: nowrap;
  }
  .nav-actions .btn {
    padding-inline: 14px;
    font-size: 0.86rem;
  }
}
