:root{
  --ink:#0b2b55;
  --muted:#51627a;
  --card:#ffffff;
  --line:rgba(10,35,70,.12);
  --shadow: 0 18px 45px rgba(10,35,70,.12);
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:#f5f8ff;
}

/* page background */
.section-bg{
  position:fixed;
  inset:0;
  background:
    radial-gradient(900px 420px at 18% 60%, rgba(31,93,185,.18), transparent 60%),
    radial-gradient(900px 420px at 82% 35%, rgba(255,166,83,.18), transparent 60%),
    linear-gradient(180deg, #f7fbff 0%, #eef4ff 60%, #f8fbff 100%);
  pointer-events:none;
}

.wrap{
  position:relative;
  min-height:100vh;
  padding: clamp(18px, 3.2vw, 38px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 18px;
}

/* LOGO (double size) */
.portal-logo img{
  height:110px;
  width:auto;
}

.top{
  text-align:center;
  max-width: 760px;
}
.title{
  margin: 10px 0 6px;
  font-size: clamp(28px, 3.3vw, 48px);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.subtitle{
  margin:0;
  font-size: clamp(13px, 1.4vw, 16px);
  color: rgba(11,43,85,.70);
}

.cards{
  width:min(1120px, 100%);
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(14px, 2.4vw, 26px);
  align-items:stretch;
}

/* Card */
.card{
  display:flex;
  flex-direction:column;
  background:var(--card);
  border:1px solid var(--line);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: var(--shadow);
  text-decoration:none;
  color:inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-2px);
  border-color: rgba(10,35,70,.18);
  box-shadow: 0 22px 55px rgba(10,35,70,.16);
}

/* Image area: less padding, more height (but still CONTAIN) */
.card-media{
  background: transparent;
  height: 300px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px 6px;
}
.card-img{
  width:100%;
  height:100%;
  object-fit: contain;
}

/* Meta */
.card-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  padding: 14px 18px 16px;
  background: linear-gradient(180deg, rgba(245,248,255,.80) 0%, rgba(245,248,255,.55) 55%, rgba(245,248,255,.35) 100%);
  border-top:1px solid rgba(10,35,70,.06);
}
.card-title{
  font-weight: 900;
  font-size: 20px;
  line-height: 1.2;
  margin: 0 0 2px;
}
.card-desc{
  font-size: 13px;
  color: rgba(11,43,85,.70);
}
.card-arrow{
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display:grid;
  place-items:center;
  color: rgba(11,43,85,.90);
  background: rgba(11,43,85,.06);
  flex:0 0 auto;
}
.card-arrow svg{width:22px;height:22px}

.foot{
  margin-top: 6px;
  font-size: 12px;
  color: rgba(11,43,85,.55);
}

/* MOBILE: keep clean + fit without looking tiny */
@media (max-width: 760px){
  .wrap{padding:16px; gap:12px}
  .portal-logo img{height:80px}
  .cards{grid-template-columns:1fr; gap:12px}
  .card-media{height: 190px; padding: 8px 10px 4px;}
  .card-meta{padding: 10px 12px 12px}
  .card-title{font-size:16px}
  .card-desc{font-size:12px}
  .card-arrow{width:42px;height:42px;border-radius:12px}
  .foot{font-size:11px}
}

@media (max-width: 380px){
  .card-media{height: 170px}
  .title{font-size: 24px}
  .subtitle{font-size: 12px}
}
/* Product card image wrapper */
.product-card .image-box {
  overflow: hidden;            /* IMPORTANT */
  border-radius: 18px;         /* outer rounding */
}

/* Actual images */
.product-card .image-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;         /* image rounding */
  background: #ffffff;
}

/* Optional – very subtle premium depth (recommended) */
.product-card {
  box-shadow: 0 12px 30px rgba(10, 42, 90, 0.08);
}
/* CLEAN FIX — applies to your real HTML only */

/* Image container */
.card-media {
  background: #ffffff;
  padding: 14px;                 /* premium inner spacing */
  border-radius: 18px;
  overflow: hidden;
}

/* Image itself */
.card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  display: block;
}

/* Subtle premium depth (very light) */
.card {
  box-shadow: 0 14px 34px rgba(10, 42, 90, 0.08);
}
/* ===== FINAL IMAGE ROUNDING & PREMIUM FRAME (WORKING) ===== */

/* Image wrapper used in index.html */
.card-media {
  background: #ffffff;
  padding: 14px;                 /* premium inner frame */
  border-radius: 18px;
  overflow: hidden;              /* REQUIRED for rounding */
}

/* Actual image */
.card-img {
  width: 100%;
  height: 100%;
  object-fit: contain;           /* you wanted contain */
  border-radius: 14px;
  display: block;
}

/* Card depth – subtle, not flashy */
.card {
  box-shadow: 0 14px 34px rgba(10, 42, 90, 0.08);
}
/* ===== FINAL IMAGE ROUNDING & PREMIUM FRAME (FORCED) ===== */
.card-media{
  background:#ffffff !important;
  padding:14px !important;
  border-radius:18px !important;
  overflow:hidden !important;
}
.card-img{
  border-radius:14px !important;
  display:block !important;
}
/* =============================
   IMAGE FRAME (PREMIUM + VISIBLE)
   ============================= */

.card-media{
  background: rgba(11,43,85,.04);
  padding: 14px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(10,35,70,.10);
  margin: 14px 16px 0;          /* separation from card edge */
}

.card-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  background: #ffffff;
}
/* ===== FINAL POLISH (A: visible but subtle) ===== */

/* slightly stronger, cleaner frame */
.card-media{
  background: rgba(11,43,85,.05);
  border: 1px solid rgba(10,35,70,.12);
  border-radius: 20px;
  padding: 12px;                 /* tighter = more premium */
  margin: 14px 16px 0;           /* keep breathing space */
  overflow: hidden;
}

/* image rounding + no weird gaps */
.card-img{
  border-radius: 16px;
  background: #fff;
  display:block;
}

/* optional: make cards feel a bit richer (very subtle) */
.card{
  box-shadow: 0 16px 40px rgba(10,42,90,.10);
}
