/* ============================================
   Freimaurerloge "Zur Wahrheit und Treue"
   Custom Theme Stylesheet
   ============================================ */

:root {
    --gold: #C9A84C;
    --gold-light: #E8D48B;
    --gold-dark: #9E7B2F;
    --navy: #0D1B2A;
    --navy-light: #1B2D44;
    --navy-mid: #14243A;
    --charcoal: #1A1A2E;
    --slate: #2C3E50;
    --cream: #FAF8F0;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #6B7B8D;
    --border: rgba(201, 168, 76, 0.2);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --radius: 8px;
    --font-serif: 'Playfair Display', 'Georgia', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-dark); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5 {
    font-family: var(--font-serif);
    color: var(--navy);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p { margin-bottom: 1em; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--navy);
    height: var(--header-height);
    transition: all 0.3s;
    border-bottom: 1px solid rgba(201,168,76,0.15);
}

.site-header.scrolled {
    height: 64px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    background: rgba(13,27,42,0.98);
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex-shrink: 1;
    min-width: 0;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: height 0.3s;
}

.scrolled .site-logo img { height: 40px; }

.site-logo-text {
    color: var(--cream);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 8px 18px;
    color: rgba(250,248,240,0.8);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--gold);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item > a::after,
.nav-menu .current_page_item > a::after {
    transform: scaleX(1);
}

/* Dropdown */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--navy-light);
    min-width: 220px;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    list-style: none;
    border-top: 2px solid var(--gold);
}

.nav-menu li:hover > .sub-menu { display: block; }

.nav-menu .sub-menu a {
    padding: 10px 20px;
    font-size: 0.85rem;
}

.nav-menu .sub-menu a::after { display: none; }

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--cream);
    transition: all 0.3s;
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
    overflow: hidden;
    margin-top: var(--header-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.25;
    filter: blur(1px);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(13,27,42,0.4) 0%,
        rgba(13,27,42,0.7) 50%,
        rgba(13,27,42,0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 24px;
    max-width: 800px;
}

.hero-emblem {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    opacity: 0.8;
}

.hero h1 {
    color: var(--cream);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-family: var(--font-sans);
    color: var(--gold);
    font-size: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 400;
    margin-bottom: 24px;
}

.hero-desc {
    color: rgba(250,248,240,0.75);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 36px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.hero-cta:hover {
    background: var(--gold-light);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(201,168,76,0.3);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--gold);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    opacity: 0.6;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Sections --- */
.section {
    padding: 80px 0;
}

.section-dark {
    background: var(--navy);
    color: var(--cream);
}

.section-dark h2,
.section-dark h3 { color: var(--cream); }

.section-alt {
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-dark .section-header p {
    color: rgba(250,248,240,0.65);
}

.gold-line {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 16px auto;
    border-radius: 2px;
}

/* --- Cards Grid --- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 24px;
}

.card-meta {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.card-body h3 a {
    color: var(--navy);
    transition: color 0.3s;
}

.card-body h3 a:hover { color: var(--gold-dark); }

.card-excerpt {
    color: var(--text-light);
    font-size: 0.92rem;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    color: var(--gold-dark);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.read-more:hover { color: var(--gold); gap: 10px; }

/* --- Page Content --- */
.page-hero {
    background: var(--navy);
    padding: 120px 0 60px;
    text-align: center;
    margin-top: var(--header-height);
}

.page-hero h1 {
    color: var(--cream);
    margin-bottom: 8px;
}

.page-hero .gold-line { margin: 12px auto 0; }

.page-content {
    padding: 60px 0 80px;
}

.page-content .container {
    max-width: 800px;
}

.page-content h2 { margin: 40px 0 16px; }
.page-content h3 { margin: 30px 0 12px; }

.page-content ul, .page-content ol {
    margin: 0 0 1.5em 1.5em;
}

.page-content li { margin-bottom: 0.5em; }

.page-content blockquote {
    border-left: 4px solid var(--gold);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(201,168,76,0.06);
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--slate);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.page-content img {
    border-radius: var(--radius);
    margin: 24px 0;
    box-shadow: var(--shadow);
}

/* --- Contact Form --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info-card {
    background: var(--navy);
    color: var(--cream);
    padding: 36px;
    border-radius: var(--radius);
}

.contact-info-card h3 {
    color: var(--gold);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.contact-detail {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.contact-detail-icon {
    color: var(--gold);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-detail a { color: var(--gold-light); }
.contact-detail a:hover { color: var(--gold); }

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.92rem;
    transition: border-color 0.3s;
    background: var(--white);
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.wpcf7 textarea { min-height: 150px; resize: vertical; }

.wpcf7 input[type="submit"] {
    background: var(--gold);
    color: var(--navy);
    border: none;
    padding: 14px 36px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpcf7 input[type="submit"]:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

/* --- Timeline (Chronik) --- */
.chronik-timeline {
    position: relative;
    padding-left: 40px;
}

.chronik-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gold);
    opacity: 0.3;
}

.chronik-entry {
    position: relative;
    margin-bottom: 40px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.chronik-entry::before {
    content: '';
    position: absolute;
    left: -33px;
    top: 28px;
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    border: 3px solid var(--cream);
}

.chronik-year {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--gold-dark);
    font-weight: 700;
    margin-bottom: 8px;
}

/* --- Footer --- */
.site-footer {
    background: var(--charcoal);
    color: rgba(250,248,240,0.7);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-about h3,
.footer-links h3,
.footer-contact h3 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 16px;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.82rem;
}

.footer-about p {
    font-size: 0.88rem;
    line-height: 1.7;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    display: block;
    padding: 5px 0;
    color: rgba(250,248,240,0.6);
    font-size: 0.88rem;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 6px;
}

.footer-contact p {
    font-size: 0.88rem;
    margin-bottom: 8px;
}

.footer-contact a {
    color: var(--gold-light);
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(250,248,240,0.4);
}

/* --- Responsive --- */
@media (max-width: 980px) {
    .nav-toggle { display: flex; }

    .main-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--navy);
        padding: 20px;
        z-index: 999;
        overflow-y: auto;
    }

    .main-nav.active { display: block; }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-menu a {
        padding: 14px 20px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .nav-menu a::after { display: none; }

    .nav-menu .sub-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        padding: 0;
        padding-left: 20px;
        background: transparent;
        border-top: none;
    }

    .hero { min-height: 70vh; }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    :root { --header-height: 64px; }

    .site-logo-text { font-size: 0.85rem; }

    .hero { min-height: 60vh; }
    .hero h1 { font-size: 1.8rem; }
    .hero-desc { font-size: 0.95rem; }

    .section { padding: 50px 0; }
    .page-hero { padding: 90px 0 40px; }

    .cards-grid { grid-template-columns: 1fr; }

    .card-img { height: 180px; }
}

/* --- Utility --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* WordPress generated classes */
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
}

.wp-caption-text {
    font-size: 0.82rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 6px;
}

.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.gallery-item { flex: 1; min-width: 200px; }
.gallery-item img { border-radius: var(--radius); }

/* --- Print --- */
@media print {
    .site-header, .site-footer, .hero-cta, .nav-toggle { display: none !important; }
    .hero { min-height: auto; padding: 40px 0; }
    body { color: #000; background: #fff; }
}
