﻿:root{
  --ct-bg: #f4efe6;
  --ct-paper: #fbf8f1;
  --ct-ink: #1f2426;
  --ct-muted: rgba(31,36,38,.68);
  --ct-line: rgba(31,36,38,.12);
  --ct-shadow: 0 14px 40px rgba(0,0,0,.10);
  --ct-radius: 20px;
}

/* Header & corner-logo now consolidated in style.css */

/* Language Switcher - Gold accent for Collecting Tips */
.lang-switch {
  display: flex;
  gap: 1px;
  background: linear-gradient(135deg, rgba(184, 138, 43, 0.08), rgba(184, 138, 43, 0.12));
  border: 1px solid rgba(184, 138, 43, 0.2);
  border-radius: 7px;
  padding: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  margin-left: auto;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: rgba(31, 36, 38, 0.6);
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  position: relative;
  min-width: 32px;
}

.lang-btn::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 1.5px;
  background: rgba(184, 138, 43, 0.6);
  border-radius: 2px;
  transition: transform 0.2s ease;
}

.lang-btn[aria-pressed="true"] {
  background: rgba(251, 248, 241, 0.9);
  color: var(--ct-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.lang-btn[aria-pressed="true"]::after {
  transform: translateX(-50%) scaleX(1);
}

.lang-btn:hover {
  background: rgba(251, 248, 241, 0.7);
  color: var(--ct-ink);
}

/* Corner-logo & responsive rules now in style.css */

/* =========================================================
   PostcardPolis Collecting Tips Background
   ========================================================= */

.ct-wrap{
  padding: 26px 0 50px;
}

.ct-container{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
  box-sizing: border-box;
}

@media (max-width: 600px){
  .ct-container{
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* =========================================================
   Views
   ========================================================= */
.ct-view{ display: none; }
.ct-view--active{ display: block; }

/* =========================================================
   Page Header
   ========================================================= */
.ct-head{
  padding: 18px 0 10px;
}
.ct-head__title{
  margin: 0;
  font-size: clamp(28px, 3.2vw, 44px);
}
.ct-head__subtitle{
  margin: 10px 0 0;
  color: var(--ct-muted);
  line-height: 1.6;
}

/* =========================================================
   List Grid — Single Column
   ========================================================= */
.ct-grid{
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.ct-item{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;

  text-align: left;
  border: 1px solid var(--ct-line);
  background: rgba(251,248,241,.75);
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-shadow);
  padding: 10px 14px;
  cursor: pointer;

  transition: background-color .2s ease, border-color .2s ease, transform .12s ease;
}

.ct-item::before{
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: transparent;
  border-radius: 2px;
  transition: background-color .2s ease, width .2s ease;
}

.ct-item:hover{
  background: rgba(251,248,241,.97);
  border-color: rgba(184,138,43,.55);
}

.ct-item:hover::before{
  background: rgba(184,138,43,.55);
}

.ct-item.is-active{
  background: rgba(251,248,241,.88);
  border-color: rgba(31,36,38,.18);
}

.ct-item.is-active::before{
  background: rgba(31,36,38,.22);
}

.ct-item:focus-visible{
  outline: none;
  border-color: rgba(184,138,43,.60);
}

.ct-item__roman{
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ct-line);
  background: rgba(0,0,0,.03);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.ct-item__title{
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

/* =========================================================
   Detail View
   ========================================================= */
.ct-detailBar{
  margin: 8px 0 16px;
}
.ct-back{
  border: 1px solid var(--ct-line);
  background: rgba(251,248,241,.75);
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
}

.ct-back:active{
  transform: translateY(1px);
}

/* =========================================================
   Article Head
   ========================================================= */
.ct-article__head{
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: start;
  margin: 12px 0 12px;
}
.ct-article__kicker{
  width: 44px; 
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ct-line);
  background: rgba(0,0,0,.03);
  font-weight: 800;
}
.ct-article__title{
  margin: 0;
  font-size: 28px;
}
.ct-article__subtitle{
  margin: 6px 0 0;
  color: var(--ct-muted);
  font-style: italic;
}

/* =========================================================
   Content Card
   ========================================================= */
.ct-card{
  border: 1px solid var(--ct-line);
  background: rgba(251,248,241,.94);
  border-radius: var(--ct-radius);
  box-shadow: var(--ct-shadow);
  overflow: hidden;
}
.ct-card__body{
  padding: 18px 18px 10px;
  line-height: 1.75;
}
.ct-card__body p{ 
  margin: 0 0 14px; 
}

/* =========================================================
   Quote Block
   ========================================================= */
.ct-quote{
  margin: 16px 0;
  padding: 14px 14px;
  border-left: 3px solid rgba(184,138,43,.55);
  background: rgba(184,138,43,.08);
  border-radius: 14px;
}

.ct-quote p{
  margin: 0;
}

/* =========================================================
   Table
   ========================================================= */
.ct-table{
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 15px;
}

.ct-table th,
.ct-table td{
  padding: 10px 12px;
  border-bottom: 1px solid var(--ct-line);
  text-align: left;
  vertical-align: top;
}

.ct-table thead th{
  font-weight: 700;
  color: var(--ct-ink);
  background: rgba(0,0,0,.03);
}

.ct-table tbody tr:hover{
  background: rgba(184,138,43,.06);
}

/* =========================================================
   Intro Overlay — Fixed for iPad & All Devices
   ========================================================= */
.ct-intro{
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: none;
}

.ct-intro.is-active{
  display: block;
}

.ct-intro__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 1;
}

.ct-intro__card{
  position: relative;
  max-width: 760px;
  margin: 8vh auto 0;
  padding: 14px;
  z-index: 2;
}

.ct-intro__media{
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}

.ct-intro__media img{
  width: 100%;
  height: auto;
  display: block;
}

.ct-intro__overlayText{
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0,0,0,.38);
  color: #fff;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ct-intro__title{
  font-size: 22px;
  font-weight: 700;
}

.ct-intro__subtitle{
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  opacity: .9;
}

.ct-intro__skip{
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;

  border: 1px solid rgba(255,255,255,.35);
  background: rgba(0,0,0,.28);
  color: rgba(255,255,255,.92);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .02em;
  cursor: pointer;

  opacity: .75;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.ct-intro__skip:hover{ 
  opacity: 1; 
}

/* Fade-out animation */
.ct-intro.fade-out{
  animation: ctIntroFade .6s ease forwards;
}

@keyframes ctIntroFade{
  to{
    opacity: 0;
    transform: translateY(-6px);
  }
}
/* iPad Mini & Tablet specific overlay fixes (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .ct-intro__card {
    margin: 6vh auto 0;
    max-width: 680px;
  }

  .ct-intro__media {
    border-radius: 18px;
  }

  .ct-intro__overlayText {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 12px 14px;
  }

  .ct-intro__title {
    font-size: 20px;
  }

  .ct-intro__subtitle {
    font-size: 13px;
  }

  /* Ensure header stays below overlay */
  body.collecting-tips .site-header {
    position: relative;
    z-index: 50;
  }
  
  /* Ensure corner logo stays below overlay */
  body.collecting-tips .corner-logo {
    z-index: 80;
  }
}

/* Mobile specific overlay fixes */
@media (max-width: 768px) {
  .ct-intro__card {
    margin: 4vh auto 0;
    padding: 10px;
  }

  .ct-intro__media {
    border-radius: 16px;
  }

  .ct-intro__overlayText {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
  }

  .ct-intro__title {
    font-size: 18px;
  }

  .ct-intro__subtitle {
    font-size: 12px;
  }

  .ct-intro__skip {
    top: 14px;
    right: 14px;
    font-size: 11px;
    padding: 5px 9px;
  }
}


/* =========================================================
   View Transitions
   ========================================================= */
.ct-view{ 
  will-change: opacity, transform; 
}

.ct-view.is-enter{
  opacity: 0;
  transform: translateY(8px);
}
.ct-view.is-enter.is-enter-active{
  opacity: 1;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease;
}

.ct-view.is-leave{
  opacity: 1;
  transform: translateY(0);
}
.ct-view.is-leave.is-leave-active{
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

/* =========================================================
   Background (PostcardPolis specific)
   ========================================================= */
html body.collecting-tips{
  background-image: url("../images/collecting/collecting-tips-bg.jpg");
  background-size: cover;
  background-position: center 10%;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #f2efe6;
  min-height: 100vh;
}

/* Mobile: use scroll for performance */
@media (max-width: 768px){
  html body.collecting-tips{
    background-attachment: scroll;
  }
}

/* =========================================================
   Language Visibility
   ========================================================= */
/* Default: hide all languages */
.lang-en .ct-en { display: block; }
.lang-en .ct-de { display: none; }
.lang-en .ct-fr { display: none; }

.lang-de .ct-en { display: none; }
.lang-de .ct-de { display: block; }
.lang-de .ct-fr { display: none; }

.lang-fr .ct-en { display: none; }
.lang-fr .ct-de { display: none; }
.lang-fr .ct-fr { display: block; }

/* =========================================================
   MOBILE READABILITY (Critical Step 1)
   ========================================================= */
@media (max-width: 768px){

  /* Main article text */
  .ct-card__body{
    font-size: 16px;
    line-height: 1.7;
    padding: 18px 16px 14px;
  }

  .ct-card__body p{
    margin-bottom: 16px;
  }

  /* Article title */
  .ct-article__title{
    font-size: 22px;
    line-height: 1.25;
  }

  /* Kicker */
  .ct-article__kicker{
    font-size: 16px;
  }

  /* Active item styling */
  .ct-item.is-active{
    background: rgba(251,248,241,.92);
    border-color: rgba(31,36,38,.22);
  }

  .ct-item.is-active::before{
    background: rgba(184,138,43,.75);
    width: 3px;
  }

  .ct-item.is-active .ct-item__roman{
    background: rgba(184,138,43,.12);
    border-color: rgba(184,138,43,.45);
  }

  /* Button active feedback */
  .ct-item:active{
    transform: translateY(1px);
    background: rgba(251,248,241,1);
  }
}

/* =========================================================
   TABLET — iPad Mini Balanced Padding
   ========================================================= */
@media (min-width: 768px) and (max-width: 1023px){
  html body.collecting-tips .ct-container{
    padding-left: clamp(140px, 18vw, 260px);
    padding-right: clamp(28px, 4vw, 60px);
    max-width: 1100px;
  }
  
  /* Center the content better on iPad */
  body.collecting-tips .ct-card {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Grid items more centered */
  body.collecting-tips .ct-grid {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* =========================================================
   DESKTOP — Center Content
   ========================================================= */
@media (min-width: 768px){
  body.collecting-tips .ct-card{
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Desktop only — shift text to the right */
@media (min-width: 1024px){
  .collecting-tips .ct-container{
    margin-left: auto;
    margin-right: 8%;
  }
}