﻿/* =========================================
   Postcardpolis - style.css (Final)
   Amaç: Ortak + Index (Home) stilleri
   Category sayfası özel stilleri: category.css
   ========================================= */

/* ---------- 1) Kök değişkenler ---------- */
:root{
  --bg: #f7f4ef;
  --text: #222;
  --muted: #555;

  --brand: #0e6b65;
  --glass: rgba(255,255,255,0.75);
  --glass-strong: rgba(255,255,255,0.92);

  --shadow: 0 6px 20px rgba(0,0,0,0.18);
  --shadow-strong: 0 10px 26px rgba(0,0,0,0.25);

  --r: 18px;
  --container: 1100px;

  --headerH: 64px;

  /* HOME spacing kontrolü */
  --home-hero-top: 5.5rem;
  --home-cats-gap: 4rem;
}

/* ---------- 2) Reset / temel ---------- */
html{
  scroll-behavior: smooth;
  overflow-y: scroll;
}

*,
*::before,
*::after{
  box-sizing: border-box;
}

body{
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);

  background-color: var(--bg);
  background-image: url('../images/backgrounds/OttoWoman.cpa-bacground.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center 60px;
}

a{
  color: inherit;
  text-decoration: none;
}

img{
  max-width: 100%;
  height: auto;
  display: block;
}

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- 3) Header ---------- */
.site-header{
  background: var(--glass-strong);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,0.04);

  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  min-height: var(--headerH);
}

.logo{
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo{
  height: 42px;
  width: auto;
}

.logo-text{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-main{
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.logo-sub{
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 1px;
}

/* ✅ Nav: sadece desktop'ta görünür */
.main-nav{
  display: none;
}

.main-nav a{
  margin-left: 1rem;
  font-size: 0.9rem;
  opacity: 0.85;
}

.main-nav a:hover,
.main-nav a.active{
  opacity: 1;
  text-decoration: underline;
}

.lang-switch{
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
  align-items: center;
}

.lang-btn{
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.45);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  line-height: 1;
}

.lang-btn.is-active{
  background: rgba(255,255,255,0.85);
  font-weight: 700;
}

/* ---------- 4) Köşe damga (Home'a döndüren kapı) ---------- */
.corner-logo{
  position: fixed;
  right: 20px;
  top: calc(var(--headerH, 64px) + 8px);  /* ✅ Desktop: header'ın hemen altında */
  bottom: auto;
  z-index: 100;
  width: 140px;
  height: 140px;
  opacity: 0.95;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.corner-logo:hover{
  transform: translateY(-2px) rotate(-1deg);
  opacity: 1;
}

.corner-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.20));
}

/* ---------- 5) Hero (Home) ---------- */
.hero{
  padding: 0;
}

.hero.full-bg{
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero.full-bg::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.25);
  pointer-events: none;
}

.hero-inner{
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2.4rem 1.5rem 1rem;
}

/* HOME: spacing */
body.page-home .hero-inner{
  padding-top: var(--home-hero-top);
}

body.page-home .hero-categories{
  margin-top: var(--home-cats-gap);
  padding-top: 5rem;
}

