@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');

html { font-size: 20px; }

/* === NAVBAR === */

/* ÚPLNE zruší Bootstrap arrow pre APLIKÁCIE (tvoj custom arrow riešiš cez .dropdown-arrow) */
.apps-dropdown > .nav-link::after{
  display: none !important;
  content: none !important;
  width: 0 !important;
  height: 0 !important;
}

.navbar .dropdown-toggle::after{
  display: none !important;
  content: none !important;
}

/* Z-index vrstvenie (bez extrémov a bez .navbar * z-index) */
.navbar{ z-index: 1030; }
.dropdown-menu{ z-index: 1040; }

/* === NAV LINKS === */
.navbar-nav .nav-link{
  font-family:'Poppins', sans-serif !important;
  font-size: 1.0rem !important;
  font-weight: 600;
  color:#222 !important;
  text-transform: uppercase;
  background-color: transparent !important;
  position: relative;
  padding: 10px 22px;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  width:0;
  height:4px;
  background-color:#FF9100;
  border-radius:10px 10px 0 0;
  transform:translateX(-50%);
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover{ color:#FF9100 !important; }
.navbar-nav .nav-link:hover::after{ width:60%; }

.navbar-nav .nav-link.active{ color:#FF9100 !important; }
.navbar-nav .nav-link.active::after{ width:60%; }

/* === LOGO === */
.project-logo{
  max-height:110px !important;
  height:auto !important;
  width:auto !important;
  display:block;
  transform: translateY(-2px);
}

.navbar-brand{
  padding-top:0 !important;
  padding-bottom:0 !important;
  display:flex;
  align-items:center;
}

/* === TOOLS (SEARCH + GLOBE) === */
.navbar-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:16px;
  min-width:160px;
}

/* === SEARCH BAR === */
.search-form{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  transition: width 0.35s ease, background 0.3s ease, border-color 0.3s ease;
  overflow:hidden;
  width:44px; /* len ikonka */
  border:2px solid transparent;
  border-radius:30px;
  padding:4px 10px;
  cursor:pointer;
  background:transparent;
}

.search-form.open{
  width:480px;
  max-width: calc(100vw - 360px);
  border-color:#FF9100;
  background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,0.05);
}

/* Input */
.search-form input{
  display:none;
  border:none;
  outline:none;
  background:transparent;
  flex:1;
  font-size:0.95rem;
  color:#27364B;
}

.search-form.open input{ display:block; }

.search-form input::placeholder{ color:#999; }

/* Lupa tlačidlo */
.search-form .btn{
  background:transparent !important;
  border:none !important;
  color:#27364B;
  font-size:1.25rem;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: color 0.3s ease;
}

.search-form .btn:hover{ color:#FF9100; }

.search-form input:focus{
  outline:none;
  box-shadow:none;
}

/* Keď je search otvorený → skryť navbar linky */
body.search-open .navbar-nav,
body.search-open .dropdown,
body.search-open .dropdown-menu{
  display:none !important;
}

/* Glóbus */
.globe-icon{
  font-size:1.2rem;
  color:#27364B;
  cursor:pointer;
  margin-bottom:17px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  transition: color 0.3s ease, transform 0.25s ease;
}

.globe-icon:hover{ color:#FF9100; }

/* Search bar sa posunie doľava potom, čo sa skrýje navbar */
body.search-open .search-form{ margin-right:auto !important; }

/* === LANGUAGE POPUP === */
.language-popup-overlay{
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
  isolation: isolate;

  /* vždy viditeľné aj pri otvorenom mobile menu */
  display: flex;
  align-items: flex-start;
  justify-content: center;

  /* scrolluje sa overlay, nie stránka */
  overflow-y: auto;
  padding: 16px 12px;
}

.language-popup{
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  width: min(92vw, 380px);
  position: relative;
  z-index: 20001 !important; 
  /* aby sa to vždy zmestilo do viewportu */
  margin-top: 12px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.language-popup h3{
  margin: 0 0 10px 0;
  font-weight: 700;
  color: #27364B;
  text-align: center;
}

.language-popup .language-options{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.language-popup .language-options a{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #333;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #eee;
  transition: all 0.2s ease;
}

.language-popup .language-options a:hover{
  background: #f6f8fb;
  border-color: #FF9100;
}

.flag-icon{
  width: 24px;
  height: auto;
  border-radius: 2px;
}

/* === DROPDOWN ARROW (tvoj vlastný) === */
.navbar .dropdown-arrow{
  font-size:0.75rem;
  margin-left:6px;
  transition: transform 0.25s ease;
}

.apps-dropdown.show .dropdown-arrow{ transform: rotate(180deg); }

/* Štýl rozbaleného menu */
.apps-menu{
  border-radius:10px;
  padding:10px 0;
  animation: dropdownFade 0.2s ease-out;
}

@keyframes dropdownFade{
  from{ opacity:0; transform: translateY(-5px); }
  to{ opacity:1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */

/* Tablet/mobil – dropdown menu v collapse NESMIE byť absolute */
@media (max-width: 991px){
  .project-logo{
    max-height:90px;
    transform: translateY(0);
  }

  .search-form.open{
    width:100%;
    max-width:100%;
  }

  /* APLIKÁCIE link + šípka na konce */
  .apps-dropdown > .nav-link{
    display:flex;
    align-items:center;
    justify-content:space-between;
  }

  /* dropdown v collapse ako normálny blok */
  .navbar-nav .dropdown-menu{
    position:static !important;
    transform:none !important;
    float:none !important;
    width:100%;
    margin:8px 0 0 0;
    border-radius:12px;
    box-shadow:none;
  }

  .navbar-nav .dropdown-menu .dropdown-item{
    padding:12px 16px;
  }
}

/* Malý mobil */
@media (max-width: 576px){
  .navbar-nav .nav-link{
    padding: 12px 18px;
  }

  .globe-icon{
    margin-bottom: 0;
  }
}