/* ============================================
   LUVASTAV - Custom Styles
   Design: Dark & Premium | Construction
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #C4853C;
  --secondary: #1A1A1A;
  --accent: #D4A04A;
  --dark: #0F0F0F;
  --light: #FAF7F2;
  --text: #E8E2DA;
  --text-light: #9A938B;
  --text-dark: #2A2A2A;
}

/* --- Base --- */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

::selection {
  background: var(--primary);
  color: white;
}

/* --- Sections with GSAP slide animations --- */
#about_1,
#services_1,
#features_1,
#whyus_1,
#testimonials_1,
#faq_1,
#contact_1 {
  overflow-x: hidden;
}

/* --- Navbar --- */
#navbar {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

#navbar.scrolled {
  background: rgba(15, 15, 15, 0.95);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-link {
  position: relative;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* --- Mobile Menu --- */
#mobile-menu {
  background: var(--dark);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.mobile-open .burger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.mobile-open .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-open .burger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-link {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: white;
  transition: color 0.3s ease, transform 0.3s ease;
  padding: 0.25rem 0;
}

.mobile-link:hover {
  color: var(--primary);
  transform: translateX(8px);
}

/* --- Hero --- */
.hero-bg-img {
  -webkit-filter: saturate(0.8);
  filter: saturate(0.8);
}

/* Hero featured image - float animation */
.hero-featured-frame {
  animation: heroFloat 6s ease-in-out infinite;
}

.hero-featured-img {
  animation: heroImgZoom 15s ease-in-out infinite alternate;
}

@keyframes heroFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes heroImgZoom {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.06);
  }
}

/* On mobile, limit featured image size */
@media (max-width: 1023px) {
  .hero-featured-container {
    max-width: 600px;
    margin: 0 auto;
  }
  
 .hero-featured-container .hero-featured-img {
    aspect-ratio: 1 / 1;
  }
 
}

@media (max-width: 480px) {
  .hero-featured-container {
    max-width: 180px;
  }
}

.hero-content h1 .highlight {
  color: var(--primary);
}

/* --- Services Edge Glow --- */
.services-glow {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.services-glow-left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  background: linear-gradient(to right, rgba(196, 133, 60, 0.2), rgba(212, 160, 74, 0.06), transparent);
}

.services-glow-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  background: linear-gradient(to left, rgba(196, 133, 60, 0.2), rgba(212, 160, 74, 0.06), transparent);
}

.services-glow-top {
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(212, 160, 74, 0.15), rgba(196, 133, 60, 0.04), transparent);
}

.services-glow-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to top, rgba(212, 160, 74, 0.15), rgba(196, 133, 60, 0.04), transparent);
}

/* --- Light Section Edge Glow (grey) --- */
.light-glow {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.light-glow-left {
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05), transparent);
}

.light-glow-right {
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05), transparent);
}

.light-glow-top {
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.03), transparent);
}

.light-glow-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.03), transparent);
}

/* --- Gridline Background --- */
.section-gridlines::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* --- Service Zigzag --- */
.service-zigzag {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  background: var(--secondary);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.4s ease;
  max-width: 75%;
}

