/* Eterlens Eyewear Guide — premium editorial educational section */
.etl-eg {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  background: rgb(var(--color-background));
  color: rgb(var(--color-text));
}
.etl-eg * { box-sizing: border-box; }
.etl-eg-inner { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* Section header — magazine style */
.etl-eg-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}
.etl-eg-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #C7A77A;
  margin-bottom: 14px;
  padding: 4px 0;
  position: relative;
}
.etl-eg-kicker::after {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: #C7A77A;
  margin: 10px auto 0;
}
.etl-eg-title {
  font-family: 'Playfair Display', 'Noto Serif JP', serif;
  font-size: 26px;
  font-weight: 700;
  color: #2E2A26;
  line-height: 1.35;
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}
.etl-eg-subtitle {
  font-size: 14px;
  line-height: 1.8;
  color: #6B6256;
  margin: 0;
  font-weight: 500;
}

/* Grid layout */
.etl-eg-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* Card */
.etl-eg-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #E0D6C8;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(.2,.7,.2,1),
              box-shadow 0.45s cubic-bezier(.2,.7,.2,1),
              border-color 0.3s ease;
  will-change: transform;
}
.etl-eg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(46, 42, 38, 0.12), 0 4px 10px rgba(46, 42, 38, 0.05);
  border-color: #C7A77A;
}

/* Card image — aspect ratio + fit driven by section settings */
.etl-eg-card-img {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #F4ECE0;
  line-height: 0;
}
/* Aspect ratio variants (set on section root) */
.etl-eg-ratio-16-10 .etl-eg-card-img { aspect-ratio: 16 / 10; }
.etl-eg-ratio-4-3   .etl-eg-card-img { aspect-ratio: 4 / 3; }
.etl-eg-ratio-3-2   .etl-eg-card-img { aspect-ratio: 3 / 2; }
.etl-eg-ratio-1-1   .etl-eg-card-img { aspect-ratio: 1 / 1; }
.etl-eg-ratio-auto  .etl-eg-card-img { aspect-ratio: auto; }

.etl-eg-card-img img {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.7s cubic-bezier(.2,.7,.2,1);
}
/* For aspect-ratio fixed containers, image fills the box */
.etl-eg-ratio-16-10 .etl-eg-card-img img,
.etl-eg-ratio-4-3   .etl-eg-card-img img,
.etl-eg-ratio-3-2   .etl-eg-card-img img,
.etl-eg-ratio-1-1   .etl-eg-card-img img { height: 100%; }
/* Auto-ratio: image's native height drives card height */
.etl-eg-ratio-auto .etl-eg-card-img img { height: auto; }

/* Fit variants — contain shows full image with cream letterbox, cover crops to fill */
.etl-eg-fit-contain .etl-eg-card-img img { object-fit: contain; object-position: center; }
.etl-eg-fit-cover   .etl-eg-card-img img { object-fit: cover;   object-position: center; }

.etl-eg-card:hover .etl-eg-card-img img {
  transform: scale(1.035);
}

/* Tag pill — top-left over image */
.etl-eg-card-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-block;
  padding: 5px 12px;
  background: rgba(46, 42, 38, 0.86);
  color: #F4ECE0;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Card body */
.etl-eg-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.etl-eg-card-title {
  font-family: 'Playfair Display', 'Noto Serif JP', serif;
  font-size: 19px;
  font-weight: 700;
  color: #2E2A26;
  line-height: 1.4;
  margin: 0;
  letter-spacing: 0.005em;
}
.etl-eg-card-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: #6B6256;
  margin: 0;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA */
.etl-eg-card-cta {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #C7A77A;
  letter-spacing: 0.06em;
}
.etl-eg-card-cta-text {
  position: relative;
}
.etl-eg-card-cta-text::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: #C7A77A;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(.2,.7,.2,1);
}
.etl-eg-card:hover .etl-eg-card-cta-text::after {
  transform: scaleX(1);
}
.etl-eg-card-cta-arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.etl-eg-card:hover .etl-eg-card-cta-arrow {
  transform: translateX(6px);
}

/* ===== PC (≥ 720px) ===== */
@media (min-width: 720px) {
  .etl-eg-inner { padding: 0 24px; }
  .etl-eg-head { margin-bottom: 44px; }
  .etl-eg-kicker { font-size: 12px; }
  .etl-eg-title { font-size: 32px; }
  .etl-eg-subtitle { font-size: 16px; }

  .etl-eg-grid { gap: 28px; }
  .etl-eg-cols-2 .etl-eg-grid { grid-template-columns: repeat(2, 1fr); }
  .etl-eg-cols-3 .etl-eg-grid { grid-template-columns: repeat(3, 1fr); }

  .etl-eg-card-img { aspect-ratio: 16 / 10; }
  .etl-eg-card-body { padding: 26px 28px 30px; }
  .etl-eg-card-title { font-size: 22px; }
  .etl-eg-card-desc { font-size: 14px; }
  .etl-eg-card-cta { font-size: 13.5px; }
  .etl-eg-card-tag { top: 18px; left: 18px; font-size: 11px; padding: 6px 14px; }
}

/* ===== Large desktop (≥ 1100px) ===== */
@media (min-width: 1100px) {
  .etl-eg-cols-2 .etl-eg-card-title { font-size: 24px; }
  .etl-eg-cols-2 .etl-eg-card-body { padding: 30px 32px 32px; }
}
