:root{
    /* sensible base and navbar size limits */
    --base-font: 22px;
    --navbar-height: 64px;
    --navbar-padding-x: 1rem;
}

* {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: rgba(4, 76, 135, 1);
    color: #ffffff;
    line-height: 1.5;
    display: grid;
    place-content: center;
    font-size: var(--base-font);
    width: 100%;
}

.content_main{
    width: 100%;
    background-color: whitesmoke;
    border-radius: 10px 10px 10px 10px;
}

main{
    width: 100%;
}

h1, p {
    text-align: center;
    padding: 2rem;
}

.simple-paragraph {
    text-align: center;
    padding: 1rem 2rem;
    font-size: clamp(16px, 1.8vw, 20px);
    color: #06283d; /* dark navy for readability */
}

/* Ensure h1 is readable on light content blocks and matches site style */
.content_main h1 {
    color: #06283d; /* dark navy readable on whitesmoke */
    font-size: clamp(24px, 2.4vw, 36px);
    font-weight: 700;
    margin: 0;
    padding: 1.5rem 1rem;
    text-decoration: none; /* no underlines */
}

/* If an h1 contains a link, keep it static and consistent */
.content_main h1 a,
.content_main h1 a:visited {
    color: inherit;
    text-decoration: none;
    cursor: default; /* not intended as a link */
}

.content_main h1 a:hover {
    color: inherit;
    text-decoration: none; /* explicitly disable hover underline */
}

a {
    color: inherit;
    text-decoration: none;
}

a:visited {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navbar part */
.navbar {
  display: flex;
  gap: clamp(0.75rem, 1.5vw, 1.2rem); /* ensure a minimum horizontal separation between left and right */
  justify-content: space-between;
  align-items: center;
  background: navy;
  color: #4367b482;
  font-family: 'Poppins', sans-serif;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-radius: 0px 0px 10px 10px;

  height: auto;
  min-height: var(--navbar-height);
  padding: 0 var(--navbar-padding-x);     /* keep vertical padding 0 so height is stable */
  overflow: visible;                      /* allow dropdowns to escape navbar bounds */
  box-sizing: border-box;

    /* bounded, responsive font-size so zoom doesn't blow it up endlessly */
  font-size: clamp(14px, 1.6vw, 20px);
  
  /* elevated shadow effect matching boxes */
  box-shadow: 0 10px 48px rgba(3,11,35,0.78), 0 8px 30px rgba(3,11,35,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
}

.nav-left {
  flex: 1 1 0;
  text-align: left;
  gap: 0px 0.5rem;
  padding-inline-end: 0.35rem;
}

/* Logo */
.brand {
  color: white;
  font-family: Arial;
  font-weight: 700;
  font-size: clamp(18px, 2.5vw, 28px); /* limit growth */
}

.nav-right {
  flex: 1 1 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;                /* allow the right side to shrink without overflowing */
  padding-inline-start: 0.35rem; /* small breathing room toward the center */
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

/* keep each link on one line and avoid shrinking */
.nav-links li {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* add a light separator between items using CSS (clean and consistent) */
@media (min-width: 540px) {
  .nav-links li:not(:last-child)::after {
    content: "|";
    color: rgba(255,255,255,0.12);
    margin: 0 0.35rem;
  }
}

/* Anchor behavior within nav links unordered list */
.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  display: inline-block; /* ensures transforms and vertical movement behave consistently */
  padding: 0.15rem 0.25rem; /* keeps a consistent hit area across sizes */
  transition: color 0.3s ease, transform 0.3s ease;
  will-change: transform; /* hint to browser for smoother animation */
  font-size: clamp(13px, 1.2vw, 16px); /* bounded */
}

.nav-links a:hover {
  color: #60a5fa;
  transform: translateY(-2px);
}

/* Language selector */
.language-selector { 
  position: relative; 
  display: inline-block; 
}

.language-selector .lang-button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: #d1d5db;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.language-selector .lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #325bb0;
  border-radius: 6px;
  padding: 0.25rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  display: none;
  min-width: 8rem;
  z-index: 2000;
}

.language-selector .lang-menu.show { display: block; }
.language-selector .lang-item {
  padding: 0.4rem 0.6rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: #e6eefc;
  cursor: pointer;
  border-radius: 4px;
}
.language-selector .lang-item:hover { background: rgba(255,255,255,0.04); }

.no-bullets { list-style: none; padding-left: 0; margin-left: 0; }

/* Home page layout */

.home-wrapper-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(4, auto);
  column-gap: 20px;
  row-gap: 1em;
  padding: 1.5rem;     /* space between boxes and page borders */
  max-width: 1200px;   /* optional: keeps layout readable on large screens */
  margin: 1rem auto;   /* vertical gap and center horizontally */
}

.responsive-image {
  width: 100%;
  height: auto;
  max-height: 80vh; /* limit image height so right boxes can size to content */
  object-fit: cover; /* Ensures the image covers the box */
}

/* Style the main image with border and matching elevated shadow (no hover) */
.responsive-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 80vh; /* keep the previous height cap */
  object-fit: cover;
  border-radius: 8px; /* small inner radius; main border/shadow moved to .box-apteka-image */
  margin: 0 auto; /* horizontally center when smaller than container */
}

