/* --- Globale Variablen & Stile --- */
:root {
    --bg-color: #1a1a1a;
    --text-color: #f4f1e9;
    --font-garamond: 'EB Garamond', serif;
    --font-lato: 'Lato', sans-serif;
    --glow-color: #ffeb3b;
    --flame-color: #ff9800;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* =================================================== */
/* ===== LANDING PAGE STILE (DUNKLES DESIGN) ===== */
/* =================================================== */

body { background-color: var(--bg-color); color: var(--text-color); font-family: var(--font-garamond); display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; }
.altar-room { position: relative; width: 90vw; height: 90vh; max-width: 1200px; max-height: 800px; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding-top: 5vh; }
.memorial-header { text-align: center; margin-bottom: 30px; }
.memorial-header h1 { font-size: 3rem; font-weight: 500; font-style: italic; letter-spacing: 1px; }
.memorial-header p { font-size: 1.5rem; font-family: var(--font-garamond); opacity: 0.8; }
.memorial-portrait { position: relative; z-index: 1; margin-bottom: 30px; }
#portrait { max-width: 350px; width: 100%; height: auto; border-radius: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); cursor: pointer; transition: transform 0.3s ease; }
#portrait:hover { transform: scale(1.02); }
.tooltip { position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); background-color: rgba(0, 0, 0, 0.8); color: var(--text-color); padding: 10px 15px; border-radius: 6px; font-family: var(--font-lato); font-size: 0.9rem; opacity: 0; pointer-events: none; transition: opacity 0.4s ease, transform 0.3s ease; z-index: 10; width: 280px; max-width: none; text-align: center; word-wrap: normal; }
.tooltip.tooltip-visible { opacity: 1; pointer-events: auto; }
.tooltip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-left: 0; border-width: 5px; border-style: solid; border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent; }
.tooltip.tooltip--align-left { transform: translateX(-15%); }
.tooltip.tooltip--align-right { transform: translateX(-85%); }
.memorial-portrait:hover .tooltip, .candle:hover .tooltip { opacity: 1; }
.tooltip strong { display: block; margin-bottom: 5px; font-weight: 700; white-space: nowrap; }
.tooltip span { white-space: normal; word-wrap: break-word; }
.candle-circle { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; }
.candle { position: absolute; width: 20px; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.flame { width: 20px; height: 30px; background: radial-gradient(ellipse at bottom, var(--glow-color) 0%, var(--flame-color) 40%, transparent 70%); border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: 0 0 20px 5px var(--glow-color); animation: flicker 1.5s infinite alternate; margin-bottom: -2px; flex-shrink: 0; }
.candle-stub { width: 16px; background-color: #e0e0e0; border-radius: 1px; position: relative; box-shadow: 0 0 5px rgba(0,0,0,0.2); flex-grow: 1; }
.candle-stub::after { content: ''; position: absolute; top: -5px; width: 8px; height: 10px; background-color: #e0e0e0; clip-path: polygon(50% 0%, 100% 50%, 100% 100%, 0% 100%, 0% 50%); border-radius: 0; }
.candle:nth-child(odd) .candle-stub::after { left: -2px; transform: rotate(-15deg); }
.candle:nth-child(even) .candle-stub::after { right: -2px; transform: rotate(15deg); }
@keyframes flicker { 0% { transform: scale(1.0) rotate(-2deg); opacity: 0.9; } 50% { transform: scale(1.05) rotate(2deg); opacity: 1; } 100% { transform: scale(1.02) rotate(-1deg); opacity: 0.95; } }
.cta-container { position: absolute; bottom: 8%; left: 0; width: 100%; text-align: center; z-index: 3; }
.cta-button { display: inline-block; width: 280px; height: 60px; line-height: 60px; font-family: var(--font-garamond); font-size: 1.3rem; font-weight: 400; letter-spacing: 1px; text-decoration: none; color: var(--text-color); background-color: #141414; border-radius: 4px; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); border: none; cursor: pointer; }
.cta-button:hover { background-color: #0f0f0f; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3); }

/* ======================================================== */
/* ===== HAUPTSEITE & UNTERSEITEN (HELLES DESIGN) ===== */
/* ======================================================== */

.page-light { background-color: #c1c8cd; color: #2d2d2d; display: block; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.main-header { display: flex; justify-content: space-between; align-items: center; padding: 30px 5%; max-width: 1400px; margin: 0 auto; font-family: var(--font-lato); }
.logo { font-family: var(--font-garamond); font-size: 1.8rem; font-weight: 500; text-decoration: none; color: #2d2d2d; }
.main-nav { display: flex; align-items: center; gap: 35px; }
.main-nav a { text-decoration: none; color: #2d2d2d; font-size: 1rem; padding-bottom: 5px; border-bottom: 2px solid transparent; transition: border-color 0.3s ease; }
.main-nav a:not(.nav-button):hover { border-color: #2d2d2d; }
.main-nav .nav-button { background-color: transparent; border: 1px solid #2d2d2d; border-radius: 50px; padding: 10px 25px; line-height: normal; transition: all 0.3s ease; }
.main-nav .nav-button:hover, .main-nav .nav-button.active { background-color: #2d2d2d; color: #c1c8cd; border-color: #2d2d2d; }
.content-wrapper { padding: 20px 5% 80px; max-width: 1200px; margin: 0 auto; }
.intro-section { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; margin-top: 40px; }
.intro-text h1 { font-family: var(--font-garamond); font-size: 4rem; font-weight: 500; margin-bottom: 25px; }
.intro-text p { font-family: var(--font-lato); font-size: 1.1rem; line-height: 1.7; margin-bottom: 20px; }
.intro-image img { width: 100%; max-width: 450px; height: auto; border-radius: 8px; }
.subtle-cta { margin-top: 40px; padding: 20px; background-color: rgba(255, 255, 255, 0.2); border-left: 3px solid #2d2d2d; }
.subtle-cta p { margin-bottom: 0; }
.subtle-cta a { color: #2d2d2d; font-weight: 700; }
.form-page-section { display: flex; justify-content: center; padding-top: 40px; }
.form-page-section .form-wrapper { background-color: rgba(255, 255, 255, 0.2); padding: 40px; border-radius: 8px; max-width: 600px; width: 100%; }
.form-page-section .form-wrapper h1 { font-family: var(--font-garamond); font-size: 3rem; text-align: center; margin-bottom: 15px; }
.form-intro { text-align: center; font-family: var(--font-lato); margin-bottom: 30px; opacity: 0.8; }
.form-group { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-group label { font-size: 1rem; opacity: 0.8; }
.form-group input, .form-group textarea { border-radius: 4px; padding: 12px; font-family: var(--font-lato); font-size: 1rem; transition: border-color 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; }
.form-group textarea { resize: vertical; min-height: 100px; }
#char-counter { text-align: right; font-size: 0.8rem; opacity: 0.6; }
.form-button { margin-top: 10px; width: 100%; }
.page-light .form-group input, .page-light .form-group textarea { background-color: #ffffff; border: 1px solid #aab2b8; color: #2d2d2d; }
.page-light .form-group input:focus, .page-light .form-group textarea:focus { border-color: #2d2d2d; }
.page-light .cta-button.form-button { background-color: #2d2d2d; color: #c1c8cd; }
.page-light .cta-button.form-button:hover { background-color: #1a1a1a; }
.main-footer { text-align: center; padding: 40px 5%; margin-top: 60px; border-top: 1px solid rgba(0, 0, 0, 0.1); font-family: var(--font-lato); }
.main-footer a { color: #2d2d2d; text-decoration: none; margin: 0 15px; opacity: 0.7; transition: opacity 0.3s ease; }
.main-footer a:hover { opacity: 1; }
.contact-email { display: block; text-align: center; margin-top: 25px; font-family: var(--font-lato); font-size: 1.2rem; font-weight: 700; color: #2d2d2d; text-decoration: none; padding-bottom: 5px; border-bottom: 1px dashed #2d2d2d; transition: border-bottom-style 0.3s ease; }
.contact-email:hover { border-bottom-style: solid; }

/* ======================================================== */
/* ===== STILE FÜR BEISETZUNG & LIGHTBOX ===== */
/* ======================================================== */

.intro-image.lightbox-trigger { cursor: zoom-in; }
.intro-image.lightbox-trigger img { box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

.map-section { margin-top: 80px; }
.map-section h2 { font-family: var(--font-garamond); font-size: 2.5rem; font-weight: 500; margin-bottom: 25px; }
.map-container { position: relative; width: 100%; padding-bottom: 56.25%; /* 16:9 Aspect Ratio */ height: 0; overflow: hidden; border-radius: 4px; }
.map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

.lightbox-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); z-index: 1000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.lightbox-overlay.active { opacity: 1; pointer-events: auto; }
.lightbox-image { max-width: 90vw; max-height: 90vh; box-shadow: 0 0 40px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 20px; right: 30px; font-size: 3rem; color: #fff; cursor: pointer; line-height: 1; }

/* ======================================================== */
/* ===== RESPONSIVE STYLES & MOBILE OPTIMIERUNG ===== */
/* ======================================================== */

@media (max-width: 768px) {
    .altar-room { height: 88vh; padding-top: 2vh; }
    .memorial-header { margin-bottom: 20px; }
    .memorial-header h1 { font-size: 2rem; }
    .memorial-header p { font-size: 1rem; }
    #portrait { max-width: 200px; }
    .cta-container { bottom: 10%; }
    .cta-button { width: 240px; height: 50px; line-height: 50px; font-size: 1.1rem; }
    #portrait:hover, .cta-button:hover { transform: none; }
    
    .intro-section { grid-template-columns: 1fr; text-align: center; }
    .intro-image { order: -1; margin-bottom: 30px; max-width: 300px; margin-left: auto; margin-right: auto; }
    .intro-text h1 { font-size: 3rem; }
    .main-header { flex-direction: column; gap: 20px; }
    .main-nav { gap: 15px; flex-wrap: wrap; justify-content: center; }
}