/**
 * Iceberg Section - Frontend styly
 * TASK-025: Nový layout s hladinou jako overlay
 * TASK-054b: Refaktoring hardcoded barev na CSS proměnné
 *
 * @package ReactWind Energy Child
 * @version 4.1.0
 */

/* =====================================================
   CSS PROMĚNNÉ - Lokální barvy pro Iceberg sekci
   Rozšiřují globální proměnné z blocks/shared/tailwind.css
   ===================================================== */
:root {
  /* Gradient pozadí sekce */
  --iceberg-bg-start: #0a1628;
  --iceberg-bg-end: #1e3a5f;

  /* Barva pro neřešitelné badge (šedá) */
  --color-slate-400: #94a3b8;
}

/* =====================================================
   FULLSCREEN SECTION
   ===================================================== */

.iceberg-section {
  background: var(
    --iceberg-gradient,
    linear-gradient(180deg, var(--iceberg-bg-start), var(--iceberg-bg-end))
  );
  position: relative;
  overflow: hidden;
  /* Výška: 100vh mínus header (--header-height) a admin bar (32px když přihlášen) */
  /*min-height: calc(100vh - var(--header-height, 80px));*/
  display: flex;
  flex-direction: column;
  /* Scroll snap pro plynulý přesun */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* WordPress admin bar kompenzace */
.admin-bar .iceberg-section {
  min-height: calc(100vh - var(--header-height, 80px) - 32px);
}

@media (max-width: 782px) {
  .admin-bar .iceberg-section {
    min-height: calc(100vh - var(--header-height, 60px) - 46px);
  }
}

/* =====================================================
   CONTAINER WRAPPER - omezení šířky obsahu
   ===================================================== */
.iceberg-container.section-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 5;
}

/* Intro sekce */
.iceberg-intro {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
}

/* =====================================================
   HLAVNÍ ČÁST - ROZTÁHNE SE (flex: 1)
   ===================================================== */

.iceberg-main {
  flex: 1;
  display: grid;
  align-items: center;
  padding: 1rem;
  position: relative;
  /* Tablet (641-1023px): 2 sloupce - texty vlevo, ledovec vpravo */
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* =====================================================
   TASK-047: MOBILE (< 641px)
   Text nahoře, ledovec uprostřed, badge dole
   ===================================================== */

/* =====================================================
   MOBILE LAYOUT (< 640px) - na konci souboru pro vyšší prioritu
   ===================================================== */

@media (min-width: 1024px) {
  .iceberg-main {
    /* Desktop: ledovec větší, centrovaný */
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    padding: 1rem 2rem;
  }
}

/* =====================================================
   LEVÁ STRANA - TEXTY + BADGE (MOBILE)
   ===================================================== */

.iceberg-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  z-index: 20;
}

