/* 
  Ruhaani Art – Design System
  Built on top of Bootstrap 5
*/

:root {
  --gold: #C9A84C;
  --black: #0A0A0A;
  --white: #FFFFFF;
  --beige: #F9F7F2;
  --dark-gold: #A68A3E;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lato', sans-serif;
  color: var(--black);
  background: var(--white);
}



h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
}

/* === UTILITIES === */
.text-gold {
  color: var(--gold);
}

.bg-gold {
  background-color: var(--gold);
}

.bg-gold-subtle {
  background-color: rgba(201, 168, 76, 0.15);
}

.tracking-widest {
  letter-spacing: 0.2rem;
}

.transition-all {
  transition: var(--transition);
}

.section-padding {
  padding: 70px 0;
}

.object-fit-cover {
  object-fit: cover;
}

.hover-lift {
  transition: var(--transition);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* === RESPONSIVE === */
/* === RESPONSIVE & MOBILE MENU === */
@media (max-width: 991px) {
  .section-padding {
    padding: 50px 0;
  }

  .navbar {
    background: rgba(0, 0, 0, 0.98) !important;
    padding: 10px 0 !important;
    max-width: 100vw;
    overflow: hidden;
  }

  .nav-logo img {
    height: 60px !important;
  }

  /* Typography Scaling */
  .display-1 {
    font-size: 3rem !important;
  }

  .display-2 {
    font-size: 2.5rem !important;
  }

  .display-3 {
    font-size: 2.2rem !important;
  }

  .display-4 {
    font-size: 2rem !important;
  }

  .display-5 {
    font-size: 1.8rem !important;
  }

  .section-title {
    font-size: 2rem !important;
  }

  .hero-title {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  .hero-desc {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.5 !important;
  }

  .hero-tag {
    font-size: 0.75rem !important;
    margin-bottom: 1rem !important;
    letter-spacing: 3px !important;
  }

  /* Full Screen Overlay Menu */
  .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(15px);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    transform: translateX(100%);
    z-index: 1040;
    padding: 80px 20px;
    visibility: hidden;
  }

  .navbar-collapse.show {
    transform: translateX(0);
    visibility: visible;
  }

  .navbar-nav {
    width: 100%;
    text-align: center;
  }

  .navbar-nav .nav-item {
    margin: 8px 0 !important;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
  }

  .navbar-collapse.show .navbar-nav .nav-item {
    opacity: 1;
    transform: translateY(0);
  }

  /* Staggered Entrance */
  .navbar-collapse.show .navbar-nav .nav-item:nth-child(1) {
    transition-delay: 0.2s;
  }

  .navbar-collapse.show .navbar-nav .nav-item:nth-child(2) {
    transition-delay: 0.25s;
  }

  .navbar-collapse.show .navbar-nav .nav-item:nth-child(3) {
    transition-delay: 0.3s;
  }

  .navbar-collapse.show .navbar-nav .nav-item:nth-child(4) {
    transition-delay: 0.35s;
  }

  .navbar-collapse.show .navbar-nav .nav-item:nth-child(5) {
    transition-delay: 0.4s;
  }

  .navbar-collapse.show .navbar-nav .nav-item:nth-child(6) {
    transition-delay: 0.45s;
  }

  .navbar-collapse.show .navbar-nav .nav-item:nth-child(7) {
    transition-delay: 0.5s;
  }


  .navbar-nav .nav-link {
    font-size: 1.5rem !important;
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px !important;
    color: var(--white) !important;
  }

  .navbar-nav .nav-link.active {
    color: var(--gold) !important;
  }

  .navbar-nav .nav-link::after {
    display: none !important;
  }


  /* Custom Animated Hamburger */
  .navbar-toggler {
    z-index: 1050;
    position: relative;
    padding: 0;
    width: 32px;
    height: 22px;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
  }

  .navbar-toggler-icon {
    display: none;
  }

  .navbar-toggler::before,
  .navbar-toggler::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background: var(--gold);
    left: 0;
    transition: all 0.3s ease;
  }

  .navbar-toggler::before {
    top: 0;
    box-shadow: 0 9px 0 var(--gold);
  }

  .navbar-toggler::after {
    bottom: 0;
  }

  .navbar-toggler:not(.collapsed)::before {
    transform: translateY(9px) rotate(45deg);
    box-shadow: none;
    background: var(--gold);
  }

  .navbar-toggler:not(.collapsed)::after {
    transform: translateY(-9px) rotate(-45deg);
    background: var(--gold);
  }

  #heroCarousel,
  .hero-static {
    height: auto !important;
    min-height: 450px !important;
    padding: 0 !important;
  }

  .carousel-item,
  .hero-static {
    height: auto !important;
    min-height: 400px !important;
    padding: 100px 20px 60px 20px !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .carousel-item {
    min-height: 480px !important;
  }

  .carousel-item {
    min-height: 500px !important;
    /* Increased for better content fit */
  }

  .carousel-caption {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 45px !important;
    /* Added padding to clear arrows */
    margin: 0 !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  div.carousel-caption div.d-flex.gap-3 {
    flex-direction: column !important;
    align-items: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  div.carousel-caption div.d-flex.gap-3 a.btn {
    width: 100% !important;
    max-width: 260px !important;
    margin: 0 !important;
    padding: 12px 20px !important;
  }
}


.btn-gold {
  background: var(--gold) !important;
  border: 1px solid var(--gold) !important;
  color: var(--black) !important;
  border-radius: 0;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-gold:hover {
  background: var(--black) !important;
  border-color: var(--gold) !important;
  color: var(--gold) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(201, 168, 76, 0.3);
}

.navbar-nav .btn-gold {
  padding: 10px 25px !important;
  margin-top: 5px;
  line-height: 1;
}


.btn-outline-light {
  border-radius: 0;
  border-width: 2px;
}

/* === PRELOADER === */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--black);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  font-family: 'Playfair Display', serif;
  color: var(--gold);
  font-size: 2.5rem;
  letter-spacing: 5px;
  animation: pulse 2s infinite;
}

.preloader-line {
  position: absolute;
  bottom: 40%;
  width: 0;
  height: 1px;
  background: var(--gold);
  animation: lineGrow 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

@keyframes lineGrow {
  0% {
    width: 0;
    left: 50%;
  }

  50% {
    width: 100px;
    left: calc(50% - 50px);
  }

  100% {
    width: 0;
    left: 50%;
  }
}

/* === NAVBAR === */
.transition-nav {
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95) !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 10px;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: calc(100% - 20px);
}

.hover-gold:hover {
  color: var(--gold) !important;
}

/* === HERO CAROUSEL === */
#heroCarousel {
  height: 700px;
  min-height: 700px;
}

.carousel-item {
  height: 700px;
  min-height: 700px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.4);
  transform: scale(1.1);
  transition: transform 10s ease;
}

