/* Minimize all base spacing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Basic text styling */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Rotary Farbvariablen */
:root {
    --rotary-blue: #17458f;
    --rotary-gold: #f7a81b;
    --text-black: #000;
}

/* Bootstrap-Erweiterungen mit Rotary-Farben */
.bg-rotary {
    background-color: var(--rotary-blue) !important;
}
.text-rotary-blue {
    color: var(--rotary-blue) !important;
}
.bg-rotary-gold {
    background-color: var(--rotary-gold) !important;
}
.text-rotary-gold {
    color: var(--rotary-gold) !important;
}

/* French and German text specific styles */
.french-text,
.german-text,
.fr-content,
.de-content,
.document-content {
    font-family: 'Roboto', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
}

/* Only color differences between languages */
.french-text,
.fr-content,
.document-content[lang="fr"] {
    color: var(--rotary-blue) !important;
}

.german-text,
.de-content,
.document-content[lang="de"] {
    color: var(--text-black) !important;
}

/* Unified paragraph styling for all language variants */
.french-text p,
.german-text p,
.fr-content p,
.de-content p,
.document-content p,
.docx-paragraph {
    margin: 0 0 0.5em 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
}

/* Remove margin from last paragraphs */
.french-text p:last-child,
.german-text p:last-child,
.fr-content p:last-child,
.de-content p:last-child,
.document-content p:last-child,
.docx-paragraph:last-child {
    margin-bottom: 0 !important;
}

/* Consistent strong/bold text styling */
.french-text strong,
.french-text b,
.german-text strong,
.german-text b,
.fr-content strong,
.fr-content b,
.de-content strong,
.de-content b,
.document-content strong,
.document-content b {
    font-weight: 600 !important;
    color: inherit !important;
}

/* Consistent spacing in bilingual containers */
.bilingual-content {
    display: flex !important;
    width: 100% !important;
    gap: 1.5rem !important;        /* Erhöht von 0.25rem auf 1.5rem für mehr Abstand */
    margin: 0.25em 0 !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
}

.bilingual-content > div {
    flex: 1 1 calc(50% - 0.75rem) !important;  /* Angepasst an neuen gap */
    margin: 0 !important;
    padding: 0 !important;
    min-width: calc(50% - 0.75rem) !important; /* Angepasst an neuen gap */
    width: calc(50% - 0.75rem) !important;     /* Angepasst an neuen gap */
    box-sizing: border-box !important;
}

/* Verhindere unerwünschte Abstände */
.fr-content p:last-child,
.de-content p:last-child,
.document-content p:last-child {
    margin-bottom: 0 !important;
}

/* Image containment */
.content-image {
    width: 100%;
    margin: 1em 0 !important;
    padding: 0 !important;
    border-radius: 4px;
    overflow: hidden;
}

.content-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 !important;
    padding: 0 !important;
}

/* Container Stile */
.homepage-content,
.meetings-content,
#year-content-container {
    padding: 0 1em;
    margin: 0 auto;
    max-width: 1200px;
    width: 100%;
}

.content-item {
    margin: 0;
    padding: 0;
    position: relative;
}

/* Document content padding */
.document-content {
    padding: 0;
    margin: 1em 0;
}