/* "Cena komodity" - NAD hladinou */
.iceberg-above-water {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

/* Badge MOBILE - vertikálně */
.iceberg-badges-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* =====================================================
   PRAVÁ STRANA - LEDOVEC S HLADINOU
   ===================================================== */

.iceberg-visual {
  /*position: relative;*/
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* =====================================================
   ICEBERG SCÉNA - TASK-046a: Fixní rozměry a zaoblení
   ===================================================== */

.iceberg-scene {
  /*position: relative;*/
  max-width: 100%;
  min-height: 600px;
  width: 100%;
  /* Bez border-radius a pozadí - pozadí je na celé sekci */
  overflow: visible;
  /* CSS proměnné pro pozice */
  --waterline-top: 32%;
  --berg-top: 5%;
}

/* Responzivní škálování na mobile */
@media (max-width: 640px) {
  .iceberg-scene {
    min-height: 320px; /* Menší výška scény */
    max-width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 1023px) {
  .iceberg-scene {
    min-height: 500px;
    max-width: 100%;
  }
}

/* =====================================================
   TASK-046b: ATMOSFÉRICKÉ EFEKTY (OBLOHA)
   ===================================================== */

/* Aurora - zeleno-tyrkysový gradient s blur (nad hladinou) */
.iceberg-aurora {
  position: absolute;
  top: 5%;
  left: 25%;
  width: 50%;
  height: 30%;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--color-green-accent) 12%, transparent) 0%,
    color-mix(in srgb, var(--color-blue-light) 8%, transparent) 40%,
    transparent 70%
  );
  filter: blur(40px);
  opacity: 0.2;
  animation: aurora-pulse 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes aurora-pulse {
  0%,
  100% {
    opacity: 0.1;
    transform: scale(1) translateY(0);
  }
  50% {
    opacity: 0.25;
    transform: scale(1.05) translateY(-5px);
  }
}

/* Kontejner pro hvězdy (nad hladinou) */
.iceberg-stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 36%; /* Nad hladinou */
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

/* Jednotlivá hvězda (generováno JS) */
.iceberg-star {
  position: absolute;
  width: var(--size, 1px);
  height: var(--size, 1px);
  background: var(--color-white);
  border-radius: 50%;
  opacity: 0;
  animation: star-twinkle var(--duration, 3s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Atmosférické efekty vypnuté */
.iceberg-section[data-animations="false"] .iceberg-aurora,
.iceberg-section[data-animations="false"] .iceberg-star {
  animation: none;
  opacity: 0.15;
}

.iceberg-section[data-animations="false"] .iceberg-star {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .iceberg-aurora,
  .iceberg-star {
    animation: none;
  }
  .iceberg-aurora {
    opacity: 0.15;
  }
  .iceberg-star {
    opacity: 0.5;
  }
}

/* =====================================================
   LEDOVEC KONTEJNER - RELATIVNÍ PRO OVERLAY
   ===================================================== */

.iceberg-container {
  /*position: absolute;*/
  top: var(--berg-top, 14%);
  left: 50%;
  /*transform: translateX(-50%);*/
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* =====================================================
   HLADINA - ABSOLUTNĚ NA 33% OD SHORA LEDOVCE
   ===================================================== */

.iceberg-waterline {
  position: absolute;
  top: var(--waterline-top, 44%);
  /* Fullscreen šířka přes celý viewport */
  left: 0;
  right: 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  height: 3rem;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}

.wave-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave-path {
  transform-origin: center;
}

.wave-1 {
  animation: wave-move 8s ease-in-out infinite;
}

.wave-2 {
  animation: wave-move 12s ease-in-out infinite reverse;
}

@keyframes wave-move {
  0%,
  100% {
    d: path(
      "M0,60 C240,120 480,0 720,60 C960,120 1200,0 1440,60 L1440,120 L0,120 Z"
    );
  }
  50% {
    d: path(
      "M0,80 C320,20 640,100 960,40 C1280,0 1440,80 1440,80 L1440,120 L0,120 Z"
    );
  }
}

/* Fallback pro prohlížeče bez podpory animace d atributu */
@supports not (d: path("")) {
  .wave-1 {
    animation: wave-float 4s ease-in-out infinite;
  }
  .wave-2 {
    animation: wave-float 6s ease-in-out infinite reverse;
  }
  @keyframes wave-float {
    0%,
    100% {
      transform: translateY(0) scaleY(1);
    }
    50% {
      transform: translateY(-5px) scaleY(1.1);
    }
  }
}

/* =====================================================
   TASK-046c: VODNÍ EFEKTY (POD HLADINOU)
   ===================================================== */

/* Kontejner pro kaustiky (světelné pruhy pod vodou) */
.iceberg-caustics {
  position: absolute;
  top: var(--waterline-top, 44%);
  left: 0;
  width: 100%;
  height: calc(100% - var(--waterline-top, 44%));
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}

/* Jednotlivá kaustika (generováno JS) */
.iceberg-caustic {
  position: absolute;
  bottom: 0;
  width: 2px;
  /* Poznámka: opacity je dynamická přes --opacity proměnnou z JS */
  background: linear-gradient(
    to top,
    transparent 0%,
    color-mix(in srgb, var(--color-blue-light) 10%, transparent) 50%,
    transparent 100%
  );
  opacity: var(--opacity, 1);
  animation: caustic-wave var(--duration, 4s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  transform-origin: bottom center;
}

@keyframes caustic-wave {
  0%,
  100% {
    transform: skewX(-3deg) scaleY(1);
    opacity: var(--opacity, 0.08);
  }
  50% {
    transform: skewX(4deg) scaleY(1.1);
    opacity: calc(var(--opacity, 0.08) * 2);
  }
}

/* Kontejner pro bubliny */
.iceberg-bubbles {
  position: absolute;
  top: var(--waterline-top, 44%);
  left: 0;
  width: 100%;
  height: calc(100% - var(--waterline-top, 44%));
  overflow: hidden;
  pointer-events: none;
  z-index: 4;
}

/* Jednotlivá bublina (generováno JS) */
.iceberg-bubble {
  position: absolute;
  bottom: 10%;
  width: var(--size, 5px);
  height: var(--size, 5px);
  background: radial-gradient(
    circle at 30% 30%,
    color-mix(in srgb, var(--color-white) 80%, transparent) 0%,
    color-mix(in srgb, var(--color-blue-light) 30%, transparent) 50%,
    transparent 100%
  );
  border-radius: 50%;
  animation: bubble-rise var(--duration, 5s) ease-in infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes bubble-rise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-120px) translateX(var(--drift, 10px)) scale(0.6);
    opacity: 0;
  }
}

/* Vodní efekty vypnuté */
.iceberg-section[data-animations="false"] .iceberg-caustic,
.iceberg-section[data-animations="false"] .iceberg-bubble {
  animation: none;
}

.iceberg-section[data-animations="false"] .iceberg-caustic {
  opacity: 0.08;
}

@media (prefers-reduced-motion: reduce) {
  .iceberg-caustic,
  .iceberg-bubble {
    animation: none;
  }
  .iceberg-caustic {
    opacity: 0.08;
  }
  .iceberg-bubble {
    display: none;
  }
}

/* =====================================================
   BADGE DESKTOP - PO STRANÁCH LEDOVCE
   ===================================================== */

.iceberg-badges-desktop {
  position: absolute;
  top: 70%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0;
  z-index: 15;
  pointer-events: none;
}

.iceberg-badges-desktop > * {
  pointer-events: auto;
}

.iceberg-badges-left,
.iceberg-badges-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.iceberg-badges-left {
  align-items: flex-end;
  padding-right: 1rem;
}

.iceberg-badges-right {
  align-items: flex-start;
  padding-left: 1rem;
}
.iceberg-badges-left .badge {
  display: inline-flex;
  flex-direction: row-reverse;
}

/* =====================================================
   BADGE - specifické úpravy pro iceberg sekci
   (základní badge styly jsou v /blocks/components/badge.css)
   ===================================================== */
.admin-bar .iceberg-section {
  min-height: calc(100% + var(--header-height, 80px) + 32px);
}
/* DaisyUI badge úpravy specifické pro iceberg */
.iceberg-section .badge {
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  /* Přepsat DaisyUI default border - border jen když showBorder: true (inline styl) */
  border: none;
}

@media (min-width: 1024px) {
  .iceberg-section .badge {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
  }
}

.iceberg-section .badge svg {
  flex-shrink: 0;
}

/* TASK-046a: Obrázek ledovce - rozměry škálované pro scénu */
.iceberg-image {
  max-width: 180px;
  max-height: 260px;
  width: auto;
  height: auto;
  /* mix-blend-mode odstraněn - způsoboval černé pozadí u PNG s průhledností */
  filter: drop-shadow(
    0 0 30px color-mix(in srgb, var(--color-blue-light) 30%, transparent)
  );
}

/* TASK-047: Větší ledovec na mobile (< 641px) - 65vw, centrovaný */
@media (max-width: 640px) {
  .iceberg-image {
    max-width: 65vw;
    max-height: 300px;
  }
}

@media (min-width: 641px) {
  .iceberg-container {
    top: 0;
  }
  .iceberg-above-water {
    margin-bottom: 2.5rem;
  }
  .iceberg-badges-mobile {
    padding-top: 3.5rem;
  }
  .iceberg-image {
    max-width: 360px;
    max-height: 540px;
  }
}

@media (min-width: 1024px) {
  .iceberg-image {
    /* Větší ledovec */
    max-width: 480px;
    max-height: 720px;
  }
}

/* Placeholder SVG ledovce */
.iceberg-placeholder {
  width: 180px;
  height: 260px;
  opacity: 0.6;
  filter: drop-shadow(
    0 0 40px color-mix(in srgb, var(--color-blue-light) 40%, transparent)
  );
}

@media (min-width: 641px) {
  .iceberg-placeholder {
    width: 220px;
    height: 320px;
  }
}

@media (min-width: 1024px) {
  .iceberg-placeholder {
    width: 260px;
    height: 380px;
  }
}

/* =====================================================
   LEDOVEC DRIFTING ANIMACE (TASK-025c)
   ===================================================== */

.iceberg-image,
.iceberg-placeholder {
  animation: iceberg-drift 6s ease-in-out infinite;
}

@keyframes iceberg-drift {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-8px) rotate(0.5deg);
  }
  50% {
    transform: translateY(-4px) rotate(0deg);
  }
  75% {
    transform: translateY(4px) rotate(-0.3deg);
  }
}

/* =====================================================
   ANIMACE VYPNUTÉ
   ===================================================== */

.iceberg-section[data-animations="false"] .wave-1,
.iceberg-section[data-animations="false"] .wave-2,
.iceberg-section[data-animations="false"] .iceberg-image,
.iceberg-section[data-animations="false"] .iceberg-placeholder {
  animation: none;
}

/* Respektování prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .iceberg-image,
  .iceberg-placeholder,
  .wave-1,
  .wave-2 {
    animation: none;
  }
}

/* =====================================================
   MOBILE/DESKTOP VISIBILITY (nahrazuje Tailwind třídy)
   ===================================================== */

/* MOBILE: zobrazit content (texty + badge), skrýt desktop verze */
.iceberg-above-desktop {
  display: none;
}

.iceberg-content {
  display: flex;
}

/* Badges mobile - default skryté, zobrazí se jen na mobile (<= 640px) */
.iceberg-badges-mobile {
  display: none;
}

.iceberg-badges-desktop {
  display: none;
}

/* TABLET (641-1023px): 2 sloupce - texty+badges vlevo, ledovec vpravo */
@media (min-width: 641px) and (max-width: 1023px) {
  /* Waterline pozice pro tablet */
  .iceberg-scene {
    --waterline-top: 33%;
  }

  .iceberg-main {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
  }

  /* Texty - levý sloupec, první řádek */
  .iceberg-content {
    grid-column: 1;
    grid-row: 1;
  }

  /* Badges - levý sloupec, druhý řádek */
  .iceberg-badges-mobile {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem;
    grid-column: 1;
    grid-row: 2;
    align-self: start;
  }

  /* Ledovec - pravý sloupec, přes oba řádky */
  .iceberg-visual {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* DESKTOP: skrýt mobile verze, zobrazit desktop */
@media (min-width: 1024px) {
  /* Desktop: flex centrovaný */
  .iceberg-main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
  }

  /* "Cena komodity" - stejná struktura jako badges-desktop */
  .iceberg-above-desktop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
    z-index: 25;
  }

  .iceberg-above-desktop > * {
    pointer-events: auto;
  }

  .iceberg-above-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    max-width: 220px;
  }

  .iceberg-above-spacer {
    flex: 2;
    min-width: 300px;
  }

  .iceberg-above-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    max-width: 220px;
  }

  .iceberg-content {
    display: none;
  }

  .iceberg-badges-mobile {
    display: none;
  }

  .iceberg-badges-desktop {
    display: flex;
  }

  /* Visual je kontejner pro scénu + badge */
  .iceberg-visual {
    position: relative;
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
  }

  /* Badge desktop - pod hladinou po stranách ledovce */
  .iceberg-badges-desktop {
    position: absolute;
    top: 50%; /* Pod hladinou */
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
  }

  .iceberg-badges-desktop > * {
    pointer-events: auto;
  }

  .iceberg-badges-left {
    max-width: 160px;
  }

  .iceberg-badges-right {
    max-width: 160px;
  }
}

