/* ===========================
   AstroKaji Custom Styles
   =========================== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0B1A3C;
}
::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.5);
}

/* ===========================
   Stripe-like Navbar
   =========================== */
#astrokaji-navbar.astrokaji-navbar--scrolled {
  background-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(13, 13, 13, 0.08);
  border-bottom-color: rgba(13, 13, 13, 0.08);
}

.astrokaji-nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  color: inherit;
}

.astrokaji-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(177, 28, 28, 0), rgba(177, 28, 28, 0.65), rgba(245, 208, 138, 0.75), rgba(177, 28, 28, 0));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms ease;
}

.astrokaji-nav-link:hover::after,
.astrokaji-menu-item.current-menu-item > a .astrokaji-nav-link::after,
.astrokaji-menu-item.current-menu-ancestor > a .astrokaji-nav-link::after {
  transform: scaleX(1);
}

.astrokaji-nav-link:hover {
  color: #B11C1C;
}

/* ===========================
   Dropdown (Desktop nav)
   =========================== */
.astrokaji-desktop-nav .menu-item {
  position: relative;
}

.astrokaji-desktop-nav .menu-item-has-children::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: 100%;
  height: 18px;
}

.astrokaji-desktop-nav .menu-item-has-children > a .astrokaji-nav-link {
  padding-right: 14px;
}

.astrokaji-desktop-nav .menu-item-has-children > a .astrokaji-nav-link::before {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  opacity: 0.55;
  transition: transform 200ms ease, opacity 200ms ease;
}

.astrokaji-desktop-nav .menu-item-has-children:hover > a .astrokaji-nav-link::before,
.astrokaji-desktop-nav .menu-item-has-children:focus-within > a .astrokaji-nav-link::before {
  transform: translateY(-45%) rotate(225deg);
  opacity: 0.85;
}

.astrokaji-desktop-nav .sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: -10px;
  min-width: 240px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(13, 13, 13, 0.08);
  box-shadow: 0 18px 50px rgba(13, 13, 13, 0.10);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
  z-index: 60;
}

.astrokaji-desktop-nav .menu-item-has-children:hover > .sub-menu,
.astrokaji-desktop-nav .menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.astrokaji-desktop-nav .sub-menu li + li {
  margin-top: 4px;
}

.astrokaji-desktop-nav .sub-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151; /* gray-700 */
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.astrokaji-desktop-nav .sub-menu a:hover,
.astrokaji-desktop-nav .sub-menu a:focus-visible {
  background: rgba(177, 28, 28, 0.08);
  color: #B11C1C;
  transform: translateX(2px);
}

/* ===========================
   Dropdown (Mobile nav)
   =========================== */
.astrokaji-mobile-nav .sub-menu {
  position: static;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin-top: 10px;
}

.astrokaji-mobile-nav .menu-item-has-children > a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.astrokaji-mobile-nav .sub-menu a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: #6B7280; /* gray-500 */
  text-transform: none;
  letter-spacing: normal;
}

.astrokaji-mobile-nav .sub-menu a:hover {
  color: #B11C1C;
}

/* ===========================
   Contact Form 7 (Contact page)
   =========================== */
.astrokaji-cf7 .wpcf7 form {
  margin: 0;
}

.astrokaji-cf7 .wpcf7 form p {
  margin: 0 0 14px 0;
}

.astrokaji-cf7 .wpcf7 label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  color: #111827; /* gray-900 */
  margin-bottom: 8px;
}

.astrokaji-cf7 .wpcf7 .wpcf7-form-control-wrap {
  display: block;
}

