/* =================================================================
   Theme22 - Modern Sidebar Layout
   ================================================================= */
:root {
    /* Dynamic CSS variables are loaded from manifest.json via layout.tpl */
    /* Static layout variables */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --sidebar-width: 280px;
    --navbar-height: 70px;
}

/* =================================================================
   Base Styles
   ================================================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-light-color);
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: var(--primary-color-hover);
    text-decoration: none;
}

/* =================================================================
   Layout Structure
   ================================================================= */
.modern-layout {
    min-height: 100vh;
}

.layout-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =================================================================
   Top Navigation
   ================================================================= */
.top-navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-hover) 100%);
    height: var(--navbar-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}

.navbar-brand-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-inverse-color);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-inverse-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.brand-logo:hover {
    color: var(--text-inverse-color);
    opacity: 0.9;
}

.logo-image {
    height: 40px;
    width: auto;
    border-radius: var(--border-radius-sm);
}

.brand-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.navbar-actions {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Search Form */
.search-form {
    margin-left: auto;
    margin-right: 1rem;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.25rem;
    transition: all 0.3s ease;
    min-width: 300px;
    margin-top: 0;
}

.search-input-group:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-input {
    background: none;
    border: none;
    color: var(--text-inverse-color);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    flex: 1;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-inverse-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* =================================================================
   Main Container
   ================================================================= */
.main-container {
    display: flex;
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

/* =================================================================
   Sidebar
   ================================================================= */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--background-sidebar-color) 0%, var(--font-dark-color) 100%);
    color: var(--footer-text-color);
    position: fixed;
    left: 0;
    top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1020;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-content {
    padding: 2rem 0;
}

.sidebar-section {
    margin-bottom: 2.5rem;
    padding: 0 1.5rem;
    position: relative;
}

.sidebar-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -1.25rem;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 400;
    position: relative;
}

.sidebar-nav a:hover {
    background-color: var(--background-overlay-color);
    color: var(--text-inverse-color);
    transform: translateX(4px);
}

.sidebar-nav a:hover::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: var(--text-inverse);
    font-weight: 500;
}

.breadcrumb-sidebar {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-sidebar a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.breadcrumb-sidebar a:hover {
    color: var(--text-inverse);
}

/* Mobile Sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1010;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =================================================================
   Main Content
   ================================================================= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
}

.content-wrapper {
    padding: 2rem;
    max-width: none;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
}

/* =================================================================
   Cards & Components
   ================================================================= */
.card {
    background: var(--background-card-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light-color);
}

.card-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-text {
    color: var(--text-light-color);
    line-height: 1.6;
}

.card-img-top {
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.card:hover .card-img-top {
    transform: scale(1.02);
}

/* =================================================================
   Buttons
   ================================================================= */
.btn {
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-hover) 100%);
    color: var(--text-inverse-color);
    box-shadow: var(--shadow-sm);
}

.btn-primary-custom:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--text-inverse-color);
}

/* Bootstrap button overrides */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--primary-color-hover) !important;
    border-color: var(--primary-color-hover) !important;
    color: white !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

.btn-outline-secondary {
    color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

/* =================================================================
   Forms
   ================================================================= */
.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--background-overlay-color);
    outline: none;
}

/* =================================================================
   Footer
   ================================================================= */
.modern-footer {
    background: linear-gradient(135deg, var(--footer-background-color) 0%, var(--font-dark-color) 100%);
    color: var(--footer-text-color);
    margin-top: auto;
}

.footer-content {
    padding: 3rem 0 1.5rem;
}

.footer-brand {
    margin-bottom: 1rem;
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-inverse-color);
    margin-bottom: 0.5rem;
}

.brand-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-end;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--text-inverse-color);
    transform: translateY(-1px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.copyright-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

.footer-regulations {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
}

.footer-regulations .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-regulations .nav-item {
    margin: 0;
}

.footer-regulations .nav-link {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0;
    font-weight: 400;
}

.footer-regulations .nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .footer-regulations {
        justify-content: center;
        margin-top: 1rem;
    }
}

/* =================================================================
   Responsive Design
   ================================================================= */
@media (max-width: 768px) {
    .search-input-group {
        min-width: 220px;
    }

    .brand-text {
        font-size: 1.25rem;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .footer-links {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .navbar-brand-section {
        gap: 0.5rem;
    }

    .search-form {
        margin-right: 0.5rem;
    }
}

@media (max-width: 576px) {
    .search-input-group {
        min-width: 180px;
    }

    .navbar-actions {
        margin-left: 0.5rem;
    }

    .sidebar-section {
        padding: 0 1rem;
    }

    .brand-text {
        display: none;
    }

    .top-navbar .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Bardzo małe ekrany - ukryj tekst wyszukiwarki */
@media (max-width: 480px) {
    .search-input::placeholder {
        content: "...";
    }

    .search-input-group {
        min-width: 150px;
    }
}

/* =================================================================
   Content Styling
   ================================================================= */
.blog-content img,
.company-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-sm);
    margin: 1rem 0;
    box-shadow: var(--shadow-sm);
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover-color) 100%);
    color: var(--text-inverse);
    padding: 4rem 0;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.15"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    color: var(--text-inverse);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Animation Classes */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-slide-up {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted-color);
}

/* =================================================================
   Featured Company Cards (Homepage)
   ================================================================= */
.company-featured-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.company-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.company-featured-card a {
    color: inherit;
    text-decoration: none;
}

.company-featured-card:hover a {
    color: inherit;
}

.company-logo-container {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-light-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
}

.company-logo {
    max-height: 80px;
    max-width: 100px;
    object-fit: contain;
}

.company-logo-placeholder {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-light-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 2.5rem;
    color: var(--text-muted-color);
}

.company-featured-card .card-title {
    color: var(--text-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.company-featured-card:hover .card-title {
    color: var(--primary-color);
}

.company-featured-card .btn {
    transition: all 0.3s ease;
}

.company-featured-card:hover .btn {
    transform: translateY(-1px);
}

/* =================================================================
   Enhanced List Styles
   ================================================================= */
.card h-100 {
    height: 100%;
}

.card .card-img-top {
    transition: all 0.3s ease;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.card:hover .card-img-top {
    transform: scale(1.02);
}

/* Better hover effects for existing cards */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Enhanced button styles for lists */
.btn-outline-secondary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-inverse);
}

/* Category buttons styling */
.btn-outline-primary-custom {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary-custom:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-hover-color);
    color: var(--text-inverse);
}

.hero-section p, .hero-section h1, .hero-section h2 {
    color: var(--homepage-text-color);
}