body {
  color: #3b3b3b;
  background: #f0f2f5;
  font-family: Merriweather, Arial, sans-serif !important;
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

#page {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.layout-main {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  padding: 20px;
}

.main-content {
  flex: 1 1 0%;
  min-width: 0;
}

#sidebar-second {
  flex: 0 0 310px;
  width: 310px !important;
}

#header {
  background-color: #ffffff;
  border-bottom: 3px solid #1d84c3;
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.region-header .site-branding__logo img {
  width: 250px;
  max-width: 100%;
  height: auto;
  display: block;
}

.region-header .site-branding__text,
.region-header .site-branding__slogan {
  color: #555555;
  font-size: 14px;
  margin-top: 10px;
}

.region-primary-menu .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.region-primary-menu .menu a {
  color: #1d84c3;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
}

ul.menu a.is-active,
.region-primary-menu .menu a:hover {
  background-color: #1d84c3 !important;
  color: #ffffff !important;
}

a, .link {
  color: #1d84c3;
  text-decoration: none;
}

a:hover, a:focus, .link:hover, .link:focus {
  color: #055a8e;
}

.page-title {
  font-size: 28px;
  line-height: 1.3;
  font-family: Merriweather, Arial, sans-serif !important;
  text-align: center;
  padding: 20px;
  color: #ffffff;
  background-color: #1d84c3;
  margin: 0;
  border-radius: 8px 8px 0 0;
  font-weight: bold;
}

.page-title .field--name-title {
  color: #ffffff;
}

#block-bartik-page-title {
  margin-bottom: 0;
}

#block-bartik-content {
  margin-top: 0;
}

.region-sidebar-second .block {
  background-color: #ffffff;
  margin-bottom: 30px;
}

.region-sidebar-second .block h2 {
  font-size: 18px;
  color: #333333;
  border-bottom: 2px solid #1d84c3;
  padding-bottom: 8px;
  margin-top: 0;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.view-id-frontpage .view-content,
.view-id-souteze .view-content,
.view-id-poradatel.view-display-id-podle_souteze .view-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.medailonek_souteze {
  text-align: center;
  background: #ffffff;
  border: 1px solid #e5e6e9;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-width: 306px;
}

.medailonek_souteze:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.view-frontpage .titulek, 
.view-vyherci .views-field-title {
  background-color: #1d84c3;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
}

.view-frontpage .titulek a, 
.view-vyherci .views-field-title a {
  color: #ffffff;
  font-size: 16px;
  font-weight: bold;
}

.view-frontpage .titulek a:hover {
  color: #e8f4f8;
}

.hp_img {
  background: #fdfdfd;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.hp_img img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.vyherci_soutez {
  text-align: center;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 30px;
  margin: 30px 0;
  border: 1px solid #e1e4e8;
}

.vyherci_soutez fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.vyherci_soutez legend {
  font-size: 22px;
  font-weight: bold;
  color: #1d84c3;
  margin-bottom: 20px;
  padding: 0;
  display: block;
  width: 100%;
}

.vyherci_soutez legend h3 {
  margin: 0;
  font-size: inherit;
  color: inherit;
}

.field--name-field-vyherci .field__label {
  display: none;
}

.field--name-field-vyherci .field__item {
  padding: 10px 0;
  border-bottom: 1px dashed #cccccc;
  font-size: 16px;
  color: #333333;
}

.field--name-field-vyherci .field__item:last-child {
  border-bottom: none;
}

.thx.nazev-udalosti {
  font-size: 16px;
  color: #1d84c3;
  margin-top: 15px;
  font-weight: bold;
}

.button, .button:hover, .btn {
  background-color: #1d84c3 !important;
  border-radius: 6px !important;
  border: none !important;
  color: #ffffff !important;
  text-shadow: none !important;
  width: 100% !important;
  max-width: 250px;
  margin: 15px auto;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  display: block;
  transition: background-color 0.2s ease, transform 0.2s ease !important;
}

.button:hover, .btn:hover {
  background-color: #055a8e !important;
  transform: translateY(-2px);
}

#table_form, #table_otazky {
  width: 100%;
  margin-top: 20px;
}

#table_form td, #table_otazky td {
  padding: 10px;
  vertical-align: middle;
}

#table_form input[type="text"], 
#table_form input[type="email"] {
  border: 1px solid #cccccc;
  padding: 10px;
  border-radius: 4px;
  width: 100%;
}

.site-footer {
  background: #222222;
  color: #dddddd;
  padding: 40px 20px 20px 20px !important;
  font-size: 14px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 18px;
  margin-top: 0;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #444444;
}

.site-footer a {
  color: #4da6ff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer__bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #444444;
}

#block-souhlasscookie {
  text-align: center;
  font-size: 13px;
  background-color: #111111;
  color: #aaaaaa;
  padding: 10px 20px;
}

.image-promoted {
  text-align: center;
  margin-bottom: 0;
}

.node--type-soutez .image-outer {
  background: #fdfdfd;
  border: 1px solid #e5e6e9;
  border-top: none;
  border-radius: 0 0 8px 8px;
  padding: 40px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.node--type-soutez .image-promoted img {
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  max-width: 100%;
  height: auto;
}

.contest_table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background: #ffffff;
  border: 1px solid #e5e6e9;
  border-radius: 8px;
  overflow: hidden;
}

.contest_table td {
  padding: 15px;
  border-bottom: 1px solid #e5e6e9;
}

.contest_table tr:last-child td {
  border-bottom: none;
}

.blue {
  background: #e8f4f8;
  color: #1d84c3;
  padding: 5px 15px;
  border-radius: 6px;
  font-weight: bold;
  display: inline-block;
}

.poradatel_vip, .field--name-field-typ-firmy, .jakmoc {
  padding: 5px 10px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 10px;
}

.poradatel_vip { background: orange; color: #000; }
.field--name-field-typ-firmy { background: navy; color: #fff; }
.moc1 { background: orange; color: #fff; }
.moc2 { background: #977c4b; color: #fff; }
.moc3 { background: #b9995e; color: #fff; }
.moc4 { background: red; color: #fff; }

.view-id-slideshow .view-content {
  position: relative;
  overflow: hidden;
  height: 330px; 
  width: 100%;
}

.view-id-slideshow .view-content {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.view-id-slideshow .views-row {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.view-id-slideshow .views-row.active-slide {
  position: relative;
  opacity: 1;
  z-index: 2;
}

.view-id-slideshow .views-row img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 850px) {
  .view-id-frontpage .view-content,
  .view-id-souteze .view-content,
  .view-id-poradatel.view-display-id-podle_souteze .view-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  #header {
    flex-direction: column;
    text-align: center;
  }
  
  .region-primary-menu .menu {
    justify-content: center;
    margin-top: 15px;
  }
  
  .layout-main {
    flex-direction: column;
    display: flex !important;
    padding: 15px;
  }
  
  .main-content {
    width: 100% !important;
    flex: 1 1 auto !important;
  }

  #sidebar-second {
    display: block !important;
    width: 100% !important;
    flex: 1 1 auto !important;
    max-width: none !important;
    margin-top: 30px;
    clear: both;
  }

  .view-id-frontpage .view-content,
  .view-id-souteze .view-content,
  .view-id-poradatel.view-display-id-podle_souteze .view-content {
    grid-template-columns: 1fr;
  }

  .view-id-slideshow .view-content {
    position: relative;
    overflow: hidden;
    height: auto; 
    width: auto;
  }

  #table_form td, #table_otazky td {
    display: block;
    width: 100% !important;
  }
}