/*
Theme Name: Simple Hero Posts
Theme URI: https://luziaemmenegger.ch
Description: Hero section per post with expanding contact banner (no header).
Author: Kevin Mueller
Version: 3.6
License: GPL-2.0+
Text Domain: simple-hero-posts
*/

/* ===== Base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.6;
}

a { color: #222; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* ===== Hero posts layout (index page) ===== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: left;
  scroll-snap-align: start;
  padding: 4rem 1rem;
}

.overlay-box {
  background: rgba(255, 255, 255, 0.78);
  padding: 3rem 4rem;
  max-width: 1000px;
  width: 90%;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  text-align: left;
  overflow: hidden;
}

.overlay-box h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  margin-bottom: 1.4rem;
  color: #000;
}

.overlay-box .hero-content {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  line-height: 1.8;
  color: #333;
  /* kein line-clamp, kein Fade-Out mehr */
}

/* ===== Emphasis text in hero content ===== */ 
.overlay-box .hero-content strong, 
.overlay-box .hero-content b {   
font-weight: 600;   
color: #111;   
letter-spacing: 0.01em; 
} 

.overlay-box .hero-content em, 
.overlay-box .hero-content i {   
font-style: italic;   
color: #444;           
letter-spacing: 0.01em; }

/* Scroll arrows */
.scroll-arrow {
  position: absolute;
  bottom: 24px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-right: 3px solid rgba(255,255,255,0.9);
  border-bottom: 3px solid rgba(255,255,255,0.9);
  transform: translateX(-50%) rotate(45deg);
  animation: bounce 1.8s infinite;
}

/* Up arrow to previous section */
.scroll-arrow-up {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 18px;
  height: 18px;
  border-right: 3px solid rgba(255,255,255,0.9);
  border-top: 3px solid rgba(255,255,255,0.9);
  transform: translateX(-50%) rotate(-45deg);
  animation: bounce-up 1.8s infinite;
}

@keyframes bounce {
  0%,20%,50%,80%,100% { transform: translateX(-50%) translateY(0) rotate(45deg); }
  40% { transform: translateX(-50%) translateY(6px) rotate(45deg); }
  60% { transform: translateX(-50%) translateY(3px) rotate(45deg); }
}

@keyframes bounce-up {
  0%,20%,50%,80%,100% { transform: translateX(-50%) translateY(0) rotate(-45deg); }
  40% { transform: translateX(-50%) translateY(-6px) rotate(-45deg); }
  60% { transform: translateX(-50%) translateY(-3px) rotate(-45deg); }
}

/* ===== Contact toggle + banner ===== */
.contact-toggle {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.contact-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}
.contact-toggle:focus-visible {
  outline: 3px solid rgba(6,147,227,0.4);
  outline-offset: 2px;
}

.contact-banner {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  z-index: 1000;
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform .28s ease;
  background: linear-gradient(to right, rgba(255,255,255,0.94), rgba(255,255,255,0.9));
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  backdrop-filter: saturate(120%) blur(4px);
  -webkit-backdrop-filter: saturate(120%) blur(4px);
  overflow: hidden;
}
.contact-banner.is-open { transform: scaleX(1); }

.contact-inner {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px 0 70px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 28px;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1rem;
  color: #111;
}

.contact-item {
  display: inline-flex;
  align-items: center;
}

.contact-inner a {
  display: inline-flex;
  align-items: center;
  color: #111;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
.contact-inner a:hover { border-bottom-color: rgba(0,0,0,0.35); }

/* ===== Mobile layout for banner ===== */
@media (max-width: 768px) {
  .contact-banner { height: auto; min-height: 60px; }
  .contact-inner {
    height: auto;
    padding: 12px 16px 12px 60px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 10px 16px;
    font-size: 0.95rem;
  }
  .contact-item {
    display: block;
    width: 100%;
  }
}

/* ===== Responsive hero tweaks ===== */
@media (max-width: 1200px) {
  .overlay-box { max-width: 900px; padding: 2.6rem 3.2rem; }
  .overlay-box h2 { font-size: 2rem; }
  .overlay-box .hero-content {
    font-size: 1.15rem;
    line-height: 1.7;
  }
}
@media (max-width: 768px) {
  .overlay-box {
    max-width: 95%;
    padding: 1.8rem 1.5rem;
    margin: 0 1rem;
  }
  .overlay-box h2 { font-size: 1.6rem; }
  .overlay-box .hero-content {
    font-size: 1.05rem;
    line-height: 1.6;
  }
}

/* ===== Make entire overlay-box clickable ===== */
.overlay-box {
  position: relative;
  cursor: pointer;
}

.overlay-box .overlay-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: block;
  background: transparent;
}

.overlay-box > *:not(.overlay-link) {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

@media (hover:hover) and (pointer:fine) {
  .overlay-box:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    transform: translateY(-1px);
    transition: box-shadow .2s ease, transform .2s ease;
  }
}

/* ===== Single Post Page ===== */
.single-post-container {
  background: #fff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.single-post-content {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-radius: 12px;
  max-width: 900px;
  width: 100%;
  padding: 3rem 3rem 4rem;
}

.single-post-title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #111;
  line-height: 1.2;
}

.single-post-body {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #333;
}

.single-post-body p {
  margin-bottom: 1.4rem;
}

.single-post-body img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
}

/* Prev/Next nav on single */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  font-size: 1rem;
}

.post-nav a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.15);
}
.post-nav a:hover {
  border-bottom-color: rgba(0,0,0,0.35);
}

/* Responsive tweaks for single */
@media (max-width: 768px) {
  .single-post-content {
    padding: 2rem 1.5rem 3rem;
  }
  .single-post-title {
    font-size: 2rem;
  }
  .single-post-body {
    font-size: 1.05rem;
  }
}

/* ===== Floating Home Button (single posts only) ===== */
.home-button {
  position: fixed;
  top: 64px;
  left: 14px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.9);
  color: #222;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  text-decoration: none;
}

.home-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.home-button:focus-visible {
  outline: 3px solid rgba(6,147,227,0.4);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .home-button {
    top: 60px;
    left: 14px;
  }
}
