/* ==========================================================================
   Teducas — Widget Certificado de Finalización
   ========================================================================== */

.tcert-wrapper {
    width: 100%;
    position: relative;
}

/* ─── Cabecera ────────────────────────────────────────────────────────────── */
.tcert-header {
    margin-bottom: 40px;
}

.tcert-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #c9a84c;
    margin-bottom: 12px;
}

.tcert-title {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    color: #f0ece4;
    margin: 0 0 12px;
    line-height: 1.2;
}

.tcert-description {
    font-size: 16px;
    color: #a09a90;
    margin: 0;
    max-width: 600px;
    line-height: 1.65;
}

/* Centro automático en layouts centrados */
.tcert-layout--centered .tcert-header[style*="center"] .tcert-description,
.tcert-layout--floating .tcert-header[style*="center"] .tcert-description {
    margin-left: auto;
    margin-right: auto;
}

/* ─── Área de contenido ───────────────────────────────────────────────────── */
.tcert-content-area {
    display: flex;
    justify-content: center;
}

/* ─── Layout: centrado ───────────────────────────────────────────────────── */
.tcert-layout--centered .tcert-content-area {
    justify-content: center;
}

/* ─── Layout: fullwidth ──────────────────────────────────────────────────── */
.tcert-layout--fullwidth .tcert-image-wrap {
    max-width: 100% !important;
    width: 100%;
}

/* ─── Layout: lado a lado ────────────────────────────────────────────────── */
.tcert-layout--side_by_side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.tcert-layout--side_by_side .tcert-header {
    margin-bottom: 0;
}

.tcert-layout--side_by_side .tcert-content-area {
    justify-content: stretch;
}

.tcert-layout--side_by_side .tcert-image-wrap {
    max-width: 100% !important;
    width: 100%;
}

.tcert-layout--side_by_side.tcert-side--right {
    direction: rtl;
}

.tcert-layout--side_by_side.tcert-side--right > * {
    direction: ltr;
}

.tcert-layout--side_by_side .tcert-badges {
    grid-column: 1 / -1;
}

@media (max-width: 767px) {
    .tcert-layout--side_by_side {
        grid-template-columns: 1fr;
    }
    .tcert-layout--side_by_side.tcert-side--right {
        direction: ltr;
    }
}

/* ─── Layout: flotante ───────────────────────────────────────────────────── */
.tcert-layout--floating {
    text-align: center;
    padding: 60px 32px;
    position: relative;
    overflow: hidden;
}

.tcert-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.tcert-deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(201,168,76,0.12);
}

.tcert-deco-circle--1 {
    width: 500px;
    height: 500px;
    top: -200px;
    right: -150px;
}

.tcert-deco-circle--2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -80px;
    border-color: rgba(201,168,76,0.07);
}

.tcert-layout--floating .tcert-header,
.tcert-layout--floating .tcert-content-area,
.tcert-layout--floating .tcert-badges {
    position: relative;
    z-index: 1;
}

/* ─── Imagen ──────────────────────────────────────────────────────────────── */
.tcert-image-wrap {
    display: inline-block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform .35s ease, box-shadow .35s ease;
    max-width: 720px;
    width: 100%;
    line-height: 0;
}

.tcert-image-wrap img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: inherit;
    transition: filter .35s ease, transform .35s ease;
}

/* ─── Hover effects ──────────────────────────────────────────────────────── */
.tcert-hover--lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}

.tcert-hover--scale:hover {
    transform: scale(1.03);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.tcert-hover--glow:hover {
    box-shadow: 0 0 40px rgba(201,168,76,0.45), 0 16px 40px rgba(0,0,0,0.25);
    transform: translateY(-4px);
}

.tcert-hover--tilt {
    transform-style: preserve-3d;
    perspective: 1200px;
}

/* ─── Marca de agua ──────────────────────────────────────────────────────── */
.tcert--watermark {
    cursor: default;
}

.tcert-watermark-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13,13,13,0.45);
    z-index: 2;
    pointer-events: none;
    border-radius: inherit;
}

.tcert-watermark-text {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: #f0ece4;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    pointer-events: none;
}

/* ─── Placeholder ────────────────────────────────────────────────────────── */
.tcert-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(201,168,76,0.05);
    border: 2px dashed rgba(201,168,76,0.25);
    border-radius: inherit;
    padding: 60px 32px;
    gap: 16px;
    min-height: 240px;
}

.tcert-placeholder-icon {
    font-size: 64px;
    line-height: 1;
}

.tcert-placeholder p {
    color: #7a756d;
    font-size: 14px;
    text-align: center;
    margin: 0;
    max-width: 260px;
    line-height: 1.5;
}

/* ─── Insignias ──────────────────────────────────────────────────────────── */
.tcert-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
}

.tcert-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tcert-badge-icon {
    display: flex;
    align-items: center;
}

.tcert-badge-icon i,
.tcert-badge-icon svg {
    font-size: 18px;
    width: 18px;
    color: #c9a84c;
    fill: #c9a84c;
}

.tcert-badge-text {
    font-size: 14px;
    color: #d4cfc7;
    font-weight: 500;
}

/* ─── Animaciones de entrada ─────────────────────────────────────────────── */
.tcert-entrance--fade-up,
.tcert-entrance--fade-in,
.tcert-entrance--zoom-in {
    opacity: 0;
    transition-property: opacity, transform;
    transition-timing-function: cubic-bezier(.22, .61, .36, 1);
    transition-duration: 700ms;
}

.tcert-entrance--fade-up  { transform: translateY(40px); }
.tcert-entrance--zoom-in  { transform: scale(.9); }
.tcert-entrance--fade-in  { transform: none; }

.tcert-entrance--fade-up.tcert--visible,
.tcert-entrance--fade-in.tcert--visible,
.tcert-entrance--zoom-in.tcert--visible {
    opacity: 1;
    transform: none;
}
