/* Anadolu Tarım Platformu - Ortak Tasarım Sistemi CSS */

/* Değişken Tanımlamaları */
:root {
  /* Renkler (DESIGN.md ve Mevcut Tema Değerleri) */
  --at-primary: #5d5f5f;
  --at-on-primary: #ffffff;
  --at-primary-container: #ffffff;
  --at-on-primary-container: #747676;
  
  --at-secondary: #496455; /* Orman Yeşili */
  --at-on-secondary: #ffffff;
  --at-secondary-container: #ccead6;
  --at-on-secondary-container: #4f6a5b;
  
  --at-tertiary: #7e562e; /* Toprak Kahvesi */
  --at-on-tertiary: #ffffff;
  --at-tertiary-container: #ffffff;
  --at-on-tertiary-container: #986d43;

  --at-error: #ba1a1a;
  --at-on-error: #ffffff;
  --at-error-container: #ffdad6;
  --at-on-error-container: #93000a;
  
  --at-background: #f8f9fa;
  --at-surface: #ffffff;
  --at-surface-dim: #d9dadb;
  --at-surface-bright: #f8f9fa;
  
  --at-surface-container-lowest: #ffffff;
  --at-surface-container-low: #f3f4f5;
  --at-surface-container: #edeeef;
  --at-surface-container-high: #e7e8e9;
  --at-surface-container-highest: #e1e3e4;

  --at-on-surface: #191c1d;
  --at-on-surface-variant: #444748;
  --at-outline: #747878;
  --at-outline-variant: #c4c7c8;

  /* Font Aileleri */
  --at-font-headline: 'Montserrat', sans-serif;
  --at-font-body: 'Inter', sans-serif;

  /* Yuvarlatılmış Köşeler */
  --at-border-radius-sm: 0.125rem; /* 2px */
  --at-border-radius-default: 0.25rem; /* 4px */
  --at-border-radius-md: 0.375rem; /* 6px */
  --at-border-radius-lg: 0.5rem; /* 8px */
  --at-border-radius-xl: 0.75rem; /* 12px */
  
  /* Boşluklar (Spacing) */
  --at-gutter: 24px;
  --at-margin-desktop: 64px;
  --at-margin-mobile: 20px;
  --at-unit-xs: 4px;
  --at-unit-sm: 8px;
  --at-unit-md: 16px;
  --at-unit-lg: 32px;
  --at-unit-xl: 64px;
}

/* Temel Sıfırlamalar ve Yazı Tipleri */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--at-font-body);
  background-color: var(--at-background);
  color: var(--at-on-surface);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--at-font-headline);
  font-weight: 600;
  color: var(--at-on-surface);
}

/* Tipografi Yardımcı Sınıfları */
.font-headline-xl { font-family: var(--at-font-headline); font-weight: 700; }
.font-headline-lg { font-family: var(--at-font-headline); font-weight: 600; }
.font-headline-md { font-family: var(--at-font-headline); font-weight: 600; }
.font-headline-sm { font-family: var(--at-font-headline); font-weight: 600; }

.font-body-lg { font-family: var(--at-font-body); font-weight: 400; }
.font-body-md { font-family: var(--at-font-body); font-weight: 400; }
.font-body-sm { font-family: var(--at-font-body); font-weight: 400; }
.font-label-lg { font-family: var(--at-font-body); font-weight: 600; letter-spacing: 0.05em; }

.text-headline-xl { font-size: 48px; line-height: 1.2; letter-spacing: -0.02em; }
.text-headline-lg { font-size: 32px; line-height: 1.3; letter-spacing: -0.01em; }
.text-headline-md { font-size: 24px; line-height: 1.4; }
.text-headline-sm { font-size: 20px; line-height: 1.4; }

.text-body-lg { font-size: 18px; line-height: 1.6; }
.text-body-md { font-size: 16px; line-height: 1.6; }
.text-body-sm { font-size: 14px; line-height: 1.5; }
.text-label-lg { font-size: 14px; line-height: 1; }

