/* ============================================
   Toyota distributorship Static Website Styles
   Version 1.0
   ============================================ */

/* ============================================
   CSS Custom Properties (Variables)
   ============================================ */
:root {
  /* Colors - Toyota Theme */
  --color-primary: #eb0a1e;
  --color-primary-dark: #c20819;
  --color-white: #ffffff;
  --color-off-white: #f6f6f6;
  --color-text: #1a1a1a;
  --color-text-secondary: #707070;
  --color-border: #e0e0e0;

  /* Typography */
  --font-family-en: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
  --font-family-ar: 'Cairo', 'Noto Kufi Arabic', sans-serif;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  /* Layout */
  --container-max: 1200px;
  --navbar-height: 70px;

  /* Logo framing */
  --logo-bg: var(
    --color-white
  ); /* default background behind transparent logos */
  --logo-padding: 6px; /* inner spacing around the logo image */
  --logo-radius: var(--radius-md); /* adjustable corner roundness */
  --logo-bg-alpha: 100%; /* background opacity as percentage (e.g., 80%) */
}

/* Self-hosted Cairo variable/weight-range webfont (woff2) */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  /* file covers weights 200–1000 */
  font-weight: 200 1000;
  font-display: swap;
  src: url('../fonts/cairo-normal-200-1000.woff2') format('woff2');
}

/* Self-hosted Roboto variable/weight-range webfont (woff2) */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  /* file covers weights 100–900 */
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/roboto-normal-100-900.woff2') format('woff2');
}

/* ============================================
   Reset & Base Styles
   ============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-en);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* RTL Support */
html[dir='rtl'] body {
  font-family: var(--font-family-ar);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a[href^='tel:'],
a[href^='mailto:'] {
  direction: ltr;
  unicode-bidi: embed;
  display: inline-block;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: var(--spacing-md);
}

.text-secondary {
  color: var(--color-text-secondary);
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section {
  padding: var(--spacing-3xl) 0;
}

.section--alt {
  background-color: var(--color-off-white);
}

main {
  flex: 1;
}

/* ============================================
   Navbar
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: box-shadow var(--transition-normal);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.navbar__logo {
  height: 45px;
  width: auto;
}

.navbar__logo img {
  height: 100%;
  width: auto;
}

.navbar__menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.navbar__link {
  font-weight: 500;
  color: var(--color-text);
  padding: var(--spacing-sm) 0;
  position: relative;
  transition: color var(--transition-fast);
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-normal);
}

.navbar__link:hover,
.navbar__link.active {
  color: var(--color-primary);
}

.navbar__link:hover::after,
.navbar__link.active::after {
  width: 100%;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.lang-switch:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Hamburger Menu */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--spacing-sm);
}

.navbar__hamburger span {
  width: 24px;
  height: 2px;
  background-color: var(--color-text);
  transition: all var(--transition-fast);
}

.navbar__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.navbar__mobile-menu {
  display: none;
  position: absolute;
  top: var(--navbar-height);
  left: 0;
  right: 0;
  background-color: var(--color-white);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
}

.navbar__mobile-menu.active {
  display: block;
}

.navbar__mobile-menu .navbar__link {
  display: block;
  padding: var(--spacing-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.navbar__mobile-menu .navbar__link:last-child {
  border-bottom: none;
}

.navbar__mobile-menu .lang-switch {
  margin-top: var(--spacing-lg);
  justify-content: center;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

.btn--primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

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

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

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

/* ============================================
   Hero Carousel
   ============================================ */
.hero {
  margin-top: var(--navbar-height);
  position: relative;
  overflow: hidden;
}

.carousel {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 700px;
}

.carousel__slides {
  display: flex;
  height: 100%;
  transition: transform var(--transition-slow);
  direction: ltr; /* keep slide flow consistent even on RTL pages */
}

.carousel__slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  object-fit: cover;
  object-position: center center; /* default */
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel__overlay {
  position: absolute;
  inset: 0;
  background: none;
  display: flex;
  align-items: center;
}

html[dir='rtl'] .carousel__overlay {
  background: none;
}

.carousel__content {
  position: absolute;
  left: 4%;
  top: 50%;
  transform: translateY(-50%);
}

.carousel__title {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
}

.carousel__subtitle {
  background: rgba(0, 0, 0, 0.65);
  color: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  max-width: 500px;
  font-size: 1.25rem;
}

.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  font-family: var(--font-family-en);
  direction: ltr;
  unicode-bidi: isolate-override;
  color: var(--color-text);
  transition: all var(--transition-fast);
  z-index: 10;
}

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

.carousel__nav--prev {
  left: var(--spacing-lg);
}

.carousel__nav--next {
  right: var(--spacing-lg);
}

/* RTL nav position overrides removed to keep behavior consistent. */

.carousel__dots {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-sm);
}

.carousel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}

