/* AllmaNews 1.2.6 - fluid Elementor editorial cards and responsive category layout.
   Loaded after legacy CSS. Works on already-imported Elementor pages; no content migration. */

/* Make long editorial copy expand its card rather than cross the metadata footer. */
:is(#allmanews-content,.elementor) .an-page .an-features,
:is(#allmanews-content,.elementor) .an-page .an-lower {
  height:auto!important;
  align-items:stretch;
}
:is(#allmanews-content,.elementor) .an-page .an-feature-card,
:is(#allmanews-content,.elementor) .an-page .an-park-card {
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch;
  min-width:0;
  height:auto!important;
  overflow:visible;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-title,.an-park-title),
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-description,.an-park-description) {
  position:relative;
  min-width:0;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  overflow-wrap:break-word;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-title,.an-park-title) {
  line-height:1.24;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-description,.an-park-description) {
  line-height:1.4;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) > .an-card-bottom {
  position:relative!important;
  inset:auto!important;
  bottom:auto!important;
  left:auto!important;
  right:auto!important;
  width:100%!important;
  min-width:0;
  height:auto!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:10px!important;
  padding:clamp(12px,1.1vw,18px) 0 0!important;
  margin-top:auto!important;
  overflow:visible;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) .an-meta {
  min-width:0;
  max-width:calc(100% - 38px)!important;
  flex:1 1 auto;
  overflow:visible!important;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) .an-meta ul,
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) .elementor-icon-list-items {
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center;
  gap:5px 10px!important;
  min-width:0;
  overflow:visible;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) .an-meta .elementor-icon-list-item {
  max-width:100%;
  min-width:0;
  white-space:normal!important;
  padding-left:0!important;
  border-right:0!important;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) .an-meta .elementor-icon-list-item span {
  overflow-wrap:anywhere;
}
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) .an-circle-arrow {
  flex:0 0 auto;
}

