/*
 * responsive-patch.css – DigitalniOdolnost.cz
 * DŮLEŽITÉ: Inline styly mají vyšší specificitu než třídy.
 * Proto používáme !important a cílíme přímo na elementy.
 */

/* ═══════════════════════════════════════
   HAMBURGER TLAČÍTKO A MOBILE PANEL
═══════════════════════════════════════ */

#do-ham {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}
#do-ham span {
  display: block;
  width: 24px;
  height: 2px;
  background: #55e6f5;
  border-radius: 2px;
  transition: all .25s;
}
#do-ham.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
#do-ham.open span:nth-child(2) { opacity: 0; }
#do-ham.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

#do-mobile-panel {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(2, 8, 23, .98);
  border-bottom: 1px solid rgba(103,232,249,.15);
  padding: 12px 20px 20px;
  z-index: 199;
  gap: 2px;
}
#do-mobile-panel.open { display: flex !important; }
#do-mobile-panel a {
  display: block;
  padding: 12px 16px;
  color: #cbd5e1;
  font-weight: 800;
  font-size: 15px;
  border-radius: 10px;
  text-decoration: none;
}
#do-mobile-panel a:hover { background: rgba(85,230,245,.1); color: #55e6f5; }
#do-mobile-panel .do-mobile-cta {
  background: #55e6f5 !important;
  color: #071022 !important;
  border-radius: 14px !important;
  font-weight: 950 !important;
  margin-top: 8px;
  text-align: center;
}

