/* Eng. Hani Zainaddin — Apple-style colours on top of Bootstrap 5
   Light: white and light grey sections, Apple blue accents.
   Dark: black and charcoal sections, bright blue accents.
   All colours are defined here, at the top. */

:root, [data-bs-theme="light"] {
  --hz-bg: #ffffff;            /* page background */
  --hz-alt: #f5f5f7;           /* alternating section background */
  --hz-surface: #f5f5f7;       /* cards on white sections */
  --hz-surface-alt: #ffffff;   /* cards on grey sections */
  --hz-text: #1d1d1f;
  --hz-muted: #6e6e73;
  --hz-line: #d2d2d7;
  --hz-accent: #0071e3;        /* buttons */
  --hz-accent-hover: #0077ed;
  --hz-link: #0066cc;          /* links */
  --hz-header: rgba(255, 255, 255, .8);

  --bs-body-bg: var(--hz-bg);
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color: var(--hz-text);
  --bs-emphasis-color: #000000;
  --bs-secondary-color: var(--hz-muted);
  --bs-tertiary-bg: var(--hz-alt);
  --bs-border-color: var(--hz-line);
  --bs-link-color: var(--hz-link);
  --bs-link-color-rgb: 0, 102, 204;
  --bs-link-hover-color: var(--hz-link);
  --bs-link-hover-color-rgb: 0, 102, 204;
  --bs-primary: var(--hz-accent);
  --bs-primary-rgb: 0, 113, 227;
}
[data-bs-theme="dark"] {
  --hz-bg: #000000;
  --hz-alt: #161617;
  --hz-surface: #1d1d1f;
  --hz-surface-alt: #232325;
  --hz-text: #f5f5f7;
  --hz-muted: #a1a1a6;
  --hz-line: #38383c;
  --hz-accent: #0071e3;
  --hz-accent-hover: #0077ed;
  --hz-link: #2997ff;
  --hz-header: rgba(22, 22, 23, .8);

  --bs-body-bg: var(--hz-bg);
  --bs-body-bg-rgb: 0, 0, 0;
  --bs-body-color: var(--hz-text);
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: var(--hz-muted);
  --bs-secondary-bg: var(--hz-surface);
  --bs-tertiary-bg: var(--hz-alt);
  --bs-border-color: var(--hz-line);
  --bs-link-color: var(--hz-link);
  --bs-link-color-rgb: 41, 151, 255;
  --bs-link-hover-color: var(--hz-link);
  --bs-link-hover-color-rgb: 41, 151, 255;
  --bs-primary: var(--hz-accent);
  --bs-primary-rgb: 0, 113, 227;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
h1, h2, h3, .display-5 { letter-spacing: -0.02em; }
html { scroll-padding-top: 130px; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-body-secondary { color: var(--hz-muted) !important; }

/* Sections alternate between white (black) and light grey (charcoal) */
.section-alt { background: var(--hz-alt); }

/* Header: translucent bar with blur, like apple.com */
.site-header {
  background: var(--hz-header);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hz-line);
}
.site-header .border-top { border-color: var(--hz-line) !important; }
.navbar-brand { color: var(--hz-text) !important; }
.nav-link { color: var(--hz-text) !important; opacity: .8; font-size: .95rem; }
.nav-link:hover { opacity: 1; text-decoration: none; }
.navbar-toggler { color: var(--hz-text); }
.site-footer { background: var(--hz-alt); border-top: 1px solid var(--hz-line); }
.site-footer a { color: var(--hz-muted) !important; }
.site-footer a:hover { color: var(--hz-text) !important; }

/* Buttons: Apple blue pill and outline pill */
.btn { border-radius: 980px; padding-inline: 1.1rem; }
.btn-sm { padding-inline: .85rem; }
.btn-apple {
  --bs-btn-color: #fff; --bs-btn-bg: var(--hz-accent); --bs-btn-border-color: var(--hz-accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--hz-accent-hover); --bs-btn-hover-border-color: var(--hz-accent-hover);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #006edb; --bs-btn-active-border-color: #006edb;
  --bs-btn-focus-shadow-rgb: 0, 113, 227;
}
.btn-apple-outline {
  --bs-btn-color: var(--hz-link); --bs-btn-bg: transparent; --bs-btn-border-color: var(--hz-link);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--hz-accent); --bs-btn-hover-border-color: var(--hz-accent);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: var(--hz-accent); --bs-btn-active-border-color: var(--hz-accent);
}
.btn:hover { text-decoration: none; }
.btn-toc { --bs-btn-color: var(--hz-text); --bs-btn-bg: var(--hz-surface-alt); --bs-btn-border-color: transparent; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--hz-accent); font-size: .8rem; }

