/* ============================= */
/* 🎨 KOLORY MOTYWU — REHABILITACJA / NFZ-MZ */
/* ============================= */
:root {
  --theme-color-primary: #1E1F7A;      /* głęboki niebieski (nagłówek, stopka) */
  --theme-color-secondary: #0F1456;    /* ciemniejszy niebieski akcent */
  --theme-color-accent: #0099FF;       /* jaśniejszy niebieski linki/akcent */
  --theme-color-hover: #007ACC;        /* kolor hover linków/akcentów */
  --theme-color-background: #F5F8FF;   /* bardzo jasne tło strony */
  --theme-color-surface: #FFFFFF;      /* powierzchnie (karty, sekcje) */
  --theme-color-text: #1A1A1A;         /* ciemny tekst */
  --theme-color-muted: #767E89;        /* przytłumiony tekst */
  --theme-color-border: #D0D5DD;       /* linie i granice */
}

/* ============================= */
/* 🧱 STRUKTURA STRONY */
/* ============================= */
body {
  background: var(--theme-color-background);
  color: var(--theme-color-text);
  overflow-x: hidden;
  font-family: "Roboto", "Arial", sans-serif;
  line-height: 1.6;
}

header.header {
  background: var(--theme-color-primary);
  color: var(--theme-color-surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ============================= */
/* 🔗 LINKI */
/* ============================= */
a {
  color: var(--theme-color-accent);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--theme-color-hover);
}

/* ============================= */
/* ⚓ STOPKA */
/* ============================= */
footer {
  background: var(--theme-color-secondary);
  color: var(--theme-color-surface);
  text-align: center;
  padding: 1.5rem 0;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.10);
}
footer h1, h2, h3, h4, h5, h6{
  color: var(--theme-color-surface) !important;
}

.footer .grid-child {
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
}

footer .footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

footer iframe {
  width: 300px;
  height: 200px;
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

footer .footer-info {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.4;
}

footer .footer-info a {
  color: var(--theme-color-accent);
  font-weight: 500;
}
footer .footer-info a:hover {
  color: var(--theme-color-hover);
}

/* 📱 Stopka RWD */
@media (max-width: 600px) {
  footer .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  footer iframe {
    width: 100%;
    height: 220px;
  }
  footer .footer-info {
    text-align: center;
  }
}

/* ============================= */
/* 🧭 MENU (MetisMenu) */
/* ============================= */
ul.mod-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.mod-menu > li {
  position: relative;
}

/* ukrycie submenu */
ul.mod-menu ul.mm-collapse {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  border-radius: 6px;
  padding: 6px 0;
  transition: opacity 0.25s ease-in-out;
  z-index: 999;
}

/* pokazanie submenu po hover */
ul.mod-menu li.deeper:hover > ul.mm-collapse {
  display: block !important;
  opacity: 1;
  visibility: visible;
  background: var(--theme-color-surface);
  box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

/* styl linków submenu */
ul.mod-menu ul.mm-collapse li a {
  display: block;
  padding: 8px 16px;
  color: var(--theme-color-text) !important;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}

ul.mod-menu ul.mm-collapse li a:hover {
  background: var(--theme-color-hover);
  color: var(--theme-color-surface) !important;
}

/* główne linki menu */
ul.mod-menu > li > a {
  color: var(--theme-color-surface) !important;
  padding: 10px 16px;
  display: block;
  transition: background 0.2s ease-in-out, box-shadow 0.2s;
  border-radius: 6px;
}

ul.mod-menu > li:hover > a {
  background: var(--theme-color-hover);
  color: var(--theme-color-surface) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* 📱 mobile */
@media (max-width: 768px) {
  ul.mod-menu ul.mm-collapse {
    position: static;
    display: none !important;
    opacity: 1;
    visibility: visible;
  }
}

/* ============================= */
/* 🧩 ELEMENTY STRONY */
/* ============================= */
.header, .site-grid, section {
  max-width: 100%;
  box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--theme-color-text);
  white-space: normal !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

iframe, form, input, textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--theme-color-surface);
  color: var(--theme-color-text);
  border: 1px solid var(--theme-color-border);
  border-radius: 6px;
}

/* ============================= */
/* 🗺️ KARTA KONTAKTOWA */
/* ============================= */
.contact-box {
  max-width: 400px;
  margin: 40px auto;
  padding: 25px 30px;
  text-align: center;
  background: var(--theme-color-surface);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.10);
  color: var(--theme-color-text);
}

