/*
====================================================================
ROJEK EXTRANET - HLAVNÍ CSS STYLY
====================================================================
Vlastní styly pro ROJEK extranet s tmavým tématem a žlutými akcenty
Autor: GitHub Copilot
Datum: 2025
Verze: 3.0 - ROJEK Extranet Design System
====================================================================
*/

/* ================================================================
   GLOBÁLNÍ PROMĚNNÉ A ZÁKLADNÍ NASTAVENÍ
   ================================================================ */

:root {
    /* Barevné schéma ROJEK */
    --rojek-yellow: rgb(251, 221, 0);
    --rojek-yellow-rgb: 251, 221, 0;
    --rojek-black: #000000;
    --rojek-dark-bg: #1e1e1e;
    --rojek-card-bg: #2d2d2d;
    --rojek-light-text: #f0f0f0;
    --rojek-muted-text: #aaa;
    
    /* Přechody a efekty */
    --transition-smooth: all 0.3s ease;
    --transition-fast: all 0.15s ease;
    --shadow-glow: 0 0 15px rgba(var(--rojek-yellow-rgb), 0.3);
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* ================================================================
   ZÁKLADNÍ ELEMENTY
   ================================================================ */

body {
    background-color: var(--rojek-dark-bg) !important;
    color: var(--rojek-light-text) !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

html, body {
    height: 100%;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--rojek-dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--rojek-yellow);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--rojek-yellow-rgb), 0.8);
}

/* ================================================================
   KOMPONENTY A KARTY
   ================================================================ */

.card {
    background-color: var(--rojek-card-bg) !important;
    border: 1px solid rgba(var(--rojek-yellow-rgb), 0.3) !important;
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.card-header {
    background-color: rgba(var(--rojek-yellow-rgb), 0.1) !important;
    border-bottom: 1px solid rgba(var(--rojek-yellow-rgb), 0.3) !important;
    color: var(--rojek-yellow) !important;
}

/* ================================================================
   NAVIGACE A MENU
   ================================================================ */

.navbar-brand:hover {
    transform: scale(1.08);
    transition: var(--transition-smooth);
}

.navbar-logo {
    transition: var(--transition-smooth);
    filter: brightness(1.1) drop-shadow(0 0 10px rgba(251, 221, 0, 0.3));
}

.navbar-logo:hover {
    filter: brightness(1.3) drop-shadow(0 0 15px rgba(251, 221, 0, 0.6));
    transform: scale(1.05);
}

.nav-link {
    position: relative;
    transition: var(--transition-smooth);
    border-radius: 12px !important;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--rojek-yellow) !important;
    background: linear-gradient(135deg, rgba(var(--rojek-yellow-rgb), 0.15) 0%, rgba(var(--rojek-yellow-rgb), 0.05) 100%) !important;
    border: 1px solid rgba(var(--rojek-yellow-rgb), 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--rojek-yellow-rgb), 0.2);
}

.nav-link.active {
    color: var(--rojek-yellow) !important;
    background: linear-gradient(135deg, rgba(var(--rojek-yellow-rgb), 0.2) 0%, rgba(var(--rojek-yellow-rgb), 0.1) 100%) !important;
    border: 1px solid rgba(var(--rojek-yellow-rgb), 0.5) !important;
    box-shadow: 0 2px 10px rgba(var(--rojek-yellow-rgb), 0.3);
    transform: none !important; /* Zabránit hover efektům na aktivních položkách */
}

.nav-link.active:hover {
    background: linear-gradient(135deg, rgba(var(--rojek-yellow-rgb), 0.2) 0%, rgba(var(--rojek-yellow-rgb), 0.1) 100%) !important;
    color: var(--rojek-yellow) !important;
    transform: none !important;
}

