/* --------------------------------------------------
   Global Card Styles Patch
   -------------------------------------------------- */

/* All cards get 1px primary (blue) border */
.card {
    border: 1px solid #000066 !important;
    border-radius: 0.375rem !important;
}

/* All card headers get primary theme (blue) */
.card-header {
    background-color: #000066 !important;
    color: #ffffff !important;
    border-bottom: 1px solid #000044 !important;
    font-weight: 600 !important;
}

/* Ensure headings and text inside headers have proper color and no borders */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header p,
.card-header span,
.card-header a {
    color: #ffffff !important;
    border: none !important;
}

/* Buttons inside headers remain visible */
.card-header .btn {
    font-weight: 600;
}

/* =========================================
   EMAIL CARD STYLES (Source of Truth)
   ========================================= */

:root {
    --brand-primary: #000000;
    --text-color-dark: #1a1a1a;
    --text-color-light: #555555;
    --background-color: #eef1f5;
}

.custom-card {
    background-color: #ffffff;
    width: 340px;
    height: 200px;
    border-radius: 16px;
    border-top: 5px solid var(--brand-primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0 auto;
    /* Center by default if in container */
}

.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card-main-content {
    display: flex;
    flex-direction: row;
    flex: 1;
    position: relative;
}

.card-image-section {
    width: 120px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image-section img.photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image-section img.logo {
    max-width: 100px;
    height: auto;
}

.card-logo-corner {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 52px;
    opacity: 0.9;
}

.card-text-section {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0 0 2px 0;
    color: var(--brand-primary);
    line-height: 1.2;
}

.card-subtitle {
    font-size: 9px;
    color: var(--text-color-light);
    text-transform: uppercase;
    margin: 0 0 10px 0;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.contact-item img {
    width: 16px;
    height: 16px;
}

.contact-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-color-dark);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-card .card-footer {
    background-color: #000000;
    color: #ffffff;
    padding: 6px;
    text-align: center;
    font-size: 10px;
    font-style: italic;
    width: 100%;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.custom-card {
    animation: fadeInUp 0.5s ease forwards;
}

/* Responsive Grid for Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    justify-items: center;
    width: 100%;
}