/* FULL-WIDTH CATEGORY ARCHIVE
   Removes theme container/sidebar constraints only on category pages. */
body.category{
  overflow-x:hidden!important;
}
body.category #page,
body.category .site.grid-container{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}
body.category #content.site-content,
body.category .site-content{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.category #primary,
body.category .content-area{
  float:none!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}
body.category #right-sidebar,
body.category #left-sidebar,
body.category .widget-area.sidebar{
  display:none!important;
}


/* Defensive GeneratePress width reset: category content starts at x=0 and fills the viewport. */
body.category #page,
body.category #content,
body.category #primary,
body.category main.tpd-universal-category{
  position:relative!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
}

body.category main.tpd-universal-category{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

.tpd-universal-category,
.tpd-universal-category *,
.tpd-universal-category *::before,
.tpd-universal-category *::after{box-sizing:border-box}

.tpd-universal-category{
  --copper:#b05c1b;
  --copper-dark:#8a4714;
  --gold:#b5851f;
  --peach:#edc0a3;
  --peach-light:#f5dbc8;
  --peach-faint:#fdf5ef;
  --cream:#faf7f4;
  --warm-white:#fff9f5;
  --text-dark:#2a1f14;
  --text-mid:#5a4030;
  --text-muted:#937060;
  --border:#e8d5c4;
  --border-light:#f0e0d0;

  /*
   * IMPORTANT:
   * Do not use left:50% + negative viewport margins here.
   * The GeneratePress archive container is already forced to 100% width above.
   * Using the old breakout trick together with #primary { margin:0!important; }
   * caused the entire category layout to move half a screen to the right.
   */
  position:relative;
  display:block;
  left:auto;
  right:auto;
  width:100%;
  max-width:none;
  margin:0;
  padding:0;
  background:var(--cream);
  color:var(--text-dark);
  font-family:'DM Sans',sans-serif;
  min-height:100vh;
  overflow:hidden;
}

.tpd-universal-category a{text-decoration:none}

/* HERO */
.tpd-cat-hero{
  position:relative;
  background:var(--warm-white);
  border-bottom:1px solid var(--border);
  overflow:hidden;
  padding:72px 24px 56px;
  text-align:center;
}
.tpd-cat-hero::before{
  content:'';
  position:absolute;
  inset:0;
  background:
    radial-gradient(ellipse 60% 80% at 10% 50%,rgba(176,92,27,.05) 0%,transparent 60%),
    radial-gradient(ellipse 50% 70% at 90% 30%,rgba(181,133,31,.04) 0%,transparent 55%);
  pointer-events:none;
}
.tpd-hero-deco-left{position:absolute;left:5%;top:15%;opacity:.07;pointer-events:none}
.tpd-hero-deco-right{position:absolute;right:5%;bottom:10%;opacity:.07;pointer-events:none}
.tpd-cat-hero__ornament{position:relative;display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:20px}
.tpd-cat-hero__ornament svg{opacity:.5}
.tpd-cat-hero__label{font-size:11px;letter-spacing:.22em;text-transform:uppercase;color:var(--copper);font-weight:500}
.tpd-cat-hero__title{position:relative;font-family:'Cormorant Garamond',serif;font-size:clamp(2.4rem,5vw,3.8rem);font-weight:300;color:var(--text-dark);line-height:1.12;letter-spacing:-.01em;margin:0 0 16px}
.tpd-cat-hero__title em{font-style:italic;color:var(--copper)}
.tpd-cat-hero__desc{position:relative;font-size:1rem;color:var(--text-muted);max-width:500px;margin:0 auto 32px;line-height:1.7;font-weight:300}

/* SEARCH */
.tpd-hero-search{position:relative;display:flex;align-items:center;max-width:420px;margin:0 auto;background:#fff;border:1px solid var(--border);border-radius:100px;overflow:hidden;transition:box-shadow .2s,border-color .2s}
.tpd-hero-search:focus-within{border-color:var(--copper);box-shadow:0 0 0 3px rgba(176,92,27,.1)}
.tpd-hero-search input{flex:1;min-width:0;border:none!important;outline:none!important;box-shadow:none!important;padding:13px 20px!important;font-size:14px!important;font-family:'DM Sans',sans-serif!important;color:var(--text-dark)!important;background:transparent!important;margin:0!important;border-radius:0!important}
.tpd-hero-search input::placeholder{color:var(--text-muted)}
.tpd-hero-search button{background:var(--copper);border:none;padding:10px 20px;margin:4px;border-radius:100px;cursor:pointer;display:flex;align-items:center;gap:6px;color:#fff;font-size:13px;font-family:'DM Sans',sans-serif;font-weight:500;letter-spacing:.03em;transition:background .2s;white-space:nowrap}
.tpd-hero-search button:hover{background:var(--copper-dark)}

/* SEARCH STATUS */
.tpd-search-status{max-width:1240px;margin:0 auto;padding:24px 24px 0;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.tpd-search-status__text{font-size:14px;color:var(--text-mid)}
.tpd-search-status__text strong{color:var(--copper);font-weight:600}
.tpd-clear-search{display:inline-flex;align-items:center;gap:6px;background:transparent;border:1px solid var(--border);border-radius:100px;padding:6px 14px;font-size:12px;font-family:'DM Sans',sans-serif;color:var(--text-muted);transition:all .2s}
.tpd-clear-search:hover{border-color:var(--copper);color:var(--copper)}

/* POSTS */
.tpd-page-wrap{max-width:1240px;margin:0 auto;padding:52px 24px 80px}
.tpd-posts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}

/* CARD */
.tpd-post-card{background:#fff;border:1px solid var(--border-light);border-radius:14px;overflow:hidden;color:inherit;display:flex;flex-direction:column;transition:transform .25s ease,box-shadow .25s ease;position:relative;min-width:0}
.tpd-post-card:hover,.tpd-post-card:focus-visible{transform:translateY(-5px);box-shadow:0 18px 50px rgba(176,92,27,.11)}
.tpd-post-card:focus-visible{outline:2px solid var(--copper);outline-offset:3px}
.tpd-post-card__img{position:relative;overflow:hidden;aspect-ratio:4/3;background:var(--peach-light)}
.tpd-post-card__img img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease;display:block}
.tpd-post-card:hover .tpd-post-card__img img,.tpd-post-card:focus-visible .tpd-post-card__img img{transform:scale(1.05)}
.tpd-post-card__placeholder{width:100%;height:100%;background:var(--peach-light)}
.tpd-post-card__img-overlay{position:absolute;inset:0;background:linear-gradient(to top,rgba(42,31,20,.32) 0%,transparent 50%);opacity:0;transition:opacity .3s ease;pointer-events:none}
.tpd-post-card:hover .tpd-post-card__img-overlay,.tpd-post-card:focus-visible .tpd-post-card__img-overlay{opacity:1}
.tpd-post-card__body{padding:22px 22px 20px;flex:1;display:flex;flex-direction:column;gap:10px}
.tpd-post-card__title{font-family:'Cormorant Garamond',serif;font-size:1.2rem;font-weight:500;line-height:1.3;color:var(--text-dark);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0}
.tpd-post-card__excerpt{font-size:.83rem;color:var(--text-muted);line-height:1.65;flex:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:0}
.tpd-post-card__footer{display:flex;align-items:center;justify-content:space-between;padding-top:12px;border-top:1px solid var(--border-light);margin-top:auto}
.tpd-post-card__date{font-size:11.5px;color:var(--text-muted)}
.tpd-post-card__arrow{width:28px;height:28px;border-radius:50%;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;color:var(--copper);transition:all .2s ease;flex-shrink:0}
.tpd-post-card:hover .tpd-post-card__arrow,.tpd-post-card:focus-visible .tpd-post-card__arrow{background:var(--copper);border-color:var(--copper);color:#fff;transform:rotate(-45deg)}

/* LOAD MORE */
.tpd-load-more-wrap{display:flex;justify-content:center;margin-top:48px}
.tpd-load-more-btn{display:inline-flex;align-items:center;gap:10px;background:transparent;border:1.5px solid var(--copper);color:var(--copper);border-radius:100px;padding:14px 40px;font-size:13px;letter-spacing:.1em;text-transform:uppercase;font-weight:600;font-family:'DM Sans',sans-serif;transition:all .25s ease;cursor:pointer}
.tpd-load-more-btn:hover,.tpd-load-more-btn:focus-visible{background:var(--copper);color:#fff}
.tpd-load-more-btn:focus-visible{outline:2px solid var(--copper);outline-offset:3px}
.tpd-load-more-btn:disabled{opacity:.58;cursor:wait;transform:none}

/* EMPTY STATE */
.tpd-state-wrap{grid-column:1/-1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;gap:16px;color:var(--text-muted);text-align:center}
.tpd-state-wrap p{font-size:1rem;max-width:340px;line-height:1.6;margin:0}

/* RESPONSIVE */
@media(max-width:900px){.tpd-posts-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}}
@media(max-width:560px){
  .tpd-posts-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
  .tpd-post-card__body{padding:14px 14px 12px;gap:7px}
  .tpd-post-card__title{font-size:1rem}
  .tpd-post-card__excerpt{display:none}
  .tpd-cat-hero{padding:52px 20px 44px}
  .tpd-page-wrap{padding:36px 16px 60px}
  .tpd-hero-search{max-width:100%}
  .tpd-search-status{padding-left:16px;padding-right:16px}
}
@media(max-width:380px){.tpd-posts-grid{grid-template-columns:1fr}}

@media(prefers-reduced-motion:reduce){
  .tpd-universal-category *,
  .tpd-universal-category *::before,
  .tpd-universal-category *::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