@media (max-width: 767px) {
  .text-headline-xl { font-size: 32px; }
  .text-headline-lg { font-size: 26px; }
}

/* Renk Yardımcı Sınıfları */
.bg-surface { background-color: var(--at-background) !important; }
.bg-surface-white { background-color: var(--at-surface) !important; }
.bg-surface-container-low { background-color: var(--at-surface-container-low) !important; }
.bg-surface-container { background-color: var(--at-surface-container) !important; }
.bg-surface-container-high { background-color: var(--at-surface-container-high) !important; }
.bg-surface-container-highest { background-color: var(--at-surface-container-highest) !important; }
.bg-secondary { background-color: var(--at-secondary) !important; color: var(--at-on-secondary) !important; }
.bg-secondary-container { background-color: var(--at-secondary-container) !important; color: var(--at-on-secondary-container) !important; }
.bg-tertiary { background-color: var(--at-tertiary) !important; color: var(--at-on-tertiary) !important; }

.text-primary { color: var(--at-primary) !important; }
.text-secondary { color: var(--at-secondary) !important; }
.text-tertiary { color: var(--at-tertiary) !important; }
.text-on-surface { color: var(--at-on-surface) !important; }
.text-on-surface-variant { color: var(--at-on-surface-variant) !important; }
.text-on-secondary-container { color: var(--at-on-secondary-container) !important; }

/* Kenarlıklar (Borders) */
.border-outline-variant { border-color: var(--at-outline-variant) !important; }
.border-outline { border-color: var(--at-outline) !important; }
.border-secondary { border-color: var(--at-secondary) !important; }

/* Yuvarlatılmış Köşeler (Border Radius) */
.rounded-sm { border-radius: var(--at-border-radius-sm) !important; }
.rounded-default { border-radius: var(--at-border-radius-default) !important; }
.rounded-md { border-radius: var(--at-border-radius-md) !important; }
.rounded-lg { border-radius: var(--at-border-radius-lg) !important; }
.rounded-xl { border-radius: var(--at-border-radius-xl) !important; }
.rounded-full { border-radius: 9999px !important; }

/* Boşluk Yardımcı Sınıfları */
.py-unit-xl { padding-top: var(--at-unit-xl) !important; padding-bottom: var(--at-unit-xl) !important; }
.py-unit-lg { padding-top: var(--at-unit-lg) !important; padding-bottom: var(--at-unit-lg) !important; }
.mb-unit-xl { margin-bottom: var(--at-unit-xl) !important; }
.mb-unit-lg { margin-bottom: var(--at-unit-lg) !important; }
.mb-unit-md { margin-bottom: var(--at-unit-md) !important; }
.mb-unit-sm { margin-bottom: var(--at-unit-sm) !important; }
.gap-unit-lg { gap: var(--at-unit-lg) !important; }
.gap-unit-md { gap: var(--at-unit-md) !important; }

/* Özel Bileşenler */
.max-w-container-max {
  max-width: 1280px;
  width: 100%;
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--at-outline-variant);
  border-radius: var(--at-border-radius-xl);
}

