/*
Theme Name: TALS Sectioned Theme
Theme URI: https://talsarchitects.com/
Author: Özgür Öğdem
Author URI: https://talsarchitects.com/
Description: Section bazli, tek sayfali TALS Architects temasi. Hero, projects, films, panorama, about ve contact alanlari ayri customizer panelleriyle yonetilir; projeler ve ekip uyeleri admin panelden eklenebilir.
Version: 1.4.7
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: asp-sectioned  
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
*/

/* =========================================================
   GLOBAL DEĞİŞKENLER (SSOT) ve TEMELLER
   ========================================================= */

/* Reset / temel iskelet */
* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  /* sabit header + adminbar kadar kaydırma payı */
  scroll-padding-top: calc(var(--sa-top) + var(--adminbar-h));
}

html,
body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  overscroll-behavior: contain;
  scrollbar-width: none;
}
body::-webkit-scrollbar {
  display: none;
}

/* Hareket azalt tercihi */
@media (prefers-reduced-motion: reduce) {
  #asp-sections,
  .asp-sections,
  main.fp-app,
  main#fp {
    transition: none !important;
  }
}

/* =========================================================
   FULLPAGE SARMALAYICI ve BÖLÜMLER (Desktop + Mobil)
   ========================================================= */

#asp-sections,
.asp-sections,
main.fp-app,
main#fp {
  position: relative;
  width: 100%;
  height: var(--app-h); /* viewport yüksekliği (base.css’ten gelir) */
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: pan-y;
  will-change: transform;
}

/* Tüm ana section'lar: footer düşülmüş tam ekran */
#asp-sections > section,
.asp-sections > section,
#asp-sections > [data-section],
.asp-sections > [data-section] {
  position: relative;
  height: var(--app-hf);
  min-height: var(--app-hf);
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* =========================================================
   PROJECTS WRAPPER — HEADER/FOOTER AWARE
   ========================================================= */
/* Desktop: header/footer durumuna göre yükseklik ve üst boşluk */
@media (min-width: 1024px) {
  #projects .tals-prj {
    box-sizing: border-box;
    /* HEADER veya FOOTER’a göre otomatik üst boşluk */
    padding-top: var(--header-safe);
    /* Kullanılabilir yükseklik = viewport - footer-safe - header-safe */
    height: calc(var(--app-hf) - var(--header-safe));
  }

  #projects .tals-prj__section {
    height: 100%;
  }
}

/* Mobil: section full-screen, header-safe kullanılmıyor */
@media (max-width: 1023.98px) {
  #projects .tals-prj {
    height: var(--app-hf);
    padding-top: 0;
  }

  #projects .tals-prj__section {
    height: 100%;
  }
}

/* Opsiyonel alt karartma efekti */
.fade-under-footer {
  position: relative;
}
.fade-under-footer::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--footer-h) + 24px);
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.22) 100%
  );
}

/* =========================================================
   GLOBAL FULLPAGE NAV / NEXT
   ========================================================= */
.fp-next {
  position: fixed;
  right: calc(var(--fp-next-right-web, 16px) + env(safe-area-inset-right, 0px));
  bottom: calc(
    var(--fp-next-bottom-web, 16px) + var(--footer-h) + var(--sa-bottom)
  );
  width: var(--fp-next-size-web, 56px);
  height: var(--fp-next-size-web, 56px);
  border-radius: 9999px;
  display: grid;
  place-items: center;
  z-index: 10000;
  background: var(--fp-next-bg-web, rgba(20, 20, 22, 0.65));
  border: 1px solid var(--fp-next-border-web, rgba(255, 255, 255, 0.18));
  backdrop-filter: blur(6px);
  color: var(--fp-next-icon-web, #fff);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .fp-next:hover {
    transform: translateY(-2px);
    transition: transform 0.2s;
  }
}
.fp-next__icon {
  font-size: clamp(18px, calc(var(--fp-next-size-web, 56px) * 0.4), 34px);
  line-height: 1;
}

