:root {
    /* Main brand colors based on --adm-... */
    --HM-primary: #f97316;
    --HM-primary-hover: #ea580c;
    --HM-secondary: #6b7280;
    --HM-accent: #fbbf24;
    --HM-bg-light: #f8f9fc;
    --HM-bg-dark: #111827;
    --HM-text-light: #1f2937;
    --HM-text-dark: #f9fafb;
    --HM-card-bg-light: #ffffff;
    --HM-card-bg-dark: #1f2937;
    --HM-border-light: #e5e7eb;
    --HM-border-dark: #374151;
    --HM-shadow-light: rgba(249, 115, 22, 0.15);
    --HM-shadow-dark: rgba(234, 88, 12, 0.3);
    --HM-header-bg: #ea580c;

    /* Generic tokens aligned to the same palette */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e0e0e0;
    --border-color: #e0e0e0;

    /* Semantic statuses */
    --HM-danger: #ef4444;
    --HM-danger-hover: #dc2626;
    --HM-danger-soft: #fee2e2;
    --HM-danger-border: #fecaca;

    --HM-warning: #fbbf24;
    --HM-warning-hover: #f59e0b;
    --HM-warning-soft: #fef3c7;
    --HM-warning-border: #fde68a;

    --HM-info: #3b82f6;
    --HM-info-hover: #2563eb;
    --HM-info-soft: #dbeafe;
    --HM-info-border: #bfdbfe;
}

[data-theme="dark"] {
    --HM-bg: var(--HM-bg-dark);
    --HM-text: var(--HM-text-dark);
    --HM-admin-card-bg: var(--HM-card-bg-dark);
    --HM-card-bg: var(--HM-card-bg-dark);
    --HM-border: var(--HM-border-dark);
    --HM-shadow: var(--HM-shadow-dark);
    --HM-text-muted: #9ca3af;
    --HM-table-hover: rgba(55, 65, 81, 0.7);
    --HM-hover: rgba(255, 255, 255, 0.05);

    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3d3d3d;
    --border-color: #404040;

    /* Semantic statuses in dark mode (slightly deeper + translucent soft bg) */
    --HM-danger: #f87171;
    --HM-danger-hover: #ef4444;
    --HM-danger-soft: rgba(248, 113, 113, 0.12);
    --HM-danger-border: #fca5a5;

    --HM-warning: #facc15;
    --HM-warning-hover: #eab308;
    --HM-warning-soft: rgba(250, 204, 21, 0.12);
    --HM-warning-border: #fde047;

    --HM-info: #60a5fa;
    --HM-info-hover: #3b82f6;
    --HM-info-soft: rgba(96, 165, 250, 0.12);
    --HM-info-border: #93c5fd;
}

[data-theme="light"],
:root {
    --HM-bg: var(--HM-bg-light);
    --HM-text: var(--HM-text-light);
    --HM-card-bg: var(--HM-card-bg-light);
    --HM-border: var(--HM-border-light);
    --HM-shadow: var(--HM-shadow-light);
    --HM-text-muted: #6b7280;
    --HM-table-hover: rgba(248, 250, 252, 0.8);
    --HM-hover: rgba(0, 0, 0, 0.05);

    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e0e0e0;
    --border-color: #e0e0e0;
}





/* =========================
   CHECKBOX INPUTS
   ========================= */
/* Square checkbox input - for user edit page visibility checkboxes */
.check-input-square {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--HM-border);
    border-radius: 4px;
    background: var(--HM-card-bg);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin: 0;
}

.check-input-square:hover {
    border-color: var(--HM-primary);
}

.check-input-square:checked {
    background: var(--HM-primary);
    border-color: var(--HM-primary);
}

.check-input-square:checked::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.check-input-square:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.check-input-square:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkbox wrapper for proper alignment - for /adm/users/edit page */
.form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    min-height: 20px;
}

.form-check.form-switch .form-check-label {
    margin: 0;
    cursor: pointer;
    color: var(--HM-text);
    font-size: 0.95rem;
}

/* =========================
   BUTTONS
   ========================= */
/* Primary button */
.btn-primary {
    background: linear-gradient(135deg, var(--HM-primary), var(--HM-primary-hover));
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--HM-primary-hover), #c2410c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