/* =====================================================
   GRADIENT TEXT SUPPORT
   ===================================================== */

.iceberg-section h2,
.iceberg-section p,
.iceberg-section span {
  /* Zajistí správné zobrazení gradient textu */
  display: inline-block;
}

.iceberg-intro h2 {
  display: block;
}

/* Footer text v sekci nad hladinou */
.iceberg-footer-text {
  display: block;
  max-width: 280px;
  line-height: 1.5;
}

/* =====================================================
   SCROLL-DRIVEN FADE POD VLNOU (TASK-041)
   Obsah pod vlnou má na začátku nízkou opacity a postupně se zobrazuje
   ===================================================== */

/**
 * Wrapper pro obsah pod vlnou
 * JS nastavuje --scroll-fade-progress CSS proměnnou (0 → 1)
 */
.iceberg-underwater-fade {
  --scroll-fade-progress: 0;
  /* Opacity roste od 0.15 do 1 podle scroll progress */
  opacity: calc(0.15 + (var(--scroll-fade-progress) * 0.85));
  transition: opacity 0.1s ease-out;
}

/* Pokud animace vypnuté, zobrazit okamžitě */
.iceberg-section[data-animations="false"] .iceberg-underwater-fade {
  opacity: 1;
}

/* Respektování prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .iceberg-underwater-fade {
    opacity: 1;
  }
}

/* =====================================================
   BADGE STAGGERED ANIMACE
   Desktop: po řádcích (data-row)
   Mobile: po jednom (nth-child)
   ===================================================== */

