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

:root {
  --color-base: #EDDED1;
  --color-base-dark: #EDD6C2;
  --color-peach: #F0CCAD;
  --color-blue: #1C57F5;
  --color-red: #DE3D3D;
  --color-yellow: #F7CF45;
  --color-white: #F6FBFB;
  --font-main: 'Heebo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-base);
  color: #1a1a1a;
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ===== Scroll Reveal System ===== */
/* Base hidden state for all reveal types */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

/* Direction variants */
[data-reveal="up"] { transform: translateY(60px); }
[data-reveal="down"] { transform: translateY(-60px); }
[data-reveal="right"] { transform: translateX(-80px); }
[data-reveal="left"] { transform: translateX(80px); }
[data-reveal="zoom"] { transform: scale(0.85); }
[data-reveal="flip"] { transform: perspective(800px) rotateY(25deg); }
[data-reveal="fade"] { transform: none; }

/* Visible state */
[data-reveal].visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1) rotateY(0deg);
}

/* Stagger delays */
[data-delay="1"] { transition-delay: 0.1s; }
[data-delay="2"] { transition-delay: 0.25s; }
[data-delay="3"] { transition-delay: 0.4s; }
[data-delay="4"] { transition-delay: 0.55s; }
[data-delay="5"] { transition-delay: 0.7s; }

/* ===== Floating Decorative Blobs ===== */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

.blob-blue {
  background: var(--color-blue);
  width: 300px;
  height: 300px;
  animation: floatBlob 8s ease-in-out infinite;
}

.blob-red {
  background: var(--color-red);
  width: 200px;
  height: 200px;
  animation: floatBlob 10s ease-in-out infinite reverse;
}

.blob-yellow {
  background: var(--color-yellow);
  width: 250px;
  height: 250px;
  animation: floatBlob 12s ease-in-out infinite;
}

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ===== Header ===== */
.site-header {
  position: relative;
  padding: 20px 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background-color: transparent;
  z-index: 10;
}

.site-header .logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.site-header .logo:hover {
  transform: rotate(-5deg) scale(1.08);
}

/* ===== Section: Hero Image ===== */
.section-hero-image {
  width: 100%;
  text-align: center;
  background-color: var(--color-base);
  overflow: hidden;
}

.section-hero-image img {
  width: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===== Section: Hero Text ===== */
.section-hero {
  background-color: var(--color-base);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-hero h3 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.7;
  color: var(--color-blue);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Hero lines animate in one by one */
.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: heroLineIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.3s; }
.hero-line:nth-child(2) { animation-delay: 0.6s; }
.hero-line:nth-child(3) { animation-delay: 0.9s; }

@keyframes heroLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Wave Divider ===== */
.wave-divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  width: 100%;
  height: 60px;
  display: block;
}

.wave-divider.flip {
  transform: scaleY(-1);
}

/* ===== Section: Features ===== */
.section-features {
  background-color: var(--color-base);
  padding: 60px 20px;
  position: relative;
}

.features-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.feature-card {
  text-align: center;
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(28, 87, 245, 0.12);
}

.feature-card .feature-icon {
  width: 90px;
  height: 90px;
  object-fit: contain;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(-5deg);
}

.feature-card h4 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-blue);
  margin-top: 8px;
}

.feature-card p {
  font-size: 1.15rem;
  color: #333;
  line-height: 1.6;
}

/* ===== Section: Registration Form ===== */
.section-form {
  background-color: var(--color-base);
  padding: 80px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section-form h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-blue);
  line-height: 1.5;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}

.section-form .form-subtitle {
  font-size: 1.3rem;
  color: #444;
  margin-bottom: 30px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

.form-cta {
  margin-top: 40px;
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-block;
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #E63946 0%, #C1121F 100%);
  border: none;
  border-radius: 50px;
  padding: 22px 55px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  box-shadow: 0 6px 25px rgba(198, 18, 31, 0.35);
  letter-spacing: 0.02em;
  animation: ctaPulse 3s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 6px 25px rgba(198, 18, 31, 0.35); }
  50% { box-shadow: 0 8px 40px rgba(198, 18, 31, 0.5), 0 0 60px rgba(230, 57, 70, 0.2); }
}

.cta-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 35px rgba(198, 18, 31, 0.5);
  animation: none;
}

.cta-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(198, 18, 31, 0.3);
}

/* Shine sweep */
.cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}

/* ===== Section: Map Banner ===== */
.section-map {
  text-align: center;
  overflow: hidden;
}

.section-map img {
  width: 100%;
  display: block;
  transition: transform 8s ease-out;
}

.section-map.visible img {
  transform: scale(1.03);
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-blue);
  color: var(--color-base);
  padding: 60px 20px 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Animated gradient overlay on footer */
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(28, 87, 245, 0) 0%,
    rgba(100, 140, 255, 0.15) 50%,
    rgba(28, 87, 245, 0) 100%);
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.footer-logo {
  width: 120px;
  height: auto;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.footer-logo:hover {
  transform: scale(1.1) rotate(3deg);
}

.site-footer h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-base);
}

.site-footer .footer-tagline {
  font-size: 1.15rem;
  color: var(--color-base);
  opacity: 0.9;
}

.footer-contact h6 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-base);
}

.footer-contact p {
  font-size: 1rem;
  color: var(--color-base);
  opacity: 0.85;
}

.footer-contact a {
  color: var(--color-base);
  text-decoration: underline;
  transition: opacity 0.3s;
}

.footer-contact a:hover {
  opacity: 0.7;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 16px 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(237, 222, 209, 0.12);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background-color 0.3s ease;
}

.social-links a:hover {
  background-color: rgba(237, 222, 209, 0.3);
  transform: translateY(-4px) scale(1.15);
}

.social-links svg {
  width: 20px;
  height: 20px;
  fill: var(--color-base);
}

.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 20px;
  color: var(--color-base);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-header {
    padding: 16px 20px;
  }

  .site-header .logo {
    width: 60px;
    height: 60px;
  }

  .section-hero {
    padding: 50px 20px;
  }

  .section-hero h3 {
    font-size: 1.6rem;
  }

  .section-form {
    padding: 50px 16px;
  }

  .section-form h1 {
    font-size: 2rem;
  }

  .section-form .form-subtitle {
    font-size: 1.1rem;
  }

  .cta-button {
    font-size: 1.3rem;
    padding: 16px 36px;
  }

  .features-grid {
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }

  .feature-card {
    min-width: unset;
    width: 100%;
    max-width: 320px;
  }

  .site-footer h1 {
    font-size: 1.7rem;
  }

  .blob {
    display: none;
  }

  .wave-divider svg {
    height: 30px;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