/* Secondary button */
.btn-secondary {
    background: linear-gradient(135deg, var(--HM-secondary), #4b5563);
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Danger button (full) */
.btn-danger {
    background: linear-gradient(135deg, var(--HM-danger), var(--HM-danger-hover));
    border: none;
    border-radius: 8px;
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--HM-danger-hover), #b91c1c);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Slim button styles - for use in table cells */
.btn-slim {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    border-radius: 4px !important;
}

.btn-slim i {
    font-size: 0.75rem;
}

/* Slim primary button (no lift on hover) */
.btn-primary.btn-slim {
    background: var(--HM-primary);
    color: white;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.3s;
    transform: none !important;  /* Prevents lifting/jumping */
}

.btn-primary.btn-slim:hover {
    opacity: 0.85;
    color: white;
    transform: none !important;  /* Prevents lifting/jumping on hover */
}

/* Slim danger button - outline style, used mainly in button groups */
.btn-danger.btn-slim {
    /* Outline look by default */
    background: transparent;
    color: var(--HM-danger);
    border: 2px solid var(--HM-danger);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    transform: none !important;

    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
    border-radius: 0 4px 4px 0 !important;
    border-left: none !important; /* For grouped buttons – left edge sdílí primary */
}

.btn-danger.btn-slim:hover {
    /* Fill on hover, still subtle for tables */
    background: var(--HM-danger-soft);
    color: var(--HM-danger-hover);
    border-color: var(--HM-danger-hover);
    transform: none !important;
}

/* Connected buttons styling - for edit/delete button groups */
.btn-group .btn-primary.btn-slim {
    border-radius: 4px 0 0 4px !important;
    border: 2px solid var(--HM-primary);
    border-right: none !important;
}

/* Keep visual separation between edit/delete */
.btn-group .btn-primary.btn-slim + .btn-danger.btn-slim {
    border-left: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* =========================
   MARKETPLACE STYLES
   Public marketplace search and item display
   ========================= */

/* Marketplace inputs and selects - same style as admin */
.form-control,
.form-select {
    width: 100%;
    border: 2px solid var(--HM-border);
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    background: var(--HM-card-bg);
    color: var(--HM-text);
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
}

[data-theme="dark"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--HM-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
    outline: none;
    background: var(--HM-card-bg);
    color: var(--HM-text);
}

.form-control::placeholder {
    color: var(--HM-text-muted);
    opacity: 0.7;
}

.form-select option {
    background: var(--HM-card-bg);
    color: var(--HM-text);
    padding: 0.5rem;
}

/* Marketplace pagination */
.pagination .page-link {
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    color: var(--HM-text);
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background: var(--HM-hover);
    border-color: var(--HM-primary);
    color: var(--HM-primary);
}

.pagination .page-item.active .page-link {
    background: var(--HM-primary);
    border-color: var(--HM-primary);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background: var(--HM-card-bg);
    border-color: var(--HM-border);
    color: var(--HM-text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Marketplace item cards */
.item-card {
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    transition: all 0.3s ease;
}

/* Make entire card clickable */
a:has(.item-card) {
    display: block;
    text-decoration: none;
    color: inherit;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.15);
    border-color: var(--HM-primary);
}

.item-card img {
    transition: transform 0.3s ease;
}

.item-card:hover img {
    transform: scale(1.05);
}

.item-card .btn-primary {
    background: var(--HM-primary);
    border-color: var(--HM-primary);
    transition: all 0.3s ease;
}

.item-card .btn-primary:hover {
    background: var(--HM-primary-hover);
    border-color: var(--HM-primary-hover);
    transform: translateY(-2px);
}

/* Watch button styles */
.watch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent !important;
    border: none !important;
    padding: 0.25rem !important;
}

.watch-btn:hover:not([disabled]) i {
    transform: scale(1.2);
}

.watch-btn[disabled] {
    cursor: default;
    opacity: 0.9;
}

.watch-btn[disabled]:hover i {
    transform: none;
}

/* ========================================
   Gallery Small (Market Item View)
   ======================================== */

/* Gallery Container */
.gallery-sm-container {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Main Image Area */
.gallery-sm-main {
    position: relative;
    height: 500px;
    background: var(--HM-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-sm-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Image Wrapper for Broken Image Icon */
.gallery-sm-img-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.gallery-sm-img-wrapper img {
    position: relative;
    z-index: 1;
}

/* Hide broken image and alt text */
.gallery-sm-img-wrapper img[alt] {
    text-indent: -9999px;
    font-size: 0;
    color: transparent;
}

/* Hide browser's broken image icon */
.gallery-sm-img-wrapper img {
    position: relative;
    min-height: 1px;
}

.gallery-sm-img-wrapper img[src=""],
.gallery-sm-img-wrapper img:not([src]),
.gallery-sm-img-wrapper img[src*="invalid"] {
    opacity: 0;
}

.gallery-sm-img-wrapper::before {
    content: "\f03e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--HM-text-muted);
    opacity: 0.3;
    z-index: 0;
}

/* Navigation Arrows */
.gallery-sm-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 0.8;
}

.gallery-sm-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.gallery-sm-arrow-prev {
    left: 12px;
}

.gallery-sm-arrow-next {
    right: 12px;
}

/* Image Counter */
.gallery-sm-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(8px);
    z-index: 10;
}

/* Thumbnails Container */
.gallery-sm-thumbs {
    padding: 16px;
    background: var(--HM-bg);
    border-top: 1px solid var(--HM-border);
}

.gallery-sm-thumbs-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--HM-primary) var(--HM-bg);
}

/* Custom Scrollbar */
.gallery-sm-thumbs-scroll::-webkit-scrollbar {
    height: 8px;
}

.gallery-sm-thumbs-scroll::-webkit-scrollbar-track {
    background: var(--HM-border);
    border-radius: 4px;
}

.gallery-sm-thumbs-scroll::-webkit-scrollbar-thumb {
    background: var(--HM-primary);
    border-radius: 4px;
}

.gallery-sm-thumbs-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--HM-primary-hover);
}

/* Thumbnail Item */
.gallery-sm-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid transparent;
    transition: border-color 0.2s ease;
    position: relative;
}

.gallery-sm-thumb:hover {
    border-color: var(--HM-primary);
}

.gallery-sm-thumb.active {
    border-color: var(--HM-primary);
}

.gallery-sm-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Thumbnail Wrapper for Broken Image Icon */
.gallery-sm-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--HM-bg);
}

.gallery-sm-thumb-wrapper img {
    position: relative;
    z-index: 1;
}

/* Hide broken image and alt text */
.gallery-sm-thumb-wrapper img[alt] {
    text-indent: -9999px;
    font-size: 0;
    color: transparent;
}

/* Hide browser's broken image icon */
.gallery-sm-thumb-wrapper img {
    position: relative;
    min-height: 1px;
}

.gallery-sm-thumb-wrapper img[src=""],
.gallery-sm-thumb-wrapper img:not([src]),
.gallery-sm-thumb-wrapper img[src*="invalid"] {
    opacity: 0;
}

.gallery-sm-thumb-wrapper::before {
    content: "\f03e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--HM-text-muted);
    opacity: 0.3;
    z-index: 0;
}

/* Empty State */
.gallery-sm-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--HM-text-muted);
    font-size: 3rem;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-sm-main {
        height: 350px;
    }

    .gallery-sm-thumb {
        width: 70px;
        height: 70px;
    }

    .gallery-sm-arrow {
        width: 38px;
        height: 38px;
    }
}

/* ========================================
   CARD STYLES (Public version - no adm prefix)
   ======================================== */

