/**
 * PRAMENO — Application Guide Page
 * ag-* namespace
 */

/* ─────────────────────────────────────────
   Hero
───────────────────────────────────────── */
.ag-hero {
  position: relative;
  background-color: #cce0ee;
  background-image: url('/assets/img/ez-water-cosmetic.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 420px;
  display: flex;
  align-items: center;
  padding: 64px 0;
  overflow: hidden;
}

/* No overlay — show full image. Variants (.ag-hero--bev/--sil) re-enable their own overlay via display:block */
.ag-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  display: none;
  z-index: 1;
}

.ag-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.ag-hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 700;
  line-height: 1.22;
  color: var(--pr-color-primary);
  margin: 14px 0 22px;
  letter-spacing: -0.02em;
}

.ag-hero-lead {
  font-size: 17px;                     /* 15px → 17px (한 단계 위) */
  line-height: 1.8;                     /* 1.78 → 1.8 */
  color: #000;                         /* pure black for max visibility */
  font-weight: 500;                    /* semi-bold for legibility */
  max-width: 640px;                    /* 420 → 640 (3-line → 2-line wrap) */
  margin: 0 auto;
  text-shadow: 0 1px 6px rgba(255,255,255,0.55);  /* subtle white glow on light hero */
}

/* ─────────────────────────────────────────
   Shared layout
───────────────────────────────────────── */
.ag-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 40px;
}

.ag-section {
  padding: 64px 0;
}

.ag-section--alt {
  background: #f5f9fc;
}

/* ─────────────────────────────────────────
   Section label (eyebrow)
───────────────────────────────────────── */
.ag-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--pr-color-secondary);
  margin-bottom: 10px;
}

.ag-label--light {
  color: rgba(130, 210, 240, 0.8);
}

/* ─────────────────────────────────────────
   Section headings
───────────────────────────────────────── */
.ag-h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--pr-color-primary);
  margin: 0 0 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.ag-h2--light {
  color: #fff;
}

.ag-p {
  font-size: 17px;          /* 15px → 17px (섹션 본문 단락) */
  line-height: 1.8;          /* 1.78 → 1.8 (가독성 향상) */
  color: var(--pr-color-text);
  margin: 0 0 20px;
}

/* ─────────────────────────────────────────
   Callout box (Core Idea)
───────────────────────────────────────── */
.ag-callout {
  background: #e5f3fa;
  border-left: 3px solid var(--pr-color-secondary);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 28px;
}

.ag-callout-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: rgba(14, 108, 167, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pr-color-secondary);
}

.ag-callout-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--pr-color-secondary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ag-callout-text {
  font-size: 16.5px;        /* 14.5px → 16.5px (콜아웃 박스 본문) */
  line-height: 1.75;         /* 1.72 → 1.75 */
  color: var(--pr-color-primary);
  font-weight: 500;
  margin: 0;
}

.ag-callout-text em {
  font-style: normal;
  color: var(--pr-color-secondary);
  font-weight: 700;
}

/* ─────────────────────────────────────────
   7 Feature cards grid
───────────────────────────────────────── */
.ag-feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 36px;
  counter-reset: ag-feat;
}

/* 7th card: stays in natural flow (first column of 3rd row) */
.ag-feat-card {
  background: #fff;
  border: 1px solid var(--pr-color-border);
  border-radius: 12px;
  padding: 22px 20px 24px;
  transition: box-shadow 0.22s var(--ease-soft, ease);
  counter-increment: ag-feat;
  /* Grid layout — icon left, title right (same row); description spans both below */
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
}

.ag-feat-card:hover {
  box-shadow: 0 6px 24px rgba(0, 60, 100, 0.09);
}

.ag-feat-card-top {
  display: flex;
  align-items: center;
  margin-bottom: 0;  /* was 14px — grid handles spacing now */
}

