/* ============================================
   SLTH STOLÁRSTVO - Custom Styles
   Design: Rustic & Craft
   Palette: Warm wood tones
   Typography: DM Serif Display + DM Sans
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --primary: #8B5E3C;
  --secondary: #2C1A0E;
  --accent: #C8984B;
  --dark: #1C1210;
  --light: #FAF7F2;
  --text: #3A2A1C;
  --text-light: #8C7A68;
  --cream: #F5EDE3;
  --sand: #E8DDD0;
  --wood: #6B4226;
}

/* --- Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: white;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--light);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* --- Overflow protection for sections with slide animations --- */
#about_1,
#services_1,
#contact_1 {
  overflow-x: hidden;
}

/* --- Navigation --- */
.nav-transparent {
  background: transparent;
}

.nav-transparent .nav-logo-text,
.nav-transparent .nav-link,
.nav-transparent .nav-menu-btn i {
  color: white;
}

.nav-scrolled {
  background: rgba(250, 247, 242, 0.97);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 20px rgba(44, 26, 14, 0.08);
}

.nav-scrolled .nav-logo-text,
.nav-scrolled .nav-link,
.nav-scrolled .nav-menu-btn i {
  color: var(--secondary);
}

.nav-link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  padding: 0.5rem 0;
}

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

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

.nav-link:hover {
  color: var(--accent) !important;
}

/* Mobile nav link */
.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--secondary);
  border-radius: 0.5rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-link:hover {
  background: var(--cream);
  color: var(--accent);
}

/* --- Hero --- */
.scroll-dot {
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0.3; }
}

/* --- Services Numbered List --- */
.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.4s ease;
  align-items: start;
}

.service-item:hover {
  padding-left: 1rem;
}

.service-number {
  font-family: 'DM Serif Display', serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(200, 152, 75, 0.15);
  transition: color 0.4s ease;
  min-width: 80px;
}

.service-item:hover .service-number {
  color: rgba(200, 152, 75, 0.4);
}

.service-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(200, 152, 75, 0.1);
  border-radius: 12px;
  margin-bottom: 1rem;
  transition: background 0.3s ease, transform 0.3s ease;
}

.service-item:hover .service-icon-wrap {
  background: rgba(200, 152, 75, 0.2);
  transform: scale(1.05);
}

/* --- Gallery --- */
.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  cursor: pointer;
  aspect-ratio: 4/3;
}

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

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

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

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

.gallery-overlay-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-card:hover .gallery-overlay-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* --- Video Gallery --- */
.video-card {
  border-radius: 1rem;
  background: white;
  box-shadow: 0 4px 20px rgba(44, 26, 14, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(44, 26, 14, 0.12);
}

/* Instagram blockquote embeds — keep Instagram's own min-width intact */
.video-card .instagram-media {
  margin: 0 auto !important;
  max-width: 100% !important;
  width: 100% !important;
}

.video-card iframe.instagram-media-rendered {
  max-width: 100% !important;
}

/* --- Contact Section --- */
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1rem;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(200, 152, 75, 0.3);
}

.contact-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(200, 152, 75, 0.15);
  border-radius: 10px;
  flex-shrink: 0;
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  outline: none;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(200, 152, 75, 0.15);
}

.form-input.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15);
}

.form-label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.form-error-msg {
  color: #e74c3c;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}

.form-input.error + .form-error-msg {
  display: block;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

.form-submit-btn {
  width: 100%;
  background: var(--accent);
  color: white;
  padding: 1rem 2rem;
  border-radius: 0.75rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.form-submit-btn:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

.form-submit-btn:active {
  transform: translateY(0);
}

.form-success {
  text-align: center;
  padding: 2rem;
  color: white;
}

/* --- Footer --- */
.footer-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9375rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: block;
}

.footer-link:hover {
  color: var(--accent);
  padding-left: 0.25rem;
}

/* --- Wood Grain Pattern (decorative) --- */
.wood-grain-pattern {
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 40px,
      rgba(200, 152, 75, 0.03) 40px,
      rgba(200, 152, 75, 0.03) 41px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 80px,
      rgba(200, 152, 75, 0.02) 80px,
      rgba(200, 152, 75, 0.02) 81px
    );
}

/* --- Stat Card --- */
.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--cream);
  border-radius: 1rem;
  transition: transform 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-light);
  font-weight: 500;
}

/* --- Floating Buttons --- */
#whatsapp-btn,
#scroll-top-btn {
  transition: opacity 0.4s ease, transform 0.3s ease;
}

#whatsapp-btn.visible,
#scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
  .service-item {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .service-number {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .stat-card {
    padding: 1rem 0.75rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .gallery-overlay {
    opacity: 1;
  }

  .gallery-overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .video-card .instagram-media {
    max-width: 100% !important;
  }
}

/* --- FAQ Accordion --- */
.faq-question:hover .faq-icon {
  background: var(--sand);
}

/* --- Small phone breakpoints --- */
@media (max-width: 480px) {
  .stat-value {
    font-size: 1.2rem;
  }

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

  .service-number {
    font-size: 2rem;
  }

  .gallery-overlay {
    opacity: 1;
  }

  .gallery-overlay-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 350px) {
  .contact-card {
    padding: 1rem;
    gap: 0.75rem;
  }

  .form-input {
    font-size: 0.875rem;
  }

  .faq-question span:first-child {
    font-size: 0.875rem;
  }
}

/* --- Prefers 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;
  }

  .scroll-dot {
    animation: none;
  }

  .gallery-card img {
    transition: none;
  }
}