/* Page Title Styles */
.page-title {
    color: var(--HM-text);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.page-subtitle {
    color: var(--HM-text-muted);
    font-size: 1rem;
    margin: 0;
}

.card {
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--HM-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card-header {
    background: linear-gradient(135deg, var(--HM-primary), var(--HM-primary-hover));
    color: white;
    padding: 1rem 1.25rem;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.card-title {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
    margin: 0;
}

.card-body {
    padding: 1.5rem 1.25rem;
    background: var(--HM-card-bg);
}

/* ========================================
   INPUT STYLES (Public version - no adm prefix)
   ======================================== */

/* Text inputs */
.input,
input.input,
textarea.input {
    width: 100%;
    border: 2px solid var(--HM-border);
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    background: var(--HM-card-bg);
    color: var(--HM-text);
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
}

.input:focus {
    border-color: var(--HM-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
    outline: none;
    background: var(--HM-card-bg);
    color: var(--HM-text);
}

.input::placeholder {
    color: var(--HM-text-muted);
    opacity: 0.7;
}

textarea.input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Number input with custom arrows */
input[type="number"].input {
    padding-right: 2rem;
    -moz-appearance: textfield;
}

input[type="number"].input::-webkit-inner-spin-button,
input[type="number"].input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Wrapper for number input with custom arrows */
.number-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.number-input-wrapper .input {
    padding-right: 2rem;
}

/* Custom arrow buttons */
.number-arrows {
    position: absolute;
    right: 2px;
    top: 2px;
    bottom: 2px;
    width: 1.5rem;
    display: flex;
    flex-direction: column;
    border-radius: 0 6px 6px 0;
    overflow: hidden;
}

.number-arrow {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--HM-card-bg);
    border-left: 1px solid var(--HM-border);
    color: var(--HM-text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    user-select: none;
}

.number-arrow:hover {
    background: var(--HM-primary);
    color: white;
}

.number-arrow:active {
    background: var(--HM-primary-hover);
}

.number-arrow-up {
    border-bottom: 1px solid var(--HM-border);
}

/* Select dropdown */
.select,
select.select {
    width: 100%;
    border: 2px solid var(--HM-border);
    border-radius: 8px;
    padding: 0.5rem 2.5rem 0.5rem 0.875rem;
    background: var(--HM-card-bg);
    color: var(--HM-text);
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 12px !important;
}

.select:focus {
    border-color: var(--HM-primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
    outline: none;
    background: var(--HM-card-bg);
    color: var(--HM-text);
}

.select:hover {
    border-color: var(--HM-primary);
}

.select option {
    background: var(--HM-card-bg);
    color: var(--HM-text);
    padding: 0.5rem;
}

[data-theme="dark"] .select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
}

/* Transport Options Styling */
.transport-option {
    position: relative;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transport-label {
    font-weight: 500;
    color: var(--HM-text);
    font-size: 0.85rem;
    margin: 0;
    cursor: pointer;
    white-space: nowrap;
    width: 90px;
}

.transport-price-input {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.35rem 0.5rem;
}

.transport-helper {
    display: block;
    font-size: 0.75rem;
    color: var(--HM-text-muted);
    margin: 0;
    font-style: italic;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--HM-border);
    border-radius: 12px;
    padding: 2rem;
    background: var(--HM-card-bg);
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.upload-area.dragover {
    border-color: var(--HM-primary);
    background: rgba(249, 115, 22, 0.05);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 4rem;
    color: var(--HM-text-muted);
    margin-bottom: 1.5rem;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--HM-text);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.95rem;
    color: var(--HM-text-muted);
    margin-bottom: 0;
}

/* ========================================
   Main Navigation
   ======================================== */

.main-nav {
    background: var(--HM-card-bg);
    border-bottom: 1px solid var(--HM-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.main-nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 2rem;
}

/* Brand/Logo */
.main-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--HM-primary);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}

.main-nav-brand:hover {
    color: var(--HM-primary-hover);
}

.main-nav-brand i {
    font-size: 1.5rem;
}

/* Main Links */
.main-nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.main-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    color: var(--HM-text);
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.main-nav-link:hover {
    background: transparent;
    color: var(--HM-primary);
    border-bottom-color: var(--HM-primary);
}

.main-nav-link i {
    font-size: 1rem;
}

/* Actions (Right Side) */
.main-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    margin-right: -0.625rem;
}

/* User Menu */
.main-nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
    margin-right: 0.625rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    position: relative;
}

.main-nav-user:hover {
    background: transparent;
}

/* Show dropdown on hover */
.main-nav-user:hover + .main-nav-dropdown,
.main-nav-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--HM-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.main-nav-user-name {
    color: var(--HM-text);
    font-weight: 600;
}

/* Settings Toggle */
.main-nav-setting {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--HM-bg);
    border: none;
    border-radius: 8px;
    color: var(--HM-text);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.main-nav-setting:hover {
    background: var(--HM-border);
}

.main-nav-setting i {
    font-size: 1.125rem;
}

/* Login Button */
.main-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--HM-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.main-nav-btn:hover {
    background: var(--HM-primary-hover);
    transform: translateY(-1px);
}

/* Dropdown Menu */
.main-nav-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.main-nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav-dropdown-small {
    min-width: 160px;
}

.main-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--HM-text);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}

.main-nav-dropdown-item:hover {
    background: var(--HM-bg);
    color: var(--HM-primary);
}

.main-nav-dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.main-nav-dropdown-divider {
    height: 1px;
    background: var(--HM-border);
    margin: 0.5rem 0;
}

/* Mobile Menu Toggle */
.main-nav-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--HM-bg);
    border: none;
    border-radius: 8px;
    color: var(--HM-text);
    cursor: pointer;
    transition: all 0.2s;
}

.main-nav-mobile-toggle:hover {
    background: var(--HM-border);
}

/* Mobile Menu Overlay */
.main-nav-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.main-nav-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.main-nav-mobile-overlay.active .main-nav-mobile-content {
    transform: translateX(0);
}

.main-nav-mobile-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: var(--HM-card-bg);
    box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.main-nav-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--HM-border);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--HM-text);
    flex-shrink: 0;
}

.main-nav-mobile-brand {
    color: var(--HM-primary);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}

.main-nav-mobile-brand:hover {
    color: var(--HM-primary-hover);
}

.main-nav-mobile-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--HM-bg);
    border: none;
    border-radius: 8px;
    color: var(--HM-text);
    cursor: pointer;
    transition: all 0.2s;
}

.main-nav-mobile-close:hover {
    background: var(--HM-border);
}

.main-nav-mobile-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    color: var(--HM-text);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    flex-shrink: 0;
}

.main-nav-mobile-item:hover {
    background: var(--HM-bg);
    border-left-color: var(--HM-primary);
    color: var(--HM-primary);
}

.main-nav-mobile-item i {
    width: 24px;
    text-align: center;
    font-size: 1.125rem;
}

.main-nav-mobile-divider {
    height: 1px;
    background: var(--HM-border);
    margin: 1rem 0;
}

.main-nav-mobile-item-label {
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--HM-text-muted);
    letter-spacing: 0.5px;
}

/* Hide desktop-only elements on mobile */
.main-nav-desktop-only {
    display: flex;
}

/* Responsive */
@media (max-width: 992px) {
    .main-nav-links {
        display: none;
    }

    .main-nav-mobile-toggle {
        display: flex;
    }

    .main-nav-desktop-only {
        display: none !important;
    }

    .main-nav-link span {
        display: none;
    }

    .main-nav-btn span {
        display: none;
    }

    /* Disable user dropdown on mobile */
    .main-nav-user {
        cursor: default;
        pointer-events: none;
    }

    #userDropdown {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .main-nav-content {
        gap: 0.75rem;
    }

    .main-nav-actions {
        gap: 0.5rem;
    }

    .main-nav-mobile-content {
        width: 100%;
        max-width: 300px;
    }
}

