/* === Module: Global (ID: 5) === */
/* CSS Variablen */
:root {
    --primary-color: #0077b6;
    /* Ein schönes Meeresblau */
    --secondary-color: #00b4d8;
    /* Ein helleres Türkis */
    --accent-color: #ff8c00;
    /* Ein warmer Orangeton für Akzente */
    --text-color: #333;
    --text-color-light: #555;
    --light-text-color: #fff;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --footer-background: #212529;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
}

/* Basis-Styling */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

.footercontent {
    color: #aaa !important;
}

body {
    font-family: var(--font-primary);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-color-light);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header & Navigation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-logo {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: var(--secondary-color);
}

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

.nav-link {
    font-weight: 600;
    color: var(--text-color);
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: all 0.3s ease-in-out;
}



/* Footer */
.main-footer {
    background-color: var(--footer-background);
    color: #ccc;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.main-footer a {
    color: #fff;
    text-decoration: underline;
}

.main-footer a:hover {
    color: var(--secondary-color);
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}



/* Responsive Design */
@media (max-width: 768px) {

    .gallery-item {
        flex: 0 0 280px;
        width: 280px;
    }

    .lightbox-content {
        max-height: calc(100vh - 200px);
    }

    .lightbox-prev,
    .lightbox-next {
        padding: 10px;
        font-size: 1.5rem;
    }

    .scroll-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .scroll-arrow-left {
        left: 5px;
    }

    .scroll-arrow-right {
        right: 5px;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        gap: 0.5rem;
    }

    
    .nav-menu.active {
        left: 0;        
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .legal-box {
        padding: 1.5rem;
    }

    .form-group-half {
        width: 100%;
    }

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

    .tab-button {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

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

/* === Module: KI Assistent (ID: 4) === */
.ai-assist-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.tts-toggle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
  gap: 0.5rem;
}

.btn-new-conversation {
  padding: 0.5rem 1rem;
  border: 2px solid #b38e4d; /* Omi Spa Gold */
  background: white;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #b38e4d;
}

.btn-new-conversation:hover:not(:disabled) {
  background: #b38e4d;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(179, 142, 77, 0.3);
}

.btn-new-conversation:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-tts-toggle {
  width: 40px;
  height: 40px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
  color: #666;
}

.btn-tts-toggle:hover {
  border-color: #b38e4d;
  transform: scale(1.1);
}

.btn-tts-toggle.active {
  background: #b38e4d; /* Gold statt Blau */
  border-color: #b38e4d;
  color: white;
}

.btn-tts-toggle.active.playing {
  animation: pulse-tts 1.5s ease-in-out infinite;
}

@keyframes pulse-tts {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(179, 142, 77, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(179, 142, 77, 0);
  }
}

.prompt-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.prompt-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.prompt-input:focus {
  outline: none;
  border-color: #b38e4d;
}

.prompt-input:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

.btn-send,
.btn-clear,
.btn-voice {
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  position: relative;
}

.btn-voice {
  background: #e34c4c; /* Rot für Aufnahme beibehalten */
  color: white;
  min-width: 140px;
}

.btn-voice:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(227, 76, 76, 0.4);
}

.btn-voice.recording {
  background: #ff5722;
  animation: pulse-recording 1.5s ease-in-out infinite;
}

.btn-send {
  background: #b38e4d; /* Gold statt Blau */
  color: white;
  flex: 1;
}

.btn-send:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(179, 142, 77, 0.4);
}

.btn-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-clear {
  background: #e4e6eb;
  color: #4b4b4b;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
  min-height: 200px;
}

.chat-message {
  border-radius: 12px;
  padding: 0.75rem;
  animation: fadeIn 0.3s ease;
  max-width: 85%;
}

.user-message {
  background: #f0f2f5; /* Neutrales Hellgrau */
  align-self: flex-start;
  border: 1px solid #e0e0e0;
}

.assistant-message {
  background: #333333; /* Dunkles Anthrazit für edlen Kontrast */
  color: white;
  align-self: flex-end;
  border: 1px solid #1a1a1a;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.user-message .message-header {
  color: #555;
}

.assistant-message .message-header {
  color: #b38e4d; /* Goldener Header in der dunklen Sprechblase */
}

.message-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.assistant-message .message-content {
  color: white;
}

.btn-speak-message {
  background: rgba(179, 142, 77, 0.2);
  border: 1px solid rgba(179, 142, 77, 0.4);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  color: white;
}

/* --- AI Assistant Styles --- */

.btn-assistant {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    color: #b38e4d;
    font-weight: 400;
}

#aiAssist {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 520px;
    max-width: 90vw;
    height: 80vh;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

#aiAssist.visible {
    display: flex;
}

.ai-popup-header {
    background: #333333; /* Dunkelgrau statt Blau */
    border-bottom: 2px solid #b38e4d; /* Goldene Trennlinie */
    color: #b38e4d; /* Goldene Schrift */
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
}

.ai-popup-header-title {
  cursor: move;
}

.ai-popup-close {
    background: rgba(179, 142, 77, 0.2);
    border: none;
    color: #b38e4d;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
}

.ai-popup-content {
    padding: 1rem;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #f9f9f9;
}