/* Design tokens matching the official Jada Brand Guideline (V5, 2026):
   "Brand Guideline-jada30.pdf" - colors verified against the palette pages
   (pp.12-14) and fonts against the typography pages (pp.17-18). */
:root {
  /* "Jada Sans" = itf Ruaq Arabic (Arabic) + Bahnschrift (English/numerals),
     defined in css/fonts.css from the files in /fonts. */
  --font-family-ar: 'Jada Sans', 'Segoe UI', Tahoma, sans-serif;
  --font-family-en: 'Jada Sans', 'Segoe UI', Tahoma, sans-serif;

  /* Official brand palette */
  --brand-plum: #71154c;
  --brand-orange: #eb6a40;
  --brand-green: #37b586;
  --brand-navy: #0f4066;
  --brand-navy-dark: #042842;
  --brand-cyan: #1ccbd3;
  --brand-amber: #f1af34;
  --brand-mint: #00ed97;
  --brand-teal: #09adc3;
  --brand-ink: #00102a;

  /* Semantic aliases used throughout the theme */
  --primary-color: var(--brand-navy);
  --primary-500: var(--brand-teal);
  --primary-700: var(--brand-navy-dark);
  --primary-900: var(--brand-ink);

  --secondary-500: var(--brand-cyan);
  --secondary-600: var(--brand-teal);

  --surface-ground: #efefef;
  --surface-0: #ffffff;
  --surface-section: #ffffff;
  --surface-card: #ffffff;
  --surface-border: #c7d1d8;
  --surface-hover: #dae1e5;

  --text-color: #101213;
  --text-color-secondary: #515a5f;
  --text-color-title: #1d1e1c;
  --text-white: #ffffff;

  --border-radius-md: .625rem;
  --border-radius-rounded: .75rem;
  --border-radius-full: 1.5rem;
}

/* ---------- Bootstrap container: max 1320px from laptop (lg) up ---------- */
/* Overrides Bootstrap's default escalating container widths (960/1140/1320px
   at lg/xl/xxl); narrower viewports simply fill the width. */
@media (min-width: 992px) {
  .container {
    max-width: 1320px;
  }
}

/* ---------- Dark mode palette ---------- */
html.jada-dark {
  --surface-ground: #0f1720;
  --surface-0: #16212c;
  --surface-section: #16212c;
  --surface-card: #1c2a38;
  --surface-border: #2c3e50;
  --surface-hover: #22344a;

  --text-color: #eef2f3;
  --text-color-secondary: #a2b3be;
  --text-color-title: #ffffff;

  --primary-900: #001724;
}

html.jada-dark body,
html.jada-dark .jada-header,
html.jada-dark .jada-hackathon-card,
html.jada-dark .jada-hackathon-registration {
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html[lang="ar"] body,
html:not([lang]) body {
  font-family: var(--font-family-ar);
}

html[lang="en"] body {
  font-family: var(--font-family-en);
}

body {
  margin: 0;
  background: var(--surface-ground);
  color: var(--text-color);
  line-height: 1.6;
}

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

a:hover {
  color: var(--primary-color);
}

/* ---------- Accessibility: grayscale + zoom (mirrors jada30's header) ---------- */
html.jada-grayscale {
  filter: grayscale(1);
}

html.jada-zoom-1 { font-size: 100%; }
html.jada-zoom-2 { font-size: 112.5%; }
html.jada-zoom-3 { font-size: 125%; }
html.jada-zoom-4 { font-size: 137.5%; }

/* ---------- Header ---------- */
.jada-header {
  background: var(--surface-0);
  border-bottom: 1px solid var(--surface-border);
}

.jada-header__toolbar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5rem 1.25rem;
  font-size: .85rem;
  color: var(--text-color-secondary);
  border-bottom: 1px solid var(--surface-border);
}

.jada-toolbar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-color-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 7px;
  font-size: 1.05rem;
  line-height: 1;
}

.jada-toolbar-btn:hover,
.jada-toolbar-btn:focus-visible {
  background: var(--surface-hover);
  color: var(--primary-color);
  outline: none;
}

.jada-darkmode-icon {
  display: inline-block;
  transform: rotate(180deg);
}

html.jada-dark .jada-darkmode-icon {
  transform: rotate(0deg);
}