.dropdown-menu {
    background-color: var(--rojek-card-bg) !important;
    border: 1px solid rgba(var(--rojek-yellow-rgb), 0.3) !important;
    border-radius: 12px !important;
    padding: 8px;
    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.modern-dropdown {
    backdrop-filter: blur(10px);
    background: rgba(45, 45, 45, 0.95) !important;
}

.dropdown-item {
    border-radius: 8px !important;
    margin: 2px 0;
    transition: var(--transition-smooth);
    font-size: 1rem;
    padding: 12px 16px;
}

.modern-dropdown-item {
    color: #f0f0f0 !important;
}

.modern-dropdown-item:hover {
    background: linear-gradient(135deg, rgba(var(--rojek-yellow-rgb), 0.15) 0%, rgba(var(--rojek-yellow-rgb), 0.05) 100%) !important;
    color: var(--rojek-yellow) !important;
    transform: translateX(5px);
}

/* ================================================================
   MENU IKONY - VĚTŠÍ A MODERNĚJŠÍ BEZ ZÁŘE
   ================================================================ */

.menu-icon-wrapper {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(251, 221, 0, 0.2);
    transition: var(--transition-smooth);
}

.menu-icon-wrapper-large {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(251, 221, 0, 0.2);
    transition: var(--transition-smooth);
    position: relative;
}

.menu-icon-wrapper-large-kotle {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(230, 40, 20, 0.2);
    transition: var(--transition-smooth);
    position: relative;
}

.menu-icon {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.menu-icon-large {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.nav-link:hover .menu-icon-wrapper {
    background: rgba(251, 221, 0, 0.15);
    border-color: rgba(251, 221, 0, 0.4);
    transform: scale(1.05);
}

.nav-link:hover .menu-icon-wrapper-large {
    background: rgba(251, 221, 0, 0.15);
    border-color: rgba(251, 221, 0, 0.4);
    transform: scale(1.05);
}

.nav-link:hover .menu-icon-wrapper-large-kotle {
    background: rgba(230, 40, 20, 0.15);
    border-color: rgba(230, 40, 20, 0.4);
    transform: scale(1.05);
}

.nav-link:hover .menu-icon,
.nav-link:hover .menu-icon-large {
    transform: scale(1.1);
}

/* ================================================================
   MENU IKONY - MENŠÍ PRO FRESH DESIGN
   ================================================================ */

.menu-icon-wrapper-small {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(251, 221, 0, 0.2);
    transition: var(--transition-smooth);
}

.menu-icon-wrapper-small-kotle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(45, 45, 45, 0.8);
    border: 1px solid rgba(230, 40, 20, 0.2);
    transition: var(--transition-smooth);
}

.menu-icon-small {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.nav-link:hover .menu-icon-wrapper-small {
    background: rgba(251, 221, 0, 0.15);
    border-color: rgba(251, 221, 0, 0.4);
    transform: scale(1.05);
}

.nav-link:hover .menu-icon-wrapper-small-kotle {
    background: rgba(230, 40, 20, 0.15);
    border-color: rgba(230, 40, 20, 0.4);
    transform: scale(1.05);
}

.nav-link:hover .menu-icon-small {
    transform: scale(1.1);
}

/* ================================================================
   MOBILE FRIENDLY PŘEPÍNAČ KATEGORIÍ
   ================================================================ */

.category-switcher {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 60px;
    height: 36px;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
}

.category-switcher:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    text-decoration: none !important;
}

.category-switch-icon {
    transition: transform 0.6s ease !important;
}

.category-switcher:hover .category-switch-icon {
    transform: rotate(360deg) !important;
}

.category-switch-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Mobile responsive pro přepínač */
@media (max-width: 768px) {
    .category-switcher {
        min-width: 40px !important;
        height: 32px !important;
        padding: 4px 8px !important;
    }
    
    .category-switch-text {
        display: none !important;
    }
    
    .category-switch-icon {
        width: 18px !important;
        height: 18px !important;
    }
}

@media (max-width: 576px) {
    .category-switcher {
        min-width: 36px !important;
        height: 30px !important;
        padding: 3px 6px !important;
        margin-right: 0.5rem !important;
    }
    
    .category-switch-icon {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Menu text upravy pro fresh design */
@media (min-width: 1200px) {
    .menu-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 1199px) {
    .menu-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .menu-icon-wrapper-small,
    .menu-icon-wrapper-small-kotle {
        width: 28px;
        height: 28px;
    }
}

/* ================================================================
   RESPONSIVNÍ ÚPRAVY PRO MENU
   ================================================================ */

@media (max-width: 1200px) {
    .menu-text {
        font-size: 0.95rem;
    }
    
    .menu-icon-wrapper-large {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 992px) {
    .menu-text {
        font-size: 1rem;
    }
    
    .menu-icon-wrapper-large {
        width: 36px;
        height: 36px;
    }
    
    .nav-link {
        padding: 12px 16px !important;
    }
}

@media (max-width: 768px) {
    .navbar-collapse {
        background: rgba(45, 45, 45, 0.98);
        border-radius: 12px;
        margin-top: 10px;
        padding: 15px;
        border: 1px solid rgba(var(--rojek-yellow-rgb), 0.3);
    }
    
    .menu-icon-wrapper-large {
        width: 32px;
        height: 32px;
    }
    
    .menu-text {
        font-size: 0.95rem;
    }
}

/* ================================================================
   MOBILNÍ OPTIMALIZACE
   ================================================================ */

/* Navigace pro mobilní zařízení */
@media (max-width: 768px) {
    .navbar-brand img {
        height: 35px !important;
    }
    
    .nav-link {
        font-size: 1rem !important;
        padding: 8px 16px !important;
    }
    
    .menu-text {
        font-size: 0.9rem !important;
    }
    
    .menu-icon-wrapper-large,
    .menu-icon-wrapper-large-kotle {
        width: 40px !important;
        height: 40px !important;
    }
    
    .dropdown-menu {
        margin-top: 0 !important;
        border-radius: 0 !important;
        width: 100% !important;
    }
    
    .modern-dropdown-item,
    .modern-dropdown-item-kotle {
        padding: 12px 20px !important;
        font-size: 0.9rem !important;
    }
}

/* Kontejnery pro mobilní */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .breadcrumb {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
    
    .breadcrumb-item {
        margin-bottom: 4px;
    }
    
    /* Hlavičky stránek */
    .h1, .h2, .h3 {
        font-size: 1.25rem !important;
    }
    
    /* Rychlé akce karty */
    .quick-action-card .card-body {
        padding: 12px !important;
    }
    
    .quick-action-card .fas {
        font-size: 1.5rem !important;
    }
    
    .quick-action-card h5,
    .quick-action-card h6 {
        font-size: 0.9rem !important;
    }
    
    .quick-action-card p {
        font-size: 0.8rem !important;
        margin-bottom: 8px !important;
    }
}

/* Průzkumník souborů pro mobilní */
@media (max-width: 768px) {
    .explorer-item {
        margin-bottom: 8px !important;
    }
    
    .explorer-item .card-body {
        padding: 10px !important;
    }
    
    .explorer-item h6 {
        font-size: 0.85rem !important;
    }
    
    .explorer-item small {
        font-size: 0.75rem !important;
    }
    
    /* Navigační toolbar */
    .btn-sm {
        font-size: 0.8rem !important;
        padding: 4px 8px !important;
    }
    
    #pathDisplay {
        font-size: 0.75rem !important;
        word-break: break-all;
    }
}

/* Produktové karty pro mobilní */
@media (max-width: 576px) {
    .product-card {
        margin-bottom: 15px !important;
    }
    
    .product-card .card-body {
        padding: 15px !important;
    }
    
    .product-image {
        max-height: 150px !important;
    }
    
    .product-card h5 {
        font-size: 1.1rem !important;
    }
    
    .product-card h6 {
        font-size: 0.9rem !important;
    }
    
    .product-card .btn {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }
}

/* Fotogalerie pro mobilní */
@media (max-width: 768px) {
    .image-card .image-container {
        height: 150px !important;
    }
    
    .image-card h6 {
        font-size: 0.8rem !important;
    }
    
    .image-card small {
        font-size: 0.7rem !important;
    }
}

/* Alerts a status zprávy */
@media (max-width: 576px) {
    .alert {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
    
    .alert strong {
        display: block;
        margin-bottom: 4px;
    }
    
    .alert small {
        font-size: 0.75rem !important;
    }
}

/* Loading indikátory */
@media (max-width: 576px) {
    .spinner-border {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    #loadingIndicator p {
        font-size: 0.9rem !important;
    }
}

/* Tlačítka pro mobilní */
@media (max-width: 576px) {
    .btn {
        font-size: 0.85rem !important;
        padding: 8px 16px !important;
    }
    
    .btn-sm {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }
    
    .btn .fas {
        font-size: 0.8rem !important;
    }
}

/* Grid systém pro mobilní */
@media (max-width: 576px) {
    .col-md-6.col-lg-4.col-xl-3 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .col-lg-4.col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Navbar toggle pro mobilní */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(45, 45, 45, 0.95) !important;
        margin-top: 10px;
        border-radius: 8px;
        padding: 15px;
        border: 1px solid rgba(251, 221, 0, 0.3);
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    .nav-item {
        margin: 5px 0;
    }
    
    .dropdown-menu {
        position: static !important;
        display: block !important;
        float: none !important;
        width: 100% !important;
        margin: 5px 0 0 20px !important;
        background: rgba(60, 60, 60, 0.9) !important;
        border: 1px solid rgba(251, 221, 0, 0.2) !important;
        border-radius: 6px !important;
    }
}

/* ================================================================
   DARK MODE OVERRIDES
   ================================================================ */

.text-muted {
    color: var(--rojek-muted-text) !important;
}

.text-light {
    color: var(--rojek-light-text) !important;
}

.bg-light {
    background-color: var(--rojek-card-bg) !important;
}

.bg-dark {
    background-color: var(--rojek-dark-bg) !important;
}

.border-light {
    border-color: rgba(var(--rojek-yellow-rgb), 0.3) !important;
}

/* ================================================================
   PRINT STYLES
   ================================================================ */

@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .navbar, .footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        background-color: white !important;
    }
}

/* ================================================================
   CUSTOM SCROLLBAR PRO FIREFOX
   ================================================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--rojek-yellow) var(--rojek-dark-bg);
}

/* ================================================================
   VYHLEDÁVACÍ POPUP PRO SEKCI STROJE
   ================================================================ */

.search-toggle-btn:hover {
    background: rgba(251, 221, 0, 0.1) !important;
    transform: scale(1.1);
}

.search-popup {
    position: absolute;
    top: 100%;
    right: 0;
    width: 450px;
    max-width: 90vw;
    margin-top: 10px;
    background: rgba(45, 45, 45, 0.98);
    border: 1px solid rgba(251, 221, 0, 0.5);
    border-radius: 12px;
    z-index: 1050;
    backdrop-filter: blur(10px);
}

.search-popup-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(251, 221, 0, 0.3);
    background: rgba(251, 221, 0, 0.1);
    border-radius: 12px 12px 0 0;
    color: rgb(251, 221, 0);
    font-weight: 600;
    font-size: 1.1rem;
}

.search-popup-body {
    padding: 15px 20px;
    max-height: 500px;
    overflow-y: auto;
}

.search-input {
    background: rgba(30, 30, 30, 0.8);
    border: 2px solid rgba(251, 221, 0, 0.3);
    color: #f0f0f0;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 1rem;
}

.search-input:focus {
    background: rgba(30, 30, 30, 0.9);
    border-color: rgb(251, 221, 0);
    box-shadow: 0 0 0 0.25rem rgba(251, 221, 0, 0.15);
    color: #f0f0f0;
}

.search-input::placeholder {
    color: #aaa;
}

.search-results {
    margin-top: 15px;
}

.search-category {
    margin-bottom: 20px;
}

.search-category-header {
    font-weight: 600;
    color: rgb(251, 221, 0);
    font-size: 0.95rem;
    padding: 8px 12px;
    background: rgba(251, 221, 0, 0.1);
    border-radius: 6px;
    border-left: 3px solid rgb(251, 221, 0);
    margin-bottom: 10px;
}

.search-category-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #f0f0f0;
}

.search-result-item:hover {
    background: rgba(251, 221, 0, 0.1);
    border-color: rgba(251, 221, 0, 0.3);
    transform: translateX(5px);
    color: rgb(251, 221, 0);
}

.search-result-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(45, 45, 45, 0.8);
    margin-right: 12px;
    flex-shrink: 0;
}

.search-result-content {
    flex-grow: 1;
}

.search-result-title {
    font-weight: 500;
    font-size: 0.95rem;
    color: #f0f0f0;
    margin-bottom: 3px;
}

.search-result-meta {
    font-size: 0.8rem;
    color: #aaa;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .search-popup {
        width: 95vw;
        right: 50%;
        transform: translateX(50%);
    }
    
    .search-popup-body {
        max-height: 400px;
    }
    
    .search-result-item {
        padding: 10px 12px;
    }
    
    .search-result-title {
        font-size: 0.9rem;
    }
    
    .search-result-meta {
        font-size: 0.75rem;
    }
}

/* ================================================================
   KONEC CSS
   ================================================================ */