/* ---------- 7) Sol bilgi menüsü (info-nav) ---------- */
.info-nav{
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Home hero içinde konumlanan versiyon */
.info-nav-hero{
  position: absolute;
  left: 22px;
  top: calc(var(--headerH) + 80px);
  z-index: 2;
  width: 280px;
}

.info-nav-link{
  display: flex;
  align-items: center;
  gap: 0.55rem;

  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.info-nav-link:hover{
  transform: translateX(3px);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}

.info-nav-icon{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(14,107,101,0.10);
  color: var(--brand);
}

.info-nav-icon svg{
  width: 18px;
  height: 18px;
}

.info-nav-label{
  font-size: 0.88rem;
  color: #2a2525;
  white-space: nowrap;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === INFO NAV: Rose Gold override === */
.info-nav-link{
  position: relative;
  gap: 0.65rem;
  padding: 0.48rem 1rem;
  padding-right: 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(255,255,255,0.6);

  background: linear-gradient(145deg, #f3e6dd, #d8b8a4);
  color: #3b2f29;
  border: 1px solid #c98f78;
  box-shadow:
    0 3px 8px rgba(120, 88, 70, 0.28),
    inset 0 1px 0 rgba(255, 248, 243, 0.9);
}

.info-nav-link:hover{
  transform: translateY(-1px);
  box-shadow:
    0 5px 10px rgba(160, 110, 80, 0.24),
    inset 0 -1px 1px rgba(120, 98, 72, 0.3),
    inset 0 1px 1px rgba(255,255,255,0.8);
  color: #35271f;
}

.info-nav-icon{
  width: 32px;
  height: 32px;
  flex-shrink: 0;

  background: radial-gradient(circle at 30% 20%, #fff7f4 0%, #e7c4b8 50%, #c29686 100%);
  border: 1px solid rgba(173, 115, 101, 0.85);

  box-shadow:
    0 2px 5px rgba(120, 76, 62, 0.28),
    inset 0 -1px 1px rgba(128, 78, 67, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.info-nav-icon svg{
  width: 20px;
  height: 20px;
  stroke: #5d3e38;
  stroke-width: 2;
  filter: drop-shadow(0 1px 1px rgba(80, 60, 50, 0.4));
}

.info-nav-link:hover .info-nav-icon{
  filter: brightness(1.08) saturate(1.15);
  transform: translateY(-2px);
}

/* ---------- 8) Genel bölüm tipografisi ---------- */
section{
  padding: 2rem 0;
}

h2{
  font-size: 1.4rem;
  margin: 0 0 0.5rem 0;
}

.section-intro{
  margin: 0 0 1.5rem 0;
  color: var(--muted);
}

/* ---------- 9) Hero altı Categories ---------- */
.hero-categories{
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  padding-bottom: 3rem;
}

#categories{
  scroll-margin-top: calc(var(--headerH) + 16px);
}

.hero-categories h2{
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.hero-categories .section-intro{
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
}

.categories-section{
  position: relative;
  z-index: 2;
  margin-top: 0.6rem;
  padding-top: 0;
  background: transparent;
}

.categories-content{
  min-width: 0;
}

/* grid - responsive columns */
.category-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

/* ✅ Tablet/Desktop: 3+ kolon */
@media (min-width: 769px){
  .category-grid{
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

/* ✅ Mobile: minimum 2 kolon */
@media (max-width: 768px){
  .category-grid{
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
  }
}

/* ✅ Çok küçük ekranlar: yine 2 kolon ama daha dar */
@media (max-width: 400px){
  .category-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
}

/* kart */
.category-card{
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r);
  padding-top: 70%;
  box-shadow: var(--shadow);
  background: #ddd;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-strong);
}

.category-card .category-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;

  transform: scale(1.03);
  transition: transform 0.25s ease-out, filter 0.25s ease-out;
}

.category-card:hover .category-bg{
  transform: scale(1.08);
  filter: brightness(1.08) contrast(1.03);
}

.category-text-box{
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4%;

  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  padding: 0.22rem 0.55rem;
  border-radius: 12px;
  text-align: center;

  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover .category-text-box{
  transform: translateY(-3px) scale(1.05);
  background: rgba(255,255,255,0.95);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.category-text-box h3{
  margin: 0;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 11) About / Contact ---------- */
.about-section,
.contact-section{
  position: relative;
  z-index: 1;
}

.about-title{
  margin-bottom: 0.8rem;
}

.about-lead{
  font-size: 1.05rem;
  line-height: 1.6;
}

.about-layout p{
  line-height: 1.65;
  color: #2a2525;
}

.about-ending{
  margin-top: 1.2rem;
  font-style: italic;
  opacity: 0.9;
}

.contact-inner p{
  line-height: 1.65;
  color: #2a2525;
}

.contact-email a{
  text-decoration: underline;
}

/* ---------- 12) Footer ---------- */
.site-footer{
  padding: 1.5rem 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.site-footer p{
  margin: 0;
  color: #3b2f29;
  opacity: 0.9;
  font-size: 0.9rem;
}

/* ---------- 13) Responsive ---------- */

@media (min-width: 1101px){
  body.page-home .info-nav-toggle{
    display: none;
  }

  /* ✅ Desktop: About & Contact görünür */
  .main-nav{
    display: block;
  }
}

@media (max-width: 1100px){
  body.page-home .container,
  .site-header .container{
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  :root{
    --home-hero-top: calc(2.4rem + 78px);
    --home-cats-gap: 4.5rem;
  }

  /* Info & Tools toggle (üst bar) */
  body.page-home .info-nav-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--headerH, 64px) + 12px);
    z-index: 10000;

    padding: 0.5rem 1.2rem;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    
    border-radius: 999px;
    background: linear-gradient(145deg, #f3e6dd, #d8b8a4);
    color: #3b2f29;
    border: 1px solid #c98f78;
    box-shadow:
      0 3px 8px rgba(120, 88, 70, 0.28),
      inset 0 1px 0 rgba(255, 248, 243, 0.9);
    
    cursor: pointer;
    transition: all 0.18s ease;
  }
  
  body.page-home .info-nav-toggle:hover{
    transform: translateX(-50%) translateY(-1px);
    box-shadow:
      0 5px 12px rgba(120, 88, 70, 0.32),
      inset 0 1px 0 rgba(255, 248, 243, 0.9);
  }

  /* Panel */
  body.page-home #infoNavPanel.info-nav-hero{
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--headerH) + 64px);
    width: 280px;
    max-width: calc(100vw - 32px);

    padding: 10px;
    border-radius: 18px;
    background: rgba(243, 230, 221, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 143, 120, 0.6);
    box-shadow: 0 14px 30px rgba(0,0,0,0.20);

    max-height: 40vh;
    overflow: auto;
    z-index: 9999;
  }

  body.page-home #infoNavPanel.info-nav-hero.is-open{
    display: flex;
  }

  body.page-home #infoNavPanel .info-nav-link{
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    font-size: 0.86rem;
    gap: 0.6rem;
  }

  body.page-home #infoNavPanel .info-nav-icon{
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
  }

  body.page-home #infoNavPanel .info-nav-icon svg{
    width: 18px;
    height: 18px;
  }

  body.page-home .hero-inner{
    padding-top: var(--home-hero-top);
  }

  body.page-home .corner-logo{
    z-index: 100;  /* ✅ Normal z-index, sağ alt köşede */
  }
}

@media (max-width: 1024px){
  body{ background-position: center 40px; }

  .info-nav-hero{
    left: 14px;
    width: 210px;
  }

  /* ✅ Tablet: corner logo header'a yakın */
  .corner-logo{
    width: 120px;
    height: 120px;
    top: calc(var(--headerH, 64px) + 6px);  /* ✅ Header'ın hemen altında */
    bottom: auto;
    right: 16px;
  }

  /* Logo metinlerini tablet için küçült */
  .logo-main{
    font-size: 0.95rem;
    letter-spacing: 0.12em;
  }

  .logo-sub{
    font-size: 0.65rem;
    letter-spacing: 0.14em;
  }

  .site-logo{
    height: 48px;
    width: auto;
  }

  /* Tablet'te de dil seçeneği görünsün (nav linkler gizli) */
  .header-inner{
    justify-content: space-between;
    align-items: center;
  }

  .main-nav {
    display: flex;
    align-items: center;
  }

  .main-nav a {
    display: none; /* Home/About linklerini gizle */
  }

  /* Dil değiştirici: dikey (üst üste) */
  .main-nav .lang-switch {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    margin-left: 0;
  }

  .main-nav .lang-btn {
    padding: 0.3rem 0.55rem;
    font-size: 0.7rem;
    border-radius: 4px;
    min-width: 36px;
    text-align: center;
  }
}

@media (max-width: 768px){
  body{ background-position: center 20px; }

  /* ✅ Header: logo solda + dil seçeneği sağda */
  .header-inner{
    justify-content: space-between;
    padding: 0 1rem;
    align-items: center;
  }

  /* Logo metinlerini mobil için küçült */
  .logo-main{
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }

  .logo-sub{
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    white-space: nowrap; /* Tek satırda kalmasını sağla */
  }

  /* Logo resmini küçült */
  .site-logo{
    height: 40px;
    width: auto;
  }

  /* Navigation linklerini gizle ama dil değiştiricisini göster */
  .main-nav {
    display: flex;
    align-items: center;
  }

  .main-nav a {
    display: none; /* Home/About linklerini gizle */
  }

  /* Dil değiştirici: dikey (üst üste) */
  .main-nav .lang-switch {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
    margin-left: 0;
  }

  /* Dil butonlarını mobil için optimize et - daha küçük */
  .main-nav .lang-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 4px;
    min-width: 32px;
    text-align: center;
  }

  :root{
    --home-hero-top: calc(2.5rem + 72px);
    --home-cats-gap: 2rem;
  }

  body.page-home .hero-inner{
    padding-top: var(--home-hero-top);
  }

  /* ---------- HOME: Info & Tools (mobile) ---------- */

  /* Toggle - sola kaydırıldı */
  body.page-home .info-nav-toggle{
    position: fixed;
    left: 12px;  /* ✅ Sola kaydırıldı, ortalamadan çıktı */
    transform: none;  /* ✅ translateX kaldırıldı */
    right: auto;
    top: calc(var(--headerH, 64px) + 10px);
    z-index: 10000;

    width: auto;  /* ✅ min-content gibi davransın */
    max-width: calc(100vw - 100px);  /* ✅ Sağdaki logo için yer bırak */
    justify-content: center;
    text-align: center;
    padding: 0.5rem 1rem;
  }

  /* Panel (dropdown) */
  body.page-home #infoNavPanel.info-nav-hero{
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: calc(var(--headerH, 64px) + 56px);
    z-index: 9999;

    width: min(280px, calc(100vw - 24px));
    display: none;

    padding: 10px;
    border-radius: 18px;
    background: rgba(243, 230, 221, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(201, 143, 120, 0.6);
    box-shadow: 0 14px 30px rgba(0,0,0,0.20);

    max-height: 62vh;
    overflow: auto;
  }

  body.page-home #infoNavPanel.info-nav-hero.is-open{
    display: flex;
  }

  body.page-home #infoNavPanel .info-nav-link{
    width: 100%;
  }

  body.page-home #infoNavPanel.info-nav-hero .info-nav-link{
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    font-size: 0.86rem;
    gap: 0.55rem;
  }

  body.page-home #infoNavPanel.info-nav-hero .info-nav-icon{
    width: 30px;
    height: 30px;
  }

  body.page-home #infoNavPanel.info-nav-hero .info-nav-icon svg{
    width: 18px;
    height: 18px;
  }

  body.page-home #infoNavPanel.info-nav-hero .info-nav-label{
    font-size: 0.86rem;
    line-height: 1.15;
  }

  body.page-home #infoNavPanel.info-nav-hero .info-nav-link:hover{
    transform: none;
  }

  body.page-home .corner-logo{
    z-index: 10000;  /* ✅ Info & Tools ile aynı seviyede */
    width: 75px;
    height: 75px;
    top: calc(var(--headerH, 64px) + 10px);  /* ✅ Info & Tools ile aynı hizada */
    bottom: auto;
    right: 12px;  /* ✅ Sağ üst köşede, Info & Tools'un yanında */
  }
}