.ag-feat-ic {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ag-feat-ic svg {
  width: 19px;
  height: 19px;
  stroke: #fff;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ag-feat-ic--text {
  font-family: var(--pr-font-data, monospace);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0;
}

/* .ag-feat-num span removed from HTML — number is now generated by CSS counter
   on .ag-feat-title::before so it appears inline with the title. */

.ag-feat-title {
  font-size: 18px;    /* 16px → 18px */
  font-weight: 700;
  color: var(--pr-color-primary);
  margin: 0;          /* was 0 0 8px — grid handles spacing */
  line-height: 1.4;
  align-self: center; /* vertically center title with icon */
}
.ag-feat-title::before {
  content: counter(ag-feat, decimal-leading-zero) ". ";
  color: var(--pr-color-secondary);
  font-family: var(--pr-font-data);
}

.ag-feat-desc {
  font-size: 15px;          /* 13px → 15px */
  line-height: 1.7;          /* 1.68 → 1.7 (가독성 향상) */
  color: var(--pr-color-text);
  margin: 14px 0 0;          /* small gap below the icon+title row */
  grid-column: 1 / -1;       /* span both grid columns (full width) */
}

/* Icon colors */
.ag-ic-blue   { background: #1a6da8; }
.ag-ic-teal   { background: #0b8a8a; }
.ag-ic-green  { background: #3a8a58; }
.ag-ic-rose   { background: #b84e78; }
.ag-ic-violet { background: #5060b0; }
.ag-ic-orange { background: #c46820; }
.ag-ic-navy   { background: #1a3460; }

/* ─────────────────────────────────────────
   Application table — dark navy section
───────────────────────────────────────── */
.ag-app-section {
  background: #fff;
  padding: 64px 0;
  border-top: 1px solid var(--pr-color-border);
  border-bottom: 1px solid var(--pr-color-border);
}
/* Override --light modifiers when used inside white ag-app-section */
.ag-app-section .ag-h2--light { color: var(--pr-color-primary); }
.ag-app-section .ag-label--light { color: var(--pr-color-secondary); }

.ag-app-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 28px;
  font-size: 14px;
  border-radius: 10px;
  overflow: hidden;
}

.ag-app-table thead th {
  background: var(--pr-neutral-50);
  color: var(--pr-color-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ag-app-table thead th:first-child { width: 22%; }

.ag-app-table tbody tr {
  border-bottom: 1px solid var(--pr-color-border);
  transition: background 0.18s ease;
}

.ag-app-table tbody tr:last-child {
  border-bottom: none;
}

.ag-app-table tbody tr:hover {
  background: var(--pr-ez-50);
}

.ag-app-table tbody td {
  padding: 15px 18px;
  color: var(--pr-color-text);
  vertical-align: middle;
}

.ag-app-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--pr-color-primary) !important;
  white-space: nowrap;
}

.ag-app-ico {
  width: 32px;
  height: 32px;
  background: var(--pr-teal-50);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ag-app-ico svg {
  width: 15px;
  height: 15px;
  stroke: var(--pr-color-reduction);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ag-app-table tbody td:nth-child(2) {
  color: var(--pr-color-muted);
}

.ag-app-table tbody td:nth-child(3) {
  color: var(--pr-color-reduction);
  font-weight: 600;
}

/* ─────────────────────────────────────────
   Live Demo section
───────────────────────────────────────── */
.ag-demo-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: flex-start;
  margin-top: 36px;
}

/* Image version of ORP meter */
.ag-demo-meter-img {
  width: 100%;
}
.ag-demo-meter-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* Styled ORP meter card */
.ag-demo-meter {
  background: linear-gradient(155deg, #08233e, #0d3258);
  border-radius: 16px;
  padding: 28px 24px 24px;
  text-align: center;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.ag-demo-meter::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, #0e8ab0, #4cc9f0, #0e8ab0);
}

.ag-meter-brand {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(100, 200, 235, 0.65);
  margin-bottom: 14px;
}

.ag-meter-screen {
  background: #020d18;
  border-radius: 10px;
  padding: 24px 16px 20px;
  border: 1px solid rgba(14, 138, 180, 0.28);
  margin-bottom: 14px;
}

.ag-meter-val {
  font-family: var(--pr-font-data, 'JetBrains Mono', monospace);
  font-size: 54px;
  font-weight: 700;
  color: #4cc9f0;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ag-meter-unit {
  font-size: 15px;
  font-weight: 500;
  color: rgba(76, 201, 240, 0.65);
  margin-top: 6px;
  letter-spacing: 0.06em;
}

.ag-meter-note {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

.ag-demo-text > p {
  font-size: 15px;
  line-height: 1.78;
  color: var(--pr-color-text);
  margin: 0 0 28px;
}

.ag-demo-steps {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 8px;
}

.ag-demo-step {
  flex: 1;
  text-align: center;
}

.ag-demo-step-num {
  width: 38px;
  height: 38px;
  background: var(--pr-color-secondary, #1a8bc4);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin: 0 auto 10px;
  flex-shrink: 0;
}

.ag-demo-step p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--pr-color-text);
  margin: 0;
}

.ag-demo-step strong {
  display: block;
  font-size: 13px;
  color: var(--pr-color-secondary);
  margin-bottom: 4px;
}

/* ─────────────────────────────────────────
   Responsive
───────────────────────────────────────── */
@media (max-width: 820px) {
  .ag-hero {
    min-height: 340px;
    padding: 48px 0;
  }
  .ag-container {
    padding: 0 24px;
  }
}

@media (max-width: 720px) {
  .ag-feat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ag-demo-grid {
    grid-template-columns: 1fr;
  }
  .ag-demo-meter {
    max-width: 260px;
    margin: 0 auto;
  }
  .ag-demo-meter-img {
    max-width: 260px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .ag-hero {
    min-height: 320px;
  }
  .ag-feat-grid {
    grid-template-columns: 1fr;
  }
  .ag-app-table {
    font-size: 12.5px;
  }
  .ag-app-table thead th,
  .ag-app-table tbody td {
    padding: 12px 12px;
  }
  .ag-demo-steps {
    flex-direction: column;
    align-items: stretch;
  }
  .ag-demo-step {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
  }
  .ag-demo-step-num {
    margin: 0;
    flex-shrink: 0;
  }
}

/* ═══════════════════════════════════════════
   BEVERAGES PAGE EXTENSIONS
═══════════════════════════════════════════ */

/* Hero — beverages: full background image, centered text */
.ag-hero--bev {
  background-color: #b8d8ea;
  background-image: url('/assets/img/ez-water-beverage.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 420px;
  justify-content: center;
}

/* White overlay to reduce image intensity for text readability */
.ag-hero--bev::before {
  display: block;
  background: rgba(255, 255, 255, 0.45);
}

/* Center the inner text block */
.ag-hero--bev .ag-container {
  display: flex;
  justify-content: center;
}

.ag-hero--bev .ag-hero-inner {
  max-width: 640px;
  text-align: center;
}

.ag-hero--bev .ag-hero-inner h1 {
  color: var(--pr-color-primary);
  text-shadow: 0 1px 12px rgba(255,255,255,0.7);
}

.ag-hero--bev .ag-hero-lead {
  color: #000;
  max-width: 640px;
  text-shadow: 0 1px 8px rgba(255,255,255,0.6);
  font-weight: 500;
}

.ag-hero--bev .pr-hero-eyebrow {
  text-shadow: 0 1px 8px rgba(255,255,255,0.5);
}

/* Hero — silicon: same pattern, image will be uploaded later */
.ag-hero--sil {
  background-color: #d6cfe6;
  background-image: url('/assets/img/ez-silicon-product.webp');
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 420px;
  justify-content: center;
}
.ag-hero--sil::before {
  display: block;
  background: rgba(255, 255, 255, 0.45);
}
.ag-hero--sil .ag-container {
  display: flex;
  justify-content: center;
}
.ag-hero--sil .ag-hero-inner {
  max-width: 640px;
  text-align: center;
}
.ag-hero--sil .ag-hero-inner h1 {
  color: var(--pr-color-primary);
  text-shadow: 0 1px 12px rgba(255,255,255,0.7);
}
.ag-hero--sil .ag-hero-lead {
  color: #000;
  max-width: 640px;
  text-shadow: 0 1px 8px rgba(255,255,255,0.6);
  font-weight: 500;
}
.ag-hero--sil .pr-hero-eyebrow {
  text-shadow: 0 1px 8px rgba(255,255,255,0.5);
}

/* 2-col category grid (for 4 items) */
.ag-cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 36px;
}

/* Shelf-life comparison card */
.ag-shelf-card {
  background: #fff;
  border: 1px solid var(--pr-color-border);
  border-radius: 14px;
  padding: 32px 28px;
  margin-top: 32px;
}

.ag-shelf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--pr-color-border);
}

.ag-shelf-col {
  padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--pr-color-border);
}

.ag-shelf-col:last-child {
  border-right: none;
  background: linear-gradient(160deg, #f0faff, #e4f4fa);
}

.ag-shelf-col-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pr-color-muted);
  margin-bottom: 14px;
}

.ag-shelf-col:last-child .ag-shelf-col-head {
  color: var(--pr-color-secondary);
}

.ag-shelf-val {
  font-family: var(--pr-font-data, monospace);
  font-size: 22px;
  font-weight: 700;
  color: #c04040;
  margin-bottom: 6px;
}

.ag-shelf-col:last-child .ag-shelf-val {
  color: var(--pr-color-reduction, #0b7a5a);
}

.ag-shelf-sub {
  font-size: 12px;
  color: var(--pr-color-muted);
  line-height: 1.5;
}

/* Regulatory table (dark section) — 2-col allowed/disallowed */
.ag-reg-table thead th.ag-th-ok {
  color: var(--pr-color-reduction);
}

.ag-reg-table thead th.ag-th-no {
  color: var(--pr-coral-600, #c44545);
}

.ag-reg-table tbody td.ag-td-ok {
  color: var(--pr-color-reduction);
  font-weight: 500;
}

.ag-reg-table tbody td.ag-td-ok::before {
  content: '✓ ';
  font-weight: 700;
}

.ag-reg-table tbody td.ag-td-no {
  color: var(--pr-coral-600, #c44545);
  font-weight: 500;
}

.ag-reg-table tbody td.ag-td-no::before {
  content: '✕ ';
  font-weight: 700;
}

/* Export CTA section */
.ag-export-section {
  background: #f5f9fc;
  padding: 64px 0;
}

.ag-export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 36px;
}

.ag-export-card {
  background: #fff;
  border: 1px solid var(--pr-color-border);
  border-radius: 12px;
  padding: 28px 24px;
  /* Grid — icon left, title right (same row); description spans both below */
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
}

.ag-export-card-flag {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  color: #fff;
}
.ag-export-card-flag.eu   { background: #003399; }   /* EU blue */
.ag-export-card-flag.asia { background: var(--pr-color-secondary); }
.ag-export-card-flag svg { width: 22px; height: 22px; }

.ag-export-card h4 {
  font-size: 17px;       /* 15px → 17px */
  font-weight: 700;
  color: var(--pr-color-primary);
  margin: 0;
  align-self: center;
}

.ag-export-card p {
  font-size: 15px;       /* 13.5px → 15px */
  line-height: 1.72;     /* 1.7 → 1.72 (한국어 가독성 향상) */
  color: var(--pr-color-text);
  margin: 14px 0 0;
  grid-column: 1 / -1;   /* span full width below */
}

.ag-bev-cta {
  background: linear-gradient(135deg, #051d31 0%, #0a3455 100%);
  padding: 64px 0;
  text-align: center;
}

.ag-bev-cta h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 14px;
}

.ag-bev-cta p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.72;
}

.ag-bev-cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive — beverages extras */
@media (max-width: 720px) {
  .ag-cat-grid {
    grid-template-columns: 1fr;
  }
  .ag-shelf-grid {
    grid-template-columns: 1fr;
  }
  .ag-shelf-col {
    border-right: none;
    border-bottom: 1px solid var(--pr-color-border);
  }
  .ag-shelf-col:last-child {
    border-bottom: none;
  }
  .ag-export-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
