/**
 * Custom CSS for Download Package Templates
 * Enhances Bootstrap styling with custom colors and effects
 */

/* ===== Variables (Flatsome Theme Matching) ===== */
:root {
    --wvdp-primary: #c83e2e;
    /* Flatsome primary red */
    --wvdp-primary-dark: #a32e20;
    --wvdp-secondary: #1D2939;
    --wvdp-border-radius: 12px;
    /* Flatsome border radius */
    --wvdp-box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    /* Flatsome shadow */
}

/* ===== Grid Layout Fixes (Override Flatsome) ===== */
/* Force Bootstrap grid to work properly */
.row.row-cols-lg-3 {
    display: flex !important;
    flex-wrap: wrap !important;
}

.row.row-cols-lg-3>.col {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* 3 columns on large screens */
@media (min-width: 992px) {
    .row.row-cols-lg-3>.col {
        flex: 0 0 auto !important;
        width: 33.333333% !important;
        max-width: 33.333333% !important;
    }
}

/* 2 columns on medium screens */
@media (min-width: 768px) and (max-width: 991.98px) {
    .row.row-cols-md-2>.col {
        flex: 0 0 auto !important;
        width: 50% !important;
        max-width: 50% !important;
    }
}

/* 1 column on small screens */
@media (max-width: 767.98px) {
    .row.row-cols-1>.col {
        flex: 0 0 auto !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}


/* ===== Bootstrap Overrides ===== */
.btn-primary {
    background-color: var(--wvdp-primary);
    border-color: var(--wvdp-primary);
}

.btn-primary:hover {
    background-color: var(--wvdp-primary-dark);
    border-color: var(--wvdp-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 45, 32, 0.3);
}

.btn-outline-primary {
    color: var(--wvdp-primary) !important;
    border: none;
    font-size: 600;
    background: rgb(248 250 252);
}

.card:hover .btn-outline-primary {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
}

.badge.bg-primary {
    background-color: rgb(239 246 255) !important;
    border-color: rgb(219 234 254) !important;
    color: rgb(37 99 235) !important;
    font-size: 600;
}

.page-download p {
    margin-bottom: 0.5rem;
}

.text-primary {
    color: var(--wvdp-primary) !important;
}

a {
    color: var(--wvdp-primary);
}

a:hover {
    color: var(--wvdp-primary-dark);
}

/* ===== Cards (Flatsome Style) ===== */
.card {
    border-radius: var(--wvdp-border-radius) !important;
    /* transition: all 0.3s ease; */
    /* border: none !important; */
    background-color: #fff !important;
    border: rgb(226 232 240) 1px solid !important;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -5px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.04) !important;
}

.main-content .card:hover {
    border-color: rgb(217 45 32) !important;
}

.card-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 600;
}

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

.card-body {
    padding: 1.25rem !important;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0rem;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: #9ca3af;
}

.breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--wvdp-primary);
}

.breadcrumb-item.active {
    color: var(--wvdp-primary);
    font-weight: 500;
}

/* ===== Sidebar ===== */
/* .card.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
} */

/* ===== Form Controls ===== */
.form-control:focus,
.form-check-input:focus {
    border-color: var(--wvdp-primary);
    box-shadow: 0 0 0 0.2rem rgba(217, 45, 32, 0.25);
}

.form-check-input:checked {
    background-color: var(--wvdp-primary);
    border-color: var(--wvdp-primary);
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.badge.bg-secondary {
    background-color: #6b7280 !important;
}

/* ===== Icons ===== */
.bi {
    vertical-align: middle;
}

/* ===== Accordion ===== */
.accordion-button:not(.collapsed) {
    background-color: #fef2f2;
    color: var(--wvdp-primary);
}

.accordion-button:focus {
    border-color: var(--wvdp-primary);
    box-shadow: 0 0 0 0.2rem rgba(217, 45, 32, 0.25);
}

/* ===== Sticky Sidebar ===== */
.sticky-top {
    top: 2rem;
    z-index: 99;
}

/* ===== List Group ===== */
.list-group-item-action:hover {
    background-color: #f9fafb;
    color: var(--wvdp-primary);
}

/* ===== Pagination ===== */
.pagination .page-link {
    color: var(--wvdp-primary);
    border-color: #e5e7eb;
}

.pagination .page-link:hover {
    background-color: #fef2f2;
    border-color: var(--wvdp-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--wvdp-primary);
    border-color: var(--wvdp-primary);
}

/* ===== Responsive Utilities ===== */
@media (max-width: 991.98px) {
    .sticky-top {
        position: relative !important;
        top: 0 !important;
    }
}

/* ===== Custom Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.card {
    animation: fadeIn 0.3s ease-out;
}

/* ===== File Type Icons ===== */
.bi-file-earmark-pdf {
    color: #dc2626;
}

.bi-file-earmark-zip {
    color: #f59e0b;
}

.bi-file-earmark-text {
    color: #3b82f6;
}

/* ===== Download Button Special Styling ===== */
.btn-primary.btn-lg {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary.btn-lg:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(217, 45, 32, 0.4);
}

/* ===== Search Box Enhancement ===== */
.input-group .btn-primary {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ===== Category Filter Enhancement ===== */
.form-check-label {
    cursor: pointer;
    width: 100%;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.form-check-label:hover {
    color: var(--wvdp-primary);
}

/* ===== Content Styling ===== */
.content {
    line-height: 1.8;
    color: #374151;
}

.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6 {
    color: #1f2937;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.content p {
    margin-bottom: 1rem;
}

.content ul,
.content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--wvdp-border-radius);
    margin: 1rem 0;
}

/* ===== Border Accent ===== */
.border-start.border-primary {
    border-left-width: 4px !important;
    border-left-color: var(--wvdp-primary) !important;
}

/* ===== Share Buttons ===== */
.btn-sm {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

.wvdp-share-buttons .btn {
    transition: all 0.3s ease;
    width: 100%;
}

.item-menus .badge {
    height: auto;
}

.wvdp-share-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== Smooth Transitions ===== */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

button,
a,
input,
select,
textarea {
    transition-duration: 200ms;
}