.carousel__dot.active {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

/* ============================================
   Highlights Section
   ============================================ */
.highlights {
  padding: var(--spacing-3xl) 0;
  background-color: var(--color-off-white);
}

.highlights__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
}

.highlight-card {
  background-color: var(--color-white);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: all var(--transition-normal);
}

.highlight-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.highlight-card__icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.highlight-card__title {
  font-size: 1.25rem;
  color: var(--color-primary);
}

/* Welcome card (single large card) should span the full grid width */
.highlight-card--welcome {
  grid-column: 1 / -1;
  text-align: right; /* keep text aligned for RTL */
  padding: var(--spacing-2xl);
  font-size: 1.05rem;
  line-height: 1.9;
}

/* ============================================
   Services Section
   ============================================ */
.services-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3xl);
}

.service-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.service-item:nth-child(even) {
  direction: ltr;
}

.service-item:nth-child(even) .service-item__image {
  order: 1;
}

html[dir='rtl'] .service-item:nth-child(even) {
  direction: rtl;
}

html[dir='rtl'] .service-item:nth-child(even) .service-item__image {
  order: 1;
}

html[dir='rtl'] .service-item:nth-child(odd) .service-item__image {
  order: 1;
}

.service-item__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: none; /* remove shadow per request */
  border: none; /* ensure no border */
  justify-self: center; /* center this grid item horizontally */
  max-height: 1000px;
  object-fit: cover;
  -webkit-object-fit: cover;
}

.service-item__content {
  padding: var(--spacing-lg);
}

.service-item__content-btn {
  /* Center the CTA button inside the service item content.
     Use a shrink-to-content block so `margin: 0 auto` centers it. */
  display: block;
  width: max-content;
  margin: var(--spacing-lg) auto 0;
}