/* Full category pages must grow with the actual story content, including older Elementor exports. */
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card {
  display:flex!important;
  flex-direction:column!important;
  position:relative;
  min-width:0;
  width:100%;
  height:auto!important;
  min-height:0;
  padding:0 0 clamp(10px,1vw,16px)!important;
  overflow:hidden;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-photo {
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  aspect-ratio:16/9;
  flex:0 0 auto;
  overflow:hidden;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-photo .elementor-widget-container,
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-photo img {
  width:100%;height:100%;object-fit:cover;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-kicker {
  max-width:calc(100% - 18px);
  white-space:normal!important;
  line-height:1.2;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-title,
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-desc {
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  width:auto!important;
  min-width:0;
  max-height:none!important;
  height:auto!important;
  overflow:visible!important;
  overflow-wrap:break-word;
  margin:0;
  padding:0 clamp(12px,1.1vw,18px);
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-title {
  margin-top:clamp(10px,1.1vw,16px);
  font-family:Lora,Georgia,serif;
  font-size:clamp(16px,1.48vw,22px);
  font-weight:700;
  letter-spacing:-.025em;
  line-height:1.25;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-desc {
  margin-top:clamp(5px,.6vw,9px);
  font-family:Lora,Georgia,serif;
  font-size:clamp(12px,.98vw,15px);
  line-height:1.42;
  color:#516987;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-title .elementor-heading-title,
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-desc .elementor-widget-container {
  max-height:none!important;
  overflow:visible!important;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-meta {
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  width:100%!important;
  max-width:100%;
  min-width:0;
  height:auto!important;
  min-height:42px;
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-content:center;
  align-items:center;
  justify-content:flex-start;
  gap:5px 9px!important;
  padding:clamp(12px,1.05vw,16px) 48px 0 clamp(12px,1.1vw,18px)!important;
  margin-top:auto;
  white-space:normal!important;
  overflow:visible!important;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-meta .an-cat-meta-unit {
  min-width:0;
  max-width:100%;
  flex:0 1 auto;
  white-space:normal!important;
  gap:4px!important;
  padding-right:0!important;
  border-right:0!important;
  font-size:clamp(11px,.78vw,13px);
  line-height:1.35;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-meta .an-cat-meta-label {
  min-width:0;
  width:auto!important;
  max-width:100%;
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-card-arrow {
  position:absolute!important;
  bottom:clamp(11px,.95vw,16px)!important;
  right:clamp(10px,.95vw,16px)!important;
  top:auto!important;
  left:auto!important;
  width:34px!important;
  height:34px!important;
  min-width:34px;
  font-size:16px;
}

/* Hero: copy, subtitle and byline share natural flow instead of absolute top values. */
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero {
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  height:auto!important;
  min-height:clamp(260px,26vw,390px);
  display:flex!important;
  flex-direction:row!important;
  align-items:stretch;
  overflow:hidden;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-photo {
  width:60%!important;
  height:100%!important;
  position:absolute!important;
  left:auto!important;
  right:0!important;
  top:0!important;
  bottom:0!important;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-photo img {object-fit:cover}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-content {
  position:relative!important;
  inset:auto!important;
  z-index:2;
  width:49%!important;
  max-width:100%;
  min-height:clamp(260px,26vw,390px);
  height:auto!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start;
  justify-content:center;
  gap:clamp(11px,1.1vw,17px)!important;
  padding:clamp(18px,2vw,32px)!important;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-tag,
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-title,
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-desc,
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-meta {
  position:relative!important;
  inset:auto!important;
  top:auto!important;
  right:auto!important;
  left:auto!important;
  bottom:auto!important;
  width:100%!important;
  max-width:100%;
  height:auto!important;
  min-width:0;
  margin:0;
  overflow:visible;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-tag {
  width:auto!important;
  max-width:100%;
  white-space:normal;
  line-height:1.25;
  font-size:clamp(10px,.83vw,13px);
  padding:6px 9px;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-title {
  font-size:clamp(25px,2.6vw,43px);
  line-height:1.11;
  letter-spacing:-.025em;
  overflow-wrap:break-word;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-desc {
  font-size:clamp(12px,1.02vw,16px);
  line-height:1.5;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-meta {
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:center;
  gap:5px 12px!important;
  white-space:normal!important;
  margin-top:auto;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-meta .an-cat-meta-unit {
  min-width:0;
  max-width:100%;
  white-space:normal!important;
  flex:0 1 auto;
  font-size:clamp(11px,.79vw,13px);
  padding-right:0!important;
  border-right:0!important;
}
:is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-meta .an-cat-meta-label {
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
}

/* Desktop category composition: the main list and right rail expand independently. */
@media (min-width:768px) {
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-content {
    height:auto!important;
    min-height:0;
    display:grid!important;
    grid-template-columns:minmax(0, 3fr) minmax(225px, 1fr);
    align-items:start;
    column-gap:clamp(16px,2vw,30px)!important;
    padding:clamp(20px,2.5vw,40px)!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-primary,
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-sidebar {
    position:relative!important;
    inset:auto!important;
    left:auto!important;
    top:auto!important;
    width:100%!important;
    min-width:0;
    height:auto!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-primary {
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch;
    gap:clamp(16px,1.5vw,25px)!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page :is(.an-cat-breadcrumbs,.an-cat-intro,.an-cat-tabs,.an-cat-grid,.an-cat-pagination) {
    position:relative!important;
    top:auto!important;
    left:auto!important;
    right:auto!important;
    bottom:auto!important;
    width:100%!important;
    height:auto!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-intro {
    min-height:clamp(110px,10vw,160px);
    display:flex!important;
    flex-direction:column!important;
    justify-content:center;
    gap:14px!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-page-title,
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-page-subtitle {
    position:relative!important;
    inset:auto!important;
    top:auto!important;
    left:auto!important;
    max-width:100%;
    height:auto!important;
    white-space:normal;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-page-title {
    font-size:clamp(32px,3.9vw,55px);
    line-height:1.14;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-page-subtitle {
    font-size:clamp(12px,1.15vw,17px);
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-tabs {
    min-height:34px;
    flex-wrap:wrap;
    gap:8px!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-grid {
    height:auto!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:none!important;
    grid-auto-rows:auto!important;
    gap:clamp(12px,1.35vw,20px)!important;
    align-items:stretch;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-pagination {
    min-height:42px;
    justify-content:center;
  }
}
@media (min-width:768px) and (max-width:1190px) {
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

/* Phones and narrower tablets: photo above copy, readable titles, full dates. */
@media (max-width:767px) {
  :is(#allmanews-content,.elementor) .an-page .an-features {align-items:stretch}
  :is(#allmanews-content,.elementor) .an-page :is(.an-feature-card,.an-park-card) {
    padding:clamp(12px,2vw,18px)!important;
    min-height:0!important;
  }
  :is(#allmanews-content,.elementor) .an-page .an-feature-title {
    font-size:clamp(17px,3vw,23px);
  }
  :is(#allmanews-content,.elementor) .an-page .an-feature-description {
    font-size:clamp(12px,2vw,15px);
  }
  :is(#allmanews-content,.elementor) .an-page .an-meta,
  :is(#allmanews-content,.elementor) .an-page .an-card-bottom>.an-meta {
    font-size:clamp(10px,1.8vw,13px);
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-rows:none!important;
    grid-auto-rows:auto!important;
    height:auto!important;
    align-items:stretch;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero {
    min-height:0;
    flex-direction:column!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-photo {
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    aspect-ratio:16/9;
    min-height:0;
    max-height:280px;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero:after {display:none}
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-content {
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    min-height:0!important;
    display:flex!important;
    flex-direction:column!important;
    padding:clamp(16px,3vw,24px)!important;
    gap:12px!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-title {
    font-size:clamp(24px,5vw,35px);
    line-height:1.16;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-desc {
    font-size:clamp(13px,2.4vw,16px);
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero-meta {
    margin-top:4px;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-card-title {
    font-size:clamp(17px,2.7vw,21px);
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-card-desc {
    font-size:clamp(12px,1.9vw,15px);
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-card-meta .an-cat-meta-unit {
    font-size:clamp(10px,1.75vw,12px);
  }
}
@media (max-width:580px) {
  :is(#allmanews-content,.elementor) .an-page .an-features {grid-template-columns:1fr!important}
  :is(#allmanews-content,.elementor) .an-page .an-feature-card {
    min-height:0!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-grid {
    grid-template-columns:minmax(0,1fr)!important;
    grid-auto-rows:auto!important;
  }
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-card-meta {
    padding-right:55px!important;
  }
}

/* Old demos hide Elementor <br> elements and concatenate adjacent words.
   Keep intentional line breaks; flex layout now has room for them. */
:is(#allmanews-content,.elementor) .an-page :is(.an-feature-title,.an-feature-description,.an-park-title,.an-park-description) br {
  display:initial!important;
}
/* Editorial text must be readable over the category hero photo. */
@media (min-width:768px) {
  :is(#allmanews-content,.elementor) .an-category-page .an-cat-hero:after {
    background:linear-gradient(90deg,#fff 0%,#fff 49%,rgba(255,255,255,.97) 54%,rgba(255,255,255,.42) 69%,transparent 83%)!important;
  }
}
@media (max-width:580px) {
  :is(#allmanews-content,.elementor) .an-page .an-report:before {
    background:linear-gradient(90deg,rgba(247,245,241,.99),rgba(247,245,241,.93) 56%,rgba(247,245,241,.48) 86%,transparent)!important;
  }
}
