/**
 * Main Stylesheet – Die Geschichte der Elektrotechnik / The History of Electrical Engineering
 * Design: Historic technical, industrial heritage aesthetic
 * Color palette: Deep indigo, antique gold, warm paper
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --elektro-primary: #1a365d;
    --elektro-secondary: #2c5282;
    --elektro-accent: #b8860b;
    --elektro-accent-light: #d4a84b;
    --elektro-bg: #f8f6f1;
    --elektro-bg-warm: #f0ebe3;
    --elektro-card: #ffffff;
    --elektro-footer: #0f1419;
    --elektro-text: #2d3748;
    --elektro-text-muted: #4a5568;
    --elektro-border: rgba(26, 54, 93, 0.2);
}

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

a {
    color: var(--elektro-secondary);
    font-weight: 600;
    text-decoration: underline;
}

a:hover {
    color: var(--elektro-accent);
    text-decoration: underline;
}

p {
    color: var(--elektro-text);
}

/* Footer content overrides */
.gfgf-footer-contact,
.gfgf-footer-legal,
.gfgf-footer-copy,
.gfgf-footer-links {
    color: #cbd5e0 !important;
}

body.gfgf-body {
    margin: 0;
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--elektro-text);
    background: var(--elektro-bg);
}

/* Skip navigation */
.skip-navigation {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 0.5em 1em;
    background: var(--elektro-primary);
    color: #fff;
    text-decoration: none;
}

.skip-navigation:focus {
    left: 0.5em;
    top: 0.5em;
}

/* Header */
.gfgf-header {
    background: var(--elektro-primary);
    padding: 1.25rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gfgf-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.gfgf-logo-link {
    display: block;
}

.gfgf-logo {
    max-height: 64px;
    width: auto;
    display: block;
}

.gfgf-tagline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3;
    color: #fff;
    margin: 0;
    flex: 1;
    letter-spacing: 0.02em;
}

/* Language menu & Search */
.gfgf-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.language-menu {
    margin-left: 0;
}

.language-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
}

.language-list li.active a {
    font-weight: 700;
}

.language-list a {
    color: #fff;
    text-decoration: none;
}

.language-list a:hover {
    text-decoration: underline;
}

/* Language banner & Search link */
.language-banner .language-banner-link {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.language-banner .language-banner-item.active .language-banner-link {
    background: rgba(184, 134, 11, 0.4);
    border-color: var(--elektro-accent-light);
}

.language-banner .language-banner-link:hover {
    background: rgba(255, 255, 255, 0.25);
    text-decoration: none;
}

.gfgf-search-link-wrapper {
    margin-left: 0;
}

/* Navigation with slideshow */
.gfgf-nav-wrapper {
    position: relative;
    min-height: 220px;
    overflow: hidden;
}

.gfgf-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.gfgf-slideshow-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.gfgf-slideshow .gfgf-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.gfgf-slideshow .gfgf-slide.gfgf-slide-active {
    opacity: 1;
    z-index: 1;
}

.gfgf-slideshow .gfgf-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gfgf-slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.85) 0%, rgba(15, 20, 25, 0.75) 100%);
    z-index: 2;
}

.gfgf-nav-overlay {
    position: relative;
    z-index: 3;
    padding: 0.75rem 2rem 1rem;
    background: linear-gradient(to bottom, transparent 0%, rgba(26, 54, 93, 0.5) 100%);
}

.main-navigation ul.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.main-navigation .nav-item {
    margin: 0;
}

.main-navigation .nav-link {
    display: block;
    padding: 0.85rem 1.25rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: background 0.2s;
}

.main-navigation .nav-link:hover,
.main-navigation .nav-item.active .nav-link {
    background: rgba(184, 134, 11, 0.35);
}

/* Main content */
.gfgf-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    min-height: 50vh;
}

/* Breadcrumb */
.gfgf-breadcrumb {
    margin-bottom: 1.75rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--elektro-border);
}

