/* ===================== Grundstil ===================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root{
  --bg-start: #f0f4f8;
  --bg-end: #d9e2ec;
  --text: #1f2937;
  --muted: #555;
  --accent-a: #7c4dff; /* button gradient start */
  --accent-b: #5b21b6; /* button gradient end */
  --accent-c: #22d3ee; /* active/nav accent */
  --card-shadow: rgba(15,23,42,0.08);
  --card-shadow-strong: rgba(15,23,42,0.12);
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}

body.dark-mode {
    background: #0f1724;
    color: #e6eef8;
}

/* ===================== Header ===================== */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

header h1 {
    font-weight: 800;
    font-size: 2.4rem;
    letter-spacing: -0.5px;
    margin-top: 10px;
    
    background: linear-gradient(90deg, #0f172a, #3b82f6);
    
    /* Standard property */
    background-clip: text;

    /* Safari / WebKit browsers */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Firefox fix (optional) */
    color: transparent;
}



/* ===================== Dark Mode Button ===================== */
button.dark-mode-toggle {
    position: absolute;
    right: 20px;
    top: 20px;
    padding: 8px;
    width:44px;
    height:44px;
    font-size: 1.1rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background-color: rgba(255,255,255,0.9);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.18s, background 0.25s, color 0.25s, box-shadow 0.25s;
    box-shadow: 0 6px 18px rgba(16,24,40,0.06);
}
button.dark-mode-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(16,24,40,0.09);
}
body.dark-mode button.dark-mode-toggle {
    background-color: rgba(255,255,255,0.06);
    color: #f8fafc;
    box-shadow: 0 6px 18px rgba(2,6,23,0.6);
}

/* ===================== Navbar ===================== */
.navbar {
    position: sticky;
    top: 10px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
    align-items: center;
}

/* modern pill buttons */
.navbar button {
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
    color: white;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 20px rgba(92,36,190,0.12);
    transition: transform 0.18s, box-shadow 0.18s, opacity 0.18s;
}
.navbar button:hover {
    transform: translateY(-4px) scale(1.03);
    filter: brightness(1.12);
    box-shadow: 0 16px 26px rgba(92,36,190,0.16);
    opacity: 0.98;
}

/* Aktives Tool in navbar */
.navbar button.active {
    background: linear-gradient(90deg, var(--accent-c), #06b6d4);
    color: #052025;
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(34,211,238,0.14);
}

/* eslint: keep mobile friendly */
@media (max-width: 720px) {
  .navbar button { padding: 10px 14px; font-size: 0.95rem; }
}

/* ===================== Tool Container ===================== */
.tool-container {
    max-width: 720px;
    margin: 8px auto 44px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 14px;
}

/* Beschreibungstext über der Box */
.tool-description {
    text-align: center;
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: inherit;
}

/* ===================== Tool Card / Box (used as tool interior) ===================== */
/* Previously you used .container — keep that but make it modern */
.container {
    width: 100%;
    max-width: 620px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.96));
    padding: 26px 22px;
    border-radius: 14px;
    box-shadow: 0 14px 40px var(--card-shadow-strong);
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    overflow: visible;
}

/* Dark mode container */
body.dark-mode .container {
    background: linear-gradient(180deg, rgba(18,18,20,0.72), rgba(20,20,22,0.78));
    box-shadow: 0 14px 40px rgba(0,0,0,0.6);
}

/* give the box a subtle lift when active (JS can add .scale-up class too) */
.container.scale-up {
    transform: scale(0.99);
}

/* ===================== Inputs & Buttons INSIDE the tool-box ===================== */
/* Target the inputs that appear inside .container */
.container input,
.container select,
.container textarea {
    width: 72%;
    max-width: 520px;
    min-width: 220px;
    display: block;
    margin: 12px auto;
    padding: 12px 14px;
    font-size: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(15,23,42,0.08);
    background: rgba(255,255,255,0.98);
    box-sizing: border-box;
    text-align: center;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease, box-shadow 0.12s ease;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.55);
}

/* Focus state (nice cyan accent) */
.container input:focus,
.container select:focus,
.container textarea:focus {
    outline: none;
    border-color: rgba(34,211,238,0.95);
    background: rgba(226,251,255,0.92);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(34,211,238,0.05);
}

/* Dark mode inputs */
body.dark-mode .container input,
body.dark-mode .container select,
body.dark-mode .container textarea {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    color: #e6eef6;
    box-shadow: none;
}

