/*
Theme Name: El Perro Fiel Child
Theme URI: https://elperrofiel.com/
Description: Custom homepage (front-page.php) + styling for El Perro Fiel. Built as a child theme.
Author: (your name)
Version: 1.0.0
Template: cocoon-master
Text Domain: elperrofiel-child
*/

/* NOTE:
 * The "Template:" line MUST match your parent theme folder name.
 * If your Cocoon folder is "cocoon" (not "cocoon-master"), change it accordingly.
 */

:root{
  --epf-bg: #f7f3ea;           /* creamy paper */
  --epf-surface: #ffffff;
  --epf-ink: #1f2328;
  --epf-muted: #6b7280;
  --epf-olive: #556b2f;        /* olive green accent */
  --epf-olive-2:#3f5220;
  --epf-border: rgba(31,35,40,.10);
  --epf-shadow: 0 10px 30px rgba(31,35,40,.08);
  --epf-radius: 18px;
  --epf-max: 1120px;
}

/* Reset-ish (scoped) */
.epf-home{ background: var(--epf-bg); }
.epf-home a{ text-decoration: none; }
.epf-home .epf-wrap{ max-width: var(--epf-max); margin: 0 auto; padding: 0 18px; }
.epf-home .epf-section{ padding: 44px 0; }
.epf-home .epf-title{
  font-family: "Noto Serif JP", "Noto Serif", serif;
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0 0 14px;
  color: var(--epf-ink);
}
.epf-home .epf-sub{
  margin: 0 0 18px;
  color: var(--epf-muted);
  line-height: 1.7;
}
.epf-home .epf-divider{ height: 1px; background: var(--epf-border); margin: 0; }

/* HERO */
.epf-hero{
  position: relative;
  padding: 56px 0 24px;
}
.epf-hero .epf-hero-inner{
  border-radius: calc(var(--epf-radius) + 6px);
  overflow: hidden;
  box-shadow: var(--epf-shadow);
  border: 1px solid var(--epf-border);
  background: #111;
}
.epf-hero .epf-hero-bg{
  min-height: 320px;
  display: grid;
  align-items: end;
  padding: 28px;
  background-size: cover;
  background-position: center;
}
.epf-hero .epf-hero-overlay{
  background: linear-gradient(to top, rgba(0,0,0,.65), rgba(0,0,0,.10));
  border-radius: 16px;
  padding: 18px 16px;
  max-width: 760px;
}
.epf-hero .epf-brand{
  color: #fff;
  font-family: "Noto Serif JP", "Noto Serif", serif;
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  margin: 0 0 6px;
}
.epf-hero .epf-tagline{
  color: rgba(255,255,255,.92);
  margin: 0 0 12px;
  line-height: 1.7;
}
.epf-hero .epf-hero-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.epf-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  font-weight: 600;
  backdrop-filter: blur(6px);
}
.epf-btn:hover{ background: rgba(255,255,255,.16); }
.epf-btn--solid{
  background: var(--epf-olive);
  border-color: rgba(255,255,255,.18);
}
.epf-btn--solid:hover{ background: var(--epf-olive-2); }

/* CATEGORY CARDS */
.epf-cats{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.epf-cat{
  background: var(--epf-surface);
  border: 1px solid var(--epf-border);
  border-radius: var(--epf-radius);
  padding: 14px 14px;
  box-shadow: 0 6px 18px rgba(31,35,40,.05);
  min-height: 86px;
  display: grid;
  gap: 4px;
  align-content: center;
}
.epf-cat .epf-cat-name{
  font-weight: 700;
  color: var(--epf-ink);
}
.epf-cat .epf-cat-desc{
  color: var(--epf-muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}
.epf-cat:hover{
  transform: translateY(-1px);
  transition: .2s ease;
  border-color: rgba(85,107,47,.30);
}

/* POSTS GRID */
.epf-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.epf-card{
  background: var(--epf-surface);
  border: 1px solid var(--epf-border);
  border-radius: var(--epf-radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(31,35,40,.06);
  display: grid;
}
.epf-thumb{
  aspect-ratio: 16 / 9;
  background: rgba(0,0,0,.06);
  overflow: hidden;
}
.epf-thumb img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.epf-card-body{ padding: 14px 14px 16px; display: grid; gap: 8px; }
.epf-meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--epf-muted);
  font-size: 12px;
}
.epf-pill{
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(85,107,47,.10);
  color: var(--epf-olive);
  font-weight: 700;
}
.epf-card-title{
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--epf-ink);
  font-weight: 700;
}
.epf-excerpt{
  margin: 0;
  color: var(--epf-muted);
  font-size: 13px;
  line-height: 1.7;
}
.epf-card:hover .epf-card-title{ text-decoration: underline; }

/* TWO-COLUMN FEATURE */
.epf-feature{
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 18px;
}
.epf-feature .epf-grid{ grid-template-columns: 1fr; }

/* Footer CTA */
.epf-cta{
  background: linear-gradient(135deg, rgba(85,107,47,.10), rgba(255,255,255,.85));
  border: 1px solid var(--epf-border);
  border-radius: calc(var(--epf-radius) + 8px);
  padding: 22px 18px;
  box-shadow: var(--epf-shadow);
  display: grid;
  gap: 10px;
}
.epf-cta .epf-cta-title{
  margin: 0;
  font-family: "Noto Serif JP", "Noto Serif", serif;
  font-weight: 700;
}
.epf-cta .epf-cta-actions{ display:flex; flex-wrap:wrap; gap:10px; }

/* Responsive */
@media (max-width: 980px){
  .epf-cats{ grid-template-columns: repeat(2, 1fr); }
  .epf-grid{ grid-template-columns: repeat(2, 1fr); }
  .epf-feature{ grid-template-columns: 1fr; }
  .epf-hero .epf-hero-bg{ min-height: 280px; }
}
@media (max-width: 560px){
  .epf-grid{ grid-template-columns: 1fr; }
  .epf-hero{ padding: 36px 0 16px; }
  .epf-hero .epf-hero-bg{ padding: 18px; }
}

/* ===== カード背景イラスト：確実に出す ===== */
.epf-cat{
  position: relative;
  overflow: hidden;
  background-color: var(--epf-surface);
}

/* イラスト本体 */
.epf-cat::before{
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-position: right 14px bottom 4px;
  background-size: 140px auto;
  opacity: .30;          /* 薄さ（0.20〜0.40で調整） */
  pointer-events: none;
  z-index: 0;
}

/* 文字を読みやすくするベール（強すぎると絵が見えないので薄め） */
.epf-cat::after{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(255,255,255,.35);
  pointer-events:none;
  z-index: 1;
}

/* テキストを前面に */
.epf-cat > *{
  position: relative;
  z-index: 2;
}

/* --- 画像指定：クラスが付いてる場合 --- */
.epf-cat--cafe::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_cafe.png);
}
.epf-cat--planner-stationery::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_planner.png);
}
.epf-cat--habits::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_habits.png);
}
.epf-cat--travel::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_travel.png);
}

/* --- 保険：クラスが付いてない場合（4枚カードを順番で当てる） --- */
a.epf-cat:nth-of-type(1)::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_cafe.png);
}
a.epf-cat:nth-of-type(2)::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_planner.png);
}
a.epf-cat:nth-of-type(3)::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_habits.png);
}
a.epf-cat:nth-of-type(4)::before{
  background-image: url(https://elperrofiel.com/wp-content/uploads/2026/02/card_travel.png);
}
.epf-cat::before{
  background-position: right 14px bottom -13px !important; 
  background-size: 135px auto !important; /* ちょい小さくして切れ防止 */
}





