﻿/* =========================
   OTTOWOMAN.cpa – HISTORY PAGE
   Only affects pages with .history-page on <body>
   ========================= */

/* HERO
   ------------------------- */

.history-page .history-hero {
  padding: 2.5rem 0 1.5rem;
}

.history-page .history-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.25rem;
  text-align: center;
}

.history-page .history-eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.4rem;
}

.history-page .history-hero-inner h1 {
  font-size: 2rem;
  margin: 0 0 0.6rem;
}

.history-page .history-hero-text {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #555;
}

/* Mobile: Compact hero */
@media (max-width: 768px) {
  .history-page .history-hero {
    padding: 1.25rem 0 0.75rem;
  }

  .history-page .history-hero-inner {
    padding: 0 1rem;
  }

  .history-page .history-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    margin-bottom: 0.25rem;
  }

  .history-page .history-hero-inner h1 {
    font-size: 1.5rem;
    margin: 0 0 0.3rem;
    line-height: 1.2;
  }

  .history-page .history-hero-text,
  .history-page .history-softintro {
    font-size: 0.8rem;
    line-height: 1.3;
    margin: 0;
  }
}

/* MAIN 3-COLUMN LAYOUT
   ------------------------- */

.history-layout {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1.25rem 2.5rem;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 2.5rem;
  align-items: flex-start;
}

/* LEFT: TIMELINE
   ------------------------- */

.history-page .history-timeline-nav {
  font-size: 0.9rem;
  position: sticky;
  top: 0.5rem;
  align-self: flex-start;
}

.history-page .history-timeline-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.75;
  margin: 0 0 0.75rem;
}

.history-page .history-timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 2px solid rgba(0, 0, 0, 0.08);
}