.astrokaji-cf7 .wpcf7 input[type="text"],
.astrokaji-cf7 .wpcf7 input[type="email"],
.astrokaji-cf7 .wpcf7 input[type="tel"],
.astrokaji-cf7 .wpcf7 input[type="url"],
.astrokaji-cf7 .wpcf7 input[type="number"],
.astrokaji-cf7 .wpcf7 input[type="date"],
.astrokaji-cf7 .wpcf7 select,
.astrokaji-cf7 .wpcf7 textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(13, 13, 13, 0.12);
  background: rgba(247, 242, 234, 0.45); /* beige tint */
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.4;
  color: #111827;
  box-shadow: 0 8px 22px rgba(13, 13, 13, 0.04);
  transition: border-color 160ms ease, box-shadow 200ms ease, background-color 200ms ease;
  outline: none;
}

.astrokaji-cf7 .wpcf7 textarea {
  min-height: 140px;
  resize: vertical;
}

.astrokaji-cf7 .wpcf7 input::placeholder,
.astrokaji-cf7 .wpcf7 textarea::placeholder {
  color: rgba(17, 24, 39, 0.45);
}

.astrokaji-cf7 .wpcf7 input:focus,
.astrokaji-cf7 .wpcf7 select:focus,
.astrokaji-cf7 .wpcf7 textarea:focus {
  border-color: rgba(177, 28, 28, 0.55);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(177, 28, 28, 0.12), 0 18px 45px rgba(13, 13, 13, 0.08);
}

.astrokaji-cf7 .wpcf7 .wpcf7-submit {
  width: 100%;
  border: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 999px;
  padding: 14px 18px;
  background: #B11C1C;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 220ms ease, background-color 180ms ease;
  box-shadow: 0 18px 50px rgba(177, 28, 28, 0.20);
}

.astrokaji-cf7 .wpcf7 .wpcf7-submit:focus,
.astrokaji-cf7 .wpcf7 .wpcf7-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(177, 28, 28, 0.14), 0 18px 50px rgba(177, 28, 28, 0.20);
}

.astrokaji-cf7 .wpcf7 .wpcf7-submit:hover {
  background: #A61B18;
  transform: translateY(-1px);
  box-shadow: 0 22px 60px rgba(177, 28, 28, 0.26);
}

.astrokaji-cf7 .wpcf7 .wpcf7-submit:active {
  transform: translateY(0);
}

.astrokaji-cf7 .wpcf7 .wpcf7-spinner {
  margin-left: 10px;
}

.astrokaji-cf7 .wpcf7 .wpcf7-not-valid-tip {
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  color: #B11C1C;
}

.astrokaji-cf7 .wpcf7 .wpcf7-response-output {
  margin: 16px 0 0 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 600;
  border-width: 1px;
}

/* Success */
.astrokaji-cf7 .wpcf7 form.sent .wpcf7-response-output {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: rgba(6, 95, 70, 1);
}

/* Error */
.astrokaji-cf7 .wpcf7 form.invalid .wpcf7-response-output,
.astrokaji-cf7 .wpcf7 form.failed .wpcf7-response-output,
.astrokaji-cf7 .wpcf7 form.aborted .wpcf7-response-output {
  border-color: rgba(177, 28, 28, 0.35);
  background: rgba(177, 28, 28, 0.06);
  color: #7f1d1d;
}

/* Optional: 2-column layout on wide screens if CF7 uses "half" class */
@media (min-width: 640px) {
  .astrokaji-cf7 .wpcf7 .astrokaji-half {
    width: calc(50% - 8px);
    display: inline-block;
    vertical-align: top;
  }
  .astrokaji-cf7 .wpcf7 .astrokaji-half + .astrokaji-half {
    margin-left: 16px;
  }
}

/* Custom Logo inside navbar */
.astrokaji-logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
  padding-top: 4px;
}