.hero-gradient {
  background: linear-gradient(135deg, #F8F9FA 0%, #FFFFFF 100%);
}

/* Animasyonlar ve Buton Etkileşimleri */
.animate-bounce-slow {
  animation: bounceSlow 3s infinite;
}

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

/* Navigasyon Stilleri */
nav.sticky-nav {
  transition: all 0.3s ease;
}

nav.sticky-nav.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.search-trigger-btn {
  width: 38px;
  height: 38px;
  border-radius: 50% !important;
  color: var(--at-on-surface-variant) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: transparent !important;
}
.search-trigger-btn:hover {
  background-color: var(--at-secondary-container) !important;
  color: var(--at-secondary) !important;
  transform: scale(1.05);
}
.search-trigger-btn:active {
  transform: scale(0.95);
}

/* Sticky Navbar Z-Index Override */
.sticky-nav {
  z-index: 1050 !important;
}

/* ═══════════════════════════════════════════
   NAVBAR LINK — Temel Stil
═══════════════════════════════════════════ */
.nav-link-custom {
  font-family: var(--at-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--at-on-surface-variant);
  text-decoration: none;
  /* Sütun yönü: metin + alt çizgi aşağıya */
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border-bottom: none;
  transition: color 0.25s ease;
  /* Dropdown içindeki nav-link-custom'da
     margin-top animasyonu dropdown'u bozmasın */
  position: relative;
  z-index: 1;
}

/* Dropdown SARMALAYICI içindeki link — satır yönü (ikon yanında) */
.nav-dropdown-wrap > .nav-link-custom {
  flex-direction: row;   /* chevron ikonu yanında görünsün */
  align-items: center;
  padding-bottom: 0;     /* sütun padding'i burada gerekmez */
  gap: 2px;
}

/* Dropdown wrapper'daki linke alt çizgi EKLEME */
.nav-dropdown-wrap > .nav-link-custom .nav-underline {
  display: none !important;
}

/* jQuery .animate() ile overflow sorununu önle */
.navbar-nav {
  overflow: visible;
}

/* Nav link metin */
.nav-link-inner {
  display: inline-block;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* Alt çizgi çubuğu — jQuery animate() width kontrolü */
.nav-underline {
  display: block;
  height: 2px;
  width: 0%;
  background: var(--at-secondary);
  border-radius: 2px;
  margin-top: 4px;
  flex-shrink: 0;
}

/* Aktif link stilleri */
.nav-link-custom.active {
  color: var(--at-secondary);
}
.nav-link-custom.active .nav-link-inner {
  color: var(--at-secondary);
}
.nav-link-custom.active .nav-underline {
  width: 100%;
}

/* Dropdown içindeki aktif link — alt çizgi yok, sadece renk */
.nav-dropdown-wrap > .nav-link-custom.active .nav-underline {
  display: none !important;
}
/* Aktif dropdown → chevron renklensin */
.nav-dropdown-wrap > .nav-link-custom.active .nav-chevron {
  color: var(--at-secondary);
}

/* Özel Butonlar */
.btn-at-primary {
  background-color: var(--at-secondary);
  color: var(--at-on-secondary);
  font-family: var(--at-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  border-radius: var(--at-border-radius-lg);
  padding: 12px 24px;
  transition: all 0.2s ease;
}

.btn-at-primary:hover {
  background-color: #3b5145;
  color: var(--at-on-secondary);
}

.btn-at-outline {
  background-color: transparent;
  color: var(--at-secondary);
  font-family: var(--at-font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  border: 1px solid var(--at-secondary);
  border-radius: var(--at-border-radius-lg);
  padding: 12px 24px;
  transition: all 0.2s ease;
}

.btn-at-outline:hover {
  background-color: rgba(73, 100, 85, 0.05);
  color: var(--at-secondary);
}

/* Kart Hover Efektleri */
.card-hover-effect {
  transition: all 0.3s ease;
}
.card-hover-effect:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Bento Grid */
.bento-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--at-border-radius-xl);
  border: 1px solid var(--at-outline-variant);
  height: 100%;
}

/* ═══════════════════════════════════════════════════
   NAV DROPDOWN (Hover Menü — jQuery Destekli)
═══════════════════════════════════════════════════ */
.nav-dropdown-wrap {
  position: relative;
  /* Dropdown köprüsü için padding-bottom — mouse boşlukta menüyü kapatmasın */
  padding-bottom: 8px;
}

/* Açılır kutu */
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 2px);  /* Boşluğu azalt — mouse geçişinde kapanmasın */
  left: 50%;
  transform: translateX(-50%);
  min-width: 210px;
  background: #ffffff;
  border: 1px solid var(--at-outline-variant);
  border-radius: var(--at-border-radius-lg);
  box-shadow: 0 8px 32px rgba(73, 100, 85, 0.13), 0 2px 8px rgba(0,0,0,0.06);
  padding: 6px 0;
  z-index: 1050;
  opacity: 0;
}

