/* =========================
   Certificates Page Styles
   ========================= */

/* ===== OVA Brand Identity ===== */
:root {
  /* Colors */
  --ova-green: #6fcfba;
  --ova-green-dark: #4fae99;
  --ova-green-soft: #e9f6f2;

  --ova-black: #0f172a;
  --ova-gray-900: #1e293b;
  --ova-gray-700: #475569;
  --ova-gray-500: #64748b;
  --ova-gray-300: #cbd5e1;
  --ova-gray-200: #e5e7eb;
  --ova-gray-100: #f8fafc;

  --ova-white: #ffffff;

  /* Typography */
  --font-main: var(--font-ar), var(--font-en), system-ui, -apple-system, sans-serif;

  --fs-hero: clamp(2.2rem, 4vw, 3.2rem);
  --fs-h1: clamp(1.8rem, 3vw, 2.4rem);
  --fs-h2: 1.6rem;
  --fs-h3: 1.25rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;

  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* Radius */
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  /* Spacing */
  --space-2: 6px;
  --space-4: 12px;
  --space-6: 18px;
  --space-8: 28px;
  --space-10: 40px;

  /* Effects */
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 16px 40px rgba(15, 23, 42, 0.08);
  --transition: all .35s cubic-bezier(.4,0,.2,1);
}

/* ===== Page Layout ===== */
.certificates-hero {
  padding-top: 160px;
  padding-bottom: 60px;
  background: #FBFBFA; /* Same as index.html */
}

.certificates-hero .container-custom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 18px;
}

@media(min-width:1024px) {
  .certificates-hero .container-custom {
    padding: 0 120px;
  }
}

.cert-kicker {
  color: var(--ova-green);
  font-weight: 900;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  font-size: 11px;
  direction: ltr;
  text-align: center;
  margin-bottom: 10px;
}

.cert-title {
  margin: 10px 0 0;
  color: var(--ova-black);
  font-weight: 900;
  font-size: clamp(2.0rem, 5vw, 3.1rem);
  letter-spacing: -0.5px;
  line-height: 1.1;
  text-align: center;
}

.cert-subtitle {
  margin-top: 14px;
  color: var(--ova-gray-700);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Certificate Cards Grid ===== */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-top: 60px;
  padding-bottom: 100px;
}

@media(min-width: 768px) {
  .cert-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10);
  }
}

@media(min-width: 1280px) {
  .cert-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10);
  }
}

/* ===== Certificate Card ===== */
.cert-card {
  background: var(--ova-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.cert-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* ===== Certificate Image Section - Full Background ===== */
.cert-media {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
  background: var(--ova-gray-200);
}

.cert-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Black overlay with small opacity */
.cert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
  pointer-events: none;
}

/* Small logo centered in the card - on top of everything */
.cert-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.cert-badge img {
  height: 80px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1); /* White logo */
}

.cert-tag {
  display: none; /* Hide tag text, only show logo */
}

/* ===== Certificate Body ===== */
.cert-body {
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  flex: 1;
  background: var(--ova-white);
  position: relative;
  z-index: 1;
}

.cert-card-title {
  margin: 0;
  font-weight: 900;
  color: var(--ova-black);
  font-size: var(--fs-h3);
  line-height: 1.4;
  text-align: center;
}

.cert-card-desc {
  margin: 0;
  font-weight: 400;
  color: var(--ova-gray-700);
  font-size: var(--fs-body);
  line-height: 1.7;
  text-align: justify;
  flex: 1;
}

/* ===== Responsive Adjustments ===== */
@media(max-width: 767px) {
  .cert-media {
    height: 240px;
  }
  
  .cert-body {
    padding: var(--space-6) var(--space-4);
  }
  
  .cert-card-title {
    font-size: 1.1rem;
  }
  
  .cert-card-desc {
    font-size: 0.9rem;
  }
}

/* ===== Mobile Menu Overlay ===== */
#mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 26, 22, 0.96);
  z-index: 20000;
  display: none;
  flex-direction: column;
  padding: 90px 18px 24px;
  color: white;
  overflow-y: auto;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#mobile-menu-overlay.show {
  display: flex;
}

@media (min-width: 1024px) {
  #mobile-menu-overlay {
    display: none !important;
  }
}

/* ===== Data-lang visibility ===== */
[data-lang] {
  display: none;
}

html[lang="ar"] [data-lang="ar"],
html[lang="en"] [data-lang="en"] {
  display: block;
}

span[data-lang] {
  display: none;
}

html[lang="ar"] span[data-lang="ar"],
html[lang="en"] span[data-lang="en"] {
  display: inline;
}