/* Buttons inside tool box */
.container button {
    width: auto;
    display: inline-block;
    margin: 12px auto 6px;
    padding: 11px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    background: linear-gradient(90deg, var(--accent-a), var(--accent-b));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.2px;
    box-shadow: 0 10px 26px rgba(92,36,190,0.14);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

/* Hover & active */
.container button:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 36px rgba(92,36,190,0.18);
    filter: saturate(1.06);
}
.container button:active {
    transform: translateY(-2px) scale(.995);
}

/* Dark mode button variant */
body.dark-mode .container button {
    background: linear-gradient(90deg,#4f46e5,#6d28d9);
    color: #fff;
    box-shadow: 0 10px 26px rgba(40,30,80,0.26);
}

/* Ensure inputs/buttons shrink nicely on mobile */
@media (max-width: 640px) {
    .container input,
    .container select,
    .container textarea,
    .container button {
        width: 92%;
        max-width: 92%;
    }
}

/* ===================== Result / Output area styling ===================== */
#countdownDisplay,
#timestampDisplay,
#dateDisplay,
#dayResult,
#workResult,
#holidayDisplay,
.container .result {
    font-weight: 700;
    font-size: 1.22rem;
    margin-top: 10px;
    color: #0f172a;
    background: rgba(250,250,250,0.84);
    padding: 10px 12px;
    border-radius: 10px;
    min-width: 160px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

/* Dark mode results */
body.dark-mode #countdownDisplay,
body.dark-mode #timestampDisplay,
body.dark-mode #dateDisplay,
body.dark-mode #dayResult,
body.dark-mode #workResult,
body.dark-mode #holidayDisplay,
body.dark-mode .container .result {
    background: rgba(255,255,255,0.03);
    color: #e6eef6;
    box-shadow: none;
}

/* ===================== Animationen ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.container { animation: fadeIn .36s ease both; }

/* ===================== World Clock Sektion (keep your earlier rules but tuned) ===================== */
.world-clock-section {
    margin: 40px auto;
    max-width: 900px;
    text-align: center;
}
.world-clock-section h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
}
.clock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}
.clock-card {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 14px 40px rgba(11,20,40,0.06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.clock-card h3 { margin-bottom: 10px; font-weight: 700; }
.time-display { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; color: #07203a; }
.tz-label, .diff-label { font-size: 0.92rem; color: var(--muted); }

/* Dark mode clock cards */
body.dark-mode .clock-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    box-shadow: 0 14px 40px rgba(0,0,0,0.6);
}
body.dark-mode .time-display { color: #e8f1fb; }
body.dark-mode .tz-label, body.dark-mode .diff-label { color: #bfcfe0; }

/* ===================== Responsive ===================== */
@media (max-width: 600px) {
    .navbar { flex-direction: column; gap: 10px; }
    .container input, .container button { width: 92%; }
    .tool-container { padding: 0 12px; }
}

.world-clock-section {
    background: rgba(255,255,255,0.45);
    padding: 26px;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
    backdrop-filter: blur(6px);
}
body.dark-mode .world-clock-section {
    background: rgba(255,255,255,0.04);
}

.navbar-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.navbar-background {
    display: flex;
    justify-content: center;
    align-items: center; /* <<< WICHTIG – vertikal zentrieren */
    padding: 14px 26px;
    border-radius: 24px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);
}


.navbar {
    display: flex;
    gap: 14px;
}


body.dark-mode .navbar-background {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: center; /* zentriert den mittleren Block */
    gap: 20px;
    padding: 10px 20px 6px;
    position: relative;
}

.header-spacer {
    width: 40px; /* Platzhalter links, damit rechts der Button nicht stört */
}

.header-center {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-header h1 {
    margin: 0;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.site-header h1 span {
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.dark-mode-toggle {
    position: absolute;
    right: 20px;
}

/* Hintergrund der Tool-Leiste */
.navbar-background {
    display: flex;
    justify-content: center;
    align-items: center; /* vertikal zentrieren */
    padding: 18px 28px;
    border-radius: 26px;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.06);

    margin: 0 auto;
}

/* Die Navbar selbst */
.navbar {
    display: flex;
    gap: 16px;
    align-items: center; /* Buttons ausrichten */
    margin: 0;
    padding: 0;
}

/* BLOG PAGE */
.blog-list {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-list h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 30px;
    font-weight: 800;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.blog-card {
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.10);
}

body.dark-mode .blog-card {
    background: rgba(255,255,255,0.06);
    box-shadow: 0 14px 32px rgba(0,0,0,0.5);
}

.blog-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.blog-card p {
    margin: 0 0 12px 0;
    color: var(--muted);
}

.read-more {
    font-weight: 700;
    color: #3b82f6;
}

.blog-post {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 20px;
}

.blog-post article h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.blog-post article h3 {
    margin-top: 26px;
}

.blog-post article p {
    line-height: 1.7;
    margin-bottom: 18px;
    color: var(--muted);
}

/* ---- Navbar Alignment & Spacing Fix (paste at end of style.css) ---- */

/* Center container for both navbars, ensures identical width and centering */
.navbar-wrapper {
  display: flex;
  justify-content: center; /* center the inner .navbar-background */
  margin: 0; /* remove stray margins */
}

/* Shared background card for navbars.
   width = percentage of viewport with a hard cap so layout remains centered on large screens */
/* -------- Navbar: separate styles for primary (compact) and tools (wide) -------- */

/* base wrapper: center horizontally */
.navbar-wrapper {
  display: flex;
  justify-content: center;
  margin: 0;
}

/* shared background card style */
.navbar-background {
  display: flex;
  justify-content: center;
  align-items: center; /* vertical centering of buttons */
  padding: 14px 22px;
  border-radius: 20px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
  margin: 0 auto;
}

/* compact primary navbar (narrow, centered under header) */
.navbar-wrapper.primary .navbar-background {
  width: min(58%, 760px);   /* compact width like your earlier design */
  padding: 12px 20px;
  border-radius: 20px;
}

/* wide tools navbar (full-width style but capped) */
.navbar-wrapper.tools .navbar-background {
  width: min(92%, 1200px);  /* wide tool bar */
  padding: 18px 28px;
  border-radius: 18px;
}

/* ensure inner nav layout */
.navbar {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0;
}

/* spacing between the two navbars and between tool navbar & content */
.navbar-wrapper.primary {
  margin-bottom: 18px;  /* distance BELOW primary (top) navbar */
}
.navbar-wrapper.tools {
  margin-bottom: 28px;  /* distance BELOW tools navbar to content */
}

/* Buttons visual (unchanged, but ensure vertical centering) */
.navbar button,
.navbar a button {
  margin: 0;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* if you used active class styling */
.navbar button.active,
.navbar a button.active {
  transform: translateY(-2px);
}

/* make sure the two cards don't visually overlap (no double top/bottom rounding) */
/* by keeping comfortable vertical margins and slightly different border-radius values above */

/* Responsive: stack / wrap on small screens */
@media (max-width: 820px) {
  .navbar-wrapper.primary .navbar-background {
    width: min(92%, 760px);
  }
  .navbar-wrapper.tools .navbar-background {
    width: min(96%, 960px);
    padding: 14px 16px;
  }
  .navbar {
    flex-wrap: wrap;
    gap: 12px;
  }
}


/* SEO Footer Text */
.seo-footer {
    max-width: 900px;
    margin: 60px auto 40px auto;
    padding: 16px 12px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text);
}

body.dark-mode .seo-footer {
    color: #dce6f4;
    opacity: 0.6;
}

/* Back to Tools – Modern CTA Button */
.back-container {
    text-align: center;
    margin-top: 40px;
}

.back-button {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    border-radius: 50px;

    background: linear-gradient(90deg, #7c3aed, #9333ea, #a855f7);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.25);

    transition: transform 0.18s ease, box-shadow 0.25s ease;
}

.back-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(124, 58, 237, 0.35);
}

.back-button:active {
    transform: translateY(-1px) scale(0.98);
}

/* Dark mode */
body.dark-mode .back-button {
    background: linear-gradient(90deg, #4f46e5, #6d28d9);
    box-shadow: 0 10px 25px rgba(40, 30, 80, 0.5);
}

/* Blog Overview Page */
.blog-list {
    max-width: 900px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 0 20px;
}

.blog-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
    padding: 22px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(15,23,42,0.06);
    transition: transform .18s ease, box-shadow .18s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(15,23,42,0.12);
}

.blog-card h3 {
    margin-top: 0;
    font-weight: 700;
}

.blog-card p {
    opacity: 0.75;
    font-size: 0.95rem;
}

/* dark mode */
body.dark-mode .blog-card {
    background: rgba(255,255,255,0.06);
    box-shadow: 0 10px 28px rgba(0,0,0,0.6);
}

body.dark-mode .blog-card p {
    color: #cfd7e4;
}

/* ===================== Footer ===================== */
.site-footer {
    margin-top: 80px;
    padding: 40px 0 30px 0;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.85;
    color: var(--text);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

.footer-copy {
    opacity: 0.6;
    font-size: 0.85rem;
}

/* Dark mode */
body.dark-mode .site-footer {
    color: #d9e3f2;
}

body.dark-mode .footer-links a {
    color: #d9e3f2;
}