/* ========================================
   Rollup Navigation
   ======================================== */

.rollup-nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
}

.rollup-nav-wrapper > * {
    pointer-events: auto;
}

.rollup-nav {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: auto;
    transition: top 0.3s ease;
}

.rollup-nav.expanded {
    top: 0;
}

/* Mobile Toggle Button */
.rollup-nav-mobile-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--HM-card-bg);
    color: var(--HM-text);
    border: 1px solid var(--HM-border);
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.rollup-nav-mobile-toggle:hover {
    background: var(--HM-bg);
    border-color: var(--HM-primary);
    color: var(--HM-primary);
}

.rollup-nav-mobile-toggle i {
    font-size: 1.125rem;
}

/* Trigger Area */
.rollup-nav-trigger {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2001;
    opacity: 1;
}

.rollup-nav.expanded .rollup-nav-trigger {
    opacity: 0;
    pointer-events: none;
}

.rollup-nav-trigger::before {
    content: "\f0d7";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--HM-text-muted);
    font-size: 0.875rem;
}

.rollup-nav-trigger:hover {
    background: var(--HM-bg);
    height: 24px;
}

.rollup-nav-trigger:hover::before {
    color: var(--HM-primary);
}

/* Content Panel */
.rollup-nav-content {
    width: 100%;
    height: auto;
    background: var(--HM-card-bg);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--HM-border);
}

.rollup-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 2rem;
}

/* Brand */
.rollup-nav-brand {
    color: var(--HM-primary);
    font-weight: 700;
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.rollup-nav-brand:hover {
    color: var(--HM-primary-hover);
}

/* Links Section */
.rollup-nav-links {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.rollup-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: var(--HM-text);
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    background: none;
    border-top: none;
    border-right: none;
    border-left: none;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    border-radius: 8px 8px 0 0;
}

.rollup-nav-link:hover {
    background: transparent;
    border-bottom-color: var(--HM-primary);
    color: var(--HM-primary);
}

.rollup-nav-link i {
    font-size: 1rem;
}

/* Actions (Right Side) */
.rollup-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    margin-right: -0.625rem;
}

/* User Menu */
.rollup-nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0;
    margin-right: 0.625rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    position: relative;
}

.rollup-nav-user:hover {
    background: transparent;
}

/* Show dropdown on hover */
.rollup-nav-user:hover + .rollup-nav-dropdown,
.rollup-nav-dropdown:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rollup-nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--HM-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.rollup-nav-user-name {
    color: var(--HM-text);
    font-weight: 600;
}

/* User mobile wrapper */
.rollup-nav-user-mobile {
    display: none;
}

/* Settings Toggle */
.rollup-nav-setting {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--HM-bg);
    border: none;
    border-radius: 8px;
    color: var(--HM-text);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.rollup-nav-setting:hover {
    background: var(--HM-border);
}

.rollup-nav-setting i {
    font-size: 1.125rem;
}

/* Login Button */
.rollup-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--HM-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.rollup-nav-btn:hover {
    background: var(--HM-primary-hover);
    transform: translateY(-1px);
}

/* Dropdown Menu */
.rollup-nav-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1001;
}

.rollup-nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rollup-nav-dropdown-small {
    min-width: 160px;
}

.rollup-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--HM-text);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
}

.rollup-nav-dropdown-item:hover {
    background: var(--HM-bg);
    color: var(--HM-primary);
}

.rollup-nav-dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.rollup-nav-dropdown-divider {
    height: 1px;
    background: var(--HM-border);
    margin: 0.5rem 0;
}

/* Hide desktop-only elements on mobile */
.rollup-nav-desktop-only {
    display: flex;
}

/* Mobile adjustments */
@media (max-width: 992px) {
    .rollup-nav-wrapper {
        left: auto;
        right: 0;
    }

    .rollup-nav {
        left: auto;
        right: -280px;
        top: 0;
        width: 280px;
        height: 100vh;
        transition: right 0.3s ease;
    }

    .rollup-nav.expanded {
        left: auto;
        right: 0;
        top: 0;
    }

    .rollup-nav-content {
        height: 100%;
        overflow-y: auto;
        border-bottom: none;
        border-left: 1px solid var(--HM-border);
        box-shadow: -4px 0 16px rgba(0,0,0,0.1);
    }

    .rollup-nav-inner {
        flex-direction: column;
        align-items: stretch;
        padding: 1.5rem 0;
        gap: 0.5rem;
    }

    .rollup-nav-brand {
        padding: 0.75rem 1.5rem;
    }

    .rollup-nav-links {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }

    .rollup-nav-link {
        border-bottom: none;
        border-left: 3px solid transparent;
        border-radius: 0;
        padding: 0.875rem 1.5rem;
        gap: 1rem;
    }

    .rollup-nav-link:hover {
        border-left-color: var(--HM-primary);
        border-bottom-color: transparent;
        background: transparent;
    }

    .rollup-nav-link i {
        width: 24px;
        text-align: center;
        font-size: 1.125rem;
    }

    .rollup-nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        margin-right: 0;
        padding: 0.5rem 0;
    }

    /* Hide desktop user, show mobile user at the end */
    .rollup-nav-actions > .rollup-nav-user {
        display: none;
    }

    .rollup-nav-user-mobile {
        display: block;
    }

    .rollup-nav-user-mobile .rollup-nav-user {
        display: flex;
    }

    .rollup-nav-user {
        padding: 0.875rem 1.5rem;
        margin-right: 0;
        background: var(--HM-bg);
        border-radius: 0;
        cursor: default;
        pointer-events: none;
    }

    .rollup-nav-dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .rollup-nav-dropdown-item {
        padding: 0.875rem 1.5rem;
        border-left: 3px solid transparent;
    }

    .rollup-nav-dropdown-item:hover {
        border-left-color: var(--HM-primary);
    }

    .rollup-nav-dropdown-item i {
        width: 24px;
        text-align: center;
        font-size: 1.125rem;
    }

    .rollup-nav-dropdown-divider {
        margin: 0.75rem 1.5rem;
    }

    .rollup-nav-setting {
        width: auto;
        height: auto;
        padding: 0.875rem 1.5rem;
        gap: 1rem;
        justify-content: flex-start;
        border-radius: 0;
        border-left: 3px solid transparent;
    }

    .rollup-nav-setting:hover {
        border-left-color: var(--HM-primary);
    }

    .rollup-nav-setting i {
        width: 24px;
        text-align: center;
    }

    .rollup-nav-btn {
        margin: 0 1.5rem;
        justify-content: center;
    }

    .rollup-nav-desktop-only {
        display: flex !important;
    }

    /* Show mobile toggle button */
    .rollup-nav-mobile-toggle {
        display: flex;
    }

    /* Hide desktop trigger */
    .rollup-nav-trigger {
        display: none;
    }
}

