/* CSS Variables inspired by Angular app */
:root {
  --font-size-article-body: 16px;
  --font-size-article-title: 21px;
  --article-max-width: 700px;
  --article-img-max-width: 500px;
  --color-top-1: #445966;
  --color-top-2: #88A6B1;
  --color-mid: #EEE4D4;
  --color-bot-2: #E9ABAA;
  --color-bot-1: #C7876A;
  --color-background: #EEE4D4;
  --color-home-preview: white;
  --color-home-category: white;
  --color-article-background: white;
  --color-home-background: #EEE4D4;
  --color-category-title-background: white;
  --color-category-title-color: var(--color-top-1);
  --font-color: black;
  --color-header-font: white;
  --home-radius: 5px;
}

/* Reset and base styles */
html, body, section, div {
  margin: 0px;
  padding: 0px;
}

body {
  background-color: var(--color-home-background);
  color: var(--font-color);
  position: relative;
  line-height: 1.7em;
  font-size: 1.3em;
  text-indent: 0;
}

/* Header styles */
.header-div {
  background-color: var(--color-top-1);
  font-size: min(8vw, 45px);
  margin: 0;
  padding: 1vw;
  display: flex;
  line-height: min(30vw, 100px);
  justify-content: flex-start;
  align-items: center;
}

.header-div a {
  color: var(--color-header-font);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3vw;
}

.header-div img {
  height: min(30vw, 100px);
  width: min(30vw, 100px);
  margin: 0;
  padding: 0;
  display: block;
}

.brand-name {
  display: block;
  margin: 0;
  padding: 0;
  font-size: inherit;
  color: var(--color-header-font);
  font-weight: normal;
}

/* Main content */
.main-content {
  background-color: var(--color-mid);
  display: block;
  min-height: 100vh;
}

.content-category {
  padding: 5px 20px;
  margin: 0;
  background-color: var(--color-top-2);
  color: var(--color-header-font);
}

.breadcrumb {
  font-size: 0.9em;
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: "»";
  margin: 0 0.5rem;
  color: #ccc;
}

.breadcrumb a {
  color: var(--color-header-font);
  text-decoration: underline;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: background-color 0.2s;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  background-color: rgba(255, 255, 255, 0.2);
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Article styles */
article {
  max-width: var(--article-max-width);
  margin: 0 auto;
  background-color: var(--color-article-background);
  padding: 2em 10%;
  font-size: 18px;
}

article a {
  color: #059;
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  clear: both;
  color: var(--font-color);
}

h1 {
  font-size: 28px;
  font-weight: 400;
  margin: 27px 0;
  text-align: left;
}

h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 27px 0;
}

h3 {
  font-weight: 600;
  color: #555555;
  font-size: 18px;
  margin: 27px 0;
}

p {
  margin: 0 0 0.5em;
  text-indent: inherit;
  margin-top: 20px;
  line-height: 1.5;
}

/* Map points styles */
.map-points {
  display: flex;
}

.map-points * {
  margin-top: 0px;
}

/* Date info styles */
.article-dates {
  margin: 1rem 0 1.5rem 0;
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  text-align: right;
}

.article-dates .date-update {
  margin-left: 0.5rem;
}

/* Image styles */
img {
  width: 100%;
  max-width: var(--article-img-max-width);
  height: auto;
  margin-top: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.featured-img {
  width: 100%;
  margin-bottom: 2rem;
}

.featured-img img {
  object-fit: cover;
  width: 100%;
  max-width: none;
  height: 300px;
}

p:has(img) {
  max-width: var(--article-img-max-width);
  margin-left: auto;
  margin-right: auto;
}

/* Comments section */
.comments {
  margin: 2rem 0;
  padding: 0;
}

/* Image Lightbox */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.lightbox-container {
  position: relative;
  max-width: 95%;
  max-height: 95%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
  background-color: rgba(255, 255, 255, 0.2);
  outline: none;
}

.lightbox-caption {
  color: white;
  text-align: center;
  margin-top: 15px;
  font-size: 16px;
  max-width: 80%;
  line-height: 1.4;
}

/* Mobile responsive for lightbox */
@media (max-width: 768px) {
  .lightbox-close {
    top: -40px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
  
  .lightbox-caption {
    font-size: 14px;
    margin-top: 10px;
  }
  
  .lightbox-overlay {
    padding: 10px;
  }
}

/* Footer styles */
.footer {
  background-color: var(--color-top-1);
  font-size: 0.7em;
  color: var(--color-header-font);
  margin: 0;
  padding: 1rem, 0;
  line-height: 1.2em;
  text-align: left;
}

.footer a {
  color: var(--color-header-font);
  text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
  article {
    padding: 2em 5%;
  }
  
  .featured-img img {
    height: 250px;
  }
}