/* Veselsko.cz – shared rich-content styles for TinyMCE and public detail pages */

/* TinyMCE loads this file inside the editor iframe. Keep the editor body rules
   scoped to TinyMCE so the same stylesheet is safe to load on detail.asp. */
body.mceContentBody {
  margin: 0;
  padding: 16px 18px;
  background: #ffffff;
  color: #263746;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

/* Shared block typography. The second selector targets only article content
   on the public detail page and does not expose a container class to TinyMCE's
   automatic styleselect class import. */
body.mceContentBody h1,
.rich-content h1 {
  margin: 30px 0 16px;
  color: #263746;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
}

body.mceContentBody h2,
.rich-content h2 {
  margin: 30px 0 14px;
  color: #263746;
  font-size: 21px;
  line-height: 1.3;
  font-weight: 700;
}

body.mceContentBody h3,
.rich-content h3 {
  margin: 24px 0 10px;
  color: #263746;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

body.mceContentBody h4,
.rich-content h4 {
  margin: 20px 0 8px;
  color: #263746;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
}

body.mceContentBody h5,
.rich-content h5 {
  margin: 18px 0 7px;
  color: #3f4a53;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
}

body.mceContentBody h6,
.rich-content h6 {
  margin: 16px 0 6px;
  color: #5d646a;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
}

body.mceContentBody p,
.rich-content p {
  margin: 0 0 1.2em;
}

body.mceContentBody > p:first-child,
.rich-content > p:first-child {
  margin-top: 0;
}

body.mceContentBody ul,
body.mceContentBody ol,
.rich-content ul,
.rich-content ol {
  margin: 8px 0 20px;
  padding-left: 30px;
}

body.mceContentBody li + li,
.rich-content li + li {
  margin-top: 6px;
}

body.mceContentBody a,
.rich-content a {
  color: #8e2344;
}

body.mceContentBody a:hover,
.rich-content a:hover {
  color: #701b36;
}

body.mceContentBody img,
.rich-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto;
}

body.mceContentBody blockquote,
.rich-content blockquote {
  margin: 20px 0;
  padding: 14px 18px;
  border-left: 4px solid #8e2344;
  border-radius: 0 6px 6px 0;
  background: #f8eef2;
  color: #4d555b;
}

body.mceContentBody hr,
.rich-content hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid #dde3e7;
}

body.mceContentBody table,
.rich-content table {
  max-width: 100%;
  border-collapse: collapse;
}

body.mceContentBody th,
body.mceContentBody td,
.rich-content th,
.rich-content td {
  padding: 7px 9px;
  border: 1px solid #dde3e7;
  vertical-align: top;
}

body.mceContentBody th,
.rich-content th {
  background: #f8f9fa;
  color: #263746;
  font-weight: 700;
}

/* Historical custom styles retained for existing TinyMCE content. */
body.mceContentBody .nadpis,
.rich-content .nadpis {
  margin: 16px 0 6px;
  padding: 0;
  color: #8e2344;
  font: 700 13px/1.35 Arial, "Helvetica Neue", sans-serif;
  text-align: left;
}

body.mceContentBody .OborovaVetev,
.rich-content .OborovaVetev {
  display: inline-block;
  margin: 6px 0 10px;
  padding: 4px 10px;
  border: 1px solid #ead5dd;
  border-radius: 999px;
  background: #f7eef2;
  color: #8e2344;
  font: 700 12px/1.4 Arial, "Helvetica Neue", sans-serif;
  text-align: left;
  letter-spacing: .02em;
  box-sizing: border-box;
}

body.mceContentBody .cl_textarea,
.rich-content .cl_textarea {
  margin: 16px 0;
  padding: 12px 16px;
  border: 1px solid #dce1e7;
  border-radius: 7px;
  background: #f5f6f8;
  color: #4d555b;
  font-size: 15px;
  line-height: 1.65;
  box-sizing: border-box;
}

body.mceContentBody .cl_textarea img,
.rich-content .cl_textarea img {
  max-width: 100%;
  height: auto;
}

/* zdrojovy kod */
body.mceContentBody .code,
.rich-content .code {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px dashed #cbd3d9;
  border-radius: 6px;
  background: #f8f9fa;
  color: #263746;
  font: 13px/1.55 Consolas, "Courier New", monospace;
  text-align: left;
  white-space: pre-wrap;
  overflow-x: auto;
  overflow-wrap: anywhere;
}

/* Nové uživatelské styly pro nový obsah. Staré články mohou dál používat
   historické třídy uvedené níže. */
body.mceContentBody .perex,
.rich-content .perex {
  margin: 0 0 22px;
  padding: 14px 16px;
  border-left: 3px solid #8e2344;
  border-radius: 0 6px 6px 0;
  background: #f8eef2;
  color: #4d555b;
  font-size: 18px;
  line-height: 1.55;
  font-weight: 600;
}

body.mceContentBody .info-blok,
.rich-content .info-blok {
  margin: 20px 0;
  padding: 14px 16px;
  border: 1px solid #d9e1e6;
  border-radius: 6px;
  background: #f7f9fa;
  color: #4d555b;
  font-size: 14px;
  line-height: 1.55;
}

