/* --- 1. GLOBALE RESETS & VARIABLEN --- */
:root {
    --gold: #c9a227;
    --gold-light: #e4c76b;
    --gold-dark: #a68521;
    --black: #1a1a1a;
    --white: #ffffff;
    --gray-100: #f7f7f7;
    --gray-200: #e8e8e8;
    --gray-400: #999999;
    --gray-600: #666666;
    --gray-800: #333333;

    /* Akzentfarbe = Gold (einheitlich) */
    --accent: var(--gold);
    --accent-light: var(--gold-light);
    --accent-dark: var(--gold-dark);

    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- 2. NAVIGATION --- */
/* Hauptseiten-Variante */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
}

/* Alternative Variante für Unterseiten (gleiche Styles) */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container,
.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo,
.main-nav .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--black);
}

.nav-logo img {
    height: 45px;
    width: auto;
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--black);
    letter-spacing: 0.02em;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--gold-dark);
}

.nav-cta {
    background: var(--gold);
    color: var(--white) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

.nav-cta::after {
    display: none !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--black);
    transition: var(--transition);
}

/* Verhindert, dass Elemente auf Mobile nach rechts ausbrechen */
html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    margin: 0;
    padding: 0;
}

/* --- 2. HEADER ISOLATION (Fix für vertikalen/doppelten Header) --- */
.agisto-header {
    width: 100% !important;
    display: block !important; 
    position: relative !important;
    background: var(--white);
    z-index: 9999;
}

/* Falls der Worker einen zweiten Header der externen Seite mitschleift, blenden wir ihn aus */
header:not(.agisto-header) {
    display: none !important;
}

/* --- 3. FOOTER STYLES --- */
/* Hauptseiten-Variante (mit Klasse) */
.footer {
    background: var(--black);
    color: var(--white);
    padding: 4rem 2rem 2rem;
}

/* Alternative Variante für Unterseiten (HTML-Element ohne Klasse) */
footer:not(.footer):not(.agisto-footer) {
    background: var(--black);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

footer:not(.footer):not(.agisto-footer) .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid,
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

footer:not(.footer):not(.agisto-footer) .footer-col h3 {
    font-family: var(--font-body);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

/* Allgemeine Footer-Texte auf Sans-Serif */
footer:not(.footer):not(.agisto-footer) .footer-col {
    font-family: var(--font-body);
}

footer:not(.footer):not(.agisto-footer) .footer-col p {
    font-family: var(--font-body);
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.6;
}

.footer-brand img {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    max-width: 300px;
}

/* Footer Logo für Unterseiten */
.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-logo:hover {
    color: var(--gold);
}

.footer-logo img {
    height: 46px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-logo span {
    font-family: var(--font-body);
}

.footer-col h4 {
    font-family: var(--font-body);
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gold);
    border-color: var(--gold);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: var(--white);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--gold);
}

/* --- 4. RESPONSIVE NAV & FOOTER --- */
@media (max-width: 1024px) {
    .footer-grid,
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Navigation Mobile - beide Varianten */
    .nav-links,
    .main-nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    /* Footer Mobile - beide Varianten */
    .footer-grid,
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }

    /* Container auf Mobile */
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 480px) {
    .nav-container,
    .nav-content {
        padding: 1rem;
    }
}

/* --- Legacy: AGISTO-HEADER/FOOTER classes for blog integration --- */
.agisto-header {
    width: 100% !important;
    display: block !important;
    position: relative !important;
    background: var(--white);
    z-index: 9999;
}

header:not(.agisto-header) {
    display: none !important;
}

.agisto-footer {
    background-color: #000;
    color: var(--white);
    font-family: sans-serif;
    width: 100%;
}

.agisto-footer .footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.agisto-footer .footer-grid {
    display: grid;
    grid-template-columns: 320px 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.agisto-footer .footer-brand img {
    height: 48px !important;
    width: auto !important;
}

.agisto-footer .footer-col h4 {
    margin-bottom: 0.75rem;
    color: var(--white);
    font-size: 1.1rem;
}

.agisto-footer .footer-col ul { list-style: none; padding: 0; margin: 0; }
.agisto-footer .footer-col ul li { margin: 0.35rem 0; }
.agisto-footer .footer-col a { color: rgba(255,255,255,0.85); text-decoration: none; }

.agisto-footer .footer-bottom {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

.agisto-footer .footer-bottom p { color: rgba(255,255,255,0.5); font-size: 0.875rem; }
.agisto-footer .footer-legal { display: flex; gap: 2rem; }
.agisto-footer .footer-legal a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.agisto-footer .footer-legal a:hover { color: var(--gold); }