.contact-box h2 {
  color: var(--theme-color-accent);
  font-size: 1.6rem;
  margin-bottom: 5px;
}

.contact-box a {
  color: var(--theme-color-accent);
  font-weight: bold;
}
.contact-box a:hover {
  color: var(--theme-color-hover);
}

/* ============================= */
/* 🖼️ GALERIA */
/* ============================= */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  justify-items: center;
  margin: 20px 20px;
}

.gallery img {
  min-width: 150px;
  max-width: 360px;
  border-radius: 6px;
  object-fit: cover;
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gallery img:hover {
  transform: scale(1.5);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* RWD galerii */
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ============================= */
/* 🏋️ OPIS MASZYNY (tekst + zdjęcie) */
/* ============================= */
.machine-description {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.machine-text {
  flex: 1 1 60%;
  text-align: justify;
}

.machine-image {
  flex: 1 1 35%;
  display: flex;
  justify-content: center;
}

.machine-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

/* 📱 Mobile */
@media (max-width: 768px) {
  .machine-description {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================= */
/* 📰 PODGLĄD ARTYKUŁÓW / URZĄDZEŃ */
/* ============================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  justify-items: center;
  margin: 40px auto;
  max-width: 1000px;
  padding: 0 15px;
}

.article-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--theme-color-primary);
  color: var(--theme-color-surface);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.article-preview:hover {
  transform: scale(1.05);
  box-shadow: 0 5px 14px rgba(0,0,0,0.12);
}

.article-preview img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 8px;
  margin-bottom: 12px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-preview a.device-link {
  color: var(--theme-color-surface);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
}
.article-preview a.device-link:hover {
  color: var(--theme-color-muted);
}

/* 📱 Mobile — 1 kolumna */
@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

.articles-columns {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}

.articles-columns .column {
  flex: 1 1 calc(50% - 20px);
  background: var(--theme-color-primary);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ============================= */
/* 🎛️ STYLIZACJA ACCORDION (details/summary) */
/* ============================= */
.mce-accordion {
  background: #EFF4FF; /* delikatne tło dla accordionów */
  border: 1px solid var(--theme-color-border);
  border-radius: 8px;
  margin: 1em 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Pasek nagłówka */
.mce-accordion summary {
  cursor: pointer;
  padding: 12px 18px;
  background: var(--theme-color-secondary);
  color: var(--theme-color-surface);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease-in-out;
}

.mce-accordion summary::-webkit-details-marker {
  display: none;
}
.mce-accordion summary::marker {
  display: none;
}

.mce-accordion summary h2 {
  margin: 0;
  font-size: 1.3rem;
  width: 100%;
}

.mce-accordion summary .arrow {
  display: inline-block;
  margin-left: 10px;
  transition: transform 0.3s ease;
  width: 0; 
  height: 0; 
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--theme-color-accent);
}

.mce-accordion[open] summary .arrow {
  transform: rotate(180deg);
}

.mce-accordion summary:hover {
  background: var(--theme-color-hover);
  color: var(--theme-color-surface);
}

.mce-accordion .gallery {
  padding: 16px;
  background: var(--theme-color-surface);
  border-top: 1px solid var(--theme-color-border);
}

/* facebook widget */
.fb-page {
  max-width: 400px;
  margin: 0 auto;
}


/* ============================= */
/* 📰 LISTA AKTUALNOŚCI / WYDARZEŃ */
/* ============================= */

/* Układ dwóch kolumn */
.articles-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin: 40px auto;
  max-width: 1100px;
}

/* Pojedyncza kolumna */
.articles-columns .column {
  flex: 1 1 calc(50% - 30px);
  background: var(--theme-color-surface);
  border: 1px solid var(--theme-color-border);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 20px 24px;
  transition: box-shadow 0.25s ease;
}

.articles-columns .column:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Lista artykułów */
.mod-articles-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Pojedynczy artykuł */
.mod-articles-item {
  border-bottom: 1px solid var(--theme-color-border);
  padding: 12px 0;
}

.mod-articles-item:last-child {
  border-bottom: none;
}

/* Tytuł artykułu */
.mod-articles-title a {
  color: var(--theme-color-primary); /* granatowy tytuł */
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.mod-articles-title a:hover {
  color: var(--theme-color-hover);
}

/* Zajawka / podgląd treści */
.mod-articles-item-content p {
  color: var(--theme-color-text);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 4px 0 0;
}

/* 📱 RWD */
@media (max-width: 768px) {
  .articles-columns {
    flex-direction: column;
  }
}
