* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root{
  --bg: #F7F5EE;      /* krémové pozadí */
  --text: #1D2939;    /* tmavý text */
  --muted: #667085;   /* tlumený text */
  --brand: #0E4975;   /* navy z loga */
  --accent: #2AAA61;  /* zelená z loga */
  --peach: #F6CCBD;   /* pastel z plakátů */
  --mint: #C2E3CA;    /* jemná mint pro sekce */
  --card: #FFFFFF;
  --border: #EAEAEA;
  --cta: var(--brand);
}

.container { 
  width: min(1800px, 80%); margin: 0 auto; 
}

body{
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, "Segoe UI";
  line-height: 1.6;
}

.navbar {
  background: var(--mint);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
}

.navbar .brand a,
.navbar .nav-links a,
.hamburger {
  color: var(--brand);
  text-decoration: none;
  font-weight: 700;
  border-radius: 6px;
  display: block;
  transition: background-color .2s ease, color .2s ease, filter .2s ease;
}

.navbar .brand a {
  font-size: 18px;
  background: none;
  padding: 0;
}

.navbar .nav-links {
  display: flex;
  gap: 15px;
}

.navbar .nav-links a {
  padding: 8px 12px;
  background: transparent;
}

.navbar .nav-links a.active {
  text-decoration: underline;
}

.navbar .brand a:hover,
.navbar .nav-links a:hover,
.navbar .brand a:focus-visible,
.navbar .nav-links a:focus-visible {
  scale: 1.05;
  cursor: pointer;
  filter: brightness(1.2);
}

.navbar .nav-links a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-banner{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 0;
  gap: 24px;
  background: var(--bg);
}

.hero-title h1{
  color: var(--brand);
  margin: 0 0 10px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

.btn,
.btn-outline {
  display: inline-block;
  color: var(--brand);
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  transition: filter .3s ease;
}

.btn { background: var(--mint); }
.btn-outline { background: var(--peach); }

.btn:hover,
.btn-outline:hover {
  filter: brightness(1.05);
  scale: 1.05;
}

.cards-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.course-card{
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;

  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  position: relative;
}
.course-card:hover, .course-card:focus-visible{
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
}
.course-card h3{ 
  margin: 0; font-size: 1.05rem; color: var(--brand); 
  text-align: center;
}
.course-card p{ margin: 0; color: var(--text); }
.course-card .card-meta{ color: var(--muted); font-size: .9rem; }
.card-icon{ 
  font-size: 28px; line-height: 1; 
  text-align: center;
}

.course-detail{
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: black;
  border-radius: 14px;
  padding: 20px;
  margin-top: 20px;
  text-align: left;
  scroll-margin-top: 80px;
}
.course-detail h2{
  color: var(--brand);
}
.course-detail:target{
  display: block;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn{
  from{ opacity:0; transform: translateY(8px); }
  to{ opacity:1;  transform: translateY(0); }
}
.close-detail{ float: right; margin-left: 12px; margin-bottom: 8px; }

.callouts{
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 16px;
  align-items: center;
}
.callout-cta h2{ margin: 0 0 8px; color: var(--brand); }
.note-bubble{
  background: var(--peach);
  padding: 16px 18px;
  border-radius: 16px;
  font-weight: 600;
  color: var(--text);
}

.logo{ height:52px; width:auto; display:block; }

footer{
  background:var(--mint);
  color:var(--brand);
  text-align:center;
  padding:10px;
  margin-top:20px;
}

.with-line{
  position:relative;
  display:inline-block;
  font-size:clamp(28px,5vw,56px);
  line-height:1.1;
  text-align:center; 
  color:var(--brand);
  margin:0;
}
.with-line::before{
  content:"";
  display:block;
  width:100%;
  height:0.8em;
  margin-bottom:8px;
  background: url("img/line.png") left center / contain no-repeat;
}

.hero-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  flex-wrap:wrap;
}

.cloud-img{
  max-width:40%;
  height:auto;
}

.about-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin: 80px auto;
}

.about-block {
  margin-bottom: 60px;
}

.about-block h2 {
  color: var(--brand);
}

