@tailwind base;
@tailwind components;
@tailwind utilities;

/* Manrope Font */
@font-face {
  font-family: 'Manrope';
  src: url('https://ext.same-assets.com/1193025079/130798587.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('https://ext.same-assets.com/1193025079/1740204806.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('https://ext.same-assets.com/1193025079/3378192604.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('https://ext.same-assets.com/1193025079/738892307.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('https://ext.same-assets.com/1193025079/1861566781.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #00C9A7;
  --primary-dark: #00B894;
  --secondary: #0A1628;
  --accent-orange: #FF6B35;
  --accent-yellow: #FFD93D;
  --text-dark: #1A202C;
  --text-gray: #64748B;
  --bg-light: #F8FAFC;
  --bg-gradient-start: #0A1628;
  --bg-gradient-end: #0D4A5C;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;
    --primary: 168 100% 39%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;
    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 168 100% 39%;
    --radius: 0.5rem;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Animations */
@keyframes slideInfinite {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-slide-infinite {
  animation: slideInfinite 30s linear infinite;
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 201, 167, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 201, 167, 0.5);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* HERO CONTAINER */
.hero-glow {
  position: relative;
  overflow: hidden;
  /* Arka plan gradient'i HTML'deki Tailwind sınıflarından gelsin (daha az iş, daha az kasma) */
}

/* Parlaklık hissi için üstte yumuşak ışık katmanı */
.hero-glow::after {
  content: "";
  position: absolute;
  top: -20%;
  left: -10%;
  right: -10%;
  bottom: 40%;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(0, 201, 167, 0.18) 25%,
    transparent 60%
  );
  mix-blend-mode: screen;
  opacity: 0.12;
  pointer-events: none;
  animation: heroShine 14s ease-in-out infinite;
}

@keyframes heroShine {
  0%, 100% {
    opacity: 0.12;
  }
  50% {
    opacity: 0.22;
  }
}

/* Hero metin giriş animasyonları (yukarıdan yumuşak giriş) */
.hero-heading-main {
  opacity: 0;
  transform: translateY(18px);
  margin-top: -0.5rem;
  animation: heroFadeUp 0.6s ease-out forwards;
}

.hero-subtext {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 0.85s ease-out forwards;
}

.hero-cta-row {
  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeUp 1s ease-out forwards;
}

@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero başlık vurgusu: gradient + hafif glow */
.hero-title-highlight {
  display: inline-block;
  background: linear-gradient(90deg, #ffffff 0%, #00E5BE 40%, #00C9A7 60%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 18px rgba(0, 201, 167, 0.45);
}

/* (Hero başlık altı çizgi iptal edildi – kullanılmıyor) */

/* Dönen kısa mesaj satırı için yumuşak fade/slide */
.hero-rotating-line {
  display: inline-block;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-rotating-line--hidden {
  opacity: 0;
  transform: translateY(6px);
}

/* EPIN tarzı hero görsel efekti (teal versiyon) */
.hero-glow .hero-image {
  position: relative;
  z-index: 1;
}

.hero-glow .hero-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  background: radial-gradient(
    circle,
    rgba(0, 201, 167, 0.6) 0%,
    rgba(0, 201, 167, 0.25) 25%,
    rgba(0, 201, 167, 0.08) 50%,
    transparent 70%
  );
  border-radius: 50%;
  z-index: -1;
  animation: heroGlowTeal 4s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero-glow .hero-image::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 760px;
  height: 760px;
  background: radial-gradient(
    circle,
    rgba(0, 233, 190, 0.2) 0%,
    rgba(0, 201, 167, 0.10) 35%,
    transparent 65%
  );
  border-radius: 50%;
  z-index: -2;
  animation: heroGlowTeal 6s ease-in-out infinite alternate-reverse;
  pointer-events: none;
}

.hero-glow .hero-image img {
  animation: heroFloatTeal 6s ease-in-out infinite;
  filter: drop-shadow(0 40px 80px rgba(0, 0, 0, 0.7))
          drop-shadow(0 0 40px rgba(0, 201, 167, 0.4));
}

/* Glow scale + opacity (EPIN'deki heroGlow'a benzeyen) */
@keyframes heroGlowTeal {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
}

/* Yumuşak yukarı-aşağı hareket */
@keyframes heroFloatTeal {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-16px);
  }
}

/* Gradient backgrounds */
.bg-hero-gradient {
  background: linear-gradient(135deg, #0A1628 0%, #0D4A5C 50%, #116466 100%);
}

.bg-features-gradient {
  background: linear-gradient(180deg, #E8F7F5 0%, #ffffff 100%);
}

/* Text gradients */
.text-gradient {
  background: linear-gradient(90deg, #00C9A7 0%, #00E5BE 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button styles */
.btn-primary {
  @apply bg-[#00C9A7] hover:bg-[#00B894] text-white font-semibold px-6 py-3 rounded-full transition-all duration-300;
}

.btn-secondary {
  @apply bg-white hover:bg-gray-50 text-[#0A1628] font-semibold px-6 py-3 rounded-full border border-gray-200 transition-all duration-300;
}

.btn-outline {
  @apply border-2 border-[#00C9A7] text-[#00C9A7] hover:bg-[#00C9A7] hover:text-white font-semibold px-6 py-3 rounded-full transition-all duration-300;
}

/* Card styles */
.feature-card {
  @apply bg-white rounded-2xl p-6 shadow-lg hover:shadow-xl transition-all duration-300 border border-gray-100;
}

/* Circular Logo Avatar Styles */
.logo-avatar {
  @apply w-24 h-24 md:w-28 md:h-28 rounded-full bg-gradient-to-br from-gray-100 to-gray-200 p-2 flex items-center justify-center overflow-hidden shadow-md hover:shadow-xl hover:scale-110 transition-all duration-300;
  position: relative;
}

.logo-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #00C9A7, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.logo-avatar:hover::before {
  opacity: 1;
}

/* Swiper Logos - oklar içinde, taşma yok */
.swiper-logos,
.swiper-logos .swiper,
.swiper-logos .swiper-container {
  overflow: hidden !important;
  max-width: 100%;
}

.swiper-logos {
  width: 100%;
  cursor: grab;
}

.swiper-logos:active {
  cursor: grabbing;
}

.swiper-logos .swiper-wrapper {
  align-items: center;
}

.swiper-logos .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}


/* Section padding */
.section-padding {
  @apply py-16 md:py-24 px-4 md:px-8;
}

/* Container */
.container-custom {
  @apply max-w-7xl mx-auto px-4 md:px-8;
}

/* Toast Notifications */
.toast {
  @apply bg-white rounded-xl shadow-lg border border-gray-200 p-4 min-w-[300px] max-w-[400px] flex items-center justify-between gap-3 transform translate-x-full opacity-0 transition-all duration-300;
}

.toast.show {
  @apply translate-x-0 opacity-100;
}

.toast-success {
  @apply border-[#00C9A7] bg-[#00C9A7]/5;
}

.toast-success .toast-message {
  @apply text-[#00B894] font-medium;
}

.toast-error {
  @apply border-red-300 bg-red-50;
}

.toast-error .toast-message {
  @apply text-red-700 font-medium;
}

.toast-warning {
  @apply border-yellow-300 bg-yellow-50;
}

.toast-warning .toast-message {
  @apply text-yellow-700 font-medium;
}

.toast-info {
  @apply border-blue-300 bg-blue-50;
}

.toast-info .toast-message {
  @apply text-blue-700 font-medium;
}

.toast-close {
  @apply text-gray-400 hover:text-gray-600 text-xl font-bold leading-none cursor-pointer flex-shrink-0;
  line-height: 1;
}

/* Loading Spinner */
.spinner {
  @apply inline-block w-5 h-5 border-2 border-current border-t-transparent rounded-full animate-spin;
}

.loading-overlay {
  @apply fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center;
}

.loading-spinner-large {
  @apply w-12 h-12 border-4 border-white border-t-transparent rounded-full animate-spin;
}

/* Form Validation Styles */
input.error,
textarea.error,
select.error {
  @apply border-red-300 focus:ring-red-500 focus:border-red-500;
}

.field-error {
  animation: fadeInUp 0.3s ease-out;
}

/* ===== MOBİL UYUMLULUK (max-width: 767px) ===== */
@media (max-width: 767px) {
  html {
    overflow-x: hidden;
  }

  body {
    overflow-x: hidden;
  }

  /* Ürün kartları - mobilde kompakt (anasayfa + tüm paketler) */
  .products-grid-mobile .product-card .bg-white > div:first-child {
    min-height: 8rem;
  }

  .products-grid-mobile .product-card h2,
  .products-grid-mobile .product-card h3 {
    font-size: 0.8125rem;
    line-height: 1.3;
  }

  .products-grid-mobile .product-card .text-lg,
  .products-grid-mobile .product-card .text-xl {
    font-size: 0.9375rem;
  }

  .products-grid-mobile .product-card .rounded-2xl.border > div:last-child {
    padding: 0.5rem 0.75rem !important;
  }

  .products-grid-mobile .product-card .rounded-2xl button {
    font-size: 0.6875rem;
    padding: 0.375rem 0.25rem;
  }

  /* Sepet - mobilde kartlar dikey stack */
  .cart-item-mobile {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-item-mobile .flex.items-center.gap-2 {
    width: 100%;
    justify-content: space-between;
  }

  /* Tablo overflow - mobilde yatay scroll */
  .overflow-x-auto-mobile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Footer - mobilde 2 sütun zaten var, metin boyutu */
  footer .grid {
    gap: 1.5rem;
  }

  footer .text-sm {
    font-size: 0.8125rem;
  }

  /* Form elemanları - daha büyük dokunma alanı */
  input, select, textarea, button {
    min-height: 44px;
  }

  /* Mobilde sticky cart konumu */
  #stickyCart {
    bottom: 1rem;
    right: 1rem;
  }
}
