/* 
 * ourCIS Custom Styles - Bootstrap 5.3.3 Compatible
 * Modern Rebis Design System
 */

/* ========================================
   CSS Variables - Rebis Brand Colors
   ======================================== */
:root {
    --rebis-primary: #2d5a27;
    --rebis-primary-dark: #1e3d1a;
    --rebis-primary-light: #4a8c42;
    --rebis-accent: #f0c040;
    --rebis-gradient: linear-gradient(135deg, var(--rebis-primary) 0%, var(--rebis-primary-light) 100%);
    --rebis-gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --shadow-glow: 0 0 30px rgba(45,90,39,0.3);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --ourcis-primary: #149300;
    --ourcis-primary-hover: #117300;
    --ourcis-primary-active: #0e5a00;
    --bs-body-bg: #f8f9fa;
}

/* Brand primary color override for buttons */
.btn-primary {
    background: var(--rebis-gradient);
    border: none;
    box-shadow: 0 4px 15px rgba(45,90,39,0.3);
}

.btn-primary:hover {
    background: var(--rebis-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45,90,39,0.4);
}

/* Neutral body background */
body {
    background-color: var(--bs-body-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--rebis-primary-light);
    color: white;
}

/* ========================================
   HTMX Integration Styles
   ======================================== */
.htmx-indicator {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-flex;
    opacity: 1;
    align-items: center;
}

.htmx-sentinel-complete {
    color: var(--bs-success, #198754);
}

.htmx-sentinel-error {
    color: var(--bs-danger, #dc3545);
}

/* ========================================
   MODERN REBIS COMPONENT STYLES
   ======================================== */

/* Modern Cards */
.card {
    border: none;
    border-radius: 16px;
    transition: var(--transition-smooth);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-bottom: none;
    padding: 1.5rem;
    background: transparent;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    border-top: none;
    padding: 1rem 1.5rem;
    background: transparent;
}

/* Smooth transitions for interactive elements */
.btn,
.badge,
.alert {
    transition: var(--transition-fast);
}

/* Modern Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
}

/* Menší tlačítka v navigaci */
.nav-scroller .btn {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
}

.btn-success {
    background: var(--rebis-gradient);
    box-shadow: 0 4px 15px rgba(45,90,39,0.3);
}

.btn-success:hover {
    background: var(--rebis-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45,90,39,0.4);
}

.btn-lg {
    padding: 1rem 2.5rem;
    border-radius: 14px;
    font-size: 1.1rem;
}

/* Enhanced focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(20, 147, 0, 0.25);
}

/* ========================================
   Utility Helpers
   ======================================== */

/* Consistent border radius */
.rounded-ourcis {
    border-radius: 0.375rem;
}

/* Text truncation helper */
.text-truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sticky header for tables */
.table-sticky-header thead th {
    position: sticky;
    top: 0;
    background-color: var(--bs-light);
    z-index: 10;
}

/* ========================================
   MODERN REBIS NAVBAR STYLES
   ======================================== */
.navbar-modern {
    background: linear-gradient(135deg, rgba(26,26,46,0.95) 0%, rgba(22,33,62,0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-modern .nav-link {
    transition: color 0.2s;
    color: rgba(255,255,255,0.7);
}

.navbar-modern .nav-link:hover {
    color: rgba(255,255,255,1);
}

.navbar-modern .dropdown-menu {
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-lg);
}

.navbar-modern .dropdown-item {
    border-radius: 8px;
    transition: all 0.2s;
    color: #333;
    padding: 0.5rem 1rem;
}

.navbar-modern .dropdown-item:hover {
    background: rgba(45,90,39,0.1);
    color: var(--rebis-primary);
}

/* ========================================
   MODERN FOOTER STYLES
   ======================================== */
.footer-modern {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    margin-top: auto;
}

.footer-modern .hover-link {
    transition: var(--transition-fast);
}

.footer-modern .hover-link:hover {
    color: white !important;
    text-decoration: underline !important;
}

/* ========================================
   PAGE HEADERS & TYPOGRAPHY
   ======================================== */
.display-5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--rebis-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Links */
.link-success {
    color: var(--rebis-primary) !important;
    transition: var(--transition-fast);
}

.link-success:hover {
    color: var(--rebis-primary-dark) !important;
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   MODERN SECTION DIVIDERS
   ======================================== */
.b-example-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--rebis-primary), transparent);
    border: none;
    box-shadow: none;
    opacity: 0.4;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .btn {
        padding: 0.5rem 1rem;
        border-radius: 10px;
    }
    
    .card {
        border-radius: 12px;
    }
}