.jada-header__toolbar .lang-switch {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.jada-header__toolbar .lang-switch ul {
  display: flex;
  gap: .6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.jada-header__toolbar .lang-switch a {
  color: var(--text-color-secondary);
  font-weight: 600;
}

.jada-header__toolbar .lang-switch a[aria-current="true"],
.jada-header__toolbar .lang-switch a.is-active {
  color: var(--primary-color);
}

.jada-globe-icon {
  font-size: .9rem;
}

.jada-header__toolbar .sep {
  width: 1px;
  height: 1rem;
  background: var(--surface-border);
}

.jada-header__main.container {
  padding-right: 0;
  padding-left: 0;
}

.jada-header__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: .85rem;
  padding-bottom: .85rem;
}

.jada-header__logo img {
  height: 40px;
  display: block;
}

.jada-header__logo {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.jada-header__nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.jada-header__nav a {
  color: var(--text-color);
  font-weight: 600;
  font-size: .95rem;
}

.jada-header__nav a:hover {
  color: var(--primary-color);
}

/* ---------- Page shell ---------- */
.jada-main {
  padding-top: 0rem;
  padding-bottom: 1rem;
}

/* ---------- Breadcrumb (sits in .jada-main's top padding, before the
   page-title band) ---------- */
#block-jadahackathon-breadcrumb nav ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  list-style: none;
  margin: 0.5rem 0 0.5rem;
  padding: 0;
  font-size: .85rem;
  color: var(--text-color-secondary);
}

#block-jadahackathon-breadcrumb nav ol li {
  display: flex;
  align-items: center;
  gap: .4rem;
}

#block-jadahackathon-breadcrumb nav ol li:not(:last-child)::after {
  content: '/';
  color: var(--surface-border);
  inset-inline-start: .1rem;
}

#block-jadahackathon-breadcrumb nav ol li a {
  color: var(--text-color-secondary);
}

#block-jadahackathon-breadcrumb nav ol li a:hover {
  color: var(--primary-color);
}

.jada-page-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-color-title);
  margin: 0 0 .5rem;
}

.jada-page-subtitle {
  color: var(--text-color-secondary);
  margin: 0 0 2rem;
}

/* ---------- Page title header band + share button ---------- */
.jada-static-page__body {
  max-width: 820px;
  padding-top: 1rem;
  padding-bottom: 3rem;
  line-height: 1.8;
}

.jada-static-page h2 {
  color: var(--primary-color);
  margin-top: 2rem;
}

.jada-pagetitle-band {
  background: var(--primary-color) url('../images/pagetitle-band-bg.jpg') center center / cover no-repeat;
  margin-bottom: 1.5rem;
  height: 200px;
}

.jada-pagetitle-band__inner {
  padding-top: 3.75rem;
  padding-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.jada-pagetitle-band .jada-page-title {
  color: var(--text-white);
  margin: 0;
}

/* ---------- Plain page title (hackathons listing only): no background,
   no share icons, just the title. ---------- */
.jada-pagetitle-plain {
  margin-bottom: 1rem;
}

.jada-pagetitle-plain__inner {
  padding-top: 1.5rem;
}

.jada-pagetitle-plain .jada-page-title {
  color: var(--text-color-title);
  margin: 0;
}

.jada-share {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: none;
  flex-wrap: wrap;
}

.jada-share__label {
  color: var(--text-white);
  font-weight: 600;
  font-size: .9rem;
  opacity: .85;
}

.jada-share__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, .12);
  color: var(--text-white);
  border: 1px solid rgba(255, 255, 255, .35);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
}

.jada-share__icon:hover,
.jada-share__icon:focus-visible {
  background: rgba(255, 255, 255, .28);
  color: var(--text-white);
  outline: none;
}

.jada-share__icon.is-copied {
  background: var(--secondary-500);
  border-color: var(--secondary-500);
}

/* ---------- Footer ---------- */
.jada-footer {
  background: var(--primary-900) url('../images/footer-bg.webp') center / cover no-repeat;
  color: var(--text-white);
  margin-top: 3rem;
  font-size: .9rem;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.jada-footer__columns {
  padding-top: 3rem;
  padding-bottom: 2rem;
  row-gap: 2rem;
  width: 100%;
}

.jada-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding: 1.25rem 0;
  text-align: center;
}

.jada-footer__bottom p {
  margin: 0;
}

.jada-footer__bottom-links {
  display: inline-flex;
  gap: 1rem;
  margin-inline-start: .75rem;
}

.jada-footer__bottom-links a {
  color: #c7d1d8;
  text-decoration: underline;
}

.jada-footer__bottom-links a:hover {
  color: var(--text-white);
}

.jada-footer__column .block {
  margin: 0;
}

.jada-footer__column h2,
.jada-footer__column .block-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 1rem;
}

.jada-footer__column ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.jada-footer__column a {
  color: #c7d1d8;
  font-size: .9rem;
}

.jada-footer__column a:hover {
  color: var(--text-white);
}

.jada-footer__social {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.jada-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 7px;
  background: rgba(255, 255, 255, .1);
  color: var(--text-white);
  font-size: 1.1rem;
}

.jada-footer__social a:hover {
  background: var(--secondary-500);
}

/* ---------- Global button radius (catches native form/webform/contact
   submit buttons not covered by a more specific .jada-* class above) ---------- */
button,
.btn,
input[type="submit"],
input[type="button"],
.form-submit {
  border-radius: 7px;
}