.gfgf-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
}

.gfgf-breadcrumb-item {
    display: flex;
    align-items: center;
}

.gfgf-breadcrumb-item:not(:last-child)::after {
    content: "›";
    margin: 0 0.5rem;
    color: var(--elektro-accent);
    font-weight: bold;
}

.gfgf-breadcrumb-link {
    color: var(--elektro-secondary);
    text-decoration: none;
}

.gfgf-breadcrumb-link:hover {
    color: var(--elektro-accent);
    text-decoration: underline;
}

.gfgf-breadcrumb-current {
    font-weight: 600;
    color: var(--elektro-text);
}

.gfgf-content {
    margin-top: 1rem;
}

/* Submenu */
.nav-item.has-submenu {
    position: relative;
}

.nav-item .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--elektro-primary);
    border: 1px solid var(--elektro-accent);
    border-top: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 100;
}

.nav-item:hover .submenu,
.nav-item.has-submenu:focus-within .submenu {
    display: block;
}

.submenu .submenu-link {
    display: block;
    padding: 0.65rem 1.25rem;
    color: #fff;
    text-decoration: none;
}

.submenu .submenu-link:hover {
    background: rgba(184, 134, 11, 0.4);
}

/* News banner */
.gfgf-news-banner {
    background: linear-gradient(135deg, var(--elektro-accent) 0%, var(--elektro-accent) 100%);
    border-left: 4px solid var(--elektro-primary);
    border-radius: 0 6px 6px 0;
    padding: 1.25rem 2rem;
    margin-bottom: 2.5rem;
    color: #fff;
}

.gfgf-news-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.gfgf-news-banner .ce-header,
.gfgf-news-banner .ce-headline,
.gfgf-news-banner .ce-bodytext,
.gfgf-news-banner .ce-text {
    display: block !important;
    visibility: visible !important;
    color: #fff !important;
}

.gfgf-news-banner .ce-bodytext a, .gfgf-news-banner a {
    color: var(--elektro-primary);
    font-weight: 600;
}

/* Card grid */
.gfgf-cards-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gfgf-cards-grid .frame {
    background: var(--elektro-card);
    border: 1px solid var(--elektro-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gfgf-cards-grid .frame:hover {
    border-color: var(--elektro-accent);
    box-shadow: 0 4px 16px rgba(26, 54, 93, 0.12);
    transform: translateY(-2px);
}

.gfgf-cards-grid .ce-bodytext a,
.gfgf-cards-grid .ce-text a {
    display: block;
    color: var(--elektro-secondary);
    font-weight: 600;
}

.gfgf-cards-grid .ce-bodytext a:hover,
.gfgf-cards-grid .ce-text a:hover {
    color: var(--elektro-accent);
}

.gfgf-cards-grid .ce-header,
.gfgf-cards-grid .ce-headline,
.gfgf-cards-grid h2, .gfgf-cards-grid h3 {
    display: block !important;
    visibility: visible !important;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--elektro-primary) !important;
}

.gfgf-cards-grid .ce-bodytext,
.gfgf-cards-grid .ce-text {
    display: block !important;
    visibility: visible !important;
}

.gfgf-cards-grid .ce-gallery {
    margin-bottom: 0.75rem;
}

.gfgf-cards-grid .ce-gallery img,
.gfgf-cards-grid .ce-image img {
    max-width: 56px;
    height: auto;
}

/* Page footer content area */
.gfgf-page-footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--elektro-border);
}

/* Fluid Styled Content – Überschriften, Unterüberschriften, Beschreibungen sichtbar */
.gfgf-content .frame,
.gfgf-main .frame {
    display: block !important;
    visibility: visible !important;
    margin-bottom: 1.75rem;
}

.gfgf-content-default .frame {
    margin-bottom: 2rem;
}

