/* ===== GÖRKEM EXPRESS — Custom Styles ===== */

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(249,115,22,0.4); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 12px rgba(249,115,22,0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(249,115,22,0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-fade-up   { animation: fadeInUp 0.6s ease both; }
.animate-fade-in   { animation: fadeIn 0.5s ease both; }
.animate-slide-right { animation: slideInRight 0.5s ease both; }
.pulse-ring        { animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite; }

/* Stagger delays */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-left.visible  { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ===== HERO ===== */
.hero-bg {
  background:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(135deg, #0F172A 0%, #1a2744 40%, #0F172A 100%);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-bg::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249,115,22,0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Grid pattern overlay — sadece bağımsız div'lerde kullanılmalı, hero-bg ile birleştirilmemeli */
.grid-overlay {
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== NAVBAR ===== */
.navbar-scrolled {
  box-shadow: 0 1px 20px rgba(0,0,0,0.08);
}

/* ===== CARDS ===== */
.service-card {
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.12);
}
.hero-service-card {
  transition: all 0.3s ease;
}
.hero-service-card:hover {
  transform: translateX(4px);
  border-color: rgba(249,115,22,0.5) !important;
}

/* ===== STEP INDICATOR ===== */
.step-line {
  position: absolute;
  top: 28px;
  left: calc(50% + 28px);
  width: calc(100% - 56px);
  height: 2px;
  background: linear-gradient(90deg, #F97316, #ea580c);
  opacity: 0.3;
}

/* ===== FORM ===== */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #E2E8F0;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #0F172A;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: #F97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.12);
}
.form-input::placeholder { color: #94A3B8; }
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}
.form-select { cursor: pointer; }

/* ===== STEP FORM ===== */
.step-btn { display: none; }
.step-btn.active { display: block; }
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeInUp 0.35s ease; }

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary { text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #F97316;
  color: #fff;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
}
.btn-primary:hover {
  background: #EA580C;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(249,115,22,0.3);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #0F172A;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  border: 1.5px solid #E2E8F0;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 0.9375rem;
}
.btn-secondary:hover {
  border-color: #F97316;
  color: #F97316;
  background: rgba(249,115,22,0.04);
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.badge-orange {
  background: rgba(249,115,22,0.1);
  color: #EA580C;
  border: 1px solid rgba(249,115,22,0.2);
}
.badge-dark {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== PRICING CARD ===== */
.pricing-card {
  border-radius: 1.25rem;
  transition: all 0.3s ease;
}
.pricing-card:hover { transform: translateY(-4px); }
.pricing-popular {
  background: linear-gradient(135deg, #0F172A, #1E293B);
  position: relative;
  overflow: hidden;
}
.pricing-popular::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F97316, #EA580C);
}

/* ===== FOOTER ===== */
.footer-bg { background: #0a0f1e; }

/* ===== MOBILE MENU ===== */
#mobile-menu { overflow: hidden; transition: max-height 0.35s ease, opacity 0.3s ease; }
#mobile-menu.hidden { display: none !important; }
#mobile-menu.open { display: block !important; max-height: 600px; opacity: 1; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #F97316; }

/* ===== FLOATING ACTION ===== */
.fab {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  z-index: 100;
  width: 56px;
  height: 56px;
  background: #F97316;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(249,115,22,0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  touch-action: manipulation;
}
.fab:hover { background: #EA580C; transform: scale(1.1); }

.fab-left {
  position: fixed;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  left: calc(1.5rem + env(safe-area-inset-left, 0px));
  z-index: 100;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.fab-left:hover { background: #1ebe5d; transform: scale(1.1); }

/* ===== NOTIFICATION DOT ===== */
.notif-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid white;
}

/* ===== REVEAL FALLBACK — JS olmadan veya zaten viewport'taysa göster ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right,
  .animate-fade-up, .animate-fade-in, .animate-slide-right {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ===== SELECT (tüm tarayıcılarda chevron) ===== */
select.form-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394A3B8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .hero-bg { padding-top: 3rem; padding-bottom: 3rem; }
  .btn-primary, .btn-secondary { padding: 0.75rem 1.25rem; font-size: 0.875rem; }
  /* iOS Safari: input font-size < 16px causes auto-zoom on focus */
  .form-input, input, select, textarea { font-size: 1rem !important; }
}

/* ===== HIDE SCROLLBAR (step form) ===== */
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ===== DASHBOARD — MOBİL / PWA ===== */

/* Safe-area: iPhone notch + home indicator */
body { padding-top: env(safe-area-inset-top, 0px); }

/* Dashboard header safe area */
.dashboard-header-safe {
  padding-top: max(0px, env(safe-area-inset-top));
}

/* Alt navigasyon touch alanı büyüt */
nav.mobile-bottom-nav a {
  -webkit-tap-highlight-color: transparent;
}

/* Touch geri bildirimi */
a, button { -webkit-tap-highlight-color: transparent; }

/* Kart ve butonlarda touch feedback */
.touch-card {
  transition: transform 0.15s ease, opacity 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.touch-card:active { transform: scale(0.98); opacity: 0.85; }

/* iOS rubber band scroll engelle (dashboard) */
#main-content { -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }

/* Mobil tipografi iyileştirme */
@media (max-width: 768px) {
  /* Dashboard tablo scroll */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Kart grid'leri tek kolon */
  .mobile-stack { flex-direction: column !important; }

  /* Daha büyük tıklama alanları */
  .mobile-tap { min-height: 44px; min-width: 44px; }

  /* Pagination küçük ekran */
  nav[aria-label="Pagination"] span,
  nav[aria-label="Pagination"] a { padding: 0.5rem 0.625rem !important; font-size: 0.75rem !important; }
}

/* Truncate iki satır */
.truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* PWA standalone mod — tarayıcı UI gizlenince padding ekle */
@media all and (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top, 0px); }
  #main-content { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)) !important; }
}
