/* Definicja niestandardowej czcionki "Tannenberg modern" */
@font-face {
    font-family: 'Tannenberg modern';
    src: url('https://example.com/fonts/tannenberg-modern.woff2') format('woff2'),
         url('https://example.com/fonts/tannenberg-modern.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Globalne style */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: transparent; /* Zmienione na transparent */
  font-family: Georgia, serif;
  margin: 0 auto; /* Center the body content */
  max-width: 980px; /* Set maximum width */
  padding-left: 20px; /* Add left padding */
  padding-right: 20px; /* Add right padding */
}

header {
  background: #e5c58c;
  padding: 12px 20px; /* Reduced padding to make header more compact */
  text-align: center;
  overflow: hidden;
  max-width: 1200px; /* Maksymalna szerokość jak dla main-layout-wrapper */
  margin: 0 auto; /* Wyśrodkowanie nagłówka */
  display: flex; /* Zmieniono: Użyj flexbox dla wyrównania elementów w nagłówku */
  align-items: center; /* Zmieniono: Wyśrodkuj elementy pionowo */
  justify-content: center; /* Zmieniono: Wyśrodkuj elementy poziomo */
  position: relative; /* Zmieniono: Dla pozycjonowania #menu-toggle */
}

header h1 {
  font-size: 16px;
  font-family: 'Libre Baskerville', serif; /* Updated from Playfair Display SC */
  color: #000;
  letter-spacing: 0.05em;
  margin: 0;
  font-style: normal;
  text-transform: uppercase; /* Added for consistency with user's snippet */
}

header h1 img {
    max-height: 48px; /* Reduced max-height for logo */
    vertical-align: middle;
}

/* Styling for the header link */
.header-link {
  text-decoration: none;
  color: inherit;
}

nav.main-nav {
  display: flex;
  padding: 10px 20px; /* Dodano poziomy padding dla paska przewijania */
  background-color: transparent;
  max-width: 1200px; /* Maksymalna szerokość jak dla main-layout-wrapper */
  margin: 0 auto; /* Wyśrodkowanie menu */
  overflow-x: auto; /* Dodano poziome przewijanie */
  -webkit-overflow-scrolling: touch; /* Dla płynniejszego przewijania na iOS */
  scrollbar-width: none; /* Ukryj pasek przewijania dla Firefox */
}

/* Ukryj pasek przewijania dla przeglądarek Webkit (Chrome, Safari) */
nav.main-nav::-webkit-scrollbar {
  display: none;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  width: 100%; /* Make the ul take full width of its parent */
  justify-content: space-between; /* Distribute items evenly */
}

nav.main-nav ul li {
  margin: 0 15px;
}

/* Apply the new styles globally for .main-nav a */
.main-nav a {
  text-decoration: none;
  color: #000;
  font-family: 'Oswald', sans-serif;
  font-size: 12px; /* Updated font size */
  font-weight: 400; /* Updated font weight */
  letter-spacing: 0.03em; /* Added letter spacing */
  text-transform: uppercase; /* Ensure ALL CAPS */
  line-height: 1.5em; /* Keep existing line height */
}

/* Hover effect for .main-nav a */
.main-nav a:hover {
  font-weight: 700;
}

/* Styl dla przycisku menu hamburger */
#menu-toggle {
  position: absolute;
  left: 10px;
  top: 20px; /* Keep original top position for menu toggle */
  transform: translateY(0);
  background: transparent;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  z-index: 1001;
  display: block;
  padding: 5px;
}

/* Styl dla nowej ikony wyszukiwania w nagłówku */
#search-toggle {
  position: absolute;
  left: 45px;
  top: 20px; /* Keep original top position for search toggle */
  transform: translateY(0);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  display: block;
  padding: 5px;
  color: #000;
}

#search-toggle svg {
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    fill: currentColor;
}

#offcanvas-menu {
  position: fixed;
  top: 0;
  left: -260px;
  width: 260px;
  height: 100%;
  background: #fff;
  overflow-y: auto;
  transition: left 0.3s ease;
  padding: 60px 20px;
  z-index: 1000;
}

#offcanvas-menu.open {
  left: 0;
}

#offcanvas-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#offcanvas-menu ul li {
  margin: 15px 0;
}

#offcanvas-menu ul li a {
  text-decoration: none;
  color: #000;
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
}

/* Remove the old search icon style from offcanvas-menu */
#offcanvas-menu .search-icon-item {
    display: none;
}

#menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}

#menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.main-layout-wrapper {
  display: flex;
  max-width: 1200px; /* This will be constrained by body's max-width now */
  margin: 20px auto;
  align-items: stretch;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.main-content {
  flex: 2.5;
  background: #fff;
  padding: 20px;
  padding-right: 20px;
}

