/* === BADGE DETAILS PAGE === */

/* --- BADGE HEADER --- */
.badge-header {
    background: linear-gradient(to bottom, #3498db 0%, #6ab2e2 100%);
    padding: 15px 0;
}

.badge-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-header-logo img {
    max-height: 50px;
}

.badge-header-nav {
    display: flex;
    gap: 30px;
}

.badge-header-nav a {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.badge-header-nav a:hover {
    color: #e0e0e0;
    text-decoration: none;
}

.badge-header-back a {
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}

.badge-header-back a:hover {
    text-decoration: underline;
}

/* --- HERO SECTION --- */
.badge-hero {
    background: #051228;
    color: #d0dce8;
    padding: 50px 0 60px;
}

.badge-hero h1 {
    font-size: 42px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #4CA3DE;
}

.badge-hero p {
    font-size: 16px;
    line-height: 1.7;
}

.badge-hero-image {
    max-width: 220px;
    max-height: 220px;
    border-radius: 50%;
    margin-top: 10px;
}

/* --- DETAILS BAR --- */
.badge-details-bar {
    background: transparent;
    border: none;
    padding: 0;
}

.badge-details-bar .container {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.badge-details-items {
    max-width: 900px;
    margin: -50px auto 0 auto; /* Overlap .badge-hero */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(10,37,75,0.07);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.badge-detail-item {
    padding: 0 20px;
    border-right: 1px solid #ccc;
}

.badge-detail-item:last-child {
    border-right: none;
}

.badge-detail-item strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 2px;
}

.badge-detail-item span {
    font-size: 15px;
    color: #333;
}

.badge-detail-cta {
    margin-left: auto;
    border-right: none;
}

.badge-detail-cta .btn {
    font-size: 13px;
    padding: 12px 28px; /* less tall, more wide */
    min-width: 200px;
    max-width: 260px;
    white-space: normal; /* allow wrapping */
    line-height: 1.2;
    background-color: #79ab47;
    border-color: #79ab47;
    color: #fff;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
    word-break: break-word;
    text-align: center;
}

.badge-detail-cta .btn:hover {
    background-color: #6a9a3c;
    border-color: #6a9a3c;
}

/* --- CRITERIA / DETAILS SECTIONS --- */
.badge-criteria-section,
.badge-recipient-details-section,
.badge-other-section,
.badge-all-section,
.badge-publish-section {
    padding: 40px 0;
    border-bottom: 1px solid #e0e0e0;
}

.badge-criteria-section h2,
.badge-recipient-details-section h2,
.badge-other-section h2,
.badge-all-section h2,
.badge-publish-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: #024F7F;
    margin: 0 0 12px;
}

.badge-criteria-section > .container > .row > .col-sm-3 p,
.badge-all-section > .container > .row > .col-sm-3 p,
.badge-publish-section > .container > .row > .col-sm-3 p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.badge-publish-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-publish-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    padding: 16px 8px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    color: #024F7F;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.badge-publish-option:hover,
.badge-publish-option:focus {
    background: #eef4fb;
    border-color: #024F7F;
    color: #024F7F;
    text-decoration: none;
}

.badge-publish-option .fa {
    font-size: 22px;
    margin-bottom: 6px;
}

.badge-publish-option span {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-criteria-content,
.badge-recipient-details-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
}

/* --- BADGE LIST (other badges / all badges) --- */
.badge-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.badge-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background 0.2s;
}

.badge-list-item:hover {
    background: #eef1f5;
}

.badge-list-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.badge-list-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.badge-list-info a {
    color: #0a254b;
    text-decoration: none;
}

.badge-list-info a:hover {
    text-decoration: underline;
}

.badge-list-info strong {
    font-size: 15px;
    color: #0a254b;
}

.badge-list-info span {
    font-size: 13px;
    color: #666;
}

/* --- BADGE CARD GRID (User Badges page) --- */
.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.badge-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px 20px;
    text-align: center;
}

.badge-card-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 16px;
}

.badge-card-dates {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 16px;
    width: 100%;
}

.badge-card-date-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.badge-card-date-item + .badge-card-date-item {
    border-left: 2px solid #ccc;
}

.badge-card-date-item strong {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.badge-card-date-item span {
    font-size: 14px;
    color: #333;
}

.btn-badge-details {
    display: inline-block;
    background-color: #024F7F;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 24px;
    border-radius: 3px;
    text-decoration: none;
}

.btn-badge-details:hover,
.btn-badge-details:active,
.btn-badge-details:focus,
.btn-badge-details:visited {
    background-color: #013a5e;
    color: #fff;
    text-decoration: none;
}

.badge-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.badge-empty-state .btn {
    margin-top: 16px;
}

/* --- OPEN BADGE FOOTER --- */
.badge-open-badge-footer {
    background-color: #f0f2f5;
    padding: 20px 0;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #333;
}

.badge-open-badge-footer a {
    color: #0a254b;
    font-weight: 600;
    text-decoration: underline;
}

.badge-open-badge-footer a:hover {
    color: #79ab47;
}

.open-badge-icon {
    height: 20px;
    vertical-align: middle;
    margin-left: 5px;
}

/* --- RESPONSIVE --- */
@media (max-width: 767px) {
    .badge-header-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .badge-header-nav {
        flex-direction: column;
        gap: 10px;
    }

    .badge-header-back {
        display: none;
    }

    .badge-hero {
        padding: 30px 0 40px;
        text-align: center;
    }

    .badge-hero h1 {
        font-size: 30px;
    }

    .badge-hero-image {
        max-width: 160px;
        max-height: 160px;
        margin-top: 20px;
    }

    .badge-details-items {
        flex-direction: column;
        align-items: flex-start;
    }

    .badge-detail-item {
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 8px 0;
        width: 100%;
    }

    .badge-detail-cta {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .badge-detail-cta .btn {
        width: 100%;
    }
}