.box-apteka-image {
  width: 100%;
  min-height: 12rem;
  padding: 1rem;
  overflow: visible; /* allow shadow to be visible outside */
  display: flex; /* center image inside the box */
  align-items: center;
  justify-content: center;
  border-radius: 12px; /* contour for shadow */
  border: 1px solid rgba(255,255,255,0.04);
  box-shadow: 0 14px 48px rgba(3,11,35,0.78), 0 8px 30px rgba(3,11,35,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  grid-column: 1 / 2;
  grid-row: 3 / span 2; /* span three rows on the left */
}

.box-welcome-text, .box-adress, .box-opening-hours, .box-map {
  /*padding: 1rem;*/
  min-height: 0; /* allow content to determine height */
  overflow: visible;
  background: navy;
  align-self: start; /* don't stretch to match left image */
  border-radius: 12px;
  /* intensified layered shadows for stronger depth */
  box-shadow: 0 14px 48px rgba(3,11,35,0.78), 0 8px 30px rgba(3,11,35,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: transform 240ms cubic-bezier(.2,.9,.3,1), box-shadow 240ms ease;
  border: 1px solid rgba(255,255,255,0.03);
}

.box-welcome-text { grid-column: 2 / 3; grid-row: 1 / 2; }
.box-adress { grid-column: 1 / 2; grid-row: 1 / 3; }
.box-opening-hours { grid-column: 2 / 3; grid-row: 2 / 3; }
.box-map { grid-column: 2 / 3; grid-row: 3 / 4; }

/* Tighten paragraph spacing inside right-side boxes */
.box-welcome-text p, .box-adress p, .box-opening-hours p, .box-map p {
  padding: 0.25rem 0.5rem;
  margin: 0;
}

/* Make the embedded map fill the box and appear larger */
.box-map {
  padding: 0.5rem;
  overflow: hidden;          /* so iframe border-radius shows cleanly */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;        /* default visible size */
}

.box-map iframe {
  width: 100%;
  height: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 10px;
  display: block;
}

@media (min-width: 1100px) {
  .box-map { min-height: 360px; }
  .box-map iframe { min-height: 340px; }
}

/* Image-text splitter: SVG 25% left, text 75% right */
.image-text-splitter {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.image-text-splitter img {
  flex: 0 0 30%;
  width: 30%;
  height: auto;
  max-width: 100%;
  padding: 10px;
}

.image-text-splitter p {
  flex: 1 1 70%;
  width: 70%;
  margin: 0;
  padding: 2px;
}

/* Blog post card style matching main page boxes */
.blog-list-post {
  background: navy;
  color: inherit;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.03);
  box-shadow: 0 14px 48px rgba(3,11,35,0.78), 0 8px 30px rgba(3,11,35,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: box-shadow 200ms ease;
  list-style: none;
}
.blog-list-post h2 { margin: 0 0 0.5rem 0; }
.blog-list-post p { margin: 0 0 0.5rem 0; }
.blog-list-post small { color: #cbd5e1; display: block; }

.content_main .blog-post-section p{
  color: white;
  min-height: 0; /* allow content to determine height */
  overflow: visible;
  background: navy;
  align-self: start; /* don't stretch to match left image */
  border-radius: 12px;
  /* intensified layered shadows for stronger depth */
  box-shadow: 0 14px 48px rgba(3,11,35,0.78), 0 8px 30px rgba(3,11,35,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  transition: transform 240ms cubic-bezier(.2,.9,.3,1), box-shadow 240ms ease;
  border: 1px solid rgba(255,255,255,0.03);
}

/* Small-screen tweaks: keep a sensible minimum gap and reduce internal padding */
@media (max-width: 540px) {
  /* Only change the right-side navigation on very small screens */
  .nav-right { padding-inline-start: 0.2rem; flex-wrap: wrap; width: 100%; justify-content: flex-start; }
  .nav-links { gap: 0.35rem; flex-wrap: wrap; }

  /* allow link text to wrap at spaces (no mid-word breaks) */
  .nav-links li { white-space: normal; min-width: 0; }
  .nav-links a { white-space: normal; word-break: normal; overflow-wrap: normal; display: inline-block; padding: 0.25rem 0.35rem; }
}

/* Responsive adjustments for smaller screens */
@media (max-width: 650px) {
  .home-wrapper-boxes {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    padding: 1rem;
  }

  .navbar {
    position: static; /* not sticky on larger screens */
    box-shadow: none; /* optional: remove heavy shadow when not elevated */
  }

  .box-welcome-text { grid-column: 1; grid-row: 1; }
  .box-adress { grid-column: 1; grid-row: 2; }
  .box-opening-hours { grid-column: 1; grid-row: 3; }
  .box-apteka-image { grid-column: 1; grid-row: 4; }
  .box-map { grid-column: 1; grid-row: 5; }
  
  /* Stack image-text-splitter on mobile */
  .image-text-splitter {
    flex-direction: column;
    align-items: center;
  }
  
  .image-text-splitter img {
    flex: none;
    width: 100%;
    max-width: 150px;
  }
  
  .image-text-splitter p {
    flex: none;
    width: 100%;
  }
}

/* Blog post detail: readable paragraph styling within main content */
.content_main section p {
    /* left-align content (overrides global centered p) */
    text-align: left;
    color: #06283d; /* dark navy matching headings */
    font-size: clamp(16px, 1.8vw, 20px);
    line-height: 1.75;
    margin: 0 1.25rem 1.25rem 1.25rem;
    max-width: 70ch; /* comfortable measure for long lines */
    hyphens: auto;
}

.content_main section small {
    color: #6b7280; /* muted gray for metadata */
    display: block;
    margin: 0 1.25rem 1rem 1.25rem;
    font-size: 0.95rem;
}