/* ===========================
   Alanya Tesisatçı - Custom CSS
   =========================== */

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #1e3a8a;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f97316;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulseSoft {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(249, 115, 22, 0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out;
}

.animate-slide-up {
  animation: slideUp 0.7s ease-out;
}

.animate-pulse-slow {
  animation: pulseSoft 2.5s ease-in-out infinite;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header scrolled state */
#site-header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Scroll-to-top visible */
#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* Line clamp helper (Tailwind alternative) */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.2s;
}

.lightbox-close:hover {
  background: #f97316;
  border-color: #f97316;
  transform: rotate(90deg);
}

/* Form focus ring */
input:focus, textarea:focus, select:focus {
  outline: none;
}

/* Details summary - hide default arrow */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}

/* FAQ animation */
details[open] summary ~ * {
  animation: slideUp 0.3s ease-out;
}

/* Emergency popup */
.emergency-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease-out;
}

.emergency-popup-overlay.active {
  display: flex;
}

.emergency-popup {
  background: white;
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s ease-out;
}

/* Mobile menu animation */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
  max-height: 600px;
}

/* Selection */
::selection {
  background: #f97316;
  color: white;
}

/* Print */
@media print {
  #site-header, footer, .fixed, .sticky {
    display: none !important;
  }
}