.service-item__icon {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.service-item__title {
  color: var(--color-primary);
  margin-bottom: var(--spacing-md);
}

.service-item__desc {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ============================================
   About Section
   ============================================ */
.about-section {
  display: block;
  width: 100%;
  margin: auto;
}

.about-section__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-section__content {
  padding: var(--spacing-lg);
}

.about-section__title {
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.about-section__text {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
  /* white-space: pre-line; */
  line-height: 1.8;
}

.about-section__mission {
  /* position: absolute; */
  /* top: calc(100% + var(--spacing-xl)); */
  /* left: 50%; */
  /* transform: translateX(-50%); */
  width: 90%;
  max-width: 1000px;
  background-color: var(--color-off-white);
  padding: var(--spacing-2xl);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-primary);
  z-index: 1;
  font-size: 1.1rem;
  margin-left: auto;
  margin-right: auto;
}

html[dir='rtl'] .about-section__mission {
  border-left: none;
  border-right: 4px solid var(--color-primary);
}

.about-section__mission h4 {
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 1.5rem;
}

/* Ensure mission card is consistently centered on desktop/tablet
   Keep mobile rules (in media queries) untouched. This selector
   is specific and scoped to the image container to avoid side-effects. */
@media (min-width: 769px) {
  .about-section__image {
    position: relative; /* make sure absolute children are positioned to this box */
  }

  .about-section__image .about-section__content {
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
  }

  .about-section__image .about-section__content > .about-section__mission {
    position: relative;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    width: min(90%, 900px) !important;
    max-width: none;
    box-sizing: border-box;
    text-align: start;
  }
}

/* ============================================
   Contact Section
   ============================================ */
.contact-section {
  padding: var(--spacing-3xl) 0;
}

.contact-section__title {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: var(--spacing-3xl);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-xl);
}

.contact-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.contact-card__header {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: var(--spacing-lg);
}

.contact-card__name {
  font-size: 1.25rem;
  color: var(--color-white);
}

.contact-card__body {
  padding: var(--spacing-xl);
}

.contact-card__item {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.contact-card__item:last-child {
  margin-bottom: 0;
}

.contact-card__icon {
  font-size: 1.25rem;
  color: var(--color-primary);
  min-width: 24px;
}

.contact-card__label {
  font-weight: 600;
  color: var(--color-text);
  display: block;
  margin-bottom: var(--spacing-xs);
}

.contact-card__value {
  color: var(--color-text-secondary);
  display: block; /* stack multiple phone entries vertically */
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.contact-card__value a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

.contact-card__value a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.contact-card__note {
  display: inline-block;
  margin-inline-start: 0.5rem; /* logical margin works with RTL */
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  vertical-align: baseline;
}

.contact-card__map-link {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
  color: var(--color-primary);
  font-weight: 600;
}

.contact-card__map-link:hover {
  text-decoration: underline;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
  margin-top: var(--navbar-height);
  padding: var(--spacing-3xl) 0;
  background-color: var(--color-off-white);
  text-align: center;
}

.page-header__title {
  color: var(--color-primary);
  margin-bottom: var(--spacing-sm);
}

.page-header__subtitle {
  color: var(--color-text-secondary);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background-color: var(--color-text);
  color: var(--color-white);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer__container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-3xl);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  height: 50px;
  margin-bottom: var(--spacing-lg);
}

.footer__logo img {
  height: 100%;
  width: auto;
  /* Fallback solid color */
  background-color: var(--logo-bg);
  /* Prefer semi-transparent mix when supported */
  background-color: color-mix(
    in srgb,
    var(--logo-bg) var(--logo-bg-alpha),
    transparent
  );
  border-radius: var(--logo-radius);
  padding: var(--logo-padding);
}

.footer__tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.footer__title {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: var(--spacing-lg);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer__link {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-primary);
}

.footer__contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--spacing-sm);
}

