/* Global styles */
body {
    background-color: #f8fafc !important;
}

/* Container */
.container {
    max-width: 90% !important;
    width: 90% !important;
}

/* Card styles */
.card {
    border-width: 1px;
    border-color: #e5e5e5;
    cursor: pointer;
}

.card.transition {
    transition: all 0.2s ease-in-out;
}

.card.transition:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    background-color: #f8fafc;
}

.card-container.histo .card.transition:hover {
    background-color: #ecfdf5;
}

.card-container.biogr .card.transition:hover {
    background-color: #eff6ff;
}

.card-container.geogr .card.transition:hover {
    background-color: #fff1f2;
}

/* Hover effects */
.hover-effect {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.hover-effect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Card body */
.card-body {
    padding: 0.5rem 1rem;  /* py-2 px-3 */
}

/* Text colors */
.text-gray-900 { 
    color: #111827 !important; 
}

.text-gray-500 { 
    color: #6b7280 !important; 
}

/* Category badges */
.badge {
    font-size: 0.75rem;
    letter-spacing: 0.025em;
    padding: 0.25rem 0.5rem;
    font-weight: 500 !important;
    border-radius: 0.25rem !important; /* rounded-pill */
}

/* Category colors */
.bg-blue-50 { background-color: #eff6ff !important; }
.bg-blue-100 { background-color: #dbeafe !important; }
.text-blue-800 { color: #1e40af !important; }

.bg-rose-50 { background-color: #fff1f2 !important; }
.bg-rose-100 { background-color: #ffe4e6 !important; }
.text-rose-800 { color: #9f1239 !important; }

.bg-emerald-50 { background-color: #ecfdf5 !important; }
.bg-emerald-100 { background-color: #d1fae5 !important; }
.text-emerald-800 { color: #065f46 !important; }

/* Layout utilities */
.card-container {
    margin-bottom: 1rem;
    transition: opacity 0.15s ease-out;
    display: block;
}

.card-container.hidden {
    opacity: 0;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    pointer-events: none;
}

/* Masonry grid */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}

.masonry-grid > .card-container {
    padding: 0 8px;
    margin-bottom: 16px;
    display: flex;
    width: 25%;
}

@media (max-width: 1400px) {
    .masonry-grid > .card-container {
        width: 33.333%;
    }
}

@media (max-width: 992px) {
    .masonry-grid > .card-container {
        width: 50%;
    }
}

@media (max-width: 576px) {
    .masonry-grid > .card-container {
        width: 100%;
    }
}

.masonry-grid > .card-container > .card {
    width: 100%;
}

/* Category toggle styles */
.form-check-input[type=checkbox] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff' stroke='%23ffffff' stroke-width='1'/%3e%3c/svg%3e") !important;
    border: 1px solid #d1d5db !important;
    background-color: #a2a3a5 !important;
    position: relative !important;
    background-repeat: no-repeat !important;
}

.form-check-input[type=checkbox]:checked.biogr {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

.form-check-input[type=checkbox]:checked.geogr {
    background-color: #9f1239 !important;
    border-color: #9f1239 !important;
}

.form-check-input[type=checkbox]:checked.histo {
    background-color: #065f46 !important;
    border-color: #065f46 !important;
}

/* Typography */
.page-title {
    font-size: 2rem;
    color: #64748b;
    margin: 0;
    padding: 0.5rem 0;
}

.header-container {
    padding: 0.5rem !important;
}

.fs-6 {
    font-size: 1rem !important;
}

.fw-normal {
    font-weight: normal !important;
}

.small {
    font-size: 0.875rem !important;
}

/* Typography - Card text */
.card-title {
    font-size: 1rem !important;  /* Smaller size */
    font-weight: semi-bold !important;
    margin-bottom: 0.25rem !important;
    color: #4b5563 !important;  /* Gray-600 for lighter text */
}

.card-subtitle {
    font-size: 0.80rem !important;  /* Even smaller for subtitle */
    color: #6b7280 !important;  /* Gray-500 for subtitle */
    margin-bottom: 0.25rem !important;
}

/* Entry page styles */
.entry-title {
    font-size: 1.7rem !important;
    color: #586679 !important;
    margin-bottom: 0.5rem !important;
}

.entry-subtitle {
    font-size: 1.2rem !important;
    color: #8896a8 !important;
    margin-top: 0.5rem !important;
}

/* Links */
a {
    color: #1f1f1e !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

a:hover {
    color: #8d0000 !important;
    /* font-weight: 700 !important; */
}

/* Form elements */
.form-check-input {
    border: none;
    width: 2.5em;
    height: 1.25em;
    margin-top: 0.125em;
}

.form-check-input:focus {
    box-shadow: none;
    border-color: transparent;
}

/* Utility classes */
.rounded-md {
    border-radius: 0.375rem;
}

.fw-medium {
    font-weight: 500;
}

/* Content styles */
.entry-text {
    text-align: justify;
    margin-top: 1.5rem;
    color: #6c757d;  /* text-secondary */
}

/* Category card layout */
.category-card {
    flex: 0 0 auto;
    width: 50%;
    margin-bottom: 1rem;
}

@media (min-width: 992px) {
    .category-card {
        width: 33.333%;
    }
}

@media (max-width: 576px) {
    .category-card {
        width: 100%;
    }
}

.category-card-body {
    display: flex;
    flex-direction: column;
}

.category-toggle {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    margin: 0.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Entry container */
.entry-container {
    width: 75%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 3rem;
    background-color: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.popover-wide {
    max-width: 400px !important;
}