/* ========== OPTIMA FONT FACE ========== */
@font-face {
  font-family: "Optima LT W02 Roman";
  src: url("https://db.onlinewebfonts.com/t/c78d5ac2e0567f3d7abc24629e42741f.eot");
  src: url("https://db.onlinewebfonts.com/t/c78d5ac2e0567f3d7abc24629e42741f.eot?#iefix") format("embedded-opentype"),
    url("https://db.onlinewebfonts.com/t/c78d5ac2e0567f3d7abc24629e42741f.woff2") format("woff2"),
    url("https://db.onlinewebfonts.com/t/c78d5ac2e0567f3d7abc24629e42741f.woff") format("woff"),
    url("https://db.onlinewebfonts.com/t/c78d5ac2e0567f3d7abc24629e42741f.ttf") format("truetype"),
    url("https://db.onlinewebfonts.com/t/c78d5ac2e0567f3d7abc24629e42741f.svg#Optima LT W02 Roman") format("svg");
}

:root {
  /* Primary Colors */
  --color-primary: #0063AD;
  --color-accent-light: #4a9bd8;
  --color-accent-dark: #004a7a;
  
  /* Background Colors - Light Palette */
  --color-bg-white: #ffffff;
  --color-bg-light: #f6f8fd;
  --color-bg-lighter: #fafbfe;
  --color-bg-blue-light: #e8f4fd;
  
  /* Text Colors */
  --color-text-dark: #333333;
  --color-text-medium: #666666;
  --color-text-light: #999999;
  --color-text-white: #ffffff;
  
  /* Typography Scale */
  --font-size-h1: 3.5rem;    /* Hero title */
  --font-size-h2: 2.5rem;    /* Section titles */
  --font-size-h3: 1.5rem;    /* Subsection titles */
  --font-size-body: 1.125rem; /* 18px */
  --font-size-small: 1rem;   /* 16px */
  
  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden; /* Prevent horizontal scrolling */
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  background: white;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Lato font for all English text */
[lang="en"] body,
[dir="ltr"] body,
html[lang="en"] body,
html[dir="ltr"] body,
[lang="en"] p,
[dir="ltr"] p,
html[lang="en"] p,
html[dir="ltr"] p,
[lang="en"] span,
[dir="ltr"] span,
html[lang="en"] span,
html[dir="ltr"] span,
[lang="en"] div,
[dir="ltr"] div,
html[lang="en"] div,
html[dir="ltr"] div,
.ltr p,
.ltr span,
.ltr div {
  font-family: 'Lato', 'Open Sans', sans-serif;
}
html {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}

body {
  min-height: 100%;
  overflow: hidden;   /* critical: body must not scroll */
  margin: 0;
}




/* Hero Section with Background Image */
.hero-section {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  min-height: 600px;
  background-image: url('../images/site/achva-background.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Gradient overlay for better text readability */
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 0;
}

/* Navbar inside hero - positioned absolutely */
.hero-section .navbar:not(.sticky-scroll) {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  /* Fully transparent - let glass effect show through */
  background: transparent !important;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: right; /* RTL for Hebrew - will be changed to left for English via JS */
  color: white;
  padding: 20px 60px;
  margin-top: 0; /* Remove top margin, using flexbox centering */
  max-width: 600px;
  align-self: flex-start; /* Align to left side */
  margin-right: 60px;
  font-family: "Noto Sans Hebrew", sans-serif; /* Default Hebrew - will be changed to Open Sans for English via JS */
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 30px;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Optima font for English titles */
[lang="en"] .hero-title,
[dir="ltr"] .hero-title,
.ltr .hero-title,
html[lang="en"] .hero-title,
html[dir="ltr"] .hero-title {
  font-family: "Optima LT W02 Roman", "Optima", sans-serif;
  text-transform: uppercase;
}

/* Optima font for all English headings */
[lang="en"] h1,
[lang="en"] h2,
[lang="en"] h3,
[dir="ltr"] h1,
[dir="ltr"] h2,
[dir="ltr"] h3,
.ltr h1,
.ltr h2,
.ltr h3,
html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3 {
  font-family: "Optima LT W02 Roman", "Optima", sans-serif;
  text-transform: uppercase;
}

.hero-description {
  font-size: 1.3rem;
  line-height: 1.8;
  font-weight: 300;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
}

/* Lato font for English hero description */
[lang="en"] .hero-description,
[dir="ltr"] .hero-description,
.ltr .hero-description,
html[lang="en"] .hero-description,
html[dir="ltr"] .hero-description {
  font-family: 'Lato', 'Open Sans', sans-serif;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 45px;
  background-color: var(--color-primary);
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 300;
  border-radius: 99px;
  transition: all 0.3s ease;
  text-align: center;
  border: 2px solid var(--color-primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.hero-button:hover {
  background-color: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

.hero-button:active {
  transform: translateY(0);
}

.hero-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.hero-button-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.hero-button:hover .hero-button-icon {
  transform: translateX(3px);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-indicator-text {
  color: white;
  font-size: 0.875rem;
  font-weight: 300;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scroll-arrow::after {
  content: '↓';
  color: white;
  font-size: 16px;
  font-weight: bold;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Test Section */
.test-section {
  width: 100%;
  min-height: 100vh;
  background: white;
  padding: 100px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.test-content {
  text-align: center;
  color: #333;
  max-width: 800px;
}

.test-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.test-content p {
  font-size: 1.2rem;
  line-height: 1.6;
}

/* ========== RESPONSIVE STYLES ========== */

/* Tablet and smaller */
@media (max-width: 1024px) {
  .hero-content {
    max-width: 500px;
    padding: 20px 40px;
    margin-right: 40px;
  }
  
  .hero-title {
    font-size: 2.8rem;
  }
  
  .hero-description {
    font-size: 1.2rem;
  }
}

/* Mobile landscape and smaller */
@media (max-width: 768px) {
  .hero-section {
    min-height: 500px;
    background-image: url('../images/site/achva-background-mobile.webp');
    background-attachment: scroll; /* Disable parallax on mobile for better performance */
  }
  
  .hero-content {
    max-width: 90%;
    padding: 20px 30px;
    margin-right: 20px;
    margin-left: 20px;
    align-self: center !important; /* Center on mobile */
  }
  
  .hero-title {
    font-size: 2.8rem;
    margin-bottom: 20px;
  }
  
  .hero-description {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 30px;
  }
  
  .hero-button {
    padding: 12px 35px;
    font-size: 1.1rem;
  }
}

/* Mobile portrait */
@media (max-width: 480px) {
  .hero-section {
    min-height: 400px;
  }
  
  .hero-content {
    max-width: 95%;
    padding: 15px 20px;
    margin-right: 10px;
    margin-left: 10px;
  }
  
  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
  }
  
  .hero-description {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 25px;
  }
  
  .hero-button {
    padding: 10px 30px;
    font-size: 1rem;
  }
  
  .scroll-indicator {
    bottom: 20px;
  }
}

/* ========== ANIMATIONS ========== */

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Base animation styles - all animated elements start hidden */
.fade-in-section,
.slide-in-up,
.slide-in-left,
.slide-in-right,
.fade-in-up,
.fade-in-left,
.fade-in-right,
.animate-item {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-item.is-visible {
  opacity: 1;
}

/* Fade in from bottom */
.fade-in-section,
.fade-in-up {
  transform: translateY(40px);
}

.fade-in-section.is-visible,
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide in from bottom */
.slide-in-up {
  transform: translateY(60px);
}

.slide-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide in from left */
.slide-in-left {
  transform: translateX(-60px);
}

.slide-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide in from right */
.slide-in-right {
  transform: translateX(60px);
}

.slide-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from left */
.fade-in-left {
  transform: translateX(-40px);
}

.fade-in-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade in from right */
.fade-in-right {
  transform: translateX(40px);
}

.fade-in-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger animation container */
.animate-stagger .animate-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-stagger .animate-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RTL-aware animations - flip directions for Hebrew */
[dir="rtl"] .slide-in-left {
  transform: translateX(60px); /* Slide from right in RTL */
}

[dir="rtl"] .slide-in-left.is-visible {
  transform: translateX(0);
}

[dir="rtl"] .slide-in-right {
  transform: translateX(-60px); /* Slide from left in RTL */
}

[dir="rtl"] .slide-in-right.is-visible {
  transform: translateX(0);
}

[dir="rtl"] .fade-in-left {
  transform: translateX(40px); /* Fade from right in RTL */
}

[dir="rtl"] .fade-in-left.is-visible {
  transform: translateX(0);
}

[dir="rtl"] .fade-in-right {
  transform: translateX(-40px); /* Fade from left in RTL */
}

[dir="rtl"] .fade-in-right.is-visible {
  transform: translateX(0);
}

/* Skip to content link for keyboard users */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 10000;
  font-weight: 600;
  border-radius: 0 0 4px 0;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
  outline: 3px solid white;
  outline-offset: 2px;
}

/* Focus Styles for Accessibility */
*:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove outline for mouse users, keep for keyboard */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Enhanced focus for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px rgba(0, 99, 173, 0.2);
}

/* Reduced motion for accessibility */
@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;
  }
}

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ARIA live regions */
[role="status"],
[role="alert"],
[aria-live] {
  position: relative;
}