.carousel-item.active .hero-bg,
.hero-static.active .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(201, 168, 76, 0.1) 100%);
}

.hero-tag {
  letter-spacing: 5px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.0rem, 4vw, 5rem);
  line-height: 1.1;
  margin-bottom: 2rem;
}

.hero-title em {
  color: var(--gold);
  font-style: italic;
}

.hero-desc {
  max-width: 700px;
  opacity: 0.8;
  margin-bottom: 3rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

/* --- ENTRY ANIMATIONS --- */
.carousel-item .hero-tag,
.carousel-item .hero-title,
.carousel-item .hero-desc,
.carousel-item .d-flex,
.hero-static .hero-tag,
.hero-static .hero-title,
.hero-static .hero-desc {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.carousel-item.active .hero-tag,
.hero-static.active .hero-tag {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

.carousel-item.active .hero-title,
.hero-static.active .hero-title {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

.carousel-item.active .hero-desc,
.hero-static.active .hero-desc {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.7s;
}

.carousel-item.active .d-flex,
.hero-static.active .d-flex {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.9s;
}

/* Fix overlapping during fade */
.carousel-fade .carousel-item {
  opacity: 0;
  transition-duration: 0.8s;
  transition-property: opacity;
}

.carousel-fade .carousel-item.active,
.carousel-fade .carousel-item-next.carousel-item-start,
.carousel-fade .carousel-item-prev.carousel-item-end {
  opacity: 1;
  z-index: 1;
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
  opacity: 0;
  z-index: 0;
  transition: opacity 0s 0.8s;
}

/* Hide content immediately when slide is not active */
.carousel-item:not(.active) .carousel-caption {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.carousel-item.active .carousel-caption {
  opacity: 1 !important;
  visibility: visible !important;
}

/* === SECTION HEADERS === */
.section-subtitle {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 5px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 25px;
}

.gold-line {
  width: 80px;
  height: 2px;
  background: var(--gold);
}

.gold-line.mx-auto {
  margin-bottom: 40px;
}

/* === ARTWORK CARDS === */
.artwork-card {
  position: relative;
  transition: var(--transition);
}

.artwork-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.artwork-card img {
  transition: transform 0.8s ease;
}

.artwork-card:hover img {
  transform: scale(1.1);
}

.artwork-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.artwork-card:hover .artwork-overlay {
  opacity: 1;
}

.view-btn {
  padding: 12px 30px;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 2px;
  font-size: 0.75rem;
  transform: translateY(20px);
  transition: var(--transition);
  cursor: pointer;
}

.artwork-card:hover .view-btn {
  transform: translateY(0);
}

.artwork-info h3 {
  transition: color 0.3s ease;
}

.artwork-card:hover .artwork-info h3 {
  color: var(--gold);
}

/* === CATEGORY CARDS === */
.cat-card .cat-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1s ease;
}

.cat-card:hover .cat-bg {
  transform: scale(1.15);
}

.cat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
}

.cat-content {
  position: relative;
  z-index: 1;
}

/* === REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease-out;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 1s ease-out;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* === RESPONSIVE === */

/* === FOOTER ENHANCEMENTS === */
#footer {
  color: #e0e0e0 !important;
}

#footer .text-muted,
#footer .list-unstyled a.text-muted,
#footer a.text-muted {
  color: rgba(255, 255, 255, 0.65) !important;
  transition: var(--transition);
}

#footer a.text-muted:hover,
#footer .hover-gold:hover {
  color: var(--gold) !important;
}

