/* 
   Advance Home Decor - Main Stylesheet
   Theme: Modern Classic (Affordable Luxury)
*/

:root {
  /* Brand Palette */
  --color-navy: #1B2A47;
  --color-gold: #D4AF37;
  --color-soft-black: #1A1A1A;
  --color-ash-gray: #F4F4F4;
  --color-pearl-white: #FDFDFD;
  --color-pure-white: #FFFFFF;
  
  /* UI Rules */
  --radius-sm: 4px;
  --shadow-diffuse: 0 10px 30px rgba(0, 0, 0, 0.05);
  --transition-smooth: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  background-color: var(--color-pearl-white);
  color: var(--color-soft-black);
  font-family: 'Outfit', sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Fraunces', serif;
}

/* Global Component Styles */
.btn-primary {
  background-color: var(--color-gold);
  color: var(--color-soft-black);
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-diffuse);
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--color-pure-white);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--color-navy);
  color: var(--color-navy);
  padding: 1rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-secondary:hover {
  background-color: var(--color-navy);
  color: var(--color-pure-white);
}

/* Images & Hover Effects */
.img-rounded {
  border-radius: var(--radius-sm);
}

.img-hover-scale {
  transition: transform var(--transition-smooth);
}

.img-container:hover .img-hover-scale {
  transform: scale(1.03);
}

/* Project Gallery Specifics */
#portfolio {
  background-color: var(--color-pearl-white);
}

.filter-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-link {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-navy);
  cursor: pointer;
  position: relative;
  padding-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.filter-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-gold);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-link.active {
  color: var(--color-gold);
}

.filter-link.active::after {
  width: 100%;
}

/* Gallery Grid - Bento / Centered Logic */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-flow: dense;
  gap: 1.5rem;
  width: 100%;
  justify-content: center; /* Centers items when not filling a row */
}

/* Mobile Dropdown */
.mobile-dropdown-content {
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  width: 100%;
}

