/* ================ */
/* CERTIFICACAO.CSS */
/* ================ */

:root{
  /* Page background (single image for the whole page) */
  --page-bg-image: url("../img/certif/certif5.webp");

  --page-bg-size: 120%;
  --page-bg-opacity: 0.50;
}

.cert-section{
  padding-top: 54px;
  padding-bottom: 72px;
}

/* Hero enrichment */
.hero-note{
  margin-top: 14px;
  max-width: 84ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-note-text{
  text-align: center;
  margin: 0;
}

/* keep highlight cards */
.hero-highlights{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-hl{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(15,23,42,.08);
  color: rgba(15,23,42,.75);
  font-weight: 650;
  font-size: 13px;
  text-align: center;

  min-height: 48px;
  display: grid;
  place-items: center;
}

/* Grid pattern */
.cert-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: stretch;
}

/* Variant: swap widths (small left, big right) */
.cert-grid.cert-grid-rev{
  grid-template-columns: .85fr 1.15fr;
}

/* Glass card */
.cert-card{
  border-radius: 18px;
  padding: 18px;

  /* allow actions to pin to the bottom corner like Home */
  display: flex;
  flex-direction: column;
}

.cert-card-title{
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -.01em;
}

.cert-card-subtitle{
  margin: 0 0 14px;
  color: rgba(15,23,42,.70);
  font-size: 15px;
}

.cert-actions{
  margin-top: auto;           /* push actions to the bottom */
  display: flex;
  justify-content: flex-end;  /* bottom-right corner */
  align-items: center;
}
.cert-actions-left{
  justify-content: flex-start; /* bottom-left corner for this specific card */
}

.cert-actions .btn{
  width: auto;
}

.extra-margin{
  margin-top: -14px;
}

/* ticks */
.ticks{
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ticks li{
  padding-left: 26px;
  position: relative;
  color: rgba(15,23,42,.78);
}

.ticks li::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(69,117,180,.20);
  border: 2px solid rgba(69,117,180,.45);
  position: absolute;
  left: 0;
  top: 7px;
}

/* tags */
.tag-row{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.tag{
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 14px;

  background: rgba(255,255,255,.35);
  border: 1px solid rgba(15,23,42,.10);

  color: rgba(15,23,42,.72);
  font-weight: 650;
  font-size: 13px;
}

/* Certifications matrix */
.cert-matrix{
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* header pills */
.cert-pill{
  border-radius: 18px;
  padding: 14px 14px;
  min-height: 56px;

  display: grid;
  place-items: center;

  background: rgba(255,255,255,.45);
  border: 1px solid rgba(15,23,42,.10);

  color: rgba(15,23,42,.78);
  font-weight: 900;
  letter-spacing: .01em;
  text-align: center;
}

.cert-pill-span{
  grid-column: 2 / 4; /* spans FSC + PEFC columns */
}

/* mini explain cards inside the certifications block */
.cert-mini{
  border-radius: 18px;
  padding: 16px;

  background: rgba(255,255,255,.45);
  border: 1px solid rgba(15,23,42,.10);
}

/* ISO mini gets the logo */
.cert-mini-iso .muted-p{
  margin-top: 8px;
}

.iso-logo-wrap{
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.iso-logo{
  width: min(90px, 70%);
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 20px rgba(15,23,42,.10));
}

.cert-mini-title{
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: -.01em;
}

/* small note below */
.cert-logos-note{
  margin-top: 12px;
  text-align: center;
  max-width: 80ch;
  margin-left: auto;
  margin-right: auto;
  color: rgba(15,23,42,.70);
  font-size: small;
}

/* Old custom CTA styles removed: CTA now uses shared base component */

/* -------------------------------------------------------
   BACKGROUND SAFETY RULES (aspect/orientation-based)
   ------------------------------------------------------- */

/* Tall portrait (phones, portrait tablets, tall devtools) */
@media (orientation: portrait) and (max-aspect-ratio: 3/4){
  :root{
    --page-bg-image: url("../img/certif/certif5m.webp");
    --page-bg-size: 180%;
    --page-bg-pos-y: 50%;
  }
}

/* 4:3-ish landscape (1024×768, 1440×1080, etc.) */
@media (orientation: landscape) and (max-aspect-ratio: 4/3){
  :root{
    --page-bg-size: 170%;
    --page-bg-pos-y: 50%;
  }
}

/* -------------------------------------------------------
   “MOBILE/TABLET” BEHAVIOUR UNDER 1440px (touch only)
   ------------------------------------------------------- */
@media (max-width: 1440px) and (hover: none) and (pointer: coarse){

  :root{
    --page-bg-size: 170%;
  }

  .cert-grid{ grid-template-columns: 1fr; }
  .cert-grid.cert-grid-rev{ grid-template-columns: 1fr; }
  .hero-highlights{ grid-template-columns: 1fr; }

  .cert-matrix{
    grid-template-columns: 1fr;
  }
  .cert-pill-span{
    grid-column: auto;
  }

  /* Mobile/tablet: centered + stretched buttons (like Home) */
  .cert-actions{
    margin-top: 18px;
    justify-content: center;
  }
  .cert-actions .btn{
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

/* Background tuning for small viewports (desktop resize / devtools included) */
@media (max-width: 980px){
  :root{
    --page-bg-size: 200%;
  }
}

/* Keep the background swap only for very small screens */
@media (max-width: 450px){

  :root{
    --page-bg-image: url("../img/certif/certif5m.webp");
    --page-bg-size: 350%;
  }
}