.col-right .extra-block {
  margin-bottom: 60px;
  text-align: center;
}

.decor-img,
.arrow-img {
  max-width: 250px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.bubble {
  background: url("img/bubble.png") no-repeat center/contain;
  padding: 60px 40px;
  max-width: 320px;
  margin: 0 auto;
}

.note {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.alt-section{ display:flex; flex-direction:column; gap:64px; margin:80px auto; }
.alt-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 60px;
  align-items: center;
}
.alt-text p{ text-align: justify; margin: 0; }
.alt-text h2{ margin: 0 0 12px; color: var(--brand); }

.center{ text-align:center; }
.big-head{
  font-size: clamp(20px, 2vw, 30px);
  color: var(--brand);
  margin: 0 0 12px;
}
.v-cloud{ max-width: 360px; width: 100%; height: auto; }
.v-arrow{ max-width: 200px; width: 100%; height: auto; margin-top: 6px; }

.big-note{
  max-width: 460px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--brand);
  text-align: center;
}

.bubble-card { 
  background: url("img/bubble.png") no-repeat center/contain;
  max-width: 420px;
  width: 100%;
  padding: 72px 44px;
  color: var(--brand);
  margin: 24px auto 48px;
  display: flex;            
  align-items: center;       
  justify-content: center;     
}

.bubble-text {
  text-align: left;   
  line-height: 1.4; 
}

.bubble-text .name {
  display: block;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 1px;
  line-height: 1.2;     
  white-space: nowrap;
}

.bubble-text .role {
  display: block;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.25;
  white-space: nowrap;
}

.bubble-text .line,
.bubble-text .ico {
  display: block;
  font-size: 16px;
  line-height: 1.3;
  margin: 2px 0;           
}

.hamburger{
  display:none;                    /* desktop skrytý */
  flex-direction:column;
  justify-content:center;
  gap:5px;
  width:32px; height:32px;
  background:none; border:0; padding:0;
  cursor:pointer;
}
.hamburger span{
  display:block;
  width:24px; height:3px;
  margin:4px auto;
  background:var(--brand);
  border-radius:2px;
  transition:transform .25s ease, opacity .25s ease;
}
.hamburger.active span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity:0; }
.hamburger.active span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

.contact-form{
  margin:60px auto;
  max-width:600px;
  text-align:left;
}
.contact-form h2{
  color:var(--brand);
  margin-bottom:20px;
  text-align:center;
}

.form{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.form label{
  display:flex;
  flex-direction:column;
  font-weight:600;
  color:var(--brand);
}

.form input,
.form textarea{
  margin-top:6px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:6px;
  font-size:1rem;
  font-family:inherit;     
  color:var(--text);     
  width:100%;              
  box-sizing:border-box;    
}

.form input:focus,
.form textarea:focus{
  border-color:var(--brand);
  outline:none;
}

.form button{
  align-self:flex-start; 
  border:0;
  cursor:pointer;
  height:auto;
}

.detail-head{
  display:grid;
  grid-template-columns: 1fr auto; 
  align-items:center;
  gap:10px;
  margin-bottom:15px;
}

.detail-head h2{ margin:0; }

.detail-actions{
  justify-self:end;
  display:flex;     
  gap:10px;
  margin-bottom:15px;
  flex-wrap:wrap;      
}

.detail-actions .btn{ margin-left:0; }

.contact-bubble img {
  max-width: 400px;
  height: auto;
  cursor: pointer;
  width: 100%; 
  transition: transform 0.3s ease;
}

.contact-bubble img:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.tools{
  max-width:1100px;
  margin:80px auto;
  padding:0 20px;
}
.tools h2{
  text-align:center;
  color:var(--brand);
  margin-bottom:40px;
  font-size:clamp(24px,5vw,32px);
}
.tool-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap:40px;
  align-items:center;
  margin-bottom:60px;
}
.tool-row.reverse .tool-image{ order:2; }
.tool-image img{
  width:100%;
  height:auto;
  border-radius:12px;
  box-shadow:0 4px 12px rgba(0,0,0,.08);
}
.tool{
  background:var(--card);
  border-radius:12px;
  padding:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.05);
  display:flex;
  gap:20px;
  align-items:center;
}
.tool-text h3{
  margin:0 0 8px;
  color:var(--brand);
  font-size:clamp(18px,3vw,28px);
}
.tool-text p{
  margin:0;
  text-align:justify;
  line-height:1.5;
  font-size:clamp(14px,2.5vw,16px);
}