/* =========================
   GALLERY STYLES (Public - no adm prefix)
   For marketplace create/edit page gallery
   ========================= */

/* Gallery Preview - Main large image */
.gallery-preview {
    width: 100%;
    height: 400px;
    background: var(--HM-card-bg);
    border: 2px solid var(--HM-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Bootstrap utility helper */
.mb-3 {
    margin-bottom: 1rem;
}

/* Navigation Buttons */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.8;
    pointer-events: all;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-preview:hover .gallery-nav-btn {
    opacity: 1;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.gallery-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav-btn.disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.gallery-nav-btn-prev {
    left: 1rem;
}

.gallery-nav-btn-next {
    right: 1rem;
}

.gallery-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    position: relative;
    max-width: 100%;
    max-height: 100%;
}

.gallery-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--HM-text-muted);
    padding: 3rem;
}

.gallery-preview-empty i {
    opacity: 0.3;
    color: var(--HM-text-muted);
}

.gallery-preview-empty p {
    color: var(--HM-text-muted);
    font-size: 1rem;
}

/* Thumbnails Container */
.gallery-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.75rem 0.75rem;
    margin: -0.25rem -0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--HM-border) transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--HM-border);
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: var(--HM-primary);
}

/* Individual Thumbnail */
.gallery-thumbnail {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border: 2px solid var(--HM-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--HM-card-bg);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Thumbnail fallback (shown when the image can't be loaded) */
.gallery-thumb-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--HM-text-muted);
    background: var(--HM-card-bg);
}

.gallery-thumbnail.is-missing img {
    display: none;
}

.gallery-thumbnail.is-missing .gallery-thumb-fallback {
    display: flex;
}

.gallery-thumbnail:hover {
    border-color: var(--HM-primary);
    transform: scale(1.05);
}

.gallery-thumbnail.active {
    border-color: var(--HM-primary);
    border-width: 4px;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25), 0 4px 12px rgba(249, 115, 22, 0.3);
}

.gallery-thumbnail.dragging {
    opacity: 0.4;
    cursor: grabbing;
    transform: scale(0.95);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-thumbnail.drag-over {
    border-color: var(--HM-accent);
    border-width: 4px;
    background: rgba(251, 191, 36, 0.15);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.3), inset 0 0 20px rgba(251, 191, 36, 0.2);
    transform: scale(1.05);
}

/* Thumbnail Delete Button */
.gallery-thumbnail-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.75rem;
}

.gallery-thumbnail:hover .gallery-thumbnail-delete {
    opacity: 1;
}

.gallery-thumbnail-delete:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Thumbnail Position Badge */
.gallery-thumbnail-position {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Pending Upload Badge */
.gallery-thumbnail-pending-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(251, 191, 36, 0.9);
    color: white;
    padding: 4px;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.gallery-thumbnail-pending {
    border-color: var(--HM-accent);
    opacity: 0.8;
}

/* Upload Button */
.gallery-upload-btn {
    border: 2px dashed var(--HM-border);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-upload-btn:hover {
    border-color: var(--HM-primary);
    background: rgba(249, 115, 22, 0.05);
}

.gallery-upload-label {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--HM-text-muted);
    margin: 0;
}

.gallery-upload-label i {
    color: var(--HM-primary);
    opacity: 0.6;
}

.gallery-upload-label span {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.gallery-upload-label:hover i {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-preview {
        aspect-ratio: 4 / 3;
    }

    .gallery-thumbnail {
        width: 80px;
        height: 80px;
    }

    .gallery-thumbnails {
        gap: 0.5rem;
    }
}

/* Quill Editor Card Body - Zero Padding */
.card-body.quill-card-body {
    padding: 0 !important;
}

/* Gallery Upload Area - Initial State */
.gallery-upload-area {
    border: 2px dashed var(--HM-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    background: var(--HM-card-bg);
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
}

.gallery-upload-area.dragover {
    border-color: var(--HM-primary);
    background: rgba(249, 115, 22, 0.05);
    transform: scale(1.01);
}

.gallery-upload-area-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--HM-text-muted);
    margin: 0;
}

.gallery-upload-area-label i {
    color: var(--HM-primary);
    opacity: 0.6;
}

.gallery-upload-area-label h5 {
    color: var(--HM-text);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.gallery-upload-area:hover .gallery-upload-area-label i {
    opacity: 1;
    transform: scale(1.1);
}

.gallery-upload-area:hover {
    border-color: var(--HM-primary);
    background: rgba(249, 115, 22, 0.03);
}

/* ===== NEWS SEARCH PAGE ===== */

/* Page Header */
.news-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.news-page-title {
    color: var(--HM-text);
    font-weight: 700;
    margin-bottom: 1rem;
}

.news-page-title i {
    color: var(--HM-primary);
    margin-right: 1rem;
}

.news-page-subtitle {
    color: var(--HM-text-muted);
}

/* Search Filter Card */
.news-search-card {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
}

.news-search-card .card-body {
    padding: 1.5rem;
}

.news-filter-label {
    color: var(--HM-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.news-filter-label i {
    margin-right: 0.25rem;
}

/* Results Count & Sort */
.news-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.news-results-count {
    color: var(--HM-text-muted);
}

.news-results-count i {
    margin-right: 0.5rem;
}

.news-sort-select {
    min-width: 250px;
    font-size: 0.9rem;
}

/* Empty State */
.news-empty-state {
    text-align: center;
    padding: 3rem 0;
}

.news-empty-state i {
    color: var(--HM-text-muted);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.news-empty-state h3,
.news-empty-state p {
    color: var(--HM-text-muted);
}

/* Loading Indicator */
.news-loading {
    text-align: center;
    padding: 3rem 0;
    display: none;
}

.news-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--HM-primary);
}

.news-loading p {
    margin-top: 1rem;
    color: var(--HM-text-muted);
}

/* Article Card */
.news-article-card {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    height: 200px;
}

.news-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Article Image Container */
.news-article-image {
    position: relative;
    aspect-ratio: 16 / 9;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--HM-card-bg);
    border-right: 2px solid var(--HM-border);
}

.news-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-article-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--HM-card-bg);
}

.news-article-image-placeholder i {
    color: var(--HM-text-muted) !important;
    opacity: 0.3 !important;
    font-size: 3rem !important;
}

