:root {
    --main-gradient: linear-gradient(180deg, #122032 0%, #355737 100%);
    --accent: #CD9B65;
    --highlight: #fff;
    --highlight-soft: rgba(255, 255, 255, 0.79);
    --card-bg: rgba(255, 255, 255, 0.13);
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--main-gradient);
    min-height: 100vh;
    color: #fff;
}

body.carousel-visible .particles-container {
  opacity: 0;
  pointer-events: none;
}

body.carousel-visible .search-info img {
  margin-bottom: 1rem;
}


.header-main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 28px;
}

.header-logo .isir-logo-header {
    width: 14rem;
}

.header-logo .isir-logo {
    width: 10rem;
}

.header-nav,
.footer-nav {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
}

.header-nav a,
.footer-nav a {
    color: #d3d3d3;
    text-transform: uppercase;
    font-size: 0.695rem;
    letter-spacing: 0.09em;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.18s;
}

.header-nav a:hover,
.footer-nav a:hover {
    color: #ffeec0;
}

/* Hero / search bar */
.hero-title {
    font-size: 2.2rem;
    font-weight: 600;
    text-align: center;
    margin: 0 auto 4.375rem auto;
    max-width: 720px;
    padding: 0 1.2rem;
    color: #fff;
}

.hero-section {
    margin-top: 1.2rem;
    margin-bottom: 5rem;
    padding: 3.75rem;
    gap: 3.313rem;
}

.search-bar-custom {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: 650px;
    margin: 4.375rem auto 0.688rem auto;
    background: #cd9b6573;
    border-radius: 18px;
    box-shadow: 0 5px 24px 1px #1a282060;
    padding: 0.18em 0.38em 0.18em 1em;
    gap: 0;
}

.search-input-custom {
    flex: 1 1 auto;
    background: none !important;
    appearance: none !important;
    border: none;
    outline: none;
    color: #e6e6e6;
    font-size: 1.25rem;
    padding: 1.05em 0 .9em 0;
    border-radius: 14px 0 0 14px;
    font-weight: 400;
    color-scheme: dark;
}

.search-input-custom::placeholder {
    color: #b8b8b8;
    font-size: 1.08rem;
    opacity: 1;
    font-weight: 400;
}

.search-input-custom:focus {
  background: none !important;
  box-shadow: none; /* vizuál drží wrapper lišty */
}

.search-bar-custom:autofill{
    background: none !important;
    appearance: none !important;
    color: #e6e6e6 !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    font-size: 1.25rem;
}

.search-input-custom:-webkit-autofill,
.search-input-custom:-webkit-autofill:hover,
.search-input-custom:-webkit-autofill:focus {
  -webkit-text-fill-color: #e6e6e6 !important;
  caret-color: #e6e6e6 !important;
  /* přemaluje interní „modré/žluté“ pozadí autofillu barvou lišty */
  -webkit-box-shadow: 0 0 0 1000px #ffffff00 inset !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  border-radius: 14px 0 0 14px; /* shodné s inputem */
  transition: background-color 5000s ease-in-out 0s !important; /* potlačí bliknutí */
  color: #e6e6e6;
    font-size: 1.25rem;
}

/* Firefox (méně spolehlivé, ale pomůže držet text/kontrast) */
.search-input-custom:-moz-autofill {
  color: #e6e6e6 !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  color: #e6e6e6;
    font-size: 1.25rem;
}

.search-btn-custom {
    background: #CD9B65;
    color: #222;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.25rem;
    font-size: 1.22rem;
    font-weight: 600;
    cursor: pointer;
    margin-left: 0.8em;
    margin-right: 0.15em;
    box-shadow: 0 5px 12px #0002;
    transition: background 0.17s;
    display: flex;
    align-items: center;
    gap: 0.2em;
}

.search-btn-custom:hover {
    background: #eac296;
}

.search-info {
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: margin-bottom 0.4s ease-out;
}

.search-info img {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.4rem;
    margin-bottom: 3.438rem;
    justify-self: center;
    transition: margin-bottom 0.4s ease-out;
}

.search-info img:hover {
    filter: brightness(1.8);
    cursor: pointer;
}

@media (max-width: 650px) {
    .search-bar-custom {
        max-width: 99vw;
        border-radius: 11px;
        padding: 0.05em 0.13em 0.05em 0.9em;
    }

    .search-btn-custom {
        padding: 0.61em 1.12em;
        font-size: 1.07rem;
    }

    .search-input-custom {
        font-size: 1.03rem;
        padding: 0.85em 0 .7em 0;
    }
}


/* Carousel */
.carousel-container {
    position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 25% auto 4rem auto;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  perspective: 1000px;
  transition: margin-top 0.4s ease-out;
}


body.carousel-visible .carousel-container {
  margin-top: -2rem;
}

body.carousel-visible .hero-section {
  margin-top: 2rem;
}

@media (max-width: 768px) {
  body.carousel-visible .carousel-container {
    margin-top: 4rem;
  }
  
  body.carousel-visible .search-info img {
    margin-bottom: 0.5rem;
  }
}


.carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    position: relative;
    width: 1000px;
    height: 280px;
    gap: 70px;
}

.carousel__item {
    position: absolute;
    width: 350px;
    aspect-ratio: 3/2;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgb(0 0 0 / 0.1);
    color: rgb(21, 73, 53);
    font-size: 5rem;
    font-weight: 900;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
    user-select: none;
    background: #ffffff;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55),
        filter 0.3s;
}

.carousel__item img {
    width: inherit;
    height: inherit;
    border-radius: inherit;
    object-fit: scale-down;
}


.carousel__item.inactive {
    filter: grayscale(0.7) brightness(0.7);
}

.carousel__item:hover {
    will-change: auto;
    cursor: pointer;
}

.carousel__item:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    box-shadow: 0 8px 48px rgba(255, 255, 255, 0.3);
}

.carousel-button {
    font-size: 2.5rem;
    background: none;
    border: none;
    color: #fff7;
    padding: 0 15px;
    cursor: pointer;
    transition: color 0.3s ease;
    user-select: none;
}

.carousel-button:hover {
    color: #fff;
    cursor: pointer;
}

@media (max-width: 700px) {
    .carousel-container {
        max-width: 95vw;
    }

    .carousel {
        width: 90vw;
        height: 250px;
    }

    .carousel__item {
        width: 140px;
        height: 190px;
        font-size: 3.5rem;
    }
}

/* Cooperation section */
.cooperation {
    max-width: 80%;
    margin: 3.5rem auto 0 auto;
    padding: 0 2vw 5rem 2vw;
    text-align: center;
}