body.mceContentBody .upozorneni,
.rich-content .upozorneni {
  margin: 20px 0;
  padding: 14px 16px;
  border-left: 4px solid #b36a00;
  border-radius: 0 6px 6px 0;
  background: #fff7e8;
  color: #5b4a2a;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 600;
}

/* Zvýrazněný odkaz / box vytvořený v TinyMCE */
body.mceContentBody .cl_link,
.rich-content .cl_link {
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 3px solid #8e2344;
  border-radius: 6px;
  background: #f8eef2;
  color: #263746;
  font-size: 14px;
  line-height: 1.5;
}

body.mceContentBody .cl_link a,
.rich-content .cl_link a {
  color: #8e2344;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
}

body.mceContentBody .cl_link a:hover,
.rich-content .cl_link a:hover {
  color: #701b36;
  text-decoration: underline;
}

/* Citace textu vytvořená v TinyMCE */
body.mceContentBody .cl_citace,
.rich-content .cl_citace {
  margin: 28px 0;
  padding: 18px 20px;
  border-radius: 6px;
  border: 1px solid #ead5dd;
  background: #f8eef2;
  color: #263746;
  font-size: 16px;
  line-height: 1.7;
}

body.mceContentBody .cl_citace p,
.rich-content .cl_citace p {
  margin: 0 0 0.9em;
}

body.mceContentBody .cl_citace p:last-child,
.rich-content .cl_citace p:last-child {
  margin-bottom: 0;
}

body.mceContentBody .cl_citace a,
.rich-content .cl_citace a {
  color: #8e2344;
}

/* Popisek obrázku – historická třída zachována, pouze modernizována. */
body.mceContentBody .div_img_popisek_top1,
.rich-content .div_img_popisek_top1 {
  box-sizing: border-box;
  width: 100%;
  max-width: 548px;
  margin: 10px auto 0;
  padding: 8px 12px;
  border: 1px solid #d7b8c3;
  border-radius: 6px 6px 0 0;
  background: #fbf5f7;
  color: #8e2344;
  font: 700 14px/1.4 Arial, "Helvetica Neue", sans-serif;
  text-align: center;
}

/* Shared legacy content classes used by existing catalog/company content. */
body.mceContentBody .Nadpis,
.rich-content .Nadpis {
  margin: 20px 0 10px;
  padding: 18px 0 0;
  border-top: 1px solid #e1e4e6;
  color: #8e2344;
  font: 700 13px/1.3 Arial, "Helvetica Neue", sans-serif;
  letter-spacing: .08em;
}

.rich-content .Nadpis:first-child {
  margin-top: 0;
}

body.mceContentBody .div_kat_popis,
.rich-content .div_kat_popis {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 20px;
  box-sizing: border-box;
}

body.mceContentBody .tabinfo,
.rich-content .tabinfo {
  padding: 8px 10px;
  border-top: 1px solid #fff;
  background: #f1f2f3;
  color: #4d555b;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 1.4;
  font-weight: normal;
}

body.mceContentBody .tabinfo *,
.rich-content .tabinfo * {
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: inherit;
  line-height: inherit;
  font-weight: normal;
}

body.mceContentBody .formPoznamka,
body.mceContentBody .FormPoznamka,
.rich-content .formPoznamka,
.rich-content .FormPoznamka {
  color: #4d555b;
  font-size: 16px;
  line-height: 1.55;
  font-weight: normal;
}

.rich-content table {
  width: 100%;
  max-width: 100%;
  margin: 0 0 14px;
  border-collapse: collapse;
}

.rich-content table td:first-child {
  width: 34%;
  color: #5d646a;
  font-weight: normal;
}

body.mceContentBody .gallery-grid,
.rich-content .gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 14px 0 20px;
}

body.mceContentBody .gallery,
.rich-content .gallery {
  display: block;
  width: auto;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #dde3e7;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

body.mceContentBody .gallery-link,
.rich-content .gallery-link {
  display: block;
  cursor: pointer;
  text-decoration: none;
}

body.mceContentBody .gallery img,
.rich-content .gallery img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 320px;
  object-fit: contain;
  background: #f8f9fa;
  transition: transform .18s ease;
}

body.mceContentBody .gallery:hover img,
.rich-content .gallery:hover img {
  transform: scale(1.015);
}

body.mceContentBody .gallery_desc,
.rich-content .gallery_desc {
  padding: 9px;
  text-align: center;
  color: #5d646a;
  font-size: 13px;
  line-height: 1.35;
}

.rich-content > .div_kat_popis > div[style*="text-align: center"] {
  display: none;
}

.rich-content > .div_kat_popis hr {
  border: 0;
  border-top: 1px solid #e1e4e6;
}

@media (max-width: 800px) {
  body.mceContentBody .gallery-grid,
  .rich-content .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.mceContentBody .gallery img,
  .rich-content .gallery img {
    max-height: none;
  }
}

@media (max-width: 640px) {
  body.mceContentBody {
    padding: 14px;
  }

  body.mceContentBody h1,
  .rich-content h1 {
    font-size: 23px;
  }

  body.mceContentBody h2,
  .rich-content h2 {
    font-size: 20px;
  }

  .cl_citace,
  body.mceContentBody .cl_citace,
  .rich-content .cl_citace {
    margin: 22px 0;
    padding: 14px 16px;
  }
}