.history-page .history-timeline-item {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.history-page .history-timeline-item:hover {
  background: rgba(255, 255, 255, 0.4);
}

.history-timeline-item.is-active {
  background: rgba(255, 255, 255, 0.4);
  border-radius: 12px;
}

.history-page .history-timeline-dot {
  position: absolute;
  left: -7px;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 2px solid rgba(0, 0, 0, 0.4);
  background: #fff;
}

.history-page .history-timeline-item.is-active .history-timeline-dot {
  border-width: 3px;
}

.history-page .history-timeline-year {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.history-page .history-timeline-buttons {
  display: flex;
  gap: 0.25rem;
}

.history-page .history-toggle-btn {
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  font-size: 0.75rem;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s;
}

.history-page .history-toggle-btn:hover {
  transform: translateY(-1px);
}

.history-page .history-toggle-btn.is-active {
  border-color: rgba(0, 0, 0, 0.6);
  font-weight: 600;
}

/* MIDDLE: PANEL
   ------------------------- */

.history-page .history-main {
  min-width: 0;
}

.history-page .history-panel {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.history-page .history-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.history-page .history-panel-label {
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
}

.history-page .history-panel-year-display {
  font-size: 0.95rem;
  font-weight: 600;
}

.history-page .history-panel-body {
  font-size: 0.95rem;
  line-height: 1.6;
}

.history-page .history-panel-body p {
  margin: 0 0 0.75rem;
}

.history-page .history-entry-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

/* RIGHT: PICTURES
   ------------------------- */

.history-page .history-images {
  font-size: 0.85rem;
  align-self: flex-start;
  max-width: 320px;
}

.history-page .history-image-main img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.history-image-main img {
  transform: translateX(40px);
}

.history-page .history-image-caption {
  margin-top: 0.8rem;
  line-height: 1.4;
  opacity: 0.8;
}

/* HIDDEN TEMPLATES SECTION */
.history-page .history-content-templates {
  display: none;
}

/* DESKTOP WIDE TWEAKS */
@media (min-width: 1200px) {
  .history-page .history-layout {
    max-width: 1400px;
    grid-template-columns: 220px minmax(0, 1fr) 360px;
    padding-right: 0;
  }

  .history-page .history-images {
    justify-self: flex-end;
    margin-right: -40px;
    max-width: 380px;
  }
}

/* RESPONSIVE */
/* 1024px ve altı için eski kural kaldırıldı - artık aşağıdaki detaylı media query'ler kullanılıyor */

@media (max-width: 768px) {
  /* Mobil: tek sütun düzen */
  .history-page .history-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "timeline"
      "main"
      "images";
    gap: 1rem;
    padding: 0 1rem 2rem;
  }

  .history-page .history-timeline-nav {
    grid-area: timeline;
    order: 1;
  }

  .history-page .history-main {
    grid-area: main;
    order: 2;
  }

  .history-page .history-images {
    grid-area: images;
    order: 3;
    max-width: 100%;
    width: 100%;
  }

  /* Mobilde resim transform'u kaldır */
  .history-image-main img {
    transform: none;
    width: 100%;
    height: auto;
  }

  .history-page .history-panel {
    padding: 1rem 1.1rem;
  }
}

/* IMAGE SLIDER CONTROLS */
.history-page .history-image-controls {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.history-page .history-image-btn {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.history-page .history-image-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.history-page .history-image-btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.history-page .history-main,
.history-page .history-images {
  transition: transform 0.25s ease;
}

/* =========================
   LANGUAGE CONTROL - CRITICAL
   Controls visibility of ct-tr and ct-en spans
   ========================= */

/* When Turkish is active, hide English */
body.lang-tr .ct-en {
  display: none !important;
}

/* When English is active, hide Turkish */
body.lang-en .ct-tr {
  display: none !important;
}

/* Ensure inline elements display correctly */
body.lang-tr .ct-tr {
  display: inline !important;
}

body.lang-en .ct-en {
  display: inline !important;
}

/* Block elements need block display */
body.lang-tr p.ct-tr,
body.lang-tr div.ct-tr,
body.lang-tr h1 .ct-tr,
body.lang-tr h2 .ct-tr,
body.lang-tr h3.ct-tr {
  display: block !important;
}

body.lang-en p.ct-en,
body.lang-en div.ct-en,
body.lang-en h1 .ct-en,
body.lang-en h2 .ct-en,
body.lang-en h3.ct-en {
  display: block !important;
}

/* FIX: history-main section must align from top like images */
body.history-page section.history-main {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* === TIMELINE POLISH (A PACK) === */
.history-page .history-timeline-list {
  border-left: 2px solid rgba(0,0,0,0.10);
  padding-left: 0.15rem;
}

.history-page .history-timeline-item {
  padding: 0.85rem 0 0.85rem 1.35rem;
  border-radius: 14px;
}

.history-page .history-timeline-item.is-active {
  background: rgba(255,255,255,0.55);
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.08);
}

.history-page .history-timeline-dot {
  top: 1.05rem;
  border-color: rgba(0,0,0,0.35);
}

.history-page .history-timeline-item.is-active .history-timeline-dot {
  border-color: rgba(0,0,0,0.75);
  transform: scale(1.05);
}

.history-page .history-timeline-year {
  letter-spacing: 0.02em;
}

.history-page .history-toggle-btn {
  background: rgba(255,255,255,0.92);
}

.history-page .history-toggle-btn.is-active {
  background: rgba(255,255,255,1);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}


/* === TIMELINE FOCUS (B PACK) === */
.history-page .history-timeline-item {
  opacity: 0.82;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.history-page .history-timeline-item:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.history-page .history-timeline-item.is-active {
  opacity: 1;
}

/* === P/H BUTTONS REFINEMENT (C PACK) === */
.history-page .history-toggle-btn {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  border-color: rgba(0,0,0,0.14);
  background: rgba(255,255,255,0.9);
}

.history-page .history-toggle-btn:hover {
  border-color: rgba(0,0,0,0.32);
  background: rgba(255,255,255,1);
}

.history-page .history-toggle-btn.is-active {
  border-color: rgba(0,0,0,0.65);
  font-weight: 600;
}

/* =========================
   MOBILE DIAL BAR SYSTEM
   Desktop: hidden
   Mobile: replaces timeline
   ========================= */

/* Desktop'ta dial bar gizli */
.ct-dialbar {
  display: none;
}

/* MOBILE: dial bar görünür, eski timeline gizli */
@media (max-width: 768px){
  
  /* Eski timeline'ı gizle */
  .history-timeline-nav {
    display: none !important;
  }

  /* Dial bar'ı göster */
  .ct-dialbar{
    display: grid;
    position: sticky;
    top: 0;
    z-index: 50;
    grid-template-columns: auto 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    background: rgba(251,248,241,.92);
    backdrop-filter: blur(6px);
    margin: 8px 0 10px;
  }

  /* H/P mode toggle */
  .ct-mode{
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.03);
  }
  
  .ct-mode__btn{
    width: 32px; 
    height: 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
  }
  
  .ct-mode__btn.is-active{
    background: rgba(184,138,43,.14);
    border-color: rgba(184,138,43,.35);
  }

  /* Dial container with prev/next */
  .ct-dial{
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    gap: 6px;
  }
  
  .ct-dial__nav{
    width: 32px; 
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(0,0,0,.03);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
  }

  .ct-dial__nav:active {
    transform: scale(0.95);
  }

  /* Track: scrollable carousel container */
  .ct-dial__track{
    overflow: hidden;
    position: relative;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(255,255,255,.55);
    padding: 8px;
    touch-action: pan-x;
  }

  /* Items wrapper: will transform to show active item */
  .ct-dial__items{
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    will-change: transform;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Individual year chips */
  .ct-dial__item{
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(251,248,241,.75);
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0.5;
    transform: scale(0.92);
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .ct-dial__item.is-active{
    opacity: 1;
    transform: scale(1);
    border-color: rgba(184,138,43,.45);
    background: rgba(251,248,241,.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
}

/* ============================================================
   HISTORY HERO — FIXED (DESKTOP ONLY)
   ============================================================ */

@media (min-width: 1025px) {
  .history-hero {
    height: 0;            /* normal akıştan çıksın */
    margin: 0;
    padding: 0;
  }

  .history-hero-inner {
    position: fixed;
    top: 110px;           /* header altında güvenli mesafe */
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;

    z-index: 20;          /* panel & image'in üstünde ama header'ın altında */
    pointer-events: none;/* metin seçilebilsin ama tıklama yakalamasın */
  }
}

/* ============================================================
   TABLET LAYOUT (Image under text)
   ============================================================ */

@media (min-width: 768px) and (max-width: 1024px) {
  /* Hero'yu tablette normal akışa al (fixed değil) */
  .history-hero {
    height: auto;
    margin: 0;
    padding: 2rem 0 1rem;
  }

  .history-hero-inner {
    position: static;
    transform: none;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 2rem; /* Tablet için padding artırıldı */
    text-align: center;
    pointer-events: auto;
  }

  /* Ana layout için yan boşluklar artırıldı */
  .history-layout {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  /* 2 sütun: solda timeline, sağda içerik */
  .history-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-areas:
      "timeline main"
      "timeline images";
    gap: 18px;
    align-items: start;
  }

  .history-timeline-nav { grid-area: timeline; }
  .history-main         { grid-area: main; }
  .history-images       { grid-area: images; }

  /* Resim alanı metnin altına gelsin, genişlesin */
  .history-images {
    margin-top: 0;
    max-width: none;
  }

  /* Görsel tablette daha dengeli dursun */
  .history-image-main img {
    width: 100%;
    height: auto;
    display: block;
    transform: none; /* Tablet'te kaydırma olmasın */
  }

  /* Caption ve oklar hizalı kalsın */
  .history-image-caption {
    margin-top: 10px;
  }

  /* iPad Pro 1024: görseli büyüt + metne yaklaştır */
  .history-images {
    margin-top: -28px;
  }

  .history-image-main img {
    max-width: 780px;
    margin: 0 auto;
    transform: scale(1.08);
    transform-origin: center top;
  }
}

@media (max-width: 1024px) {
  body { outline: 6px solid hotpink; }
}

/* iPad Air + iPad Pro (tablet) */
@media (max-width: 1024px) {
  .history-images {
    padding-left: 18px;
  }
}

/* =========================================================
   History image navigation – refined arrows
   ========================================================= */

.history-image-controls button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.6);
  color: #333;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.history-image-controls button:hover {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.history-image-controls button:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.9);
}

.history-image-controls button {
  font-family: "Georgia", "Times New Roman", serif;
  font-weight: 400;
}