.footer__bottom {
  margin-top: var(--spacing-3xl);
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer__copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .carousel__title {
    font-size: 2.5rem;
  }

  .highlights__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
  }

  .service-item {
    gap: var(--spacing-xl);
  }

  .about-section {
    gap: var(--spacing-xl);
  }

  .footer__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --navbar-height: 60px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .container {
    padding: 0 var(--spacing-md);
  }

  .section {
    padding: var(--spacing-2xl) 0;
  }

  /* Navbar Mobile */
  .navbar__menu {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .navbar__actions {
    display: none;
  }

  /* Carousel Mobile */
  .carousel {
    height: 60vh;
    min-height: 400px;
  }

  .carousel__title {
    font-size: 1.75rem;
  }

  .carousel__subtitle {
    font-size: 1rem;
  }

  .carousel__nav {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .about-section__mission {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    margin-top: var(--spacing-xl);
  }

  .carousel__overlay {
    position: static;
    background: none;
    display: block;
  }

  .carousel__content {
    position: static;
    margin-top: var(--spacing-lg);
    transform: none;
  }

  .carousel__subtitle {
    max-width: none;
  }

  /* Highlights Mobile */
  .highlights__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .highlight-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    text-align: left;
    padding: var(--spacing-lg);
  }

  html[dir='rtl'] .highlight-card {
    text-align: right;
  }

  .highlight-card__icon {
    font-size: 2rem;
    margin-bottom: 0;
  }

  /* Services Mobile */
  .service-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
  }

  /* Force content-first stacking on mobile so text appears before images
     regardless of the HTML element order (fixes inconsistent ordering). */
  .service-item__content {
    order: 0;
    padding: 0;
  }

  .service-item__image {
    order: 1;
  }

  .service-item__image img {
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: cover;
    display: block;
  }

  /* About Mobile */
  .about-section {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .about-section__content {
    padding: 0;
  }

  /* Contact Mobile */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Footer Mobile */
  .footer__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

  .footer__brand {
    max-width: none;
  }

  .footer__logo {
    margin: 0 auto var(--spacing-md);
    width: fit-content;
  }

  .footer__contact-item {
    justify-content: center;
  }

  .carousel__slide:nth-child(1) img {
    object-position: 7% center; /* Shift left */
  }

  .carousel__slide:nth-child(2) img {
    object-position: 27% center; /* Shift right */
  }

  .carousel__slide:nth-child(3) img {
    object-position: 30% center; /* Shift up */
  }

  .carousel__slide:nth-child(4) img {
    object-position: center center; /* Shift down */
  }

  /* Adjust remaining slides as needed */
  .carousel__slide:nth-child(5) img {
    object-position: 35% center;
  }

  .carousel__slide:nth-child(6) img {
    object-position: center center;
  }

  .carousel__slide:nth-child(7) img {
    object-position: center center;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .carousel {
    height: 50vh;
    min-height: 350px;
  }

  .carousel__title {
    font-size: 1.5rem;
  }

  .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.875rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: var(--spacing-sm);
}
.mt-2 {
  margin-top: var(--spacing-md);
}
.mt-3 {
  margin-top: var(--spacing-lg);
}
.mt-4 {
  margin-top: var(--spacing-xl);
}

.mb-1 {
  margin-bottom: var(--spacing-sm);
}
.mb-2 {
  margin-bottom: var(--spacing-md);
}
.mb-3 {
  margin-bottom: var(--spacing-lg);
}
.mb-4 {
  margin-bottom: var(--spacing-xl);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Better underline helpers */
.u-underline {
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--color-primary);
  text-underline-offset: 4px;
  text-decoration-skip-ink: auto;
}

.u-underline-soft {
  text-decoration-line: underline;
  text-decoration-thickness: 1.5px;

  text-underline-offset: 8px;
  text-decoration-skip-ink: auto;
}

/* Accent underline using background gradient for full control */
.u-accent-underline {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 2px;
  padding-bottom: 2px; /* keeps underline visually separated */
  color: var(--color-primary);
}

/* ============================================
   About Section Overlay Styles
   Adds a contrasting, semi-opaque panel that overlays the image
   on larger screens while preserving a stacked layout on mobile.
   ============================================ */
.about-section {
  /* keep legacy grid fallback for small screens, but allow overlaying */
  display: block;
}

.about-section__image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-section__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay panel that sits on top of the image (desktop/tablet) */
.about-section__content {
  position: absolute;
  top: 50%;
  right: 4%;
  transform: translateY(-50%);
  width: clamp(300px, 46%, 560px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.46));
  /* color: var(--color-white); */
  padding: var(--spacing-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 5;
}

html[dir='rtl'] .about-section__content {
  left: 4%;
  right: auto;
  text-align: right;
}

.about-section__content .about-section__title {
  /* color: var(--color-white); */
}

.about-section__content .about-section__text {
  /* color: rgba(255, 255, 255, 0.95); */
  margin-bottom: var(--spacing-md);
}

/* Mobile: fall back to stacked, readable layout */
@media (max-width: 768px) {
  .about-section {
    display: block;
    width: 100%;
    margin-left: 0;
  }

  .about-section__image img {
    height: auto;
  }

  .about-section__mission {
    position: static;
    top: auto;
    padding: var(--spacing-lg);
    margin: 0;
    overflow: hidden;
  }

  .about-section__content {
    position: static;
    transform: none;
    width: 100%;
    margin-top: var(--spacing-md);
    background: var(--color-off-white);
    color: var(--color-text);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
  }
}

/* Mobile overrides to ensure readable dark text when overlay is disabled */
@media (max-width: 768px) {
  .about-section__content .about-section__title,
  .about-section__content .about-section__text {
    color: var(--color-text) !important;
  }

  /* Remove any semi-opaque background left on content so it reads as a normal block */
  .about-section__content {
    background: var(--color-off-white) !important;
  }
}