#footer h4 {
  color: var(--gold);
  margin-bottom: 25px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

#footer .social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7) !important;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

#footer .social-links a:hover {
  background: var(--gold);
  color: var(--black) !important;
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 10px 20px rgba(201, 168, 76, 0.3);
}

#footer .border-top {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* === LIGHTBOX MODAL === */
#lightboxModal .modal-content {
  background: transparent;
  border: none;
}

#lightboxModal .modal-body {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightboxModal .modal-header {
  border: none;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 10;
}

#lightboxModal .btn-close {
  filter: invert(1);
  background-color: var(--gold);
  opacity: 0.8;
  padding: 1rem;
  border-radius: 0;
}

#lightboxModal .lightbox-img {
  max-height: 90vh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

#lightboxModal .lightbox-caption {
  position: absolute;
  bottom: -50px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
}

/* Form Validation Styles */
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 0.25rem rgba(201, 168, 76, 0.25);
}

/* === GALLERY TABS === */
#galleryTabs {
  border: none;
}

#galleryTabs .nav-link {
  background: #f8f9fa;
  color: var(--black);
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
  text-transform: capitalize;
  font-size: 0.9rem;
  padding: 12px 24px !important;
  border-radius: 50px !important;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

#galleryTabs .nav-link.active {
  background: var(--gold) !important;
  color: var(--black) !important;
  border-color: var(--gold);
  box-shadow: 0 8px 20px rgba(201, 168, 76, 0.25);
}

#galleryTabs .nav-link:hover:not(.active) {
  background: #fff;
  border-color: var(--gold);
  color: var(--gold);
}

@media (max-width: 767px) {
  #galleryTabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: center !important;
    /* Center if they fit */
    padding: 15px 10px !important;
    margin-bottom: 25px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex !important;
  }

  #galleryTabs::-webkit-scrollbar {
    display: none;
  }

  #galleryTabs .nav-item {
    flex: 0 0 auto;
    margin: 0 4px !important;
  }

  #galleryTabs .nav-link {
    font-size: 0.85rem;
    padding: 10px 20px !important;
  }
}


.tab-content {
  min-height: 400px;
}

/* === SCROLL TO TOP === */
.scrollTop-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  border: 2px solid var(--white);
}

.scrollTop-btn:hover {
  background: var(--black) !important;
  color: var(--gold) !important;
  border-color: var(--gold);
  transform: translateY(-5px) scale(1.1);
}

.scrollTop-btn.active {
  opacity: 1 !important;
  visibility: visible !important;
  bottom: 20px !important;
}

@keyframes pulse-gold {
  0% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.7);
  }

  70% {
    box-shadow: 0 0 0 15px rgba(201, 168, 76, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0);
  }
}

.scrollTop-btn.active {
  animation: pulse-gold 2s infinite;
}