@media (max-width: 480px){
  /* ✅ Grid: 2 kolon zorla (yukarıdaki auto-fit override) */
  .category-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .category-card{
    padding-top: 72%;  /* ✅ 62% → 72%: daha iyi oran */
  }

  .category-text-box{
    bottom: 6%;
  }

  .category-text-box h3{
    font-size: 0.85rem;  /* ✅ 0.95rem → 0.85rem: küçük ekranda sığsın */
    white-space: normal;
  }

  .corner-logo{
    width: 56px;
    height: 56px;
    top: calc(var(--headerH, 64px) + 12px);  /* ✅ Info & Tools ile aynı hizada */
    bottom: auto;
    right: 10px;
  }

  body.page-home .info-nav-toggle{
    left: 10px;  /* ✅ Sola kaydırıldı */
    transform: none;
    right: auto;
    width: auto;
    max-width: calc(100vw - 80px);  /* ✅ Logo için yer bırak */
  }

  body.page-home #infoNavPanel.info-nav-hero{
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: min(240px, calc(100vw - 20px));
    max-width: none;
  }
}

/* Elegant language switch */
.lang-switch{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.lang-btn{
  background: none;
  border: none;
  padding: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.45);
  cursor: pointer;
  transition: color 0.2s ease;
}

/* Ayırıcı karakter kaldırıldı - mobil/tablet dikey yerleşimde gereksiz */
.lang-btn::after{
  content: "";
  margin: 0;
}

.lang-btn:last-child::after{
  content: "";
  margin: 0;
}

.lang-btn:hover{
  color: rgba(0,0,0,0.75);
}

.lang-btn.is-active{
  color: rgba(0,0,0,0.95);
  font-weight: 600;
  cursor: default;
}

.lang-btn.is-active{
  text-decoration: underline;
  text-underline-offset: 3px;
}