/* Appearance switch: segmented control */
.appearance { background: var(--hz-alt); border-radius: 980px; padding: 2px; }
.appearance .btn { border: 0; color: var(--hz-muted); border-radius: 980px !important; padding: .2rem .7rem; }
.appearance .btn:hover { color: var(--hz-text); background: transparent; }
.appearance .btn[aria-pressed="true"] { background: var(--hz-bg); color: var(--hz-text); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }

/* Language bar */
.langs { display: flex; align-items: center; gap: 12px; padding-block: 6px; }
.langs-list { display: flex; flex-wrap: wrap; gap: 2px; }
.lang-btn { color: var(--hz-muted); border: 0; position: relative; border-radius: 8px !important; }
.lang-btn:hover { color: var(--hz-text); background: var(--hz-alt); }
.lang-btn[aria-pressed="true"] { color: var(--hz-link); font-weight: 600; }
.lang-btn[aria-pressed="true"]::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 2px; height: 2px; border-radius: 2px; background: currentColor; }

/* Cards and boxes: soft rounded surfaces without borders */
.card, .box { --bs-card-bg: var(--hz-surface); --bs-card-border-color: transparent; background: var(--hz-surface); border: 0 !important; border-radius: 18px !important; }
.section-alt .card, .section-alt .box { --bs-card-bg: var(--hz-surface-alt); background: var(--hz-surface-alt); }
.app-card, .contact-card { transition: transform .2s ease, box-shadow .2s ease; }
.app-card:hover, .contact-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
[data-bs-theme="dark"] .app-card:hover, [data-bs-theme="dark"] .contact-card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .6); }
.contact-card { color: var(--hz-text); }
.contact-card:hover { text-decoration: none; }
.contact-card .fa-lg, .facts .fa-solid, .facts .fa-brands { color: var(--hz-accent) !important; }
.app-icon { border-radius: 22.5%; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.app-icon-lg { width: 112px; height: 112px; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.fa-li { color: var(--hz-accent); }
.summary-list li, .feature-list li { margin-bottom: .6rem; }
.contact-list { --bs-list-group-bg: transparent; }
.contact-list .label { min-width: 6.5rem; }
.contact-list .fa-solid { color: var(--hz-accent) !important; }

/* Accordion (FAQ and support) */
.accordion {
  --bs-accordion-bg: var(--hz-surface); --bs-accordion-border-color: var(--hz-line);
  --bs-accordion-active-bg: var(--hz-surface); --bs-accordion-active-color: var(--hz-link);
  --bs-accordion-btn-focus-box-shadow: none; --bs-accordion-border-radius: 18px; --bs-accordion-inner-border-radius: 18px;
}
.accordion-item { border-color: var(--hz-line); }

/* Tables */
.table { --bs-table-bg: transparent; --bs-table-color: var(--hz-text); --bs-border-color: var(--hz-line); }
.doc-table { font-size: .95rem; }
.doc-table th { white-space: nowrap; color: var(--hz-muted); font-weight: 500; }
.doc-table td:first-child { white-space: nowrap; }
.info-table th { width: 34%; }
.breadcrumb { --bs-breadcrumb-divider-color: var(--hz-muted); --bs-breadcrumb-item-active-color: var(--hz-muted); }
.doc section { scroll-margin-top: 130px; }

/* Screenshot strip */
.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.shot { flex: none; width: 240px; height: auto; border-radius: 30px; scroll-snap-align: start; box-shadow: 0 8px 24px rgba(0, 0, 0, .10); }

/* Justified text on tablets and computers (normal alignment on phones and in narrow columns) */
@media (min-width: 768px) {
  main p, main li, .accordion-body p { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
  main .text-center p { text-align: center; }
  .summary-list li, .feature-list li, .app-desc { text-align: start; }
}

/* Phones */
@media (max-width: 575.98px) {
  .langs { align-items: flex-start; }
  .langs .fa-globe { padding-top: 8px; }
  .langs-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
  .lang-btn { padding-inline: 2px; }
  .shot { width: 70vw; max-width: 260px; }
  .info-table th { width: 42%; }
  .doc-table td:first-child { white-space: normal; }
  html { scroll-padding-top: 20px; }
  .site-header { position: static !important; }
}

/* Google Translate: hide Google's own bar and pop-ups */
#google_translate_element, .skiptranslate iframe, .goog-te-banner-frame, #goog-gt-tt, .VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }
body { top: 0 !important; position: static !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
html.translated-rtl body { direction: rtl; }
