/* =========================================================================
   BASE VARIABLES & THEME
   Preserving original colors: #fffbf0 (cream), #ffeece (orange cream), 
   #a43722 (rust/red links), #228fa4 (teal links hover)
   ========================================================================= */
:root {
  /* Colors */
  --c-bg-body: #ffffff;
  --c-bg-content: #fffbf0;
  --c-bg-accent: #ffeece;
  --c-bg-accent-hover: #ffeacb;
  --c-text-main: #2a2a2a;
  --c-text-muted: #555555;
  --c-link: #a43722;
  --c-link-hover: #228fa4;
  --c-nav-bg: #228fa4;
  --c-nav-text: #ffffff;
  --c-border: #d0d0d0;

  /* Layout */
  --max-width: 1000px;
  --border-radius: 4px;
  --shadow-sm: 1px 1px 5px 0px rgba(123, 123, 123, 0.3);
  --shadow-md: 1px 1px 10px 0px rgba(163, 163, 163, 0.5);

  /* Typography */
  --font-content: 'Lora', Georgia, serif;
  --font-heading: 'Montserrat', Arial, sans-serif;
  --font-ui: Verdana, Arial, sans-serif;
}

/* =========================================================================
   RESET & TYPOGRAPHY
   ========================================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  background-color: var(--c-bg-body);
  background-image: url('/images/tlo02.jpg');
  background-attachment: fixed;
  color: var(--c-text-main);
  font-family: var(--font-content);
  line-height: 1.6;
  font-size: 16px;
  /* Increased from 14px for better readability */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--c-text-main);
  margin-bottom: 1rem;
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  margin-top: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-top: 1.5rem;
}

h3 {
  font-size: 1.25rem;
  margin-top: 1.25rem;
}

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

a {
  color: var(--c-link);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: var(--c-link-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================================================
   LAYOUT (CSS GRID)
   ========================================================================= */
#app-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  background-color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  display: grid;
  /* Mobile default: 1 column */
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 10px;
  flex-grow: 1;
}

/* Desktop Grid: Left Sidebar (18%), Main Content, Right Sidebar (26%) */
@media (min-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 200px 1fr 240px;
    /* Approx original proportions */
  }
}

/* Panels styling */
main,
aside {
  background-color: var(--c-bg-content);
  padding: 15px;
  border: 1px solid var(--c-border);
}

/* =========================================================================
   HEADER & NAVIGATION
   ========================================================================= */
.site-header {
  width: 100%;
}

.header-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* Navigation - Modern replacing GIFs */
.site-nav {
  background-color: var(--c-bg-body);
  margin: 0;
  width: 100%;
  border-top: 2px solid white;
  border-bottom: 5px solid #228fa4;
  /* Teal horizontal line as in original */
}

.nav-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.menu-toggle {
  display: block;
  padding: 10px;
  background-color: var(--c-nav-bg);
  color: var(--c-nav-text);
  border: none;
  font-size: 1.1rem;
  font-family: var(--font-heading);
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.nav-menu {
  list-style: none;
  display: none;
  /* Hidden on mobile by default */
  flex-direction: column;
  width: 100%;
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu li {
  width: 100%;
}

.nav-menu a {
  display: block;
  padding: 12px 15px;
  background: linear-gradient(to bottom, #d24e38, #a82e1e);
  color: white;
  font-family: var(--font-heading);
  font-weight: bold;
  text-align: center;
  border: 1px solid white;
  transition: all 0.3s ease;
}

.nav-menu a:hover {
  background: linear-gradient(to bottom, #e36551, #b9402f);
  color: #fffbf0;
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0px;
    padding: 0 10px;
  }

  .nav-menu li {
    width: auto;
    flex-grow: 1;
    /* Stretch to fill space like old GIFs did */
  }

  .nav-menu a {
    border-radius: 0;
  }

  .nav-menu a:hover {
    padding-left: 15px;
    /* Reset hover padding animation on desktop */
  }
}

/* =========================================================================
   SIDEBARS & WIDGETS
   ========================================================================= */
.sidebar-left {
  background-color: var(--c-bg-accent);
}

.widget {
  margin-bottom: 25px;
  font-family: var(--font-ui);
}

.widget h3 {
  font-size: 1.1rem;
  color: var(--c-link);
  border-bottom: 2px solid var(--c-link);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.widget ul {
  list-style: none;
  margin-left: 0;
}

.widget li {
  margin-bottom: 8px;
}

.widget a {
  display: block;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.widget a:hover {
  transform: translateX(5px);
}

.rounded-img {
  border-radius: 50%;
  margin: 0 auto 15px auto;
  box-shadow: var(--shadow-sm);
  max-width: 150px;
}

.btn {
  display: inline-block;
  padding: 8px 15px;
  background-color: var(--c-link);
  color: white;
  border-radius: var(--border-radius);
  font-family: var(--font-heading);
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: white;
  color: var(--c-link);
  border-color: var(--c-link);
}

/* =========================================================================
   PAGE CONTENT (ARTICLE / HOME)
   ========================================================================= */
article header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 10px;
}

article time {
  display: block;
  color: var(--c-text-muted);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

/* Breadcrumbs */
.breadcrumb {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--c-text-muted);
}

/* Post Navigation (Prev/Next) */
.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--c-border);
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Images in content */
figure {
  margin: 20px 0;
}

figure img {
  box-shadow: var(--shadow-md);
  border-radius: var(--border-radius);
}

figcaption {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--c-text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

/* The old "blok1" list style for homepage items */
.home-list {
  list-style: none;
  margin: 20px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}

.home-list li {
  background-color: var(--c-bg-content);
  transition: background-color 0.3s ease;
}

.home-list a {
  display: flex;
  flex-direction: column;
  padding: 15px;
  color: var(--c-text-main);
  border-radius: var(--border-radius);
  border: 1px solid transparent;
}

.home-list a:hover {
  background-color: var(--c-bg-accent-hover);
  border-color: var(--c-border);
}

.home-list img {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: var(--border-radius);
  margin-bottom: 15px;
  box-shadow: var(--shadow-sm);
  align-self: center;
}

.home-list-content h2 {
  font-size: 1.25rem;
  margin-top: 0;
  color: var(--c-link);
}

.home-list-content p {
  font-size: 1rem;
  margin-bottom: 0;
}

@media (min-width: 600px) {
  .home-list a {
    flex-direction: row;
    align-items: flex-start;
  }

  .home-list img {
    margin-right: 20px;
    margin-bottom: 0;
    align-self: flex-start;
  }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  background-color: var(--c-bg-accent);
  padding: 20px;
  margin-top: 20px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  text-align: center;
  border-top: 1px solid var(--c-border);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-links {
  display: flex;
  gap: 15px;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}