/* Card Bootstrap Dynamic - Sistema Independente */
.cbd-wrapper {
    margin: 20px 0;
}

.cbd-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.cbd-row > [class*="col-"] {
    padding: 0 15px;
    margin-bottom: 30px;
    box-sizing: border-box;
}

/* Grid System próprio */
.col-12 { width: 100%; }
.col-12.col-md-6 { width: 100%; }
.col-12.col-lg-4 { width: 100%; }
.col-12.col-lg-3 { width: 100%; }

@media (min-width: 768px) {
    .col-12.col-md-6 { width: 50%; }
}

@media (min-width: 992px) {
    .col-12.col-md-6.col-lg-4 { width: 33.333%; }
    .col-12.col-md-6.col-lg-3 { width: 25%; }
}

/* Card Styles */
.cbd-card {
    background: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cbd-style-hover-shadow .cbd-card {
    transition: box-shadow 0.3s ease;
}

.cbd-style-hover-shadow .cbd-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Card Image */
.cbd-card-image {
    overflow: hidden;
    position: relative;
}

.cbd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cbd-style-hover-shadow .cbd-card:hover .cbd-card-image img {
    transform: scale(1.05);
}

/* Card Body */
.cbd-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cbd-card-title {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.cbd-card-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

.cbd-card-description p:last-child {
    margin-bottom: 0;
}

/* Card Button */
.cbd-card-button {
    display: inline-block;
    padding: 8px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
    text-align: center;
    margin-top: auto;
    align-self: flex-start;
}

.cbd-card-button:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Modal Styles - Totalmente independente */
.cbd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.cbd-modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.cbd-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.cbd-modal-container {
    position: relative;
    z-index: 2;
    width: 90%;
    max-width: 800px;
    animation: cbd-modal-slide 0.3s ease;
}

.cbd-modal-container.size-sm { max-width: 400px; }
.cbd-modal-container.size-lg { max-width: 900px; }
.cbd-modal-container.size-xl { max-width: 1140px; }

@keyframes cbd-modal-slide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cbd-modal-content {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.cbd-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.cbd-modal-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cbd-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.cbd-modal-close:hover {
    color: #333;
}

.cbd-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.cbd-modal-body img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.cbd-modal-body p:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .cbd-card-body {
        padding: 15px;
    }
    
    .cbd-card-title {
        font-size: 1.1rem;
    }
    
    .cbd-modal-container {
        width: 95%;
    }
    
    .cbd-modal-body {
        max-height: 60vh;
    }
}