/*
Theme Name: twentytwentyfive-child
Theme URI: 
Author: Filip Levälahti
Author URI: 
Description: Child theme of twentytwentyfive for giraff.fi
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfive-child
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}


.event_data {
	border:none;
	font-size:1.1em;
}

.event_timeline .event_data {
		font-size:0.7em;
	
}
.event_timeline .event_item .event_date {
	    font-weight: 400;	
}

.event_categories {
	display:none;	
}
/* GRID */
.events-grid{
  display:grid;
  gap:clamp(12px,2.5vw,24px);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  list-style:none; margin:0; padding:0;
}
@media (max-width: 420px){
  .events-grid{ grid-template-columns:1fr; }
}

/* CARD (vertical: [thumb] then [body]) */
.event-card{
  display:grid;
  grid-template-rows: minmax(0,auto) 1fr; /* body fills leftover space */
  min-height:100%;
  background:#111827;
  border:1px solid #ECECEC; /*1D4ED8*/
  min-width:0;
}

/* MEDIA */
.event-thumb{ display:block; overflow:hidden; }
.event-thumb img,
.event-thumb .event-fallback,
.event-thumb svg{
  display:block; width:100%; height:auto;
  aspect-ratio:16/9; object-fit:cover;
}

/* Phones: shorter thumbs */
@media (max-width:480px){
  .events-grid{ grid-template-columns:1fr; }
  .event-thumb img,
  .event-thumb .event-fallback,
  .event-thumb svg{
    height: clamp(120px, 40vw, 180px);
    aspect-ratio:auto;  /* override 16:9 so height cap wins */
  }
}

/* BODY */
.event-body{
  padding:clamp(12px,3.5vw,18px);
  display:flex; flex-direction:column; gap:.5rem;
  background:#111827;
}
.event-title{ margin:0; font-size:clamp(1rem,3.5vw,1.25rem); line-height:1.2; color:#fff; }
.event-meta{ color:#fff; font-size:clamp(.9rem,3vw,.95rem); }

/* DATE ICON TIDY */
.event-card .event-meta .ep-meta{ display:inline-flex; gap:.35rem; align-items:center; flex-wrap:wrap; }
.event-card .event-meta .dashicons{ font-size:1em; width:auto; height:auto; line-height:1; }
.event-card .event-meta .ep-sep, .event-card .event-meta .ep-dash{ opacity:.6; }

/* BUTTON (single definition) */
.event-more {
  margin-top:auto;
  display:inline-block;
  background: var(--wp--preset--color--primary, #0F766E);
  color:#fff; padding:.55rem .9rem; text-decoration:none;
	font-size:0.7em;
}
.event-more:hover{ filter:brightness(1.05); }

/* STRAY NODES FROM EDITOR */
.event-thumb br{ display:none !important; }
.event-card > p, .event-body > p:empty{ display:none !important; margin:0 !important; padding:0 !important; }