/* Container und Content */
.content-container {
    background-color: white;
    padding: 2em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 1.5em;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Jahre-Navigation ("Klavier") */
.years-tabs {
    display: flex;
    width: 100%;
    background-color: var(--rotary-blue);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 0 1rem 0;
    padding: 0;
}

.year-tab {
    flex: 1;
    padding: 8px 12px;
    color: var(--rotary-gold);
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-size: 0.9rem;
}

.year-tab:hover {
    background-color: rgba(247, 168, 27, 0.1);
}

.year-tab.active {
    background-color: var(--rotary-gold);
    color: var(--rotary-blue);
    font-weight: 600;
}

/* Sprachspezifische Inhaltsanzeige */
.language-selector {
    margin-bottom: 1.5rem;
}

.language-selector .btn {
    margin-right: 0.5rem;
}

/* Grundlegende Stile */
.single-content-container {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 200px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Versteckte Inhalte */
.hidden-content {
    display: none !important;
}

/* Meetings spezifisch - Tabs für Jahre */
.years-container {
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
}

/* Seitentitel und Abschnitte */
.section-title {
    margin-bottom: 2rem;
    color: #0047AB;
    border-bottom: 2px solid var(--rotary-gold);
    padding-bottom: 0.5rem;
}

/* Inhaltsbereich */
.section-header {
    border-bottom: 3px solid #3366CC;
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: #3366CC;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
}

.docx-heading {
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #3366CC;
}

/* Image containment */
.image-content {
    margin-bottom: 30px;
}

.image-content img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Timeline-Styling für die Geschichte-Seite */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: #3366CC;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: white;
    border: 4px solid var(--rotary-gold);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.left::after {
    right: -13px;
}

.timeline-item.right::after {
    left: -13px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.year-label {
    font-weight: bold;
    color: #3366CC;
    margin-bottom: 10px;
}

/* Galerie-Styling */
.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-image:hover {
    transform: scale(1.03);
}

.gallery-title {
    color: #3366CC;
    border-bottom: 2px solid var(--rotary-gold);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Image Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item.left::after,
    .timeline-item.right::after {
        left: 18px;
    }

    .nav-buttons {
        justify-content: flex-start;
    }
}

/* Animation für Content-Container */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Jahre-Navigation */
.years-keyboard {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
}

.year-key {
    padding: 8px 12px;
    background-color: #f2f2f2;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.year-key:hover {
    background-color: #e9e9e9;
}

.year-key.active {
    background-color: #3366CC;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Content Transition Effekte */
#year-content-container {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    position: relative;
    flex: 1;
}

#year-content-container.loading {
    opacity: 0;
}

.content-fade {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    width: 100%;
    animation: fadeIn 0.3s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Impressum Modal Styling */
.modal-content {
    border-radius: 8px;
    border: none;
}

.modal-header {
    background-color: var(--rotary-blue);
    color: var(--rotary-gold);
    border-bottom: 2px solid var(--rotary-gold);
    border-radius: 8px 8px 0 0;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-title {
    font-weight: 600;
}

.modal-body h6 {
    color: var(--rotary-blue);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Header und Navigation */
.header-container {
    background-color: var(--rotary-blue);
    color: var(--rotary-gold);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.navbar {
    padding: 15px 0;
}

.navbar-brand {
    color: var(--rotary-gold) !important;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    width: 100%;
    background-color: var(--rotary-blue);
    padding: 0;
    margin: 0;
}

.nav-button {
    flex: 1;
    color: var(--rotary-gold);
    text-decoration: none;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    border: 2px solid var(--rotary-gold);
    margin: 0 2px;
    text-align: center;
}

.nav-button:hover {
    background-color: rgba(247, 168, 27, 0.1);
    color: var(--rotary-gold);
    text-decoration: none;
}

/* Nav-Button Active State */
.nav-button.active {
    background-color: var(--rotary-gold) !important;
    color: var(--rotary-blue) !important;
    font-weight: 600;
}

.nav-button.active .nav-text-fr,
.nav-button.active .nav-text-de {
    color: var(--rotary-blue) !important;
}

/* Navigation Text Styles */
.nav-text-fr, .nav-text-de {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
}

.nav-text-fr {
    margin-bottom: 4px;
}

/* Language Selection Buttons */
.btn-outline-light {
    border: 1px solid var(--rotary-gold);
    color: var(--rotary-gold);
    background-color: transparent;
    padding: 4px 8px;
    margin: 0 1px;
    font-size: 0.85rem;
    font-weight: 500;
}

.btn-outline-light:hover,
.btn-outline-light:focus {
    background-color: rgba(247, 168, 27, 0.2);
    border-color: var(--rotary-gold);
    color: var(--rotary-gold);
}

.btn-outline-light.active {
    background-color: var(--rotary-gold);
    color: var(--rotary-blue);
    border-color: var(--rotary-gold);
}

/* Ensure footer stays at bottom with proper spacing */
.meetings-content {
    min-height: calc(100vh - 250px); /* Adjust based on header height */
    display: flex;
    flex-direction: column;
}
.version-text {
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.5em;
}

/* Anpassungen für die Geschichte-Übersicht */
.section-header {
    border-bottom: 2px solid var(--rotary-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--rotary-blue);
    font-weight: 600;
    font-size: 1.5rem;
}

.history-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.history-content h1 {
    font-size: 1.8rem;
    color: var(--rotary-blue);
    margin-bottom: 1rem;
}

.history-content h2 {
    font-size: 1.5rem;
    color: var(--rotary-blue);
    margin-bottom: 1rem;
}

.history-content h3 {
    font-size: 1.3rem;
    color: var(--rotary-blue);
    margin-bottom: 0.8rem;
}

.history-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Verbesserte Container-Struktur */
.history-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Anpassungen für die Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background-color: var(--rotary-gold);
}

.timeline-item {
    position: relative;
    margin: 2rem 0;
    width: 90%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}