/* ==========================================================================
   COMPONENT: CERTIFICATES — Premium Wall Design
   ========================================================================== */

.comp-certs {
    background: var(--bg-page, #F8F5EF); /* Wall-like color */
    padding: clamp(80px, 10vw, 140px) 0;
    overflow: hidden;
    position: relative;
    /* subtle wall texture using radial gradient */
    background-image: radial-gradient(#e6e2d6 1px, transparent 1px);
    background-size: 20px 20px;
}

.comp-certs .container { position: relative; z-index: 1; }

/* ── Header ── */
.comp-certs__header {
    text-align: center;
    margin-bottom: clamp(48px, 6vw, 72px);
}

.comp-certs__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold, #C9A96E);
    margin-bottom: var(--space-4, 1rem);
}
.comp-certs__eyebrow::before,
.comp-certs__eyebrow::after {
    content: '';
    display: inline-block;
    width: 24px; height: 2px;
    background: var(--gold, #C9A96E);
    border-radius: 2px;
}

.comp-certs__title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: clamp(2.5rem, 4vw, 3.8rem);
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
    line-height: 1.1;
    margin: 0;
}

/* ── Text Credentials Grid ── */
.comp-certs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6, 1.5rem);
    margin-bottom: clamp(80px, 10vw, 120px);
}

.comp-certs__item {
    background: #fff;
    border: 1px solid rgba(201,169,110,0.25);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(28,28,30,0.04);
}

.comp-certs__item:hover {
    border-color: var(--gold, #C9A96E);
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(201,169,110,0.15);
}

.comp-certs__frame {
    display: flex;
    align-items: center;
    gap: 16px;
}

.comp-certs__icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #fff, #f8f5ef);
    border: 1px solid rgba(201,169,110,0.4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold, #C9A96E);
    flex-shrink: 0;
    transition: all 0.4s ease;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.8);
}
.comp-certs__icon svg { width: 22px; height: 22px; }

.comp-certs__item:hover .comp-certs__icon {
    background: var(--gold, #C9A96E);
    color: #fff;
    border-color: var(--gold, #C9A96E);
}

.comp-certs__info h4 {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
    margin: 0 0 4px;
    line-height: 1.2;
}

.comp-certs__info p {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.875rem;
    color: var(--text-secondary, #4A4A52);
    margin: 0;
    line-height: 1.4;
}

/* ── Framed Certificates Wall ── */
.comp-certs__wall-section { }

.comp-certs__wall-header {
    text-align: center;
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--text-primary, #1C1C1E);
    margin-bottom: var(--space-10, 3rem);
    position: relative;
    padding-bottom: 20px;
}
.comp-certs__wall-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 2px;
    background: var(--gold, #C9A96E);
}

.comp-certs__wall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: start;
    perspective: 1000px;
}

.comp-certs__wall-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    transition: transform 0.4s ease;
}

.comp-certs__wall-item.is-tall {
    grid-row: span 2;
}

.comp-certs__wall-item:hover {
    /* Subtle 3D lift when hovering the whole piece */
    transform: translateY(-5px) scale(1.02);
}

/* The Frame */
.cert-frame-outer {
    /* Dark wood/matte black frame effect */
    background: #1a1a1a;
    padding: 14px;
    border-radius: 4px;
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.15),
        0 4px 12px rgba(0,0,0,0.2),
        inset 0 1px 2px rgba(255,255,255,0.1),
        inset 0 -1px 2px rgba(0,0,0,0.5);
    border: 1px solid #111;
    position: relative;
    width: 100%;
}

.cert-frame-inner {
    background: #000;
    padding: 2px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

/* The Matting */
.cert-matting {
    /* Cream textured matting */
    background: #FAFAFA;
    padding: 24px;
    box-shadow: 
        inset 0 1px 4px rgba(0,0,0,0.2),
        inset 0 0 10px rgba(0,0,0,0.05);
    /* subtle paper texture */
    background-image: url('data:image/svg+xml;utf8,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.03"/></svg>');
}

/* The Canvas/Image area */
.cert-canvas {
    position: relative;
    background: #fff;
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.15),
        inset 0 0 0 1px rgba(0,0,0,0.05);
    overflow: hidden;
}

.cert-canvas img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    /* The paper inside */
}

/* Glass Reflection Overlay */
.cert-glass {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.4) 0%,
        rgba(255,255,255,0) 30%,
        rgba(255,255,255,0) 70%,
        rgba(255,255,255,0.05) 100%
    );
    pointer-events: none;
    z-index: 2;
    mix-blend-mode: overlay;
}

/* The Plaque */
.cert-plaque {
    background: linear-gradient(to bottom, #d4af37, #aa8529); /* Gold brass look */
    padding: 10px 24px;
    border-radius: 3px;
    text-align: center;
    position: relative;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 1px rgba(255,255,255,0.5),
        inset 0 -1px 2px rgba(0,0,0,0.3);
    border: 1px solid #8e6c1e;
    min-width: 60%;
    max-width: 90%;
}

.cert-plaque__title {
    font-family: var(--font-display, 'Cormorant Garamond', serif);
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c2514; /* Deep brown/black engraved look */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}

.cert-plaque__sub {
    font-family: var(--font-body, 'DM Sans', sans-serif);
    font-size: 0.75rem;
    color: #4a3e21;
    margin: 2px 0 0;
    font-weight: 500;
    text-shadow: 0 1px 0 rgba(255,255,255,0.3);
}

/* Plaque Screws */
.cert-plaque__screw {
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: linear-gradient(to bottom, #f3d472, #9a7620);
    box-shadow: 
        inset 0 1px 2px rgba(255,255,255,0.8),
        inset 0 -1px 1px rgba(0,0,0,0.5),
        0 1px 1px rgba(0,0,0,0.3);
}
.cert-plaque__screw::after {
    /* screw slot */
    content: '';
    position: absolute;
    top: 50%; left: 10%;
    width: 80%; height: 1px;
    background: rgba(0,0,0,0.4);
    transform: translateY(-50%) rotate(45deg);
}

.cert-plaque__screw--tl { top: 6px; left: 6px; }
.cert-plaque__screw--tr { top: 6px; right: 6px; }
.cert-plaque__screw--bl { bottom: 6px; left: 6px; }
.cert-plaque__screw--br { bottom: 6px; right: 6px; }

/* Rotate screw slots slightly randomly */
.cert-plaque__screw--tr::after { transform: translateY(-50%) rotate(-15deg); }
.cert-plaque__screw--bl::after { transform: translateY(-50%) rotate(80deg); }
.cert-plaque__screw--br::after { transform: translateY(-50%) rotate(-45deg); }


/* ── GSAP Init States ── */
.gsap-cert-head { opacity: 0; transform: translateY(30px); }
.gsap-cert-item { opacity: 0; transform: translateY(40px) scale(0.95); }

/* ── Responsive ── */
@media (max-width: 991px) {
    .comp-certs__wall-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
    .comp-certs__wall-item.is-tall { grid-row: span 1; }
}

@media (max-width: 575px) {
    .comp-certs__wall-grid { grid-template-columns: 1fr; gap: 40px; }
    .cert-matting { padding: 16px; }
}