/* ==========================================================================
   Toner Shop - Global Core Components
   Header (sticky + mobile hamburger + dropdowns), Footer,
   Quick Contact Bar, Buttons, Breadcrumbs, Callout/Disclaimer
   ========================================================================== */

/* ---------------------------------------------------------------------
   Site Header
   --------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.logo-link img {
  height: 40px;
  width: auto;
}

/* --- Desktop nav --- */
.main-nav {
  display: none;
}

@media (min-width: 900px) {
  .main-nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-inline-start: var(--space-6);
  }

  .main-nav > ul {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .main-nav a {
    color: var(--color-text);
    font-weight: var(--fw-medium);
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--fs-body);
    padding: var(--space-2) 0;
  }

  .main-nav a:hover,
  .main-nav a:focus-visible {
    color: var(--color-accent);
    text-decoration: none;
  }
}

/* --- Header controls (CTA / hamburger) --- */
.header-controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: var(--space-2);
  margin-inline-start: auto;
}

/* Higher specificity than .btn's `display: inline-flex` (defined later in
   this file) so the mobile hide actually wins the cascade. */
.header-controls .header-cta {
  display: none;
  flex-shrink: 0;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .header-controls .header-cta {
    display: inline-flex;
  }
}

/* --- Mobile hamburger toggle --- */
.hamburger-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  align-items: center;
}

@media (min-width: 900px) {
  .hamburger-toggle {
    display: none;
  }
}

.hamburger-toggle .bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hamburger-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* --- Mobile menu panel --- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--header-height) 0 0 0;
  background: var(--color-bg);
  overflow-y: auto;
  z-index: 890;
  padding: var(--space-5) 0 var(--space-8);
}

.mobile-menu.is-open {
  display: block;
}

@media (min-width: 900px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu > ul > li {
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4);
  color: var(--color-text);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body);
  background: none;
  border: none;
  text-align: right;
  cursor: pointer;
}

html[dir="ltr"] .mobile-menu a {
  text-align: left;
}

.mobile-menu-cta {
  padding: var(--space-5) var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ".mobile-menu a" above strips link backgrounds/borders; give the menu's
   phone / WhatsApp buttons back the site-wide .btn-contact look
   (white background, blue frame, full width). */
.mobile-menu-cta .btn-contact {
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--fs-button);
  font-weight: var(--fw-semibold);
  color: var(--color-accent);
  background: var(--color-white);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
  text-align: center;
}

.mobile-menu-cta .btn-contact:hover,
.mobile-menu-cta .btn-contact:focus-visible {
  color: var(--color-navy);
  background: var(--color-white);
  border-color: var(--color-navy);
}

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--fs-button);
  font-weight: var(--fw-semibold);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  text-decoration: none;
  box-shadow: var(--shadow-hover);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
}

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

.btn-outline {
  background: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Phone / WhatsApp buttons - one look everywhere (header, heroes, CTAs,
   contact row, mobile menu): white background + blue frame, also on hover
   (the frame darkens and thickens instead), so the blue phone icon and the
   green WhatsApp icon always sit on white. Footer / mobile bar links are
   not .btn and are styled separately. */
.btn-contact {
  background: var(--color-white);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-contact:hover,
.btn-contact:focus-visible {
  background: var(--color-white);
  border-color: var(--color-navy);
  color: var(--color-navy);
  outline: 1px solid var(--color-navy);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-small);
}

/* ---------------------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------------------- */
.breadcrumbs {
  padding: var(--space-4) 0;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "\2039";
  margin-inline-start: var(--space-2);
}

html[dir="ltr"] .breadcrumbs li:not(:last-child)::after {
  content: "\203A";
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-text);
  font-weight: var(--fw-medium);
}

/* ---------------------------------------------------------------------
   Callout / Legal Disclaimer block
   --------------------------------------------------------------------- */
.callout,
.disclaimer {
  background: var(--color-disclaimer-bg);
  color: var(--color-disclaimer-text);
  border-inline-start: 4px solid var(--color-navy);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin: var(--space-5) 0;
}

