/* Aljawhara 3D Hero - Widget Styles */

.ajh-hero-wrapper {
  --ajh-primary: #00f0ff;
  --ajh-bg: #072559;
  --ajh-fog: #072559;
  --ajh-text: #ffffff;
  --ajh-text-secondary: rgba(255,255,255,0.68);
  --ajh-accent: #00f0ff;
  --ajh-building-t: #0a1f45;
  --ajh-building-m: #0d2a5a;
  --ajh-building-l: #16458a;
  --ajh-ground: #040d22;
  --ajh-grid: #00f0ff;
  --ajh-sun: #ffc846;
  --ajh-warm: #ffe4a0;
  --ajh-tagline: #00f0ff;
}

.ajh-hero-3d-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--ajh-bg);
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}

.ajh-scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ajh-text-card {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 5%;
  background: rgba(7,37,89,0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0,240,255,0.12);
  border-radius: 18px;
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.2rem, 2.5vw, 2.2rem);
  max-width: clamp(300px, 40vw, 480px);
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  will-change: opacity;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
}

.ajh-text-card.ajh-centered {
  right: 0;
  left: 0;
  margin: 0 auto;
  text-align: center;
  max-width: clamp(320px, 50vw, 600px);
}

/* Card 1 visible immediately */
#card-1 { opacity: 1; }
#card-1 .ajh-accent-bar { width: 55px; }

.ajh-accent-bar {
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ajh-accent), rgba(0,240,255,0.3));
  margin-bottom: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 12px var(--ajh-accent);
}

.ajh-text-card.ajh-centered .ajh-accent-bar {
  margin: 0 auto 1rem;
}

.ajh-text-card h2 {
  font-size: clamp(1.3rem, 3.2vw, 2.4rem);
  font-weight: 900;
  color: var(--ajh-text);
  line-height: 1.35;
  margin-bottom: 0.75rem;
}

.ajh-text-card p {
  font-size: clamp(0.8rem, 1.2vw, 1.05rem);
  font-weight: 400;
  color: var(--ajh-text-secondary);
  line-height: 1.9;
}

.ajh-tagline-cyan {
  font-size: clamp(1rem, 1.6vw, 1.35rem) !important;
  font-weight: 200 !important;
  color: var(--ajh-tagline) !important;
  margin-top: 1.3rem !important;
  text-shadow: 0 0 18px rgba(0,240,255,0.3);
  letter-spacing: 0.3px;
}

.ajh-logo {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 20;
  background: rgba(7,37,89,0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0,240,255,0.18);
  padding: 8px 20px;
  border-radius: 10px;
  color: var(--ajh-text);
  font-size: clamp(0.78rem, 1.1vw, 1.05rem);
  font-weight: 700;
  user-select: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.ajh-logo span {
  color: var(--ajh-primary);
}

.ajh-phase-nav {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  will-change: opacity;
}

.ajh-p-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid rgba(0,240,255,0.35);
  background: transparent;
  transition: all 0.3s ease;
  cursor: default;
}

.ajh-p-dot.ajh-on {
  background: var(--ajh-primary);
  border-color: var(--ajh-primary);
  box-shadow: 0 0 8px var(--ajh-primary);
  transform: scale(1.25);
}

.ajh-scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 0.72rem;
  will-change: opacity;
}

.ajh-scroll-chevron {
  width: 16px;
  height: 16px;
  border-right: 1.5px solid rgba(0,240,255,0.5);
  border-bottom: 1.5px solid rgba(0,240,255,0.5);
  transform: rotate(45deg);
  animation: ajh-chevB 1.5s ease-in-out infinite;
}

@keyframes ajh-chevB {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
  50% { transform: rotate(45deg) translateY(4px); opacity: 0.3; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ajh-scroll-chevron {
    animation: none;
  }
  .ajh-text-card {
    transition: none !important;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .ajh-text-card {
    right: 4%;
    left: 4%;
    max-width: 92% !important;
    padding: 1.2rem 1rem;
  }
  .ajh-text-card.ajh-centered {
    right: 4%;
    left: 4%;
  }
  .ajh-phase-nav {
    display: none;
  }
  .ajh-logo {
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    font-size: 0.75rem;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .ajh-text-card h2 {
    font-size: 1.15rem;
  }
  .ajh-text-card p {
    font-size: 0.76rem;
    line-height: 1.7;
  }
  .ajh-tagline-cyan {
    font-size: 0.9rem !important;
  }
}