.mobile-dropdown-content.active {
  max-height: 500px;
  opacity: 1;
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

.mobile-dropdown-link {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
  font-family: var(--font-heading);
  transition: all 0.3s ease;
  letter-spacing: 0.02em;
}

.mobile-dropdown-link:last-child {
  margin-bottom: 1rem;
}

.mobile-dropdown-link:hover {
  color: var(--color-gold);
}

.mobile-dropdown-btn {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Bento Mode Spanning */
.gallery-grid.bento-mode {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
}

.gallery-item {
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--color-ash-gray);
  transition: transform 0.6s ease;
}

/* Bento Spans (Only active in bento-mode) */
.gallery-grid.bento-mode .span-2 {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery-grid.bento-mode .span-row-2 {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-out, transform 0.6s ease;
}

.gallery-item img.loaded {
  opacity: 1;
}

.gallery-item video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img, .gallery-item:hover video {
  transform: scale(1.03);
}

/* Responsive Grid */
@media (max-width: 1280px) {
  .gallery-grid.bento-mode {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1023px) {
  .gallery-grid.bento-mode {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639px) {
  .gallery-grid, .gallery-grid.bento-mode {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .gallery-item {
    aspect-ratio: 1/1;
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .gallery-item img, .gallery-item video {
    height: 100%;
  }

  .gallery-item:hover img, .gallery-item:hover video {
    transform: none;
  }
}

/* Lightbox */
.lightbox {
  @apply backdrop-blur-md;
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  max-height: 90%;
  pointer-events: none;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  border-radius: 4px;
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  opacity: 0;
}

.lightbox.active .lightbox-content {
  transform: scale(1);
  opacity: 1;
}

.lightbox-content.switching {
  opacity: 0;
  transform: scale(0.95);
}

#lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  max-width: 85%;
  width: max-content;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  z-index: 1002;
}

@media (max-width: 640px) {
  #lightbox-caption {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
    bottom: 12px;
    max-width: 90%;
  }
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 2rem;
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 1001;
}

.lightbox-btn {
  width: 4rem;
  height: 4rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-btn:hover {
  background: var(--color-gold);
  color: var(--color-soft-black);
  border-color: var(--color-gold);
  transform: scale(1.1);
}

.lightbox-btn svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 768px) {
  .lightbox-nav {
    padding: 0 1rem;
    top: auto;
    bottom: 2rem;
    transform: none;
    justify-content: center;
    gap: 2rem;
  }
  
  .lightbox-btn {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* Reveal-on-Scroll Base */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Custom UI: Before/After Slider */
input[type="range"].ba-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

input[type="range"].ba-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 48px;
  height: 48px;
  cursor: pointer;
  background: transparent;
}

/* Utilities */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Glassmorphism */
.glass-header {
  background: rgba(27, 42, 71, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Footer Logo Alignment Fix */
.ml--10 {
  margin-left: -0.875rem; /* Precise shift to align visual "A" with text start */
  margin-top: -1.85rem;   /* Subtle shift to compensate for image whitespace */
}

@media (max-width: 768px) {
  .ml--10 {
    margin-left: -0.5rem;
    margin-top: -1.25rem; /* Proportional shift for smaller logo on mobile */
  }
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
  background-color: #20ba5a;
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
}

.whatsapp-tooltip {
  position: absolute;
  right: 80px;
  background: var(--color-navy);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--color-navy);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* WhatsApp Hiring Popup (Positioned Above) */
.whatsapp-hiring-popup {
  position: fixed;
  bottom: 105px;
  right: 30px;
  width: 240px;
  background: white;
  border-radius: 12px 12px 0 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  cursor: pointer;
  z-index: 1001;
  text-align: left;
  line-height: normal;
  text-decoration: none;
}

.whatsapp-hiring-popup:hover {
  border-color: #128c7e;
  box-shadow: 0 15px 35px rgba(18, 140, 126, 0.2);
  transform: translateY(-2px);
}

/* Arrow pointing down */
.whatsapp-hiring-popup::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: -8px;
  border-top: 8px solid white;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
}

/* Header style like WhatsApp */
.hiring-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.hiring-popup-title {
  color: #075E54;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hiring-popup-time {
  color: #999;
  font-size: 10px;
}

.hiring-popup-body {
  color: #333;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.hiring-popup-link {
  color: #075E54;
  font-weight: 700;
  text-decoration: underline;
  display: inline-block;
  margin-top: 4px;
  transition: color 0.2s;
}

.whatsapp-hiring-popup:hover .hiring-popup-link {
  color: #128c7e;
}

/* Close button style */
.hiring-popup-close {
  position: absolute;
  top: 6px;
  right: 8px;
  color: #bbb;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.hiring-popup-close:hover {
  color: #666;
  background: rgba(0,0,0,0.05);
}

/* Programmatic activation */
.whatsapp-hiring-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Hover activation via sibling hover */
.whatsapp-float:hover + .whatsapp-hiring-popup {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Keep visible when hovering over popup itself */
.whatsapp-hiring-popup:hover {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-icon {
    width: 28px;
    height: 28px;
  }

  .whatsapp-tooltip {
    display: none; /* Hide tooltip on mobile to avoid clutter */
  }

  .whatsapp-hiring-popup {
    bottom: 85px;
    right: 20px;
    width: 210px;
    padding: 10px 12px;
  }
  
  .whatsapp-hiring-popup::after {
    right: 15px;
  }
}
/* Social Icons Hover Colors */
.social-icon.instagram:hover { color: #E1306C; }
.social-icon.facebook:hover { color: #1877F2; }
.social-icon.youtube:hover { color: #FF0000; }
.social-icon.linkedin:hover { color: #0A66C2; }

/* Enhanced Hero Overlay for Contrast */
.hero-contrast-text {
  text-shadow: 0 2px 15px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.9);
}


/* Notification Styles */
#nav-notification-dot.show,
#mobile-notification-dot.show {
  scale: 1;
}

#notification-popup.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

#notification-popup::after {
  content: '';
  position: absolute;
  top: -6px;
  left: var(--arrow-x, 80%);
  width: 12px;
  height: 12px;
  background: white;
  transform: translateX(-50%) rotate(45deg);
  border-left: 1px solid rgba(212, 175, 55, 0.1);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
}

@keyframes bell-shake {
  0%, 100% { transform: rotate(0); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(10deg); }
  20%, 40%, 60%, 80% { transform: rotate(-10deg); }
}

.bell-animate {
  animation: bell-shake 0.8s cubic-bezier(.36,.07,.19,.97) both;
}

/* Navigation Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-pure-white);
  min-width: 220px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  padding: 0.75rem 0;
  border: 1px solid rgba(27, 42, 71, 0.05);
  margin-top: 1rem;
}

.nav-dropdown:hover .nav-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Arrow for dropdown */
.nav-dropdown-content::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px;
  height: 12px;
  background: var(--color-pure-white);
  border-left: 1px solid rgba(27, 42, 71, 0.05);
  border-top: 1px solid rgba(27, 42, 71, 0.05);
}

.nav-dropdown-link {
  display: block;
  padding: 0.875rem 1.5rem;
  color: var(--color-navy);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav-dropdown-link:hover {
  background: var(--color-ash-gray);
  color: var(--color-gold);
  border-left-color: var(--color-gold);
  padding-left: 1.75rem;
}

/* Custom Premium Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-ash-gray);
}

::-webkit-scrollbar-thumb {
  background: var(--color-navy);
  border: 2px solid var(--color-ash-gray);
  border-radius: 9999px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold);
}

/* Firefox Scrollbar Support */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-navy) var(--color-ash-gray);
}

/* Custom Text Selection Effect */
::selection {
  background-color: var(--color-gold);
  color: var(--color-navy);
}

::-moz-selection {
  background-color: var(--color-gold);
  color: var(--color-navy);
}

/* Disable scroll reveal animations on mobile to prevent scrolling jankiness */
@media (max-width: 768px) {
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}