.course-detail .close-detail{
    float: none;
    margin: 0;           
  }

.badge-peach {
  display: inline-block;
  background: var(--peach);
  color: var(--brand);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.form .error-msg{ color:#d93025; font-size:.9rem; margin:.25rem 0 0 }
.form input.is-invalid,
.form textarea.is-invalid{ border-color:#d93025; outline: none }
.form input.is-valid,
.form textarea.is-valid{ border-color:#2e7d32 }

/* Široká sekce referencí */
.references-wide{
  width: 100%;
  max-width: 1600px;
  margin: 80px auto 40px;   /* větší mezera od formuláře i od patičky */
  padding: 0 10px 40px;     /* odsazení od krajů */
}

.references-wide h2{
  text-align: center;
  color: var(--brand);      /* stejná barva jako ostatní nadpisy */
  margin: 0 0 30px;
}

/* Mřížka referencí */
.references-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Karta */
.reference-item{
  height: 100%;
  display: flex;
  flex-direction: column;
}

.reference-item p{
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (max-width: 1100px){
  .references-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobil: 1 sloupec */
@media (max-width: 700px){
  .references-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px){
  .navbar { 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
  }

 .navbar .nav-links{
  position: absolute;
  top: 72px; left: 0; right: 0;
  background: var(--mint);
  display: flex;
  flex-direction: column;
  gap: 0px;
  padding: 10px 16px 16px;
  box-shadow: 0 8px 16px rgba(0,0,0,.08);
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.navbar .nav-links.animated{
  transition: opacity .25s ease, transform .25s ease;
}

.navbar .nav-links.open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

  .tool-text p {
    text-align: center;
  }
 
 .tool-row{
    display: grid;               
    grid-template-columns: 1fr;   
    gap: 24px;
    text-align: center;
  }
  .tool-row.reverse{               
    grid-template-columns: 1fr;
  }

   .tool-row.reverse .tool-image,
  .tool-row.reverse .tool{
    order: 0;
  }

 .hero-banner {
    flex-direction: column;
    align-items: center;  
    text-align: center;
  }

  .cloud-img {
    max-width: 80%; 
    margin-top: 16px;
  }

  .about-block,
  .about-block.reverse {
    justify-content: center;
  }

  .about-text {
    max-width: 100%;
    text-align: justify;
  }

   .about-two-columns {
    grid-template-columns: 1fr;
  }

  .alt-row{ grid-template-columns: 1fr; gap: 22px; }
  .alt-text{ order: 1; }
  .alt-visual{ order: 2; }

  .hamburger{ 
    display: inline-block; 
  }         
  .nav-links.open{ 
    flex-direction: column; 
  }
  .detail-head{
    grid-template-columns: 1fr;
    align-items: center;
    gap: 10px;
    text-align: center;
  }

  .detail-actions{
    justify-content: center;
    display: grid;             
    grid-auto-flow: column;
    gap: 10px;
    width: 100%;
    grid-auto-columns: max-content;
  }
  .detail-actions .btn{
    display: inline-block;
    white-space: nowrap;
  }
  .close-detail{
    float: none;
    margin: 0;
  }

   .about-row {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: center;
  }
}

@media (max-width: 440px){
  .detail-actions{
    grid-auto-flow: row;
    justify-content: center;
    width: 100%;
  }
  .bubble-text .name { 
    font-size: clamp(10px, 5vw, 20px);
    line-height: clamp(1.1, 1.5vw, 1.3); 
  }

  .bubble-text .role { 
    font-size: clamp(8px, 5vw, 16px); 
    line-height: clamp(1.1, 1.4vw, 1.25);
  }

  .bubble-text .line,
  .bubble-text .ico  { 
    font-size: clamp(8px, 3.6vw, 16px);
    line-height: clamp(1.05, 1.3vw, 1.2);
  }

}