/* ═══════════════════════════════════════════
   ÖZKAN YILDIZ — Certificates Page Styles v2
   Premium redesign with timeline + icon style
═══════════════════════════════════════════ */

.certificates-page {
  padding-top: 100px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.certificates-page h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 7vw, 5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: .6rem;
  background: linear-gradient(135deg, var(--a3), var(--a1));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fu .9s .4s forwards;
  overflow-wrap: break-word;
  word-break: break-word;
  padding: 0 1rem;
}

.page-sub {
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
  letter-spacing: .12em;
  margin-bottom: 4rem;
  opacity: 0;
  animation: fu .9s .6s forwards;
}

.certificates-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 3rem 6rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ─────────────── CERTIFICATE CARD ─────────────── */
.certificate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s, transform .7s;
}

.certificate-card.vis {
  opacity: 1;
  transform: translateY(0);
}

/* Colored top bar accent */
.certificate-card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--a1), var(--a2));
  border-radius: 20px 20px 0 0;
}

.certificate-card:nth-child(3n+2)::before {
  background: linear-gradient(90deg, var(--a2), var(--a4));
}
.certificate-card:nth-child(3n+3)::before {
  background: linear-gradient(90deg, var(--a3), var(--a1));
}

/* Hover glow overlay */
.certificate-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at var(--mx,50%) var(--my,50%), rgba(124,108,255,.07), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}

.certificate-card:hover::after {
  opacity: 1;
}

.certificate-card:hover {
  background: var(--surface2);
  border-color: rgba(124,108,255,.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  transition: opacity .7s, transform .3s, background .3s, border-color .3s, box-shadow .3s;
}

/* ─────────────── CARD INNER ─────────────── */
.cert-inner {
  padding: 2.5rem;
}

/* ─────────────── CARD HEADER ─────────────── */
.cert-header {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.cert-icon {
  font-size: 2.2rem;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124,108,255,.1);
  border: 1px solid rgba(124,108,255,.2);
  border-radius: 14px;
}

.cert-meta {
  flex: 1;
}

.cert-category {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--a1);
  margin-bottom: .4rem;
  display: block;
}

.certificate-card:nth-child(3n+2) .cert-category { color: var(--a2); }
.certificate-card:nth-child(3n+3) .cert-category { color: var(--a3); }

.certificate-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
}

/* ─────────────── DESCRIPTION TEXT ─────────────── */
.description {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.description a {
  color: var(--a1);
  text-decoration: none;
  border-bottom: 1px solid rgba(124,108,255,.3);
  transition: color .2s, border-color .2s;
  cursor: none;
}

.description a:hover {
  color: var(--a3);
  border-color: var(--a3);
}

.list {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.list li {
  font-size: .92rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: .5rem;
}

/* ─────────────── DIVIDER ─────────────── */
.cert-divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ─────────────── GALLERY ─────────────── */
.certificate-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.2rem;
}

.certificate-gallery a {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .3s, transform .3s, box-shadow .3s;
  cursor: none;
  flex: 1 1 200px;
  max-width: 300px;
}

.certificate-gallery a:hover {
  border-color: rgba(124,108,255,.5);
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 48px rgba(124,108,255,.25);
}

.certificate-gallery img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
  transition: transform .4s;
  filter: brightness(.85);
}

.certificate-gallery a:hover img {
  transform: scale(1.06);
  filter: brightness(1);
}

/* ─────────────── RESPONSIVE ─────────────── */
@media screen and (max-width: 768px) {
  .certificates-container {
    padding: 1.5rem 1rem 4rem;
    overflow-x: hidden;
  }

  .cert-inner {
    padding: 1.4rem 1.2rem;
  }

  .cert-header {
    flex-wrap: wrap;
    gap: .9rem;
  }

  .certificate-title {
    font-size: 1.05rem;
    word-break: break-word;
  }

  .description {
    word-break: break-word;
  }

  .certificate-gallery {
    gap: .75rem;
  }

  .certificate-gallery a {
    flex: 1 1 140px;
    max-width: 100%;
  }

  .certificate-gallery img {
    height: 130px;
  }
}