/* Language Badge */
.news-language-badge {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Date Badge */
.news-date-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.news-date-badge i {
    margin-right: 0.3rem;
}

/* Article Body */
.news-article-body {
    background: var(--HM-card-bg);
    padding: 12px 1rem !important;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.news-article-title {
    color: var(--HM-text);
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-article-snippet {
    color: var(--HM-text-muted);
    line-height: 1.4;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article Tags */
.news-article-tags {
    margin-top: auto;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--HM-border);
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

.news-tag {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: white !important;
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
    display: inline-block;
    margin-right: 0.25rem;
    border-radius: 4px;
}

.news-tag-more {
    background: var(--HM-border) !important;
    color: var(--HM-text-muted) !important;
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
    display: inline-block;
    border-radius: 4px;
}

/* Article Footer */
.news-article-footer {
    flex-shrink: 0;
}

.news-article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--HM-text-muted);
}

.news-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.news-meta-item i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.news-meta-separator {
    opacity: 0.5;
}

.news-meta-rating i {
    color: #fbbf24;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .news-page-title {
        font-size: 2rem;
    }

    .news-page-title i {
        margin-right: 0.5rem;
    }

    .news-results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .news-sort-select {
        min-width: 100%;
    }

    .news-article-card {
        flex-direction: column;
        height: auto;
    }

    .news-article-image {
        aspect-ratio: 16 / 9;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--HM-border);
    }

    .news-article-body {
        padding: 1rem;
    }

    .news-article-title {
        font-size: 1rem;
    }

    .news-article-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .news-meta-separator {
        display: none;
    }
}

@media (max-width: 576px) {
    .news-page-header {
        margin-bottom: 2rem;
    }

    .news-page-title {
        font-size: 1.5rem;
    }

    .news-search-card .card-body {
        padding: 1rem;
    }

    .news-article-image-placeholder i {
        font-size: 3rem;
    }

    .news-language-badge,
    .news-date-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ===== NEWS ARTICLE VIEW PAGE ===== */

/* Article View */
.news-article-view {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    padding: 2rem;
    margin-bottom: 2rem;
}

.news-article-view-title {
    color: var(--HM-text);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
}

/* Gallery */
.news-article-gallery {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--HM-bg);
}

.news-gallery-container {
    width: 100%;
}

.news-gallery-main {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--HM-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    background: var(--HM-card-bg);
}

