/* ==========================================================================
   Anugruja Arts Studio - Motion Graphics, Responsive Mobile Polish & Transitions
   ========================================================================== */

/* --- 1. Studio Preloader with Motion Graphics --- */
#studio-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at center, #2b0844 0%, #11031c 100%);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

#studio-loader.loader-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.04);
  pointer-events: none;
}

.loader-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 0 1.5rem;
}

.palette-ring {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  border: 3px solid rgba(242, 215, 112, 0.2);
  border-top-color: #F2D770;
  border-bottom-color: rgb(223, 184, 254);
  animation: spinRing 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 25px rgba(242, 215, 112, 0.35);
}

.paint-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  margin: -6px 0 0 -6px;
}

.dot-1 {
  background: #f0df2a;
  box-shadow: 0 0 10px #f0df2a;
  transform: rotate(0deg) translate(40px);
}

.dot-2 {
  background: #ff5252;
  box-shadow: 0 0 10px #ff5252;
  transform: rotate(90deg) translate(40px);
}

.dot-3 {
  background: #e040fb;
  box-shadow: 0 0 10px #e040fb;
  transform: rotate(180deg) translate(40px);
}

.dot-4 {
  background: #00e5ff;
  box-shadow: 0 0 10px #00e5ff;
  transform: rotate(270deg) translate(40px);
}

@keyframes spinRing {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-brand {
  font-family: 'Blippo', fantasy, sans-serif !important;
  color: #F2D770 !important;
  font-size: clamp(1.6rem, 5vw, 2.2rem) !important;
  letter-spacing: 2px;
  margin: 8px 0 0 0 !important;
  text-shadow: 0 0 16px rgba(242, 215, 112, 0.5);
  animation: pulseText 2s ease-in-out infinite alternate;
}

.loader-tagline {
  font-family: 'Luminari', fantasy, sans-serif !important;
  color: #ffe76c !important;
  font-size: clamp(0.9rem, 3vw, 1.15rem) !important;
  font-weight: 100;
  margin: 0 !important;
  opacity: 0.9;
}

.loader-progress-bar {
  width: min(200px, 70vw);
  height: 4px;
  background: rgba(223, 184, 254, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.loader-progress-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #F2D770, #e040fb, #00e5ff);
  animation: progressFill 1.2s ease-in-out infinite;
}

@keyframes progressFill {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes pulseText {
  0% { opacity: 0.85; transform: scale(0.99); }
  100% { opacity: 1; transform: scale(1.01); }
}

/* --- 2. Desktop & Responsive Header Polish --- */
#header {
  height: 4.4em !important;
  line-height: 4.4em !important;
  background: rgba(20, 6, 32, 0.95) !important;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.55) !important;
  border-bottom: 1px solid rgba(242, 215, 112, 0.25) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 2rem !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  box-sizing: border-box !important;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  flex-shrink: 0;
}

.header-left .socials-title {
  color: rgb(251, 240, 177);
  font-family: 'Blippo', fantasy, sans-serif;
  font-size: 1.15rem;
  margin: 0;
  padding-top: 2px;
}

.header-left a {
  color: rgb(247, 236, 189);
  font-size: 1.25rem;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.25s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.header-left a:hover {
  color: #ffe76c;
  transform: translateY(-2px) scale(1.2);
}

#header #logo {
  position: static !important;
  margin: 0 !important;
  padding: 0 1rem !important;
  text-align: center !important;
  flex-grow: 1;
  height: auto !important;
  line-height: normal !important;
}

#header #logo a {
  color: #F2D770 !important;
  font-family: 'Blippo', fantasy, sans-serif !important;
  letter-spacing: 1.5px;
  font-size: clamp(1.2rem, 2.5vw, 1.8rem) !important;
  font-weight: bold;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  white-space: nowrap;
}

#header #logo a:hover {
  color: #fff !important;
  text-shadow: 0 0 15px rgba(242, 215, 112, 0.7);
}

#header #nav {
  position: static !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  flex-shrink: 0;
}

#header #nav > ul {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 100%;
}