.astrokaji-logo img.custom-logo {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Footer logo sizing (WordPress custom logo output) */
footer .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

footer img.custom-logo {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

/* Offset content for fixed top bar + navbar */
body {
  padding-top: 104px;
}

@media (max-width: 640px) {
  body {
    padding-top: 72px;
  }
}

/* ===========================
   CTA video: performance + safety
   =========================== */
.astrokaji-cta-video video {
  transform: translateZ(0);
}

@media (prefers-reduced-motion: reduce) {
  .astrokaji-cta-video video {
    display: none;
  }
}

/* ===========================
   Pre-animation States
   =========================== */
.pre-animate {
  opacity: 0;
  will-change: transform, opacity;
}

.pre-animate[data-animation="fade-in"] {
  opacity: 0;
}

.pre-animate[data-animation="slide-up"] {
  opacity: 0;
  transform: translateY(40px);
}

.pre-animate[data-animation="slide-right"] {
  opacity: 0;
  transform: translateX(-60px);
}

.pre-animate[data-animation="slide-left"] {
  opacity: 0;
  transform: translateX(60px);
}

.pre-animate[data-animation="zoom-in"] {
  opacity: 0;
  transform: scale(0.9);
}

/* ===========================
   Animated States
   =========================== */
.animated.animate-fade-in {
  animation: astroFadeIn 0.8s ease-out forwards;
}

.animated.animate-slide-up {
  animation: astroSlideUp 0.8s ease-out forwards;
}

.animated.animate-slide-right {
  animation: astroSlideRight 0.9s ease-out forwards;
}

.animated.animate-slide-left {
  animation: astroSlideLeft 0.9s ease-out forwards;
}

.animated.animate-zoom-in {
  animation: astroZoomIn 0.7s ease-out forwards;
}

/* ===========================
   Keyframe Animations
   =========================== */
@keyframes astroFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes astroSlideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes astroSlideRight {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes astroSlideLeft {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes astroZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===========================
   Gold Glow Effects
   =========================== */
.glow-gold {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.glow-gold-hover:hover {
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.5);
}

.text-glow-gold {
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

/* ===========================
   Gradient Text
   =========================== */
.gradient-text-gold {
  background: linear-gradient(135deg, #D4AF37, #E8CC6E, #D4AF37);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===========================
   Decorative Line
   =========================== */
.gold-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
}

/* ===========================
   Selection Style
   =========================== */
::selection {
  background: rgba(212, 175, 55, 0.3);
  color: #fff;
}

/* ===========================
   WordPress Core Overrides
   =========================== */
.wp-block-button__link {
  background-color: #D4AF37 !important;
  color: #0B1A3C !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  transition: all 0.3s ease !important;
}

.wp-block-button__link:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

/* ===========================
   Reduced Motion
   =========================== */
@media (prefers-reduced-motion: reduce) {
  .pre-animate {
    opacity: 1 !important;
    transform: none !important;
  }

  .animated {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===========================
   Loading transition
   =========================== */
body {
  opacity: 0;
  animation: bodyFadeIn 0.5s ease-out 0.1s forwards;
}

@keyframes bodyFadeIn {
  to {
    opacity: 1;
  }
}

/* ===========================
   Hero (Attachment Style)
   =========================== */
.astrokaji-hero-motif {
  position: relative;
  background-color: #F7F2EA;
  z-index: 0;
}

.astrokaji-hero-motif::before {
  content: "";
  position: absolute;
  inset: -8%;
  background-image: url("../images/astrology-circle-orance-dots-1024x1024.png");
  background-repeat: no-repeat;
  background-position: 15% 45%;
  background-size: min(720px, 70vw);
  opacity: 0.07;
  transform: rotate(-6deg);
  pointer-events: none;
  z-index: -1;
}

.astrokaji-hero-art-frame {
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.astrokaji-hero-rotate {
  transform-origin: 50% 50%;
  animation: astrokajiHeroRotate 38s linear infinite;
}

@keyframes astrokajiHeroRotate {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .astrokaji-hero-motif {
    overflow: hidden;
  }

  .astrokaji-hero-motif::before {
    inset: -18%;
    background-position: 50% 0%;
    background-size: min(520px, 95vw);
    transform: rotate(-10deg);
  }

  .astrokaji-hero-art-frame {
    border-radius: 32px 32px 20px 20px;
    padding: 22px 18px;
  }
}