.news-gallery-thumbnail {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.news-gallery-thumbnail:hover {
    opacity: 1;
}

.news-gallery-thumbnail.active {
    opacity: 1;
    border-color: var(--HM-primary);
}

/* Article Content */
.news-article-view-content {
    color: var(--HM-text);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.news-article-view-content p {
    margin-bottom: 1rem;
}

.news-article-view-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.news-article-view-content h2,
.news-article-view-content h3,
.news-article-view-content h4 {
    color: var(--HM-text);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* Comments Section */
.news-comments-section {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    padding: 2rem;
    margin-bottom: 2rem;
}

.news-comments-title {
    color: var(--HM-text);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.news-comment-form {
    margin-bottom: 2rem;
}

.news-comment-textarea {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--HM-border);
    background: var(--HM-bg);
    color: var(--HM-text);
    padding: 1rem;
}

.news-comment-textarea:focus {
    border-color: var(--HM-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.news-comment-submit {
    background: var(--HM-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-comment-submit:hover {
    background: var(--HM-primary-hover);
    transform: translateY(-1px);
}

.news-security-alert {
    background: var(--HM-bg);
    border: 1px solid var(--HM-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--HM-text-muted);
}

.news-comments-list {
    /* Comments will be styled when loaded */
}

/* Sidebar */
.news-sidebar-card {
    background: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.news-sidebar-card .card-body {
    padding: 1.5rem;
}

.news-sidebar-title {
    color: var(--HM-text);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Article Info Items */
.news-info-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--HM-border);
}

.news-info-item:last-child {
    border-bottom: none;
}

.news-info-label {
    color: var(--HM-text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-info-value {
    color: var(--HM-text);
    font-size: 0.9375rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Category and Tag Badges in Sidebar */
.news-category-badge-small {
    background: var(--HM-primary) !important;
    color: white !important;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.news-tag-small {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: white !important;
    font-size: 0.7rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
}

/* Club Link */
.news-club-link {
    color: var(--HM-primary);
    text-decoration: none;
    font-weight: 600;
}

.news-club-link:hover {
    text-decoration: underline;
}

/* Rating in Sidebar */
.news-rating-item {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.news-rating-display-small {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.news-rating-percentage-small {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
}

.news-rating-count-small {
    color: var(--HM-text-muted);
    font-size: 0.875rem;
}

/* Rating Actions in Sidebar */
.news-rating-actions-sidebar {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--HM-border);
}

.news-rating-btn-small {
    flex: 1;
    background: var(--HM-bg);
    border: 1px solid var(--HM-border);
    color: var(--HM-text);
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.news-rating-btn-small:hover {
    background: var(--HM-primary);
    color: white;
    border-color: var(--HM-primary);
}

.news-rating-btn-small.active {
    background: var(--HM-primary);
    color: white;
    border-color: var(--HM-primary);
}

/* Share Buttons in Sidebar */
.news-share-sidebar {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--HM-border);
}

.news-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.news-share-btn-small {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--HM-bg);
    border: 1px solid var(--HM-border);
    border-radius: 6px;
    color: var(--HM-text);
    transition: all 0.3s ease;
}

.news-share-btn-small:hover {
    background: var(--HM-primary);
    color: white;
    border-color: var(--HM-primary);
    transform: translateY(-2px);
}

/* Related Articles */
.news-related-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.news-related-item {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.news-related-item:hover {
    background: var(--HM-bg);
}

.news-related-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.news-related-image-placeholder {
    width: 80px;
    height: 60px;
    background: var(--HM-bg);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.news-related-image-placeholder i {
    color: var(--HM-text-muted);
    opacity: 0.3;
}

.news-related-content {
    flex: 1;
    min-width: 0;
}

.news-related-title {
    color: var(--HM-text);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-related-date {
    color: var(--HM-text-muted);
    font-size: 0.75rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .news-article {
        padding: 1.5rem;
    }

    .news-article-view-title {
        font-size: 1.75rem;
    }

    .news-article-view-meta {
        gap: 1rem;
    }

    .news-article-view-content {
        font-size: 1rem;
    }

    .news-article-rating {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-comments-section {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .news-article {
        padding: 1rem;
    }

    .news-article-view-title {
        font-size: 1.5rem;
    }

    .news-article-view-meta {
        font-size: 0.875rem;
    }

    .news-comments-section {
        padding: 1rem;
    }

    .news-sidebar-card .card-body {
        padding: 1rem;
    }
}

/* Gallery Image Error Placeholder - Universal */
.image-error-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 1;
}

/* Color for admin pages */
[class*="adm-"] .image-error-placeholder,
.adm-content .image-error-placeholder {
    color: var(--adm-text-muted, var(--HM-text-muted));
}

/* Color for public pages */
.image-error-placeholder {
    color: var(--HM-text-muted);
}

.gallery-thumbnail .image-error-placeholder i {
    opacity: 0.3;
}

/* Hide broken image icon and alt text */
.gallery-thumbnail img[alt] {
    text-indent: -9999px;
    font-size: 0;
    color: transparent;
}

.gallery-thumbnail img {
    position: relative;
    min-height: 1px;
}

/* When image fails to load */
.gallery-thumbnail img[src=""],
.gallery-thumbnail img:not([src]) {
    opacity: 0;
}

/* Gallery Preview Error Placeholder - Universal */
.gallery-preview-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-align: center;
    padding: 3rem;
}

/* Color for admin pages */
[class*="adm-"] .gallery-preview-error,
.adm-content .gallery-preview-error {
    color: var(--adm-text-muted, var(--HM-text-muted));
}

/* Color for public pages */
.gallery-preview-error {
    color: var(--HM-text-muted);
}

.gallery-preview-error i {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.gallery-preview-error p {
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.6;
}

/* =========================
   GALLERY DELETE MODAL
   ========================= */

[data-bs-theme="dark"] #galleryDeleteModal .modal-content {
    background-color: var(--HM-card-bg);
    border: 1px solid var(--HM-border);
    color: var(--HM-text);
}

[data-bs-theme="dark"] #galleryDeleteModal .modal-header {
    border-bottom-color: var(--HM-border);
}

[data-bs-theme="dark"] #galleryDeleteModal .modal-footer {
    border-top-color: var(--HM-border);
}

[data-bs-theme="dark"] #galleryDeleteModal .modal-title,
[data-bs-theme="dark"] #galleryDeleteModal .modal-body {
    color: var(--HM-text);
}

[data-bs-theme="dark"] #galleryDeleteModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Light mode */
[data-bs-theme="light"] #galleryDeleteModal .modal-content {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #212529;
}

/* Title warning icon */
#galleryDeleteModal .modal-title i {
    color: #f59e0b;
}

/* Danger button */
#galleryDeleteModal .btn-danger {
    background-color: #dc2626;
    border-color: #dc2626;
}

#galleryDeleteModal .btn-danger:hover {
    background-color: #b91c1c;
    border-color: #b91c1c;
}

/* Secondary button in dark mode */
[data-bs-theme="dark"] #galleryDeleteModal .btn-secondary {
    background-color: var(--HM-card-bg);
    border-color: var(--HM-border);
    color: var(--HM-text);
}

[data-bs-theme="dark"] #galleryDeleteModal .btn-secondary:hover {
    background-color: var(--HM-hover);
    border-color: var(--HM-border);
}


/* =========================
   EVENT SEARCH PAGE STYLES
   Note: These styles should be appended to base.css
   ========================= */

/* Page Header */
.event-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.event-page-title {
    color: var(--HM-text);
    font-weight: 700;
    margin-bottom: 1rem;
}

.event-page-title i {
    color: var(--HM-primary);
    margin-right: 1rem;
}

.event-page-subtitle {
    color: var(--HM-text-muted);
}

/* Search Filter Card */
.event-search-card {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
}

.event-search-card .card-body {
    padding: 1.5rem;
}

.event-filter-label {
    color: var(--HM-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.event-filter-label i {
    margin-right: 0.25rem;
}

/* Results Count & Sort */
.event-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.event-results-count {
    color: var(--HM-text-muted);
}

.event-results-count i {
    margin-right: 0.5rem;
}

.event-sort-select {
    min-width: 250px;
    font-size: 0.9rem;
}

/* Empty State */
.event-empty-state {
    text-align: center;
    padding: 3rem 0;
}

.event-empty-state i {
    color: var(--HM-text-muted);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.event-empty-state h3,
.event-empty-state p {
    color: var(--HM-text-muted);
}

/* Loading Indicator */
.event-loading {
    text-align: center;
    padding: 3rem 0;
    display: none;
}

.event-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--HM-primary);
}

.event-loading p {
    margin-top: 1rem;
    color: var(--HM-text-muted);
}

/* Event Card */
.event-article-card {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    height: 200px;
}

.event-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Event Image Container */
.event-article-image {
    position: relative;
    aspect-ratio: 16 / 9;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--HM-card-bg);
    border-right: 2px solid var(--HM-border);
}

.event-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-article-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--HM-card-bg);
}

.event-article-image-placeholder i {
    color: var(--HM-text-muted) !important;
    opacity: 0.3 !important;
    font-size: 3rem !important;
}

/* Category Badge */
.event-category-badge {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0.5rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.75rem;
}

/* Date Badge */
.event-date-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    margin: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.event-date-badge i {
    margin-right: 0.3rem;
}

/* Event Body */
.event-article-body {
    background: var(--HM-card-bg);
    padding: 12px 1rem !important;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.event-article-title {
    color: var(--HM-text);
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 700;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-article-snippet {
    color: var(--HM-text-muted);
    line-height: 1.4;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Event Tags */
.event-article-tags {
    margin-top: auto;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--HM-border);
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

.event-tag {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
    color: white !important;
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
    display: inline-block;
    margin-right: 0.25rem;
    border-radius: 4px;
}

.event-tag-more {
    background: var(--HM-border) !important;
    color: var(--HM-text-muted) !important;
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
    display: inline-block;
    border-radius: 4px;
}

/* Event Footer */
.event-article-footer {
    flex-shrink: 0;
}

.event-article-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--HM-text-muted);
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.event-meta-item i {
    font-size: 0.7rem;
    opacity: 0.8;
}

.event-meta-separator {
    opacity: 0.5;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .event-page-title {
        font-size: 2rem;
    }

    .event-page-title i {
        margin-right: 0.5rem;
    }

    .event-results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .event-sort-select {
        min-width: 100%;
    }

    .event-article-card {
        flex-direction: column;
        height: auto;
    }

    .event-article-image {
        aspect-ratio: 16 / 9;
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 2px solid var(--HM-border);
    }

    .event-article-body {
        padding: 1rem;
    }

    .event-article-title {
        font-size: 1rem;
    }

    .event-article-meta {
        gap: 0.5rem;
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .event-meta-separator {
        display: none;
    }
}

@media (max-width: 576px) {
    .event-page-header {
        margin-bottom: 2rem;
    }

    .event-page-title {
        font-size: 1.5rem;
    }

    .event-search-card .card-body {
        padding: 1rem;
    }

    .event-article-image-placeholder i {
        font-size: 3rem;
    }

    .event-category-badge,
    .event-date-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* =========================
   CLUB SEARCH PAGE
   ========================= */

/* Page Header */
.clubs-page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.clubs-page-title {
    color: var(--HM-text);
    font-weight: 700;
    margin-bottom: 1rem;
}

.clubs-page-title i {
    color: var(--HM-primary);
    margin-right: 1rem;
}

.clubs-page-subtitle {
    color: var(--HM-text-muted);
}

/* Search Card */
.clubs-search-card {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
}

.clubs-search-card .card-body {
    padding: 1.5rem;
}

.clubs-filter-label {
    color: var(--HM-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.clubs-filter-label i {
    margin-right: 0.25rem;
}

/* Results Header - same as news/events */
.clubs-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.clubs-results-count {
    color: var(--HM-text-muted);
}

.clubs-results-count i {
    margin-right: 0.5rem;
}

.clubs-sort-select {
    min-width: 250px;
    font-size: 0.9rem;
}

/* Empty State */
.clubs-empty-state {
    text-align: center;
    padding: 3rem 0;
}

.clubs-empty-state i {
    color: var(--HM-text-muted);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.clubs-empty-state h3,
.clubs-empty-state p {
    color: var(--HM-text-muted);
}

/* Loading Indicator */
.clubs-loading {
    text-align: center;
    padding: 3rem 0;
    display: none;
}

.clubs-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: var(--HM-primary);
}

.clubs-loading p {
    margin-top: 1rem;
    color: var(--HM-text-muted);
}

/* Club Card (3 columns) */
.club-card {
    background: var(--HM-card-bg);
    border-radius: 12px;
    border: 1px solid var(--HM-border);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.club-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Club Image with Overlay */
.club-card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--HM-card-bg);
}

.club-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.club-card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--HM-primary) 0%, var(--HM-primary-hover) 100%);
}

.club-card-image-placeholder i {
    color: white;
    opacity: 0.5;
    font-size: 4rem;
}

/* Country Flag (Top Right) */
.club-country-flag {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
}

.club-country-flag .fi {
    font-size: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Club Name Overlay (centered on image) - NO BACKGROUND */
.club-name-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    padding: 1rem 1.5rem;
}

.club-name-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow:
            -2px -2px 4px rgba(0, 0, 0, 0.9),
            2px -2px 4px rgba(0, 0, 0, 0.9),
            -2px 2px 4px rgba(0, 0, 0, 0.9),
            2px 2px 4px rgba(0, 0, 0, 0.9),
            0 0 8px rgba(0, 0, 0, 0.8);
}

/* Club Card Body */
.club-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.club-card-description {
    color: var(--HM-text);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.club-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--HM-border);
}

.club-card-footer small {
    color: var(--HM-text-muted);
    font-size: 0.85rem;
}

.club-card-footer i {
    color: var(--HM-primary);
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .club-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .club-name-text {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .clubs-page-title {
        font-size: 2rem;
    }

    .clubs-page-title i {
        margin-right: 0.5rem;
    }

    .clubs-results-header {
        flex-direction: column;
        align-items: stretch;
    }

    .clubs-sort-select {
        min-width: 100%;
    }

    .club-card-image {
        height: 200px;
    }

    .club-name-text {
        font-size: 1.1rem;
    }

    .club-name-overlay {
        padding: 0.75rem 1rem;
    }

    .club-country-flag .fi {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .clubs-page-header {
        margin-bottom: 2rem;
    }

    .clubs-page-title {
        font-size: 1.5rem;
    }

    .clubs-search-card .card-body {
        padding: 1rem;
    }

    .club-card-image {
        height: 180px;
    }

    .club-country-flag {
        top: 0.5rem;
        right: 0.5rem;
    }

    .club-country-flag .fi {
        font-size: 1.25rem;
    }
}


/* =========================
   INDEX PAGE - HOMEPAGE
   ========================= */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--HM-primary) 0%, var(--HM-primary-hover) 100%);
    background-image: url('/images/hero-firefighter.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Hero Animations */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-scroll-indicator i {
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.hero-scroll-indicator:hover {
    transform: translateX(-50%) translateY(-5px);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* History Section */
.history-section {
    background: var(--HM-body-bg);
}

.history-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.history-image-wrapper.image-reveal {
    opacity: 1;
    transform: translateX(0);
}

.history-image {
    width: 100%;
    height: auto;
    display: block;
}

.history-image-placeholder {
    width: 100%;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--HM-primary) 0%, var(--HM-primary-hover) 100%);
}

.history-image-placeholder i {
    color: white;
    opacity: 0.5;
}

.section-title {
    color: var(--HM-text);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: var(--HM-primary);
}

.section-text {
    color: var(--HM-text);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Timeline Section */
.timeline-section {
    background: var(--HM-card-bg);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--HM-primary);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.timeline-item.timeline-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 0;
    margin-right: calc(50% + 30px);
    text-align: right;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: calc(50% + 30px);
    margin-right: 0;
    text-align: left;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--HM-primary);
    border: 4px solid var(--HM-card-bg);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 0 0 4px var(--HM-primary-light);
}

.timeline-content {
    background: var(--HM-body-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--HM-border);
}

.timeline-year {
    color: var(--HM-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-title {
    color: var(--HM-text);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.timeline-description {
    color: var(--HM-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Features Section */
.features-section {
    background: var(--HM-body-bg);
}

.feature-card {
    background: var(--HM-card-bg);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--HM-border);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    height: 100%;
}

.feature-card.feature-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card:hover {
    border-color: var(--HM-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--HM-primary) 0%, var(--HM-primary-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2.5rem;
    color: white;
}

.feature-title {
    color: var(--HM-text);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--HM-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--HM-primary) 0%, var(--HM-primary-hover) 100%);
    color: white;
}

.cta-content {
    text-align: center;
    padding: 3rem 1rem;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .timeline::before {
        left: 30px;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 60px;
        margin-right: 0;
        text-align: left;
    }

    .timeline-marker {
        left: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }

    .cta-title {
        font-size: 2rem;
    }

    .cta-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .timeline-year {
        font-size: 1.2rem;
    }

    .timeline-title {
        font-size: 1.1rem;
    }
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .timeline-content {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .feature-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}


