/* Regioni-Italiane.net — Phase 2 presentation improvements
   Goal: polish original Squirrel theme without changing identity. */

/* Ensure imported grid CSS is applied (style.css path fix handles imports). */

/* Card grid for category/home sections (keeps original typography/colors). */
.ri-card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin: 12px 0 24px;
}
@media (min-width: 768px) {
  .ri-card-grid { grid-template-columns: 1fr 1fr; }
}

.ri-card {
  background: #fff;
  border: 1px solid #ebe8da;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.ri-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f3f1f2;
  overflow: hidden;
}
.ri-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ri-card__body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ri-card__title {
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 8px;
}
.ri-card__title a { color: #000; text-decoration: none; }
.ri-card__meta {
  font-size: 12px;
  color: #7a7777;
  margin-bottom: 10px;
}
.ri-card__excerpt {
  font-size: 14px;
  line-height: 22px;
  color: #4d4c4c;
  flex: 1;
  margin-bottom: 12px;
}
.ri-card__actions a {
  display: inline-block;
  text-transform: uppercase;
  color: #274e07;
  text-decoration: none;
}

/* Featured image on single posts */
.ri-featured {
  margin: 10px 0 18px;
  background: url(images/blog-shaddow.png) no-repeat;
  padding: 13px 13px 22px;
}
.ri-featured img { width: 100%; height: auto; display: block; background: #fff; }

/* Make sidebar widgets more consistent without changing style */
.sidebar h4 { margin-top: 18px; }
.sidebar .ri-widget { margin-bottom: 18px; }

/* Breadcrumb schema wrapper spacing */
#breadcrumbs { margin-bottom: 14px; }

/* Region list on homepage */
.ri-region-list {
  margin: 6px 0 18px;
  padding: 10px 12px;
  border: 1px solid #ebe8da;
  background: #fff;
}
.ri-region-list ul {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  -webkit-columns: 2;
  -moz-columns: 2;
}
@media (min-width: 960px) {
  .ri-region-list ul { columns: 3; -webkit-columns: 3; -moz-columns: 3; }
}
.ri-region-list a { text-decoration: none; }

/* Simple pagination for static category pages */
.ri-pagination {
  margin: 10px 0 22px;
  font-size: 13px;
  color: #4d4c4c;
}
.ri-pagination a,
.ri-pagination strong {
  display: inline-block;
  padding: 3px 7px;
  margin-right: 4px;
  border: 1px solid #ebe8da;
  text-decoration: none;
  background: #fff;
}
.ri-pagination strong {
  background: #373737;
  color: #fff;
  border-color: #373737;
}

/* Compact link lists (homepage "Newest") */
.ri-linklist {
  margin: 6px 0 22px;
  padding-left: 18px;
}
.ri-linklist li { margin: 4px 0; }

/* Category description */
.ri-cat-desc {
  margin: 6px 0 14px;
  color: #4d4c4c;
}

/* Small region block on single posts */
.ri-related-region {
  margin: -6px 0 14px;
  padding: 8px 12px;
  border: 1px solid #ebe8da;
  background: #fff;
}
.ri-related-region a { text-decoration: none; }

/* --- Phase 2 layout: preserve original 960 grid identity --- */
.main-container { width: 100%; }
.container_24 { margin-left: auto; margin-right: auto; }
.page-content { overflow: hidden; margin-top: 20px; }
.page-content .grid_16,
.page-content .grid_8 { display: inline; float: left; }

/* Homepage collage — keep original float-left presentation */
.content-bar img.alignleft,
.content-bar img.alignleft.size-full {
  float: left;
  margin: 0 20px 15px 0;
  max-width: 250px;
  width: auto;
  height: auto;
}

/* Single post featured hero */
.ri-featured img {
  width: 100%;
  max-width: 100%;
  height: auto;
}

/* Hide duplicate inline hero when ri-featured block is present */
.post:has(.ri-featured) .post_content > p:first-child img.aligncenter {
  display: none;
}
.post:has(.ri-featured) .post_content > p:first-child:has(img.aligncenter) {
  display: none;
}

/* Related posts plugin block */
.wp_rp_wrap { margin: 18px 0; padding-top: 12px; border-top: 1px dotted #ccc; }
.wp_rp_wrap .related_post_title { font-size: 18px; margin-bottom: 10px; }
.wp_rp_wrap .related_post { list-style: none; margin: 0; padding: 0; }
.wp_rp_wrap .related_post li { margin: 0 0 12px; overflow: hidden; }
.wp_rp_wrap .wp_rp_thumbnail { float: left; margin: 0 10px 6px 0; }
.wp_rp_wrap .wp_rp_thumbnail img { width: 80px; height: 80px; object-fit: cover; }
.wp_rp_wrap .wp_rp_title { color: #000; text-decoration: none; font-size: 14px; }

/* Prev/next navigation */
#nav-single { margin: 16px 0 24px; padding-top: 12px; border-top: 1px dotted #ccc; }
#nav-single a { text-decoration: none; color: #274e07; }

/* Sidebar extra widgets */
.sidebar .ri-widget { margin-bottom: 22px; }
.sidebar .ri-widget ul { margin-bottom: 0; }
