/* =========================
   MOBILE.CSS
   Len pre mobil / tablet
========================= */

@media (max-width: 768px) {

  /* ===== BASIC RESET ===== */
  body {
    padding: 0 !important;
    padding-top: 0 !important;
    overflow-x: hidden;
  }

  /* ===== HEADER ===== */
  header {
    height: auto !important;
    padding: 8px 12px 12px !important;
    text-align: center;
    position: relative !important;
  }

  .top-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    position: relative !important;
  }

  header h1 {
    position: static !important;
    transform: none !important;
    margin: 0 !important;

    padding: 0 52px !important;
    line-height: 40px !important;
    font-size: 1.8rem !important;
    text-align: center !important;
  }

  #search-bar {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    height: 42px !important;
    font-size: 16px !important;
  }

  /* ===== HAMBURGER ===== */
  #hamburger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: absolute !important;
    left: 0px !important;
    top: 0px !important;

    z-index: 1101 !important;

    width: 44px !important;
    height: 44px !important;

    font-size: 28px !important;
    line-height: 1 !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 2px solid rgba(255,255,255,0.9) !important;
    border-radius: 10px !important;
    box-sizing: border-box !important;

    color: #fff !important;
    cursor: pointer !important;
  }

  /* ===== USER MENU ===== */
  .user-menu {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
    margin: 0 !important;
    position: relative !important; /* kotva pre dropdown */
  }

  #notification-container {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    font-size: 1.5rem !important;
  }

  #notification-popup{
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: 92vw !important;
    top: calc(100% + 10px) !important; /* rovnaké ako login dropdown */
  }

  #login-button {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    transform: none !important;

    width: auto !important;
    max-width: none !important;
    height: 40px !important;
    padding: 8px 14px !important;
    margin: 0 !important;

    border-radius: 10px !important;
  }

  #login-button:focus,
  #login-button:active {
    outline: none !important;
    box-shadow: none !important;
  }

  /* ===== LOGIN DROPDOWN ===== */
  #logout-dropdown.dropdown,
  #logout-dropdown {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    right: 0 !important;
    left: auto !important;
    transform: none !important;

    z-index: 3000 !important;

    height: auto !important;
    padding: 2px 0 !important;
    width: 180px !important;
    max-width: 85vw !important;
    border-radius: 10px !important;
  }

  #logout-dropdown.dropdown button,
  #logout-dropdown button {
    margin-top: 0 !important;
    padding: 0 12px !important;
    height: 50px !important;
    width: 100% !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    gap: 10px !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #logout-dropdown #my-content {
    justify-content: center !important;
  }

  #logout-dropdown #logout-option img {
    display: block !important;
    margin-right: 8px !important;
    transform: translateY(-3px) !important;
  }

  #logout-dropdown button:focus,
  #logout-dropdown button:active {
    outline: none !important;
    box-shadow: none !important;
  }

  /* ===== OVERLAY ===== */
  #overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1100;
    pointer-events: none;
  }
  #overlay.show {
    display: block;
    pointer-events: auto;
  }

  /* ===== SIDEBAR ===== */
  #sidebar {
    position: fixed !important;
    top: 0;
    left: 0;

    height: 100%;
    width: 260px !important;
    max-width: 85vw;

    padding: 15px !important;
    overflow-y: auto;

    transform: translateX(-105%);
    transition: transform 0.25s ease;

    z-index: 1200;
  }
  #sidebar.open { transform: translateX(0); }

  #sidebar h2 { margin-top: 50px !important; }

  /* ===== CONTENT ===== */
  #content {
    margin-left: 0 !important;
    max-width: 100% !important;
    padding: 15px !important;
  }

  /* ===== FORM ===== */
  #content form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  #content form input,
  #content form select,
  #content form textarea {
    width: 100% !important;
    margin-left: 0 !important;
  }

  textarea { min-height: 160px; }

  /* ===== EMOJI ===== */
  .comment-input-wrap { position: relative !important; }

  .emoji-wrap{
    margin-top: 8px !important;
    margin-bottom: 10px !important;
    justify-content: flex-start !important;
  }

  #emoji-toggle-write{
    width: fit-content !important;
    display: inline-flex !important;
    margin: 0 !important;
    padding: 6px 10px !important;
  }

  .emoji-panel{
    width: min(100%, 92vw) !important;
  }

  /* ===== SUBMIT button ===== */
  #content-form button[type="submit"]{
    width: 100% !important;
    margin: 25px 0 0 0 !important;
  }

  /* ===== RECENT CONTENT ===== */
  #recent-content { padding: 15px; }

  /* ✅ Nedávno pridané: natvrdo vľavo (má inline flex v HTML) */
  #recent-content h3{
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    text-align: left !important;
    width: 100% !important;
    gap: 10px !important;
  }

  /* ===== FIX: "Čítať viac" ===== */
  #recent-content .content-item p{
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: initial !important;
  }

  .read-more{
    display: inline-block !important;
    margin-left: 6px;
    font-weight: bold;
  }

  .content-item {
    flex-direction: column;
    gap: 12px;
  }

  .content-thumbnail {
    width: 100% !important;
    height: 180px !important;
  }

  .thumbnail { object-fit: contain; }

  /* ✅ „Výber kategórie“ (label Kategória) vľavo */
  #content form label[for="category"]{
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* ✅ a select „Kategória“ iba jemne doprava (bez width/position hackov) */
  #content form select#category{
    margin-left: 0px !important;   /* len pár px doprava */
  }

  /* ✅ „Nahrať obrázky“: nič necentrujeme, len text posun doprava */
  .file-upload .file-button span:first-child{
    margin-left: 6px !important;   /* posun textu doprava */
  }

  /* ===== NEDÁVNO PRIDANÉ – stack pod seba ===== */