/* Výchozí stav - skryté */
.iceberg-badges-desktop .badge-item,
.iceberg-badges-mobile .badge-item {
  opacity: 0;
  transform: translateY(20px);
}

/* Animace se spustí až když sekce má třídu .animate-badges */
.iceberg-section.animate-badges .badge-item {
  animation: badge-row-appear 0.6s ease-out forwards;
}

/* DESKTOP (>= 1024px): Delay podle řádku (data-row) - 1.5s mezi řádky */
@media (min-width: 1024px) {
  .iceberg-section.animate-badges .badge-item[data-row="1"] {
    animation-delay: 0s;
  }

  .iceberg-section.animate-badges .badge-item[data-row="2"] {
    animation-delay: 1.5s;
  }

  .iceberg-section.animate-badges .badge-item[data-row="3"] {
    animation-delay: 3s;
  }
}

/* MOBILE + TABLET (< 1024px): Waterfall animace - každý badge zvlášť */
@media (max-width: 1023px) {
  .iceberg-section.animate-badges
    .iceberg-badges-mobile
    .badge-item:nth-child(1) {
    animation-delay: 0s;
  }
  .iceberg-section.animate-badges
    .iceberg-badges-mobile
    .badge-item:nth-child(2) {
    animation-delay: 0.6s;
  }
  .iceberg-section.animate-badges
    .iceberg-badges-mobile
    .badge-item:nth-child(3) {
    animation-delay: 1.2s;
  }
  .iceberg-section.animate-badges
    .iceberg-badges-mobile
    .badge-item:nth-child(4) {
    animation-delay: 1.8s;
  }
  .iceberg-section.animate-badges
    .iceberg-badges-mobile
    .badge-item:nth-child(5) {
    animation-delay: 2.4s;
  }
  .iceberg-section.animate-badges
    .iceberg-badges-mobile
    .badge-item:nth-child(6) {
    animation-delay: 3s;
  }
}

