/* ===========================================
   Certificates & Awards — Doctor J
   =========================================== */

/* Page Header */
.cert-page-header {
    position: relative;
    height: 52vh;
    min-height: 360px;
    background-image: url('../../interior/DSC01696-HDR.jpg');
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.cert-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(20,55,24,0.88), rgba(14,100,110,0.78));
}

.cert-header-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    padding: 0 20px;
}

.cert-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 18px;
    backdrop-filter: blur(4px);
}

.cert-header-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    margin-bottom: 16px;
    text-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.cert-header-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
}

/* Shared Section Styles */
.cert-section {
    padding: 88px 0;
    background: var(--white);
}

.cert-alt-bg {
    background: #f8f9fa;
}

.cert-section-header {
    margin-bottom: 52px;
    text-align: center;
}

.cert-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    background: rgba(45,135,53,0.08);
    padding: 6px 18px;
    border-radius: 50px;
    border: 1px solid rgba(45,135,53,0.18);
    margin-bottom: 14px;
}

.cert-section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--gray-900);
    font-weight: 700;
    margin-bottom: 8px;
}

.cert-section-desc {
    color: var(--gray-500);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* =========================================
   AWARDS CARDS
   ========================================= */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    margin: 0 auto;
}

.award-card {
    position: relative;
    border-radius: 24px;
    padding: 48px 40px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.award-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
}

.award-gold {
    background: linear-gradient(145deg, #2a1a00, #4a3000);
    color: white;
}

.award-silver {
    background: linear-gradient(145deg, #0d3b22, #1e6b3a);
    color: white;
}

.award-card-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}

.award-gold .award-card-glow {
    background: radial-gradient(circle, #f5c842, transparent 70%);
}

.award-silver .award-card-glow {
    background: radial-gradient(circle, #5ef09a, transparent 70%);
}

.award-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    position: relative;
    z-index: 1;
}

.award-gold .award-icon-wrap {
    background: rgba(245,200,66,0.2);
    color: #f5c842;
    border: 2px solid rgba(245,200,66,0.4);
}

.award-silver .award-icon-wrap {
    background: rgba(94,240,154,0.2);
    color: #5ef09a;
    border: 2px solid rgba(94,240,154,0.35);
}

.award-year {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.65;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.award-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.award-body {
    font-size: 0.92rem;
    line-height: 1.75;
    opacity: 0.82;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.award-body strong {
    opacity: 1;
    font-weight: 700;
}

.award-issuer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 8px 20px;
    border-radius: 50px;
    position: relative;
    z-index: 1;
}

.award-gold .award-issuer {
    background: rgba(245,200,66,0.15);
    border: 1px solid rgba(245,200,66,0.3);
    color: #f5c842;
}

.award-silver .award-issuer {
    background: rgba(94,240,154,0.12);
    border: 1px solid rgba(94,240,154,0.3);
    color: #5ef09a;
}

/* =========================================
   FELLOWSHIP GRID
   ========================================= */
.fellowship-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fellowship-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--white);
    border-radius: 16px;
    padding: 28px 24px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    transition: transform 0.3s, box-shadow 0.3s;
}

.fellowship-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.09);
}

.fellowship-highlight {
    border-left: 4px solid var(--primary);
}

.fellowship-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(45,135,53,0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s;
}

.fellowship-card:hover .fellowship-icon {
    background: var(--primary);
    color: white;
}

.fellowship-abbr {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
    background: rgba(45,135,53,0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.fellowship-body h4 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 6px 0 6px;
    line-height: 1.35;
}

.fellowship-body p {
    font-size: 0.83rem;
    color: var(--gray-500);
    line-height: 1.55;
    margin: 0;
}

/* =========================================
   CERTIFICATES GALLERY — Display Only
   ========================================= */

/* Group divider between portrait and landscape sections */
.cert-group-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 32px 0 12px;
    margin-top: 12px;
}

.cert-group-divider::before,
.cert-group-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(45,135,53,0.25), transparent);
}

.cert-group-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    background: rgba(45,135,53,0.08);
    padding: 7px 20px;
    border-radius: 50px;
    border: 1px solid rgba(45,135,53,0.2);
    white-space: nowrap;
}


.cert-gallery-section {
    background: #f2f4f2;
}

.cert-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Card */
.cert-card {
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06), 0 8px 28px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.09), 0 20px 50px rgba(0,0,0,0.11);
}

/* Image frame — aspect ratio set per orientation so images fill the frame */
.cert-img-frame {
    position: relative;
    background: linear-gradient(160deg, #faf8f4 0%, #ede9e0 100%);
    padding: 16px;
    overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Landscape certificates: wider than tall */
.cert-img-frame.landscape {
    aspect-ratio: 4 / 3;
}

/* Portrait certificates: taller than wide */
.cert-img-frame.portrait {
    aspect-ratio: 3 / 4;
}

/* Decorative corner brackets */
.cert-img-frame::before,
.cert-img-frame::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: rgba(45,135,53,0.3);
    border-style: solid;
    z-index: 2;
    pointer-events: none;
}

.cert-img-frame::before {
    top: 8px;
    left: 8px;
    border-width: 2px 0 0 2px;
}

.cert-img-frame::after {
    bottom: 8px;
    right: 8px;
    border-width: 0 2px 2px 0;
}

/* Certificate image */
.cert-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    pointer-events: none;         /* prevents direct drag/click on the img */
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

/* Security overlay — sits above the image, blocks all interaction */
.cert-security-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: transparent;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Number badge */
.cert-num-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
    box-shadow: 0 2px 8px rgba(45,135,53,0.45);
    pointer-events: none;
    letter-spacing: 0.2px;
}

/* Card info */
.cert-card-body {
    padding: 14px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.cert-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cert-card-cat {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(45,135,53,0.09);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.cert-card-year {
    font-size: 0.73rem;
    font-weight: 700;
    color: var(--gray-400);
    white-space: nowrap;
}

.cert-card-title {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.5;
    margin: 0;
}

/* CTA */
.cert-cta {
    background: linear-gradient(135deg, #1a5220, #0a6b73);
    padding: 72px 0;
}

.cert-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.cert-cta-inner h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    color: white;
    margin-bottom: 10px;
}

.cert-cta-inner p {
    color: rgba(255,255,255,0.8);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 440px;
}

.cert-cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 1024px) {
    .cert-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 900px) {
    .fellowship-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .awards-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 600px) {
    .fellowship-grid {
        grid-template-columns: 1fr;
    }

    .cert-gallery {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cert-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cert-cta-actions {
        justify-content: center;
    }
}