#recent-content h3 #filter-options{
 margin-left: 0 !important;           /* ❌ žiadne odsúvanie doprava */
max-width: 240px !important; 
}

  #recent-content h3 {
    display: flex !important;
    flex-direction: column !important;   /* ⬇️ POD SEBA */
    align-items: flex-start !important;  /* ⬅️ vľavo */
    text-align: left !important;
    gap: 8px !important;
  }

  /* filter kategórie POD nadpisom */
  #recent-content h3 #category-filter {
    margin-left: 0 !important;           /* ❌ žiadne odsúvanie doprava */
    max-width: 240px !important;         /* nech nie je príliš široký */
  }

  /* IBA stránky: Príspevky používateľa */
  .page-user-posts #recent-content h3 {
    display: flex !important;
    flex-direction: column !important;   /* filter pod nadpis */
    align-items: flex-start !important;
    gap: 6px !important;

    font-size: 1.15rem !important;
    line-height: 1.25 !important;
  }

  /* "Príspevky používateľa" – NIKDY nezalomiť */
  .page-user-posts #user-label {
    white-space: nowrap !important;
  }

  /* USERNAME – môže ísť na druhý riadok */
  .page-user-posts #user-username {
    white-space: normal !important;      /* POVOLIŤ zalomenie */
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    margin-left: 0 !important;
  }

  /* Filter – nechaj presne ako bol, len pod nadpisom */
  .page-user-posts #filter-options {
    margin-left: 0 !important;
    margin-top: 6px !important;
    width: 180px !important;
    max-width: 100% !important;
  }

  /* ===== ZJEDNOTENIE VEĽKOSTI NADPISOV NA MOBILE ===== */

  /* Príspevky používateľa (už máš, len pre istotu) */
  .page-user-posts #recent-content h3 {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
  }

  /* Výsledky vyhľadávania */
  #search-results #search-title,
  #search-results .no-results {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
  }


  /* nech je dot ukotvený k zvončeku, nie “niekam” doprava */
  #notification-container{
    position: relative !important;   /* 🔥 kľúčové */
    display: inline-flex !important;
    align-items: center !important;
  }

  #bell-dot{
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
  }

  /* Userprofile: akcie nebudú absolute, pôjdu pod meta */
  .page-user-posts .content-actions{
    position: static !important;      /* zruší absolute */
    bottom: auto !important;
    right: auto !important;

    margin-top: 12px !important;
    display: flex !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
  }

  /* aby meta a akcie mali pekný odstup */
  .page-user-posts .content-meta{
    margin-bottom: 8px !important;
  }

 #comments-section .emoji-wrap {
    margin-top: -30px !important;
    gap: 6px !important;
  }

  /* Content detail – textarea pre komentár (nižšia výška) */
  #comments-section textarea,
  #comment-input {
    min-height: 90px !important;   /* bolo 160px */
    height: auto !important;
    line-height: 1.35 !important;
  }

  /* ešte kompaktnejší box */
  #comments-section {
    padding: 12px !important;      /* bolo 20px */
  }

  /* Content detail: 2 obrázky vedľa seba */
  #content-detail .content-images{
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* nech obrázky vyplnia bunku (zruší max-width:200px z .thumbnail) */
  #content-detail .content-images img.thumbnail{
    width: 100% !important;
    max-width: 100% !important;   /* prepíše max-width:200px */
    height: auto !important;
    object-fit: cover !important;
    border-radius: 8px !important;
  }

  /* ===== PRIDAŤ KOMENTÁR – KOMPAKTNEJŠIE NA MOBILE ===== */

  /* celý box */
  #comments-section {
    padding: 8px !important;      /* bolo cca 20px */
  }

  /* modrý horný bar / nadpis */
  #comments-section h3,
  #comments-section .comment-header {
    padding: 6px 10px !important;  /* zmenši výšku baru */
    font-size: 1rem !important;    /* menší text */
    line-height: 1.2 !important;
    margin-bottom: 8px !important;
  }

  /* textarea – menšia výška */
  #comments-section textarea,
  #comment-input {
    min-height: 80px !important;   /* bolo 160px */
    padding: 8px !important;
    font-size: 0.95rem !important;
  }

   /* IBA tlačidlo "Pridať komentár" */
  #comments-section #post-comment-btn {
    padding: 10px 16px !important;   /* 🔥 zmenší výšku */
    font-size: 1rem !important;   /* menší text */
    line-height: 1.1 !important;
    margin-top: 2px !important;
    border-radius: 8px !important;
  }

  /* Nadpis KOMENTÁRE – väčší text + ikona */
  #comments-section h3 {
    font-size: 1.25rem !important;   /* väčšie písmo */
    line-height: 1.3 !important;
    font-weight: 600 !important;
  }

  /* ikona v nadpise (ak je <i> alebo <span>) */
  #comments-section h3 i,
  #comments-section h3 span {
    font-size: 1.3rem !important;    /* ikona mierne väčšia než text */
    vertical-align: middle;
  }



  /* IBA tlačidlo "Odoslať správu" */
  #contact-section #send-contact-btn {
    padding: 10px 16px !important;   /* menšia výška */
    font-size: 1rem !important;   /* menší text */
    line-height: 1.1 !important;
    margin-top: 6px !important;
    border-radius: 8px !important;
}

.thumbnail-link{
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

  .page-intro{
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
    word-break: normal;
    overflow-wrap: anywhere;
  }

}