.cooperation h2 {
    font-size: 2.2rem;
    color: #fff;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Grid karet drží stejnou výšku sloupců (už je implicitně stretch) */
.cooperation-cards {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;         /* důležité: všechny karty mají stejnou výšku v řádku */
  flex-wrap: wrap;
}

/* Karta = sloupec přes celou výšku, aby se dalo tlačítko „opřít“ o dno */
.coop-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 25px #0001;
  width: 100%;
  max-width: 320px;
  min-height: 360px;           /* trochu vyšší, ať je prostor i u kratších textů */
  display: flex;
  flex-direction: column;      /* obraz + obsah pod sebou */
  align-items: stretch;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

/* Obrázek fixní výšky – všechny texty začínají vždy stejně nízko */
.coop-card-img {
  width: 100%;
  height: 160px;               /* vyšší než dřív pro jednotný start obsahu */
  object-fit: cover;
  display: block;
  flex: 0 0 160px;             /* zabrání smrštění/nafouknutí */
}

/* Obsah karty vyplní zbytek výšky a vytvoří „oporu“ pro tlačítko dole */
.coop-card-content {
  flex: 1 1 auto;              /* vyplní dostupnou výšku karty pod obrázkem */
  display: flex;
  flex-direction: column;      /* titulek, text, tlačítko pod sebou */
  padding: 1.1em 1.2em 1.2em;
  color: #373737;
  text-align: left;
  min-height: 0;               /* umožní správné zkracování obsahu uvnitř */
}

/* Titulek a text mohou být různé délky, ale tlačítko vždy k dolnímu okraji */
.coop-card-title {
  color: #333;
  font-size: 1.02rem;
  font-weight: 700;
  margin: 0 0 0.6em 0;
}

.coop-card-text {
  font-size: 0.96rem;
  color: #5a5a5a;
  line-height: 1.5;
  margin: 0 0 1.1em 0;
  /* volitelně omezení výšky s ořezem, aby karty držely výšku ještě přesněji:
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  */
}

/* Tlačítko „přilep“ na dno obsahu doleva */
.coop-card-btn {
  display: inline-block;
  background: #fdf5c4;
  color: #333;
  text-decoration: none;
  padding: 0.6em 1.5em;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s;

  margin-top: auto;            /* posune tlačítko na dno contentu */
  align-self: flex-start;      /* zarovnání k levému okraji */
}

.coop-card-btn:hover {
  background: #fbeea8;
}



/* Mobile vyladění – aby se tlačítko dál lepilo ke dnu i při jednosloupcovém layoutu */
@media (max-width: 700px) {
  .coop-card {
    max-width: 98vw;
    width: 100%;
    min-height: 340px;
  }
  .coop-card-img { height: 150px; flex-basis: 150px; }
}


/* Footer */
.footer-main {
    margin-top: 1.5rem;
    padding: 2.6rem 0 1rem 0;
    width: 100%;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-main .isir-logo {
    font-family: Arial Black, Arial Bold, Gadget, sans-serif;
    font-size: 2.2rem;
    letter-spacing: 0.18em;
    color: #fff;
    margin-bottom: 6px;
}

@media (max-width:700px) {
    .cooperation-cards {
        flex-direction: column;
        gap: 1.3rem;
        align-items: center;
    }

    .coop-card,
    .coop-card.empty {
        max-width: 98vw;
        width: 100%;
    }

    .carousel-card,
    .carousel-container {
        min-width: 96vw;
        width: 96vw;
    }

    .carousel-card {
        width: 99vw;
        min-width: 150px;
        height: 110px;
    }

    .header-main {
        font-size: 1.1rem;
    }

    .footer-main {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
}

/* For extra narrow screens */
@media (max-width:500px) {
    .hero-title {
        font-size: 1.18rem;
    }

    .header-logo .isir-logo,
    .footer-main .isir-logo {
        font-size: 1.25rem;
    }

    .cooperation h2 {
        font-size: 1.2rem;
    }
}

/* BLUR pro zbytek stránky když info otevřeno */
body.info-open > *:not(.info-overlay) {
  filter: blur(5px) brightness(0.96);
  pointer-events: none !important;
  transition: filter 0.25s;
}

/* Modal overlay pozadí */
.info-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30,30,30,0.32);
  backdrop-filter: blur(7px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeOverlay 0.28s;
}
@keyframes fadeOverlay { from { opacity:0; } to { opacity:1; } }
.info-overlay.active { display: flex; }

/* Modal box */
.info-modal {
  min-width: 260px;
  max-width: 820px;
  width: 96vw;
  background: #CD9B6545;
  border-radius: 36px;
  box-shadow: 0 10px 44px 4px #0005;
  padding: 0;
  animation: fadeInModal 0.32s;
}
@keyframes fadeInModal { from {scale: 0.9; opacity: 0.05;} to {scale:1; opacity:1;} }

.info-modal {
    /* add comfortable padding and a warm accent background like the image */
    padding: 2.6rem 3.6rem;
    background: #cd9b6573;
    border-radius: 36px;
    box-shadow: 0 10px 44px 4px #0005;
}

/* Title + description */
.info-modal-title {
    color: #fff;
    font-size: 2.3rem;
    font-weight: 800;
    margin: 0 0 1.6rem 0;
    text-align: center;
    letter-spacing: 0.03em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.info-modal-desc {
    color: rgba(255,255,255,0.95);
    font-size: 1.15rem;
    margin: 0 0 1.2rem 0;
    text-align: center;
    font-weight: 400;
    letter-spacing: 0.01em;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Columns layout */
.info-modal-columns {
    display: flex;
    gap: clamp(1.6rem, 5vw, 6rem);
    justify-content: center;
    align-items: flex-start;
    margin-top: 0.6em;
    color: #fff;
    font-size: 1.05rem;
    padding-bottom: 2.2rem;
    font-weight: 400;
}

/* each column centers its content like in the image */
.info-modal-columns > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 30%;
    flex: 0 1 220px;
    line-height: 2.05;
}

/* column heading */
.info-modal strong {
    color: #fff;
    font-size: 1.08rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    width: 100%;
}

/* make individual list items slightly lighter and well spaced */
.info-modal-columns > div > *:not(strong) {
    color: rgba(255,255,255,0.96);
    font-weight: 500;
    margin: 0.18em 0;
    font-size: 1.04rem;
}

/* inactive / subtle items can use smaller size (if needed) */
.info-modal-columns > div .muted {
    color: rgba(255,255,255,0.8);
    font-size: 0.98rem;
}

/* Responsivita pro modal */
@media (max-width: 600px) {
    .info-modal-columns {
        flex-direction: column;
        gap: 1.8rem;
    }

    .info-modal-columns > div {
        min-width: auto;
        width: 100%;
    }

    .info-modal-desc {
        font-size: 1rem;
        max-width: 90%;
    }

    .info-modal-title {
        font-size: 1.8rem;
    }
}


/* Particles */
/* Kontejner na částice - překrývá spodní část obrazovky */
.particles-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 150px;
  pointer-events: none;
  overflow: visible;
  z-index: 999;
  opacity: 1;
  transition: opacity 0.6s ease-out;
}

/* Jednotlivá částice - malé kroužky */
.particle {
  position: absolute;
  bottom: 0;
  left: var(--left, 50%);
  width: var(--size, 6px);
  height: var(--size, 6px);
  background: radial-gradient(circle, #CD9B65 60%, transparent 100%);
  border-radius: 50%;
  opacity: 0;
  animation-name: sparkleRise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-fill-mode: forwards;
  animation-duration: var(--duration, 6s);
  animation-delay: var(--delay, 0s);
}


/* Animace - částice vyjde zdola, ztmavne a zmizí výstupem nahoru */
@keyframes sparkleRise {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.4);
  }
  10% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateY(-120px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-150px) scale(1);
  }
}
/* End of particles */

/* Scroll to top button */
.scroll-top-button {
  position: fixed;
  bottom: 2.5rem;
  right: 2.5rem;
  background: var(--accent);
  color: #222;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgb(205 155 101 / 0.6);
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 15000;
  display: none; /* skryté dokud se nescrolluje */
}
.scroll-top-button:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* Zobrazit tlačítko pokud se scrolluje dolů */
.scroll-top-button.show {
  display: block;
}
/* End of scroll to top button */

