/* ==== Base Styles ==== */

      :root {
        --bg-color: #ffffff;
        --bg-color-two: #bbdaff;
        --card-color: #ffffff;
        --card-color-hover: #d4d4d4;
        --title-color: #373e48;
      }

      [data-theme="dark"] {
        --bg-color: #0f172a;
        --bg-color-two: #1e293b;
        --card-color: #1e293b;
        --card-color-hover: #121822;
        --title-color: #ffffff;
      }

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom right, var(--bg-color), var(--bg-color-two));
    color: #f1f5f9;
    margin: 0;
    padding: 0;

    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: center;
    background-size: cover;
    margin-left: 0px;
    margin-top: 0px;
}

/* ==== Container ==== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ==== Content Section ==== */
.content {
    padding: 3rem 1.5rem;
}
.section-header {
    font-size: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}
.section-title {
    padding-top: 10%;
    font-weight: 700;
    background: linear-gradient(to right, #a78bfa, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    color: #94a3b8;
    font-size: 0.875rem; /* text-sm => 14px */
}
.refresh:hover {
    color: #60a5fa;
}
.refresh svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ==== News Grid ==== */
.news-grid {
    display: grid;
    gap: 1.5rem;
    padding-left: 5%;   /* etwas mehr Abstand links */
    padding-right: 5%;  /* etwas mehr Abstand rechts */
}
@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.news-card {
    background: var(--card-color);
    border-radius: 1rem;
    padding: 1.5rem; /* höher gemacht */
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    font-size: 0.9rem;
}
.news-card:hover {
    transform: scale(1.02);
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem; /* minimal kompakter */
}
.source {
    font-size: 0.7rem;
    padding: 0.2rem 0.45rem;
    border-radius: 9999px;
    background: #334155;
}
.date {
    font-size: 0.8rem;
    color: #94a3b8;
}
.news-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 1rem; /* etwas kleiner */
    color: var(--title-color);
}
.news-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==== Refresh Button ==== */
.refresh-wrapper {
    display: flex;
    justify-content: center; /* Button mittig */
    margin-bottom: 2rem;
}

.refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    cursor: pointer;
    background: none;
    border: none;
    font-size: inherit;
}
.refresh:hover {
    color: #60a5fa;
}

/* ==== Loading Spinner ==== */
.loading {
    text-align: center;
    padding: 2rem;
}
.spinner {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: #60a5fa;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.hidden {
    display: none;
}


  #theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: var(--text-color);
    color: var(--bg-color);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: background-color 0.3s, color 0.3s;
  }


  .search-container {
    display: flex;
    width: 1000px;
    max-width: 90%;
    display-content: center;
    margin: 50px auto; /* Zentriert die Suchleiste */
    font-family: Verdana !important;
    color: var(--text-color) !important;
  }

  .search-input {
    flex: 1;
    border: 2px solid var(--card-color);
    border-radius: 500px 0 0 500px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
    background-color: var(--card-color);
    font-family: Verdana !important;
    color: var(--text-color) !important;
  }

  .search-input:focus {
    border-color: var(--card-color);
  }

  .search-button {
    padding: 10px 10px;
    border: 10px solid var(--card-color);
    border-left: none;
    background-color: var(--card-color);
    color: white;
    font-size: 16px;
    border-radius: 0 500px 500px 0;
    cursor: pointer;
    transition: background-color 0.2s;
  }

  .search-button:hover {
    background-color: var(--card-color-hover); /* Optional: dunklerer Hover-Effekt */
  }

/* ==== Navigation Bar ==== */

  .nav-container {
  margin: 0;
  padding: 1rem 1.5rem;
  background: var(--card-color);
  border-radius: 0 0 25px 25px;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Gradient Text */
.header-text {
    font-family: 'MuseoModerno';
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--title-color);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Desktop Menu */
.desktop-menu {
  display: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Buttons */
.nav-button {
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.3s ease;
}

.header-btn {
  background: var(--main-color);
}

.contact-btn:hover {
  background: #1d4ed8;
}

.signup-btn {
  background: #7c3aed;
}

.signup-btn:hover {
  background: #6d28d9;
}

/* Mobile Menu */
.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  margin-top: 1rem;
  background: var(--box-bg);
  border-radius: 0.5rem;
  padding: 1rem;
  transition: color 0.3s;
}

.mobile-menu[x-cloak] {
  display: none !important;
}

.mobile-link {
  display: block;
  padding: 0.5rem 0;
  text-decoration: none;
  color: inherit;
}

/* Responsive */
@media (min-width: 768px) {
  .desktop-menu {
    display: flex;
  }
  .mobile-menu-btn {
    display: none;
  }
}

    .dropdown {
        position: relative;
        display: inline-block;
    }

    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #1e293b;
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        z-index: 1;
        padding: 10px;
        border-radius: 8px;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .mobile-dropdown {
        position: relative;
    }

    .mobile-dropdown-content {
        display: none;
    }

    .mobile-dropdown.show .mobile-dropdown-content {
        display: block;
    }
