/* ==========================================================================
   Arsa Festival — Main Stylesheet
   Structure: base → layout → components → pages → utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   BASE
   -------------------------------------------------------------------------- */
:root {
  --navy:  #0D1B2A;
  --forest:#2D6A4F;
  --gold:  #E9C46A;
  --cream: #F8F7F4;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  background-color: var(--cream);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Serif Display', serif;
  font-weight: 400;
  line-height: 1.15;
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 1280px;
}

@media (min-width: 640px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* --------------------------------------------------------------------------
   COMPONENTS — Navbar
   -------------------------------------------------------------------------- */
#mobile-menu {
  transition: max-height .3s, opacity .3s;
}

#mobile-menu.open {
  max-height: 24rem;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   COMPONENTS — Hero
   -------------------------------------------------------------------------- */
.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(13,27,42,.85) 0%,
    rgba(13,27,42,.5)  60%,
    rgba(13,27,42,.2)  100%
  );
}

/* --------------------------------------------------------------------------
   COMPONENTS — Cards
   -------------------------------------------------------------------------- */
.project-card {
  transition: transform .3s, box-shadow .3s;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(13,27,42,.15);
}

/* --------------------------------------------------------------------------
   COMPONENTS — Badges
   -------------------------------------------------------------------------- */

/* Temel badge yapısı */
.badge-active,
.badge-sold,
.badge-soon {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Nokta indikatör */
.badge-active::before,
.badge-sold::before,
.badge-soon::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Aktif Satış — yeşil */
.badge-active {
  background: rgba(45, 106, 79, 0.18);
  color: #1a4d35;
  border: 1px solid rgba(45, 106, 79, 0.35);
}
.badge-active::before { background: #2D6A4F; }

/* Hero üzerinde (koyu arka plan) */
.on-dark .badge-active {
  background: rgba(45, 106, 79, 0.35);
  color: #a8e6c3;
  border-color: rgba(45, 106, 79, 0.5);
}
.on-dark .badge-active::before { background: #52c98a; }

/* Satıldı — gri */
.badge-sold {
  background: rgba(107, 114, 128, 0.15);
  color: #4B5563;
  border: 1px solid rgba(107, 114, 128, 0.3);
}
.badge-sold::before { background: #9CA3AF; }

.on-dark .badge-sold {
  background: rgba(107, 114, 128, 0.3);
  color: #D1D5DB;
  border-color: rgba(107, 114, 128, 0.45);
}
.on-dark .badge-sold::before { background: #D1D5DB; }

/* Yakında — altın */
.badge-soon {
  background: rgba(233, 196, 106, 0.18);
  color: #7a5200;
  border: 1px solid rgba(233, 196, 106, 0.45);
}
.badge-soon::before { background: #E9C46A; }

.on-dark .badge-soon {
  background: rgba(233, 196, 106, 0.25);
  color: #E9C46A;
  border-color: rgba(233, 196, 106, 0.5);
}
.on-dark .badge-soon::before { background: #E9C46A; }

/* Kart alt köşe — parsel sayısı badge'leri */
.badge-parcel-available {
  background: #E9C46A;
  color: #0D1B2A;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

.badge-parcel-sold {
  background: rgba(107, 114, 128, 0.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
}

/* Satıldı projelerin kapak görseli */
.img-sold {
  filter: grayscale(100%);
  transition: filter .3s;
}

.project-card:hover .img-sold {
  filter: grayscale(60%);
}

/* --------------------------------------------------------------------------
   COMPONENTS — Floating CTA
   -------------------------------------------------------------------------- */
.floating-cta-menu {
  transition: all .2s;
}

.floating-cta-menu.open {
  display: flex;
}

/* --------------------------------------------------------------------------
   COMPONENTS — Tabs (proje detay sayfaları)
   -------------------------------------------------------------------------- */
.tab-btn.active {
  color: var(--forest);
  border-bottom: 2px solid var(--forest);
  background: rgba(45,106,79,.05);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

@media (max-width: 400px) {
  .tab-btn {
    font-size: 0.75rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* --------------------------------------------------------------------------
   COMPONENTS — Quick Access (Global)
   -------------------------------------------------------------------------- */
/* Quick Access Component - Global Floating Menu */
#quick-access {
  pointer-events: auto;
  background: rgb(13 27 42 / 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 12px;
  box-shadow: 
    0 20px 60px rgba(13, 27, 42, 0.4),
    0 8px 24px rgba(13, 27, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(233, 196, 106, 0.15);
  transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#quick-access:hover {
  box-shadow: 
    0 24px 80px rgba(13, 27, 42, 0.5),
    0 12px 32px rgba(13, 27, 42, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  border-color: rgba(233, 196, 106, 0.25);
}

.quick-access-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(135deg, rgba(45, 106, 79, 0.9) 0%, rgba(36, 92, 67, 0.9) 100%);
  color: white;
  padding: 13px 16px;
  border-radius: 14px;
  box-shadow: 
    0 4px 16px rgba(45, 106, 79, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: background 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  min-width: 50px;
  min-height: 50px;
  max-height: 50px;
  position: relative;
  letter-spacing: 0.2px;
  border: 1px solid rgba(45, 106, 79, 0.4);
  cursor: pointer;
}

.quick-access-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 100%);
  border-radius: 14px;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.quick-access-btn:hover::before {
  opacity: 1;
}

.quick-access-btn:hover {
  background: linear-gradient(135deg, rgba(52, 128, 93, 1) 0%, rgba(42, 109, 79, 1) 100%);
  box-shadow: 
    0 8px 24px rgba(45, 106, 79, 0.5),
    0 4px 12px rgba(45, 106, 79, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(45, 106, 79, 0.6);
}

.quick-access-btn:active {
  transform: scale(0.98);
}

.quick-access-btn:focus {
  outline: 2px solid rgba(233, 196, 106, 0.6);
  outline-offset: 3px;
}

.quick-access-btn.whatsapp {
  background: linear-gradient(135deg, rgba(37, 211, 102, 0.95) 0%, rgba(32, 189, 90, 0.95) 100%);
  border-color: rgba(37, 211, 102, 0.4);
}

.quick-access-btn.whatsapp:hover {
  background: linear-gradient(135deg, rgba(46, 230, 115, 1) 0%, rgba(37, 211, 102, 1) 100%);
  box-shadow: 
    0 8px 24px rgba(37, 211, 102, 0.5),
    0 4px 12px rgba(37, 211, 102, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border-color: rgba(37, 211, 102, 0.6);
}

.quick-access-btn.whatsapp:focus {
  outline: 2px solid rgba(233, 196, 106, 0.6);
  outline-offset: 3px;
}

.quick-access-btn svg {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  flex-shrink: 0;
}

.quick-access-btn:hover svg {
  transform: scale(1.15) rotate(-8deg);
}

.quick-access-text {
  max-width: 120px;
  opacity: 1;
  margin-left: 12px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 600;
}

.quick-access-btn.collapsed .quick-access-text {
  max-width: 0;
  opacity: 0;
  margin-left: 0;
}

.quick-access-btn + .quick-access-btn {
  margin-top: 8px;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 
      0 4px 16px rgba(37, 211, 102, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
  50% {
    box-shadow: 
      0 6px 24px rgba(37, 211, 102, 0.5),
      0 3px 12px rgba(37, 211, 102, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
}

.quick-access-btn.whatsapp {
  animation: pulse 2.5s ease-in-out infinite;
}

.quick-access-btn.whatsapp:hover {
  animation: none;
}

@media (max-width: 768px) {
  #quick-access {
    right: 12px;
    padding: 10px;
    border-radius: 16px;
  }
  .quick-access-btn {
    padding: 11px 13px;
    font-size: 13px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 12px;
  }
  .quick-access-text {
    max-width: 100px;
    font-size: 12px;
    margin-left: 10px;
  }
  .quick-access-btn + .quick-access-btn {
    margin-top: 7px;
  }
}

@media (max-width: 480px) {
  #quick-access {
    right: 8px;
    padding: 8px;
    border-radius: 14px;
  }
  .quick-access-btn {
    padding: 10px 12px;
    min-width: 42px;
    min-height: 42px;
    font-size: 12px;
    border-radius: 10px;
  }
  .quick-access-text {
    max-width: 85px;
    margin-left: 8px;
  }
  .quick-access-btn + .quick-access-btn {
    margin-top: 6px;
  }
}

@media (max-height: 600px) {
  #quick-access {
    top: 40%;
  }
}


/* --------------------------------------------------------------------------
   COMPONENTS — Projeler Wrapper (Anasayfa gradient cutoff)
   -------------------------------------------------------------------------- */

/* Mobil: 1 sütun → 3 kart göster */
.projeler-wrapper {
  max-height: calc(3 * 26rem + 2 * 1.5rem);
}

/* Tablet: 2 sütun → 2 satır = 4 kart (yaklaşık) */
@media (min-width: 768px) {
  .projeler-wrapper {
    max-height: calc(2 * 26rem + 1 * 1.5rem);
  }
}

/* Desktop: 3 sütun → 3 satır = 9 kart */
@media (min-width: 1024px) {
  .projeler-wrapper {
    max-height: calc(3 * 26rem + 2 * 1.5rem);
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE — Projeler filter bar
   -------------------------------------------------------------------------- */
#city-filters,
#status-filters {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  scrollbar-width: none;
}

#city-filters::-webkit-scrollbar,
#status-filters::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  #city-filters,
  #status-filters {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

/* --------------------------------------------------------------------------
   RESPONSIVE — Proje detay highlights grid
   -------------------------------------------------------------------------- */
@media (max-width: 400px) {
  .highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    font-size: 0.8rem;
  }
  .highlights-grid p:first-child {
    font-size: 0.9rem;
  }
}