@keyframes badge-row-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Vypnuté animace - zobrazit okamžitě */
.iceberg-section[data-animations="false"] .badge-item {
  opacity: 1;
  transform: none;
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .badge-item {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* =====================================================
   TASK-046d: TOOLTIP PRO BADGE
   ===================================================== */

.iceberg-tooltip {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--color-dark-800) 95%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid color-mix(in srgb, var(--color-white) 10%, transparent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 320px;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
  box-shadow: 0 20px 40px color-mix(in srgb, black 40%, transparent);
}

.iceberg-tooltip.visible {
  opacity: 1;
  visibility: visible;
}

.tooltip-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tooltip-color, var(--color-blue-light));
  margin-right: 0.5rem;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--tooltip-color, var(--color-blue-light));
}

.tooltip-title {
  color: var(--color-white);
  font-size: 1rem;
  font-weight: 600;
  vertical-align: middle;
}

.tooltip-desc {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  margin: 0.5rem 0 0 0;
  line-height: 1.5;
}

/* Skrýt tooltip na mobile - příliš malé pro hover */
@media (max-width: 1023px) {
  .iceberg-tooltip {
    display: none;
  }
}

/* =====================================================
   TASK-048b: NEŘEŠITELNÉ BADGE (OZE, Systémové služby)
   Šedý outline styl - tyto položky "se nedají řešit"
   ===================================================== */