#header #nav > ul > li {
  display: inline-flex;
  align-items: center;
  height: 100%;
  margin: 0;
}

#header #nav > ul > li > a,
#header #nav > ul > li > span {
  font-family: 'Blippo', fantasy, sans-serif !important;
  color: rgb(233, 223, 40) !important;
  font-size: 1.05rem !important;
  font-weight: 500;
  transition: color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

#header #nav > ul > li > a:hover,
#header #nav > ul > li > span:hover {
  color: #fff !important;
  transform: translateY(-1px);
}

/* Dropotron Dropdown Menu */
.dropotron {
  background: rgba(40, 10, 64, 0.97) !important;
  border: 1px solid rgba(223, 184, 254, 0.5) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7) !important;
  padding: 0.6rem 0 !important;
  backdrop-filter: blur(12px) !important;
}

.dropotron li a {
  color: #F2D770 !important;
  font-family: 'Blippo', fantasy, sans-serif !important;
  font-size: 1rem !important;
  padding: 0.65rem 1.4rem !important;
  transition: all 0.2s ease !important;
}

.dropotron li a:hover {
  background: rgba(75, 18, 115, 0.95) !important;
  color: #fff !important;
  padding-left: 1.7rem !important;
}

/* --- 3. Responsive Gallery Scrollers (Fixing Mobile Fitting) --- */
.scroller {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  -webkit-overflow-scrolling: touch !important;
  gap: 16px !important;
  padding: 14px 16px 26px 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  scrollbar-width: thin;
  scrollbar-color: #d1a515 rgba(55, 14, 85, 0.4);
}

.scroller::-webkit-scrollbar {
  height: 8px;
}

.scroller::-webkit-scrollbar-track {
  background: rgba(55, 14, 85, 0.4);
  border-radius: 4px;
}

.scroller::-webkit-scrollbar-thumb {
  background: #d1a515;
  border-radius: 4px;
}

/* Base image inside all horizontal scrollers */
.scroller img {
  scroll-snap-align: center !important;
  flex: 0 0 auto !important;
  height: 40vh !important;
  max-height: 360px !important;
  min-height: 200px !important;
  width: auto !important;
  max-width: min(85vw, 420px) !important;
  object-fit: contain !important;
  border: 2.5px solid gold !important;
  border-radius: 12px !important;
  background: rgba(18, 5, 28, 0.85) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5) !important;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease, border-color 0.35s ease !important;
  cursor: pointer !important;
}

.scroller img:hover {
  transform: translateY(-5px) scale(1.03) !important;
  box-shadow: 0 14px 32px rgba(242, 215, 112, 0.45) !important;
  border-color: #fff !important;
}

/* Slideshow Container (.w3-display-container, .slider-container, .mySlides) */
.slider-container, .w3-display-container {
  max-width: 100% !important;
  box-sizing: border-box !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 260px !important;
}

.mySlides {
  max-width: min(90vw, 540px) !important;
  max-height: min(48vh, 400px) !important;
  height: auto !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: none;
  border: 2.5px solid gold !important;
  border-radius: 12px !important;
  background: rgba(18, 5, 28, 0.85) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  animation: slideFadeIn 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer !important;
}

@keyframes slideFadeIn {
  from {
    opacity: 0.15;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Slideshow Left/Right Navigation Buttons */
.w3-button.w3-purple {
  background: rgba(55, 14, 85, 0.88) !important;
  color: #F2D770 !important;
  border: 1.5px solid rgba(242, 215, 112, 0.6) !important;
  border-radius: 50% !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  cursor: pointer !important;
  transition: all 0.25s ease !important;
  z-index: 20 !important;
}

.w3-button.w3-purple:hover {
  background: #5d1b8f !important;
  color: #fff !important;
  transform: scale(1.12) !important;
  box-shadow: 0 0 15px rgba(242, 215, 112, 0.5) !important;
}

/* --- 4. Smooth Section Motion Transitions --- */
html {
  scroll-behavior: smooth !important;
}

.spotlight, .wrapper {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1) !important;
  will-change: opacity, transform;
}

.spotlight.section-in-view, .wrapper.section-in-view, #banner, body.is-preload .spotlight, body.is-preload .wrapper {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* --- 5. Interactive Lightbox Modal --- */
#art-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(12, 3, 20, 0.94);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 1.5rem;
  box-sizing: border-box;
}