/* Görünmez köprü: nav-link ile menü arasındaki boşluğu mouse için kapatır */
.nav-dropdown-wrap::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;  /* dropdown top offset kadar */
}

/* Küçük ok (caret) */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 11px; height: 11px;
  background: #ffffff;
  border-left: 1px solid var(--at-outline-variant);
  border-top: 1px solid var(--at-outline-variant);
}

/* Dropdown görünür hali (jQuery tarafından kontrol edilir) */
.nav-dropdown-menu.open {
  display: block;
  opacity: 1;
}

/* Alt menü öğesi */
.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--at-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--at-on-surface-variant);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, padding-left 0.18s ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item.active {
  background: var(--at-secondary-container);
  color: var(--at-secondary);
  padding-left: 20px;
}

.nav-dropdown-item.active {
  font-weight: 600;
}

/* Divider */
.nav-dropdown-divider {
  height: 1px;
  background: var(--at-outline-variant);
  margin: 4px 12px;
}

/* Chevron döndürme — dropdown açıkken */
.nav-dropdown-wrap.open .nav-chevron {
  transform: rotate(180deg);
}

/* Mobil: dropdown hep görünür */
@media (max-width: 767px) {
  .nav-dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 2px solid var(--at-secondary-container);
    border-radius: 0;
    padding: 0 0 0 12px;
    margin-top: 4px;
    margin-bottom: 4px;
  }
  .nav-dropdown-menu::before { display: none; }
}

/* ═══════════════════════════════════════════════════
   HERO SLIDER SYSTEM WITH LOADING BAR
═══════════════════════════════════════════════════ */
#hero-slider {
  min-height: 520px;
  position: relative;
  overflow: hidden;
}

.hero-slide {
  width: 100%;
}

/* Loading Bar at the bottom of the slider */
.slider-loading-bar-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--at-surface-container-high);
  z-index: 20;
}

.slider-loading-bar {
  height: 100%;
  width: 0%;
  background-color: var(--at-secondary);
}

/* Slide arrows styling */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--at-outline-variant);
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: var(--at-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 15;
  opacity: 0.7;
}

.slider-arrow:hover {
  background-color: var(--at-secondary);
  color: #ffffff;
  opacity: 1;
  transform: translateY(-50%) scale(1.08);
}

.prev-arrow {
  left: 20px;
}

.next-arrow {
  right: 20px;
}

@media (min-width: 768px) {
  .prev-arrow {
    left: 64px;
  }
  .next-arrow {
    right: 64px;
  }
}

/* Dots Navigation */
.slider-dots-container {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--at-outline-variant);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  width: 24px;
  border-radius: 5px;
  background-color: var(--at-secondary);
}

/* ═══════════════════════════════════════════
   Custom Color Utility Helper Classes
   ═══════════════════════════════════════════ */
.bg-primary {
  background-color: var(--at-primary) !important;
}
.text-primary {
  color: var(--at-primary) !important;
}
.bg-secondary {
  background-color: var(--at-secondary) !important;
}
.text-secondary {
  color: var(--at-secondary) !important;
}
.bg-secondary-container {
  background-color: var(--at-secondary-container) !important;
}
.text-on-secondary-container {
  color: var(--at-on-secondary-container) !important;
}
.bg-tertiary {
  background-color: var(--at-tertiary) !important;
}
.text-tertiary {
  color: var(--at-tertiary) !important;
}
.bg-tertiary-container {
  background-color: var(--at-tertiary-container) !important;
}
.text-on-tertiary-container {
  color: var(--at-on-tertiary-container) !important;
}

/* Opacity badges overrides */
.bg-secondary.bg-opacity-10 {
  background-color: rgba(73, 100, 85, 0.1) !important;
}
.bg-tertiary.bg-opacity-10 {
  background-color: rgba(126, 86, 46, 0.1) !important;
}