.badge-unresolvable .badge {
  background: transparent !important;
  border: 2px solid color-mix(in srgb, var(--color-slate-400) 50%, transparent) !important;
  box-shadow: none !important;
}

.badge-unresolvable .badge span {
  color: color-mix(in srgb, var(--color-slate-400) 80%, transparent) !important;
  -webkit-text-fill-color: color-mix(
    in srgb,
    var(--color-slate-400) 80%,
    transparent
  ) !important;
  background: none !important;
}

.badge-unresolvable .badge svg {
  color: color-mix(in srgb, var(--color-slate-400) 60%, transparent) !important;
  opacity: 0.6;
}

/* Gradient border vypnout pro neřešitelné */
.badge-unresolvable.badge-gradient-border::before {
  display: none;
}

/* Hover efekt - lehké rozjasnění */
.badge-unresolvable .badge:hover {
  border-color: color-mix(
    in srgb,
    var(--color-slate-400) 70%,
    transparent
  ) !important;
}

/* =====================================================
   MOBILE LAYOUT (< 640px)
   Na konci souboru pro nejvyšší prioritu
   ===================================================== */

@media (max-width: 640px) {
  /* Waterline výš na mobile */
  .iceberg-section .iceberg-scene {
    --waterline-top: 40%;
  }

  /* Mobile: Flexbox sloupec */
  .iceberg-section .iceberg-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem;
    padding: 1rem;
  }

  /* 1. Text nahoře - centrovaný */
  .iceberg-section .iceberg-content {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
  }

  .iceberg-section .iceberg-above-water {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* 2. Ledovec uprostřed - centrovaný */
  .iceberg-section .iceberg-visual {
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* 3. Badge dole - teď je přímo v .iceberg-main, takže order funguje */
  .iceberg-section .iceberg-badges-mobile {
    order: 3 !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0 0.5rem 1rem;
    margin-top: 0 !important;
  }

  /* Kompaktní badge */
  .iceberg-section .iceberg-badges-mobile .badge {
    font-size: 0.7rem;
    padding: 0.35rem 0.6rem;
    white-space: nowrap;
  }

  .iceberg-section .iceberg-badges-mobile .badge svg {
    width: 14px;
    height: 14px;
  }

  /* Badge šířky - fit-content */
  .iceberg-section .iceberg-badges-mobile .badge-item {
    display: inline-flex !important;
    width: auto !important;
    max-width: fit-content !important;
  }
}