.vertical-strip {
  width: 20px;
  flex-shrink: 0;
  background: linear-gradient(to right, #e0e0e7 0%, #e0e0e7 40%, #151517 40%, #151517 60%, #e0e0e7 60%, #e0e0e7 100%);
}

/* Sidebar dla desktopu (zawiera gadżety) */
.sidebar.desktop-sidebar {
  background: #eee;
  padding: 20px 4px 20px 4px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  width: 232px;
  flex-shrink: 0;
}

/* Kontener dla zegarka i kalendarza (obok siebie) */
.clock-calendar-row {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 4px;
}

/* Kontenery na gadżety mobilne - domyślnie ukryte */
.mobile-top-gadgets-container,
.mobile-bottom-gadgets-container {
    display: none;
}

.article {
  margin-bottom: 30px;
  overflow: hidden;
}

.article h2 {
  font-size: 22px;
  font-family: 'Libre Baskerville', serif;
  font-weight: bold;
  margin-bottom: 10px;
}

.article p {
  float: left;
  width: 60%;
  word-break: normal;
  font-family: 'Merriweather', serif;
  font-variant: normal;
  text-transform: none;
  font-size: 18px;
  line-height: 1;
  font-weight: normal;
  font-style: normal;
}

.article img {
  float: right;
  width: 35%;
  margin-left: 5px;
}

/* Style dla iframe'ów zegarka - stałe 120px */
.clock-iframe {
    border: none;
    display: block;
    width: 120px;
    height: 120px;
    margin-right: 4px;
}

/* Style dla iframe'a kalendarza - stałe 100px */
.calendar-iframe {
    border: none;
    display: block;
    width: 100px;
    height: 100px;
}

/* Stopka - nowa klasa dla przeniesionego tekstu */
.editorial-info {
    text-align: center;
    margin-top: 10px;
    padding: 20px 0;
}

.editorial-info .contact-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 10px 15px;
  background-color: #bbb;
  color: #000;
  text-decoration: none;
  border-radius: 5px;
}

/* Horizontal separator style */
.section-separator {
  margin: 10px 0;
  padding: 20px;
  background: #eee;
  text-align: center;
}

/* New rules added as per user's request */
.article-title {
  font-family: 'Merriweather', serif;
  font-size: 24px;
  font-weight: 700;
}

.article-body p,
.lead {
  font-family: 'Merriweather', serif;
  font-size: 16px;
  line-height: 1.6;
}

/* --- Media queries dla responsywności (mobile) --- */
@media (max-width: 768px) {
  /* Main navigation bar is now visible on mobile */
  nav.main-nav {
    display: flex !important;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
  }

  nav.main-nav ul {
    flex-wrap: nowrap;
    min-width: max-content;
  }

  nav.main-nav ul li {
    flex-shrink: 0;
    margin: 0 8px;
  }

  .vertical-strip {
    display: none !important;
  }
  .sidebar.desktop-sidebar {
    display: none !important;
  }
  /* Pokazujemy elementy mobilne */
  .mobile-top-gadgets-container {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    background: none;
  }

  .mobile-bottom-gadgets-container {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    background: none;
  }

  /* Dostosowanie nagłówka i logo na mobile */
  header h1 {
    font-size: 1.5rem;
  }
  header h1 img {
    max-height: 80px;
  }

  /* Dostosowanie głównego layoutu */
  .main-layout-wrapper {
    flex-direction: column;
    margin: 10px;
    max-width: 100%;
    box-shadow: none;
  }

  .main-content {
    padding: 10px;
    width: 100%;
    flex: none;
    padding-right: 10px;
  }

  .article p,
  .article img {
    float: none;
    width: 100%;
    margin-left: 0;
  }

  .article img {
    margin-top: 10px;
  }

  /* Dostosowanie kontenerów gadżetów na mobile - horizontal spacing for top gadgets */
  .mobile-top-gadgets-container iframe {
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 10px;
  }
  .mobile-top-gadgets-container iframe.clock-iframe {
      width: 120px;
      height: 120px;
  }
  .mobile-top-gadgets-container iframe.calendar-iframe {
      width: 100px;
      height: 100px;
      margin-right: 0;
  }


  /* Dodatkowe reklamy tekstowe w main-content na mobile */
  .main-content .ad-space {
    margin: 20px 0;
    padding: 20px;
    background: #eee;
  }
}

@media (max-width: 600px) {
  header h1 {
    font-size: 0.8rem; /* Further reduced font size for smaller mobile screens */
  }
  header h1 img {
    max-height: 36px; /* Further reduced max-height for smaller mobile screens */
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 0.8rem; /* ~16px – minimal, clean for phones */
  }
}

/* === Article Action Buttons === */
.article-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 10px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.article-actions button,
.article-actions a {
    background-color: #f0f0f0;
    color: #333;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}

.article-actions button:hover,
.article-actions a:hover {
    background-color: #e0e0e0;
    border-color: #aaa;
}

@media (max-width: 600px) {
    .article-actions {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Wymuszenie normalnej grubości dla przycisków */



.article-actions a,
.article-actions button {
    background-color: #f0f0f0;
    color: #333;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
    font-family: inherit;
    font-weight: 400;
    appearance: none;
}