.callout h3,
.disclaimer h3 {
  color: var(--color-disclaimer-text);
  margin-bottom: var(--space-2);
}

.callout p:last-child,
.disclaimer p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------------
   Quick Contact Bar (mobile only)
   --------------------------------------------------------------------- */
.quick-contact-bar {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  height: var(--mobile-bar-height);
  background: var(--color-navy);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  z-index: 950;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 900px) {
  .quick-contact-bar {
    display: none;
  }
}

.quick-contact-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--color-white);
  font-size: var(--fs-small-mobile);
  font-weight: var(--fw-medium);
  border-inline-end: 1px solid rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.quick-contact-bar a:last-child {
  border-inline-end: none;
}

.quick-contact-bar a:hover,
.quick-contact-bar a:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.quick-contact-bar .qc-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Phone number must never break onto a second line (e.g. after the hyphen
   in "055-6690631") - applies everywhere the number is rendered: header
   CTA, mobile menu panel, and the mobile quick-contact bar. */
/* Contact icons (phone / WhatsApp images from assets/images/icons/),
   shown at their original colours and proportions next to the label. */
.ci {
  display: inline-block;
  flex: none;
  width: 1.45em;
  height: 1.45em;
  object-fit: contain;
  vertical-align: middle;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.quick-contact-bar .ci {
  width: 26px;
  height: 26px;
}

/* The phone icon is dark blue; on the navy footer and mobile bar it is
   shown white instead (approved by the site owner). */
.site-footer .ci-phone,
.quick-contact-bar .ci-phone {
  filter: brightness(0) invert(1);
}

[data-cfg-text="phoneDisplay"] {
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Site Footer
   --------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
  color: var(--color-white);
  padding: var(--space-7) 0 var(--space-5);
}

/* Mobile: the floating accessibility button (52px, fixed just above the
   quick-contact bar) would otherwise cover the last footer line - the
   builder credit and the privacy link. Extra bottom room lets that line
   scroll clear above the button. */
@media (max-width: 899px) {
  .site-footer {
    padding-bottom: calc(var(--space-5) + 52px + var(--space-3) + var(--space-3));
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 700px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Footer logo chip: the footer background is always dark navy, and the
   logo's own navy wordmark ("Toner") would disappear against it. Per
   instruction, the logo file itself must stay untouched - so instead it
   sits on its own light "chip" for contrast. */
.footer-logo-wrap {
  display: inline-block;
  background: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.footer-logo-wrap img {
  display: block;
  height: 36px;
  width: auto;
}

.footer-col h3 {
  color: var(--color-white);
  font-size: var(--fs-h3-mobile);
  margin-bottom: var(--space-3);
}

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

.footer-col li {
  margin-bottom: var(--space-2);
}

.footer-col a {
  color: #cfe3f0;
}

.footer-col a:hover,
.footer-col a:focus-visible {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  font-size: var(--fs-small);
  color: #cfe3f0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
}

.footer-bottom a {
  color: #cfe3f0;
}

/* ---------------------------------------------------------------------
   Modal (e.g. "פתיחת קריאת שירות" on the remote-support page) - generic
   accessible dialog: overlay + centered box, closed via [hidden].
   --------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 32, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  z-index: 1000;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-5);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-hover);
}

.modal-close {
  position: absolute;
  top: var(--space-3);
  inset-inline-end: var(--space-3);
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: var(--space-1);
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--color-text);
}

.modal-box h2 {
  margin-bottom: var(--space-2);
  padding-inline-end: var(--space-6);
}

.modal-box > p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.form-field {
  margin-bottom: var(--space-4);
}

.form-field label {
  display: block;
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-2);
}

.form-field input[type="text"],
.form-field input[type="tel"] {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--fs-body);
}

.form-field input:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.form-field--checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.form-field--checkbox input {
  margin-top: 4px;
  flex-shrink: 0;
}

.form-field--checkbox label {
  margin-bottom: 0;
  font-weight: var(--fw-regular);
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}

.form-actions {
  margin-top: var(--space-5);
}

.form-actions .btn {
  width: 100%;
}