.service-zigzag:hover {
  border-color: rgba(196, 133, 60, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Odd cards — left aligned */
.service-zigzag:nth-child(odd) {
  margin-right: auto;
  margin-left: 0;
}

/* Even cards — right aligned */
.service-zigzag:nth-child(even) {
  margin-left: auto;
  margin-right: 0;
}

.service-zigzag-reverse .service-zigzag-img {
  order: 2;
}

.service-zigzag-reverse .service-zigzag-content {
  order: 1;
}

.service-zigzag-img {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.service-zigzag-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.service-zigzag:hover .service-zigzag-img img {
  transform: scale(1.05);
}

.service-number-overlay {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  transition: color 0.4s ease;
}

.service-zigzag:hover .service-number-overlay {
  color: rgba(196, 133, 60, 0.25);
}

.service-number-mobile {
  display: none;
}

.service-zigzag-content {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-zigzag-reverse .service-zigzag-content {
  padding: 1.5rem 2rem;
}

@media (max-width: 768px) {
  .service-zigzag {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 100%;
  }

  .service-zigzag-img {
    aspect-ratio: 16 / 10;
    width: 100%;
  }

  /* Always image on top, text below on mobile */
  .service-zigzag-img {
    order: -1 !important;
  }

  .service-zigzag-content {
    order: 1 !important;
  }

  .service-zigzag-reverse .service-zigzag-img {
    order: -1 !important;
  }

  .service-zigzag-reverse .service-zigzag-content {
    order: 1 !important;
    padding: 1.5rem;
  }

  .service-zigzag-content {
    padding: 1.5rem;
    text-align: center;
  }

  .service-number-overlay {
    display: none;
  }

  .service-number-mobile {
    display: block;
    font-family: 'Archivo', sans-serif;
    font-weight: 900;
    font-size: 2rem;
    color: rgba(196, 133, 60, 0.2);
    margin-bottom: 0.5rem;
  }
}

/* --- Features Cards (white bg section) --- */
.feature-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.4s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
  border-color: rgba(196, 133, 60, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.feature-card h3 {
  color: var(--text-dark);
}

.feature-card p {
  color: #6b7280;
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  background: rgba(196, 133, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: background 0.3s ease;
}

.feature-card:hover .feature-icon {
  background: rgba(196, 133, 60, 0.2);
}

/* --- Gallery --- */
.gallery-card {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.gallery-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.gallery-card:hover img {
  transform: scale(1.08);
}

.gallery-card .gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 15, 0.8) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.gallery-caption {
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  transform: translateY(10px);
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-caption {
  transform: translateY(0);
}

.gallery-category {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
  transform: translateY(10px);
  transition: transform 0.4s ease 0.05s;
}

.gallery-card:hover .gallery-category {
  transform: translateY(0);
}

/* --- Why Us Checklist (white bg section) --- */
.whyus-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.whyus-item:hover {
  border-color: rgba(196, 133, 60, 0.3);
  transform: translateX(4px);
  background: rgba(196, 133, 60, 0.03);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.whyus-item h4 {
  color: var(--text-dark);
}

.whyus-item p {
  color: #6b7280;
}

.whyus-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(196, 133, 60, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  shrink: 0;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Testimonials Speech Bubbles --- */
.testimonial-bubble {
  position: relative;
  background: var(--secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 1rem;
  padding: 2rem;
  max-width: 85%;
  transition: all 0.3s ease;
}

.testimonial-bubble:hover {
  border-color: rgba(196, 133, 60, 0.15);
}

.testimonial-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 20px;
  height: 20px;
  background: var(--secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  transform: rotate(45deg);
}

.testimonial-bubble:hover::after {
  border-color: rgba(196, 133, 60, 0.15);
}

.testimonial-left .testimonial-bubble::after {
  left: 2rem;
}

.testimonial-right .testimonial-bubble {
  margin-left: auto;
}

.testimonial-right .testimonial-bubble::after {
  right: 2rem;
  left: auto;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-left: 0.5rem;
}

.testimonial-right .testimonial-author {
  justify-content: flex-end;
  padding-right: 0.5rem;
  padding-left: 0;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(196, 133, 60, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

.testimonial-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 0.75rem;
}

.testimonial-stars svg {
  width: 16px;
  height: 16px;
  fill: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  .testimonial-bubble {
    max-width: 100%;
  }
}

/* --- FAQ Accordion --- */
.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: rgba(196, 133, 60, 0.2);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  transition: background 0.3s ease;
}

.faq-question:hover {
  background: rgba(196, 133, 60, 0.04);
}

.faq-question[aria-expanded="true"] {
  background: rgba(196, 133, 60, 0.06);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

/* --- CTA Section --- */
#cta_1 img {
  -webkit-filter: saturate(0.6);
  filter: saturate(0.6);
}

/* --- Contact Form --- */
#contact-form input:focus,
#contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 133, 60, 0.15);
}

/* --- About Features --- */
.about-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: rgba(196, 133, 60, 0.06);
  border: 1px solid rgba(196, 133, 60, 0.1);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.about-feature:hover {
  background: rgba(196, 133, 60, 0.12);
  transform: translateX(4px);
}

/* --- Scroll to Top --- */
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* --- Stat Counter --- */
.stat-item {
  text-align: center;
}

.stat-value {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  line-height: 1.3;
}

/* --- Decorative Accent Line --- */
.accent-line {
  width: 4rem;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .gallery-card:hover img {
    transform: none !important;
  }

  .service-zigzag:hover,
  .feature-card:hover,
  .about-feature:hover,
  .whyus-item:hover {
    transform: none !important;
  }
}

/* --- GLightbox Customization --- */
.glightbox-clean .gslide-description {
  background: var(--dark);
}

.glightbox-clean .gslide-title {
  font-family: 'Archivo', sans-serif;
  color: white;
}

/* ============================================
   RESPONSIVE FIXES
   ============================================ */

/* --- Tablet & below (≤ 1024px) --- */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .services-glow-left,
  .services-glow-right {
    width: 140px;
  }
}

/* --- Mobile (≤ 768px) --- */
@media (max-width: 768px) {
  .nav-link {
    font-size: 0.8rem;
  }

  .mobile-link {
    font-size: 1.5rem;
  }

  /* Testimonials full width on mobile */
  .testimonial-right .testimonial-bubble {
    margin-left: 0;
  }

  .testimonial-right .testimonial-author {
    justify-content: flex-start;
    padding-left: 0.5rem;
    padding-right: 0;
  }

  /* Gallery overlay always visible on touch */
  .gallery-card .gallery-overlay {
    opacity: 1;
  }
}

/* --- Small phones (≤ 480px) --- */
@media (max-width: 480px) {
  /* Hero */
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }

  /* Hero stats: tighter */
  .stat-value {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.65rem;
  }

  #hero-stats {
    gap: 0.75rem;
  }

  /* Hero CTAs: stack vertically */
  #hero_1 .flex.flex-wrap {
    flex-direction: column;
  }

  #hero_1 .flex.flex-wrap a {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Section headings smaller */
  section h2 {
    font-size: 1.75rem !important;
  }

  /* About images */
  .about-images .grid {
    gap: 0.5rem;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  /* Service zigzag cards */
  .service-zigzag-img {
    max-height: 260px;
  }

  .service-zigzag-content {
    padding: 1.25rem;
  }

  .service-zigzag-content h3 {
    font-size: 1.1rem;
  }

  .service-number-mobile {
    font-size: 1.5rem;
  }

  /* Why Us items */
  .whyus-item {
    padding: 1rem 1.25rem;
  }

  .whyus-item h4 {
    font-size: 1rem;
  }

  /* Testimonials */
  .testimonial-bubble {
    padding: 1.25rem;
  }

  /* Feature cards */
  .feature-card {
    padding: 1.25rem;
  }

  /* Contact form */
  #contact_1 .bg-light {
    padding: 1.25rem;
  }

  /* CTA banner */
  #cta_1 h2 {
    font-size: 1.5rem !important;
  }

  #cta_1 a {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  /* Glow effects smaller */
  .services-glow-left,
  .services-glow-right {
    width: 80px;
  }

  .services-glow-top,
  .services-glow-bottom {
    height: 80px;
  }

  /* Scroll top button */
  #scroll-top {
    width: 40px;
    height: 40px;
    bottom: 1rem;
    right: 1rem;
  }

  /* Footer */
  #footer_1 .grid {
    gap: 2rem;
  }
}

/* --- Very small screens (< 350px) --- */
@media (max-width: 350px) {
  /* Tighten all container padding */
  .max-w-7xl,
  .max-w-5xl,
  .max-w-4xl,
  .max-w-3xl,
  .max-w-2xl {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Navbar */
  #navbar > div {
    height: 3.5rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .nav-logo {
    font-size: 1.25rem !important;
  }

  /* Hero */
  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-content p {
    font-size: 0.85rem;
  }

  /* Hero stats: single column */
  #hero-stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    max-width: 100%;
  }

  .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.5rem;
  }

  .stat-item:first-child {
    border-top: none;
    padding-top: 0;
  }

  .stat-value {
    font-size: 1.25rem;
    min-width: auto;
  }

  .stat-label {
    font-size: 0.65rem;
    margin-top: 0;
  }

  /* Section headings even smaller */
  section h2 {
    font-size: 1.4rem !important;
  }

  /* About images stack single col */
  .about-images .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  /* About standalone image */
  .about-images .max-h-\[500px\] {
    max-height: 240px;
  }

  /* Service cards */
  .service-zigzag-img {
    max-height: 200px;
  }

  .service-zigzag-content {
    padding: 1rem;
  }

  .service-zigzag-content h3 {
    font-size: 1rem;
  }

  .service-zigzag-content p {
    font-size: 0.8rem;
  }

  /* Contact — break long values */
  #contact_1 a,
  #contact_1 p {
    word-break: break-all;
  }

  #contact_1 .bg-light {
    padding: 1rem;
  }

  #contact_1 input,
  #contact_1 textarea {
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
  }

  /* CTA */
  #cta_1 h2 {
    font-size: 1.25rem !important;
  }

  #cta_1 p {
    font-size: 0.85rem;
  }

  /* Scroll top + glow */
  #scroll-top {
    width: 36px;
    height: 36px;
    bottom: 0.75rem;
    right: 0.75rem;
  }

  .services-glow-left,
  .services-glow-right {
    width: 40px;
  }

  .services-glow-top,
  .services-glow-bottom {
    height: 40px;
  }

  /* Why Us */
  .whyus-item {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .whyus-check {
    width: 24px;
    height: 24px;
  }

  /* Testimonials */
  .testimonial-bubble {
    padding: 1rem;
  }

  .testimonial-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.8rem;
  }

  /* Footer */
  #footer_1 .grid {
    gap: 1.5rem;
  }
}