﻿/* -------------------------------------------------------
   NEWS GRID LAYOUT
------------------------------------------------------- */

.af-news-captions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	margin: 0;
	grid-gap: 4px;
	width: 100%;
}


/* -------------------------------------------------------
   NEWS TILE WRAPPER
------------------------------------------------------- */

.af-news-caption {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 0px;
	text-decoration: none !important;
	color: inherit;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

	/* Subtle zoom on hover
	.af-news-caption:hover {
		transform: scale(1.01);
		box-shadow: 0 6px 16px rgba(0,0,0,0.25);
		cursor: pointer;
	} */


/* -------------------------------------------------------
   SQUARE TILE WRAPPER
------------------------------------------------------- */

.af-news-item {
	position: relative;
	width: 100%;
	padding-top: 100%; /* 1:1 square */
}


/* -------------------------------------------------------
   IMAGE
------------------------------------------------------- */

.af-news-photo {
	position: absolute;
	inset: 0;
}

	.af-news-photo img {
		width: 100%;
		height: 100%;
		object-fit: cover;
	}


/* -------------------------------------------------------
   CAPTION OVERLAY
------------------------------------------------------- */

.af-news-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	width: calc(100% - 40px);
	/* Initial collapsed height */
	height: 60px;
	background: rgba(0, 55, 125, 0.75); /* blue with transparency */
	padding: 10px 20px;
	color: #fff;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	transition: height 0.35s ease, background 0.35s ease;
}

/* Hover effect — reveal full overlay */
.af-news-caption:hover .af-news-overlay {
	height: 100%;
	background: rgba(0, 55, 125, 0.85);
}


/* -------------------------------------------------------
   TITLE
------------------------------------------------------- */

.af-news-title {
	font-size: 1.3rem;
	font-weight: 500;
	font-family: 'Fredoka', sans-serif;
	line-height: 1.2;
	margin-bottom: 6px;
	text-shadow: 0 2px 4px rgba(0,0,0,0.45);
	height:50px;
	overflow:hidden;
	margin-top:0px;
}


/* -------------------------------------------------------
   EXCERPT (hidden until hover)
------------------------------------------------------- */

.af-news-excerpt {
	font-size: 1rem;
	font-weight: 300;
	opacity: 0;
	height: 0;
	overflow: hidden;
	transition: opacity 0.3s ease 0.1s, height 0.3s ease;
}

.af-news-caption:hover .af-news-excerpt {
	opacity: 1;
	height: calc(100% - 100px); /* enough to show several lines */
}


/* -------------------------------------------------------
   DATE (OPTIONAL)
   If you want to show a date ribbon, uncomment.
------------------------------------------------------- */

/*
.af-news-date {
    position: absolute;
    bottom: 0;
    left: 0;
    background: #444;
    color: #fff;
    padding: 6px 10px;
    font-size: 0.9rem;
    opacity: 0.9;
}
*/