/* Header-Bereich – Überschriften */
.gfgf-content header,
.gfgf-content .ce-header,
.gfgf-content .ce-headline-wrap,
.gfgf-main header,
.gfgf-main .ce-header {
    display: block !important;
    visibility: visible !important;
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--elektro-primary) !important;
    margin-bottom: 0.75rem;
}

/* Alle Überschriftenstufen (h1–h6) explizit sichtbar */
.gfgf-content .ce-headline,
.gfgf-content h1, .gfgf-content h2, .gfgf-content h3,
.gfgf-content h4, .gfgf-content h5, .gfgf-content h6,
.gfgf-main .ce-headline,
.gfgf-main h1, .gfgf-main h2, .gfgf-main h3,
.gfgf-main h4, .gfgf-main h5, .gfgf-main h6 {
    display: block !important;
    visibility: visible !important;
    color: var(--elektro-primary) !important;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.gfgf-content .ce-headline-1, .gfgf-content h1 { font-size: 2rem; line-height: 1.2; }
.gfgf-content .ce-headline-2, .gfgf-content h2 { font-size: 1.65rem; line-height: 1.25; }
.gfgf-content .ce-headline-3, .gfgf-content h3 { font-size: 1.35rem; line-height: 1.3; }
.gfgf-content .ce-headline-4, .gfgf-content h4 { font-size: 1.2rem; line-height: 1.35; }
.gfgf-content .ce-headline-5, .gfgf-content h5 { font-size: 1.1rem; line-height: 1.4; }
.gfgf-content .ce-headline-6, .gfgf-content h6 { font-size: 1rem; line-height: 1.4; }

/* Unterüberschriften / Subheader */
.gfgf-content .ce-subheader,
.gfgf-main .ce-subheader {
    display: block !important;
    visibility: visible !important;
    font-size: 1.1rem;
    color: var(--elektro-text-muted) !important;
    margin: 0 0 0.5rem 0;
    font-style: italic;
}

/* Datum unter Überschrift */
.gfgf-content .ce-date,
.gfgf-main .ce-date {
    display: inline-block !important;
    font-size: 0.9rem;
    color: var(--elektro-text-muted);
}

/* Beschreibungen / Body-Text */
.gfgf-content .ce-bodytext,
.gfgf-content .ce-text,
.gfgf-main .ce-bodytext,
.gfgf-main .ce-text {
    display: block !important;
    visibility: visible !important;
    line-height: 1.75;
    color: var(--elektro-text) !important;
}

.gfgf-content .ce-bodytext p,
.gfgf-content .ce-text p,
.gfgf-main .ce-bodytext p,
.gfgf-main .ce-text p {
    margin: 0 0 1rem 0;
    color: var(--elektro-text);
}

/* Listen */
.gfgf-content .ce-list ul,
.gfgf-content .ce-list ol,
.gfgf-main .ce-list ul,
.gfgf-main .ce-list ol {
    padding-left: 1.5rem;
    margin: 0 0 1rem 0;
}

.gfgf-content .ce-list li,
.gfgf-main .ce-list li {
    margin-bottom: 0.35rem;
}

/* Bilder mit Alt-Text: Bild sichtbar, Figcaption für Beschreibung */
.gfgf-content .ce-gallery,
.gfgf-content .ce-image,
.gfgf-main .ce-gallery,
.gfgf-main .ce-image {
    display: block !important;
    margin-bottom: 1rem;
}

.gfgf-content .ce-gallery img,
.gfgf-content .ce-image img,
.gfgf-content img,
.gfgf-main .ce-gallery img,
.gfgf-main .ce-image img,
.gfgf-main img {
    display: block !important;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Figcaption / Bildbeschreibung unter Bildern (zeigt alt-ähnlichen Inhalt) */
.gfgf-content figure figcaption,
.gfgf-content .ce-gallery figcaption,
.gfgf-content .ce-image figcaption,
.gfgf-main figure figcaption,
.gfgf-main .ce-gallery figcaption,
.gfgf-main .ce-image figcaption {
    display: block !important;
    visibility: visible !important;
    font-size: 0.9rem;
    color: var(--elektro-text-muted);
    margin-top: 0.5rem;
    font-style: italic;
}

/* Text & Bild Layouts */
.gfgf-content .ce-textpic .ce-bodytext,
.gfgf-content .ce-textpic .ce-gallery,
.gfgf-main .ce-textpic .ce-bodytext,
.gfgf-main .ce-textpic .ce-gallery {
    margin-bottom: 1rem;
}

.gfgf-content .ce-textpic.ce-intext-left .ce-gallery,
.gfgf-content .ce-textpic.ce-intext-left .ce-image,
.gfgf-main .ce-textpic.ce-intext-left .ce-gallery {
    float: left;
    margin-right: 1.5rem;
}

.gfgf-content .ce-textpic.ce-intext-right .ce-gallery,
.gfgf-content .ce-textpic.ce-intext-right .ce-image,
.gfgf-main .ce-textpic.ce-intext-right .ce-gallery {
    float: right;
    margin-left: 1.5rem;
}

.gfgf-content .ce-uploads a,
.gfgf-main .ce-uploads a {
    color: var(--elektro-secondary);
}

.gfgf-content .ce-uploads a:hover,
.gfgf-main .ce-uploads a:hover {
    color: var(--elektro-accent);
}

.gfgf-content .ce-divider,
.gfgf-main .ce-divider {
    border: none;
    border-top: 2px solid var(--elektro-border);
    margin: 2rem 0;
}

/* Versteckte Überschrift (nur für Barrierefreiheit) – trotzdem für Screenreader da */
.gfgf-content .ce-headline-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Footer */
.gfgf-footer {
    background: var(--elektro-footer);
    color: #cbd5e0;
    padding: 2.5rem 2rem;
    margin-top: 4rem;
    border-top: 3px solid var(--elektro-accent);
}

.gfgf-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.gfgf-footer-links {
    margin-bottom: 1.25rem;
}

.footer-navigation .footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1rem;
}

.footer-navigation .footer-links li {
    margin: 0;
}

.footer-navigation .footer-links li::after {
    content: "|";
    margin-left: 1rem;
    color: #718096;
}

.footer-navigation .footer-links li:last-child::after {
    display: none;
}

.gfgf-footer-links .footer-link {
    color: #cbd5e0;
}

.gfgf-footer-links .footer-link:hover {
    color: var(--elektro-accent-light);
}

.gfgf-footer-legal {
    font-size: 0.9rem;
    margin: 1rem 0;
    max-width: 600px;
    color: #a0aec0;
}

.gfgf-footer-contact {
    margin: 1rem 0;
    color: #cbd5e0;
}

.gfgf-footer-contact a {
    color: var(--elektro-accent-light);
}

.gfgf-footer-copy {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid #2d3748;
    font-size: 0.9rem;
    color: #a0aec0;
}

/* Responsive */
@media (max-width: 768px) {
    .gfgf-nav-wrapper {
        min-height: 160px;
    }

    .gfgf-header {
        padding: 1rem;
    }

    .gfgf-header-inner {
        flex-direction: column;
        text-align: center;
    }

    .gfgf-tagline {
        font-size: 1.25rem;
        text-align: center;
    }

    .language-menu {
        margin-left: 0;
    }

    .language-banner .language-banner-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .gfgf-header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .gfgf-nav-overlay {
        padding: 0.5rem 1rem;
    }

    .main-navigation ul.nav-list {
        flex-direction: column;
    }

    .main-navigation .nav-link {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .nav-item .submenu {
        position: static;
        box-shadow: none;
        border: none;
        background: rgba(255, 255, 255, 0.08);
        padding-left: 1rem;
    }

    .gfgf-main {
        padding: 1.5rem 1rem;
    }

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

    .gfgf-news-banner {
        padding: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .gfgf-cards-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