#art-lightbox.lightbox-active {
  opacity: 1;
  visibility: visible;
}

#art-lightbox img {
  max-width: min(92vw, 850px);
  max-height: 86vh;
  object-fit: contain;
  border: 3px solid gold;
  border-radius: 12px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85);
  transform: scale(0.95);
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#art-lightbox.lightbox-active img {
  transform: scale(1);
}

#lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #F2D770;
  font-size: 2.2rem;
  font-family: sans-serif;
  cursor: pointer;
  background: rgba(55, 14, 85, 0.8);
  border: 1px solid rgba(242, 215, 112, 0.5);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
}

#lightbox-close:hover {
  color: #fff;
  background: #731ea6;
  transform: scale(1.1);
}

/* --- 6. Mobile & Small Screen Adaptations (<= 980px / 736px / 480px) --- */
@media screen and (max-width: 980px) {
  #header {
    display: none !important;
  }
  
  /* Mobile TitleBar */
  #titleBar {
    background: rgba(20, 6, 32, 0.97) !important;
    border-bottom: 1px solid rgba(242, 215, 112, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6) !important;
    height: 52px !important;
    line-height: 52px !important;
  }
  
  #titleBar .title {
    color: #F2D770 !important;
    font-family: 'Blippo', fantasy, sans-serif !important;
    font-size: 1.2rem !important;
    letter-spacing: 1px !important;
  }
  
  #titleBar .toggle {
    height: 52px !important;
    width: 60px !important;
  }
  
  #titleBar .toggle:before {
    background: rgba(55, 14, 85, 0.85) !important;
    color: #F2D770 !important;
  }
  
  /* Mobile Slideout Nav Panel */
  #navPanel {
    background: #150524 !important;
    border-right: 1px solid rgba(242, 215, 112, 0.3) !important;
  }
  
  #navPanel nav a {
    color: #F2D770 !important;
    font-family: 'Blippo', fantasy, sans-serif !important;
    font-size: 1.15rem !important;
    padding: 0.8em 1.2em !important;
    border-bottom: 1px solid rgba(223, 184, 254, 0.15) !important;
  }
  
  #navPanel nav a:hover {
    color: #fff !important;
    background: rgba(75, 18, 115, 0.45) !important;
  }
}

@media screen and (max-width: 736px) {
  /* Scroller tuning for phones */
  .scroller {
    padding: 10px 10px 20px 10px !important;
    gap: 12px !important;
  }
  
  .scroller img {
    height: 32vh !important;
    max-height: 270px !important;
    min-height: 180px !important;
    max-width: 78vw !important;
    border-radius: 10px !important;
  }
  
  .mySlides {
    max-width: 86vw !important;
    max-height: 36vh !important;
    border-radius: 10px !important;
  }
  
  /* Responsive Banner */
  #banner {
    padding: 5.5em 1.2em 3.5em 1.2em !important;
  }
  
  #banner header h2 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.2 !important;
  }
  
  #banner header h3 {
    font-size: clamp(1.2rem, 5vw, 1.8rem) !important;
  }
  
  /* Responsive Spotlights & Text */
  .spotlight .content {
    padding: 2.2em 1.2em !important;
  }
  
  .spotlight .content header h2 {
    font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
  }
  
  /* Action buttons */
  button, .button {
    width: 100% !important;
    max-width: 320px !important;
    height: 52px !important;
    font-size: 1.05rem !important;
    margin: 15px auto !important;
    display: block !important;
  }
}

@media screen and (max-width: 480px) {
  .scroller img {
    height: 28vh !important;
    max-height: 230px !important;
    max-width: 80vw !important;
  }
  
  .mySlides {
    max-width: 88vw !important;
    max-height: 32vh !important;
  }
}