.fp-nav {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  top: 50%;
  transform: translateY(-50%);
  z-index: 10001;
  pointer-events: none;
}
.fp-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.fp-nav__list li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fp-nav a {
  pointer-events: auto;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  opacity: 0.9;
  transition:
    transform 0.2s,
    background 0.2s,
    border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.fp-nav a:hover {
  transform: scale(1.15);
}
.fp-nav a.is-active,
.fp-nav a:focus-visible {
  background: #fff;
  border-color: #fff;
  outline: none;
}
/* Basit tooltip */
.fp-nav a[title] {
  position: relative;
}
.fp-nav a[title]:hover::after {
  content: attr(title);
  position: absolute;
  right: 150%;
  white-space: nowrap;
  background: rgba(20, 20, 22, 0.85);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font:
    500 12px/1.2 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial;
}

/* =========================================================
   GLOBAL FULLPAGE NAV / MORE (Sadece HERO + PROJECTS)
   - .fp-next ile aynı cam/orb tasarım
   - Konum JS ile .fp-next'e göre hizalanır
   ========================================================= */

.fp-more {
  position: fixed;
  right: calc(var(--fp-more-right-web, 16px) + env(safe-area-inset-right, 0px));
  bottom: calc(
    var(--fp-more-bottom-web, 16px) + var(--footer-h) + var(--sa-bottom)
  );
  width: var(--fp-more-size-web, 56px);
  height: var(--fp-more-size-web, 56px);
  border-radius: 9999px;
  display: grid;
  place-items: center;
  z-index: 10000;
  background: var(--fp-more-bg-web, rgba(20, 20, 22, 0.65));
  border: 1px solid var(--fp-more-border-web, rgba(255, 255, 255, 0.18));
  backdrop-filter: blur(6px);
  color: var(--fp-more-icon-web, #fff);
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
  .fp-more:hover {
    transform: translateY(-2px);
    transition: transform 0.2s;
  }
}

.fp-more:active {
  transform: translateY(2px) scale(0.98);
}

.fp-more > * {
  pointer-events: none;
}

.fp-more__icon {
  width: clamp(18px, calc(var(--fp-more-size-web, 56px) * 0.4), 34px);
  height: clamp(18px, calc(var(--fp-more-size-web, 56px) * 0.4), 34px);
  display: block;
}

/* --- fp-more show/hide anim --- */
.fp-more {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.98);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  pointer-events: none;
  will-change: opacity, transform;
}

.fp-more.is-on {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
}

.fp-more.is-off {
  opacity: 0;
  transform: translate3d(0, 10px, 0) scale(0.98);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .fp-more {
    transition: none !important;
  }
}

/* =========================================================
   MOBİL FULLPAGE (≤900px) — yine full-screen, sadece UI küçülür
   ========================================================= */
@media (max-width: 900px) {
  /* Section ve wrapper yüksekliği base.css + yukarıdaki global bloktan gelir.
     Burada sadece navigasyon UI boyut/kaydırma ayarlanıyor. */

  /* 3) “Viewport doldur” katmanlar sabit konumu bıraksın */
  [data-viewport="fill"] {
    inset: auto !important;
  }

  /* Mobilde nokta menü daha küçük */
  .fp-nav {
    right: 12px;
  }
  .fp-nav a {
    width: 12px;
    height: 12px;
  }
  .fp-next {
    right: 16px;
  }
}

/* =========================================================
   ÇEŞİTLİ
   ========================================================= */
/* Footer cam efekti isteyen üst sarmalayıcılarda sadece blur uygula */
.footer-overlay .site-footer {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Footer marka logosu oranlı kalsın */
.site-footer .sf__brand img.custom-logo {
  display: block;
  height: auto;
  width: auto;
  aspect-ratio: auto;
  object-fit: contain;
  max-height: var(--ft-logo-h, 44px);
  max-width: clamp(120px, 28vw, 220px);
  flex: 0 0 auto;
}
@media (max-width: 640px) {
  .site-footer .sf__brand img.custom-logo {
    max-height: 38px;
  }
}

/* ==== Global Modal kilidi (site-genel) ==== */
html.modal-open,
body.modal-open {
  overflow: hidden;
}

/* NOT:
   - Global .film-modal kuralları style.css’ten KALDIRILDI.
   - Modal görünümleri ilgili section CSS’lerinde (films.css / hero.css) yönetiliyor.
*/

/* HEADER modunda footer yok → fade-under-footer siyah bandı kapat */
@media (min-width: 901px) {
  body.menu-loc-header .fade-under-footer::after {
    height: 0;
    background: none;
  }
}

#wpadminbar {
  display: none !important;
}

/* Front page – TEAM section işaretleyici (yapısal, stil değil) */
/* #team.team-section,
section[data-section="team"] {
  position: relative;
} */