/* ═══════════════════════════════════════
   TABLET ≤ 1100px
═══════════════════════════════════════ */
@media (max-width: 1100px) {

  /* Hamburger zobrazit */
  #do-ham { display: flex !important; }
  .menu   { display: none !important; }
  header .btn { display: none !important; } /* schoveme desktop CTA */

  /* Obecné třídy → 2 sloupce */
  .cards3, .cards4, .priceGrid, .afterGrid,
  .metricGrid, .miniGraph,
  .dsThreatGrid, .dsAcademyGrid, .dsMergedTrendGrid,
  .customPricingStructure, .pricingCardsV2,
  .heroStats, .reportMetaGrid, .reportMetricGrid,
  .allOptionsGrid, .metricMiniGrid, .dashCards {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Jeden sloupec */
  .hero, .figrant, .simGrid, .customProgramGrid,
  .dsPsychGrid, .dsFamilyGrid, .dsSimList,
  .answers, .resultGrid, .processMap,
  .reportMainGrid, .analysisBottom, .reportTop {
    grid-template-columns: 1fr !important;
  }

  /* Hero */
  .heroFull { padding: 42px 28px !important; min-height: auto !important; border-radius: 28px !important; }
  .heroTitle { font-size: clamp(38px, 5vw, 60px) !important; }
  h1 { font-size: 46px !important; }
  .setupWide { min-width: 0 !important; }
  .topbar { position: static !important; flex-direction: column !important; align-items: flex-start !important; }

  /* Test kategorie */
  .testCategoryGrid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Objednávka - setup */
  .setupGrid { grid-template-columns: repeat(3, 1fr) !important; }
}

/* ═══════════════════════════════════════
   INLINE GRID OPRAVY (JS doplní, ale jako záloha)
   Cílíme na kontejner .heroActions který má inline grid
═══════════════════════════════════════ */
@media (max-width: 900px) {
  /* .heroActions má inline style="display:grid;grid-template-columns:repeat(4,1fr)"
     Přebijeme inline styl pomocí !important */
  .heroActions {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Ostatní inline 4-col gridy uvnitř hero sekce */
  .heroStats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Trendy sekce - statické boxy */
  #trendy > div > div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Osoby v objednávce */
  #orderPeopleConfig .personRow > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ═══════════════════════════════════════
   MOBIL ≤ 768px
═══════════════════════════════════════ */
@media (max-width: 768px) {

  .wrap { padding: 0 16px !important; }
  section { padding: 48px 0 !important; }

  /* Všechno na 1 sloupec */
  .cards3, .cards4, .priceGrid, .afterGrid,
  .metricGrid, .miniGraph, .dsThreatGrid, .dsAcademyGrid,
  .dsMergedTrendGrid, .customPricingStructure, .pricingCardsV2,
  .heroStats, .reportMetaGrid, .reportMetricGrid, .dsPsychGrid,
  .dsFamilyGrid, .dsSimList, .allOptionsGrid, .resultGrid,
  .simFeatures, .dashCards, .crisisReportGrid, .processMap,
  .mixdealFooterGrid, .pricingIncludedGrid, .detailCards,
  .recommendGrid, .metricMiniGrid {
    grid-template-columns: 1fr !important;
  }

  /* heroActions → 1 sloupec na mobilu */
  .heroActions {
    grid-template-columns: 1fr !important;
  }

  /* Nadpisy */
  h1, .heroTitle { font-size: clamp(28px, 7vw, 42px) !important; letter-spacing: -1px !important; }
  h2 { font-size: clamp(24px, 6vw, 34px) !important; }

  /* Hero */
  .heroFull { padding: 24px 16px !important; border-radius: 20px !important; }
  .heroLead  { font-size: 16px !important; }
  .heroActions a, .heroActions button { width: 100% !important; }

  /* Navigace */
  header .nav { flex-wrap: wrap !important; gap: 12px !important; padding: 14px 0 !important; }

  /* Sekce padding */
  .simSection, .customProgram, .dsNewBlock { padding: 24px 16px !important; margin: 32px 0 !important; border-radius: 24px !important; }

  /* Cenové karty */
  .priceCardV2, .customPriceCard { min-height: auto !important; }
  .afterItem  { min-height: auto !important; }

  /* Odpovědi testu */
  .answers, .demoAnswers { grid-template-columns: 1fr !important; }

  /* Objednávka - osoby */
  #orderPeopleConfig .personRow > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Topbar */
  .topbar { gap: 10px !important; }

  /* Report */
  .scoreRingWrap { flex-direction: column !important; }
  .reportHeroTop { flex-direction: column !important; }
  .reportMainGrid, .analysisBottom { grid-template-columns: 1fr !important; }
  .topRiskGrid   { grid-template-columns: repeat(2, 1fr) !important; }
  .detailCards   { grid-template-columns: 1fr !important; }

  /* Setup */
  .setupGrid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Kategorie */
  .testCategoryGrid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Footery */
  .mixdealFooter  { padding: 36px 0 24px !important; }
  .mixdealFooterGrid { grid-template-columns: 1fr !important; }
  .pricingSection, .pricingProgramV2 { padding: 48px 16px !important; }

  /* Tabulky */
  .orderPricingTable { overflow-x: auto !important; }

  /* Data wide */
  .dataWideTop { grid-template-columns: 1fr !important; }
  .dataWideTextCol { padding-top: 0 !important; }
  .dataWidePanelRequested { padding: 24px 16px !important; }
}

/* ═══════════════════════════════════════
   MALÝ MOBIL ≤ 480px
═══════════════════════════════════════ */
@media (max-width: 480px) {

  h1, .heroTitle { font-size: clamp(24px, 7vw, 34px) !important; }

  .setupGrid         { grid-template-columns: repeat(2, 1fr) !important; }
  .testCategoryGrid  { grid-template-columns: 1fr !important; }
  .heroStats         { grid-template-columns: repeat(2, 1fr) !important; }
  .topRiskGrid       { grid-template-columns: 1fr !important; }

  /* Trendy boxy */
  #trendy > div > div[style*="repeat(4"] {
    grid-template-columns: 1fr !important;
  }

  .priceGrid  { grid-template-columns: 1fr !important; }
  .afterGrid  { grid-template-columns: 1fr !important; }
}
