/* =========================================================
   Familie Bieri – minessa.ch (statische Version, kein PHP)
   ========================================================= */

:root {
  --color-primary: #0f7d8c;
  --color-primary-dark: #0a5c67;
  --color-accent: #ff9f5b;
  --color-bg: #f7faf9;
  --color-bg-alt: #eef5f4;
  --color-text: #1f2d2e;
  --color-text-light: #5b6b6c;
  --color-white: #ffffff;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(15, 125, 140, 0.12);
  --shadow-hover: 0 16px 40px rgba(15, 125, 140, 0.2);
  --font-heading: 'Quicksand', sans-serif;
  --font-body: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--color-text); background: var(--color-bg); line-height: 1.6; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; color: var(--color-primary-dark); margin: 0 0 0.5em; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header / Navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; color: var(--color-primary-dark); display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 1.3rem; }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-weight: 500; color: var(--color-text); position: relative; padding: 6px 0; }
.main-nav a:hover { color: var(--color-primary); }
.main-nav a.nav-logout { background: var(--color-bg-alt); padding: 8px 16px; border-radius: 999px; color: var(--color-primary-dark); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--color-primary-dark); border-radius: 2px; }

/* ---------- Hero / Banner ---------- */
.hero { position: relative; height: 78vh; min-height: 480px; max-height: 780px; overflow: hidden; display: flex; align-items: flex-end; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,40,45,0.05) 0%, rgba(8,30,34,0.75) 100%); }
.hero-content { position: relative; z-index: 2; color: var(--color-white); padding: 0 24px 56px; max-width: 1100px; margin: 0 auto; width: 100%; }
.hero-content h1 { color: var(--color-white); font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 0.2em; text-shadow: 0 4px 18px rgba(0,0,0,0.35); }
.hero-content p { font-size: clamp(1rem, 2vw, 1.3rem); margin: 0 0 1.4em; opacity: 0.95; text-shadow: 0 2px 10px rgba(0,0,0,0.35); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 14px 30px; border-radius: 999px; font-weight: 600; font-family: var(--font-body); font-size: 1rem; cursor: pointer; border: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; }
.btn-primary { background: var(--color-accent); color: #2b1a0d; box-shadow: 0 8px 24px rgba(255, 159, 91, 0.4); }
.btn-primary:hover { background: #ffb27a; transform: translateY(-2px); color: #2b1a0d; }
.btn-outline { background: transparent; border: 2px solid var(--color-white); color: var(--color-white); }
.btn-outline:hover { background: rgba(255,255,255,0.15); color: var(--color-white); }
.btn-secondary { background: var(--color-primary); color: var(--color-white); }
.btn-secondary:hover { background: var(--color-primary-dark); color: var(--color-white); }
.btn-full { width: 100%; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title { text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--color-text-light); max-width: 620px; margin: 0 auto 48px; }

/* Family member cards */
.family-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.family-card { background: var(--color-white); border-radius: var(--radius); padding: 28px 20px; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.family-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.family-avatar { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--color-primary), var(--color-accent)); color: var(--color-white); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 1.6rem; font-weight: 700; margin: 0 auto 16px; }
.family-card h3 { margin-bottom: 4px; }
.family-card p { color: var(--color-text-light); font-size: 0.95rem; margin: 0; }

/* Gallery teaser */
.gallery-teaser { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; background: var(--color-white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.gallery-teaser .lock-icon { font-size: 2.4rem; }
.gallery-teaser-text { flex: 1 1 320px; }

/* ---------- Login / Auth Overlay ---------- */
.auth-wrapper { min-height: calc(100vh - 220px); display: flex; align-items: center; justify-content: center; padding: 60px 20px; }
.auth-card { background: var(--color-white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px 40px; max-width: 420px; width: 100%; text-align: center; }
.auth-card .lock-icon-big { font-size: 2.6rem; margin-bottom: 8px; }
.auth-card p.subtitle { color: var(--color-text-light); margin-bottom: 28px; }
.form-group { text-align: left; margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--color-text); }
.form-group input[type="password"], .form-group input[type="text"] { width: 100%; padding: 12px 14px; border: 1.5px solid #dce7e6; border-radius: 10px; font-size: 1rem; font-family: var(--font-body); transition: border-color 0.15s ease; }
.form-group input:focus { outline: none; border-color: var(--color-primary); }
.error-message { background: #fdecea; color: #a12f2f; padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 18px; }
.info-message { background: var(--color-bg-alt); color: var(--color-text-light); padding: 12px 16px; border-radius: 10px; font-size: 0.9rem; margin-bottom: 18px; }

/* ---------- Gallery / Album Grid ---------- */
.page-hero { background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark)); color: var(--color-white); padding: 64px 0 48px; text-align: center; }
.page-hero h1 { color: var(--color-white); margin-bottom: 8px; }
.page-hero p { opacity: 0.9; margin: 0; }
.breadcrumb { padding: 20px 0 0; font-size: 0.9rem; color: var(--color-text-light); }
.breadcrumb a { font-weight: 600; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; margin-top: 40px; }
.album-card { background: var(--color-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease; display: block; cursor: pointer; }
.album-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.album-thumb { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--color-bg-alt); display: block; }
.album-thumb-placeholder { width: 100%; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--color-bg-alt), #dcebe9); display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--color-primary); }
.album-info { padding: 16px 18px 20px; }
.album-info h3 { margin-bottom: 4px; font-size: 1.1rem; }
.album-info p { margin: 0; color: var(--color-text-light); font-size: 0.88rem; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--color-text-light); }
.empty-state .emoji { font-size: 2.6rem; display: block; margin-bottom: 12px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 32px; }
.photo-grid a { display: block; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform 0.25s ease; }
.photo-grid a:hover img { transform: scale(1.06); }

/* Lightbox */
.lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(8, 20, 22, 0.92); z-index: 1000; align-items: center; justify-content: center; padding: 24px; }
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 10px 50px rgba(0,0,0,0.5); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; background: rgba(255,255,255,0.12); border: none; color: var(--color-white); font-size: 1.6rem; width: 48px; height: 48px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease; }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.25); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Password Gate Overlay (client-side) ---------- */
.gate-overlay { position: fixed; inset: 0; background: var(--color-bg); z-index: 900; display: flex; align-items: center; justify-content: center; }
.gate-hidden { display: none !important; }

/* Loading state */
.loading-state { text-align: center; padding: 60px 20px; color: var(--color-text-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-primary-dark); color: rgba(255,255,255,0.85); padding: 32px 0; margin-top: 40px; text-align: center; }
.footer-inner p { margin: 4px 0; }
.footer-sub { font-size: 0.85rem; opacity: 0.75; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--color-white); flex-direction: column; align-items: flex-start; padding: 16px 24px 24px; gap: 16px; box-shadow: 0 12px 20px rgba(0,0,0,0.08); display: none; }
  .main-nav.open { display: flex; }
  .gallery-teaser { padding: 28px; }
  .auth-card { padding: 34px 26px; }
}
