*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

* {
	scrollbar-width: thin;
	scrollbar-color: transparent transparent;
}
*::-webkit-scrollbar {
	width: 6px;
}
*::-webkit-scrollbar-thumb {
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 10px;
}

body {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	font-family: "Inter", sans-serif;
	margin: 0;
	padding: 20px 0 0 0;
	background-color: #1a1a1a;
}

body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
	background-image: url("images/world_img.webp");
	filter: brightness(0.9) contrast(1.5) saturate(1.8);
	background-color: rgba(73, 73, 68, 0.141);
	background-blend-mode: multiply;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	pointer-events: none;
}

#update-status {
	color: #fdf8f89d;
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	margin: 15px 0 5px 0;
	padding: 5px 0;
	width: 100%;
	display: block;
}

h2 {
	text-align: center;
	color: #cfcec5;
	margin-bottom: 20px;
}
.master-grid-container {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	width: 92%;
	max-width: 1000px;
	margin: 20px auto;
	padding: 0 25px;
	box-sizing: border-box;
	z-index: 10;
}

.main-header {
	grid-column: 1 / -1;
	text-align: center;
	z-index: 30;
}

.main-header .main-title {
	color: #fdf8f89d;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
	font-size: clamp(2rem, 8vw, 4rem);
	font-weight: bold;
	margin-top: 6rem;
}

.subtitle {
	color: #fdf8f89d;
	font-weight: 500;
	margin: 10px auto 10px auto;
	text-align: center;
	font-size: 1.1rem;
	line-height: 1.4;
}

.news-feed-wrapper {
	grid-column: 1 / -1;
	width: 95%;
	max-width: 1000px;
	margin: 10px auto 20px auto;
}

/* THE PINNED INDICATOR */
.manual-pinned {
	position: relative;
}

.manual-pinned::before {
	content: "📌 PINNED";
	position: absolute;
	top: 10px;
	right: 15px;
	color: #000000;
	font-size: 0.65rem;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 0.05rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	z-index: 5;
	pointer-events: none;
	text-transform: uppercase;
}

/* THE MAIN BOX: Stone Background */
.news-accordion,
.manual-pinned {
	width: 100%;
	margin-bottom: 25px;
	border-radius: 14px;
	background: #faf9f6;
	opacity: 0.9;
	/* Subtle shadow to make the "paper" lift off the world map */
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.4);

	text-align: center;
	transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	overflow: hidden; /* Keeps the inner content within the rounded corners */
}

/* 1. MAIN TITLES & DATES - Forced to Black for Visibility */
.news-accordion h3,
.news-date-full,
.date-manual {
	color: #000000 !important;
	text-shadow: none;
	opacity: 1;
	text-decoration: none;
}

/* 2. COUNTRY LABEL */
.news-accordion .country-label,
.country-label.manual-red-title {
	color: #fd0303 !important;
	font-weight: 900;
	letter-spacing: 2px;
	font-size: 1.3rem;
	margin-bottom: 8px;
	display: inline-block;
}

/* 3. DATE SPECIFICS  */
.news-date-full,
.date-manual {
	font-size: 1.05rem;
	font-weight: 600;
	margin-top: 10px;
	display: block;
	width: 100%;
}

/* 4. THE ARROW  */
.news-accordion summary::after {
	content: "▼";
	display: block;
	color: #ff3399;
	font-size: 1.4rem;
	margin: 15px auto 0 auto;
}

/* 5. THE EXPANDED TEXT  */
.news-content-expanded p {
	color: #1a1a1a;
	font-size: 1.2rem;
	line-height: 1.7;
	background: rgba(255, 255, 255, 0.4); /* Subtle contrast lift */
	padding: 25px 30px;
	margin: 0;
	text-align: left;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* THE BUTTON */
.news-accordion .news-content-expanded a,
.manual-pinned .news-content-expanded a {
	display: inline-block;
	background-color: #8b0000;
	color: #cfcec5; /* Inverted: Stone text on dark background */
	padding: 10px 22px;
	margin: 20px 0 25px 30px;
	border-radius: 6px;
	font-weight: 700;
	text-transform: uppercase;
	text-decoration: none;
	transition: 0.2s ease;
}

/* THE GLOBAL ACCORDION ENGINE */
.news-accordion summary,
.manual-pinned summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 25px;
	min-height: 140px;
	cursor: pointer;
	outline: none;
}

.news-accordion[open] {
	cursor: default;
}

/* FORCE THE ORDER: Title -> Tags -> Date */
.news-accordion h3,
.manual-red-title,
.country-label {
	order: 1;
	margin-bottom: 10px;
	text-align: center;
}

.news-date-full,
.date-manual {
	color: #000000;
	order: 3;
	margin-top: 5px;
}

/* The Arrow (Visible State) */
.news-accordion summary::after {
	content: "▼";
	display: block;
	color: #ff3399;
	font-size: 1.4rem;
	margin: 15px auto 0 auto;
}

/* THE DISAPPEARING ACT: When [open] is active */
.news-accordion[open] summary::after {
	opacity: 0;
	height: 0;
	margin-top: 15px;
	transform: scale(0); /* Shrinks it to nothing */
	pointer-events: none;
	overflow: hidden;
}

/* Smooth Hover */
.news-accordion:not([open]):hover summary::after {
	color: #ff3399;
	transform: scale(1.3);
}

/* TEXT STYLING */

.news-accordion .country-label {
	display: inline-block;
	color: #cfcec5;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 1.3rem;
	margin-bottom: 8px;
	position: relative;
	z-index: 5;
}

.country-label.manual-red-title {
	display: inline-block;
	color: #cfcec5;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 1.3rem;
	margin-bottom: 8px;
	position: relative;
	z-index: 5;
}

.news-accordion h3 {
	display: inline-block;
	font-weight: 500;
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 0.8px;
	font-size: 1.3rem;
	margin-bottom: 8px;
	position: relative;
	z-index: 5;
}

.news-date-full,
.date-manual {
	font-size: 1.1rem;
	font-weight: 400;
}

/* ============================================
   CATEGORY TAGS & RIGHTS TREND
   ============================================ */

.tag-bar {
	order: 2;
	margin-bottom: 8px;
	display: flex;
	flex-direction: column; /* This stacks them vertically */
	align-items: center; /* Centers them in the column */
	gap: 10px; /* Slightly more gap looks better in a column */
	width: 100%; /* Ensures the container takes full width */
}

/* Optional: Make the buttons look uniform in a column */
.tag-bar .play-news-btn {
	width: 200px; /* Gives them a consistent width */
	justify-content: center; /* Centers the icon and text inside the button */
}

.tag {
	position: relative;
	z-index: 10;
	opacity: 1;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
	background-image: none;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 0.7rem;
	font-weight: 800;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 0.05rem;
	border: 1px solid rgba(255, 255, 255, 0.7);
}

.tag-down {
	background-color: #ff0000;
}

.tag-unchanged {
	background-color: yellow;
	color: #000; /* Keeps it readable */
	font-weight: bold;
}

.tag-up {
	background-color: #05bd49;
}

/* ============================================
   DATE STYLING (Solid White & Same Size)
   ============================================ */

.news-date-full,
.date-manual {
	color: #000000;
	font-size: 1.05rem;
	font-weight: 600;
	margin-top: 10px;
	opacity: 1;
	text-transform: none;
	letter-spacing: 0.02rem;
	display: block;
}

.date-manual {
	color: #cfcec5;
	font-size: 1.05rem;
	font-weight: 600;
	margin-top: 10px;
	opacity: 1;
	text-transform: none;
	letter-spacing: 0.02rem;
	display: block;
	width: 100%;
}

.news-accordion summary *,
.news-date-full,
.date-manual {
	text-decoration: none;
}

.country-label {
	font-size: 1.1rem;
	font-weight: 900;
	letter-spacing: 0.1rem;
	color: #ffeb3b;
	margin-bottom: 8px;
	text-transform: uppercase;
}

.play-news-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: rgba(228, 3, 3, 1);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: white;

	/* Pill shape is better for thumb-tapping */
	padding: 10px 40px;
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.4);

	/* Typography */
	font-weight: 500;
	font-size: 0.8rem;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	text-decoration: none;

	/* Layering & Shadow */
	z-index: 9999;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);

	/* Smooth transition for interactions */
	transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	margin-top: 15px;
}

.play-news-btn:hover {
	/* background-color: rgba(3, 74, 228, 0.9); */
	transform: translateY(2px); /* Lifts up slightly */
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.play-news-btn:active {
	transform: translateY(1.2);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.play-icon {
	font-size: 16px;
}

/* Optional: Pulse effect when speaking */
.play-news-btn.speaking {
	background-color: #d9534f; /* Changes to red when "Stop" is available */
	animation: pulse 2s infinite;
}

/* --- RESOURCE SECTION --- */

.resource-container {
	display: grid;
	gap: 20px;
	margin-top: 30px;
}

.resource-container .resource-card {
	display: block;
	padding: 10px 0 10px 20px;
	background: transparent !important;
	border-left: 5px solid #0894f1 !important;
	text-decoration: none !important;
	border-radius: 4px;
	border: 1px solid rgba(0, 0, 0, 0.05);
	transition: all 0.2s ease;
}

/* THE TITLE - Electric Blue */
/* Change this in your CSS */
.resource-container a.resource-card .resource-title {
	display: block;
	color: #0894f1 !important;
	font-size: 1.2rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 12px;
}

/* THE DESCRIPTION - Clean Black */
.resource-container a.resource-card .resource-desc {
	display: block;
	font-size: 1rem;
	color: #000000 !important;
	line-height: 1.6;
	margin-bottom: 0; /* No extra space at the bottom of the card */
}

.resource-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
	background: #ffffff !important; /* Flips to white on hover */
}

@keyframes pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

@media screen and (max-width: 480px) {
	.master-grid-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
		padding: 10px;
		gap: 15px;
		z-index: 10;
	}

	.bento-grid {
		display: grid;
		grid-template-columns: 1fr;
		width: 100%;
		gap: 15px;
		position: relative;
		z-index: 10;
	}

	.master-grid-container > *,
	#manual-news-portal,
	.u-u-link,
	.main-header,
	#info-display-area {
		width: 100%;
		max-width: 100%;
		margin: 0 auto;
		box-sizing: border-box;
	}

	.news-accordion .news-content-expanded a,
	.manual-pinned .news-content-expanded a {
		margin-left: 0;
	}
}

/* --- MOBILE GUTTER FIX --- */
@media (max-width: 780px) {
	.master-grid-container {
		width: 100%;
		max-width: 100vw;
		padding: 0 15px;
	}

	.news-accordion summary {
		padding: 20px 15px;
	}

	.news-content-expanded p {
		padding: 0 15px;
		font-size: 1.1rem;
	}
	.news-accordion .news-content-expanded a,
	.manual-pinned .news-content-expanded a {
		margin-left: 0;
	}
}

/* 3. Mobile ONLY (Strictly enforced) */
@media screen and (max-width: 760px) {
	body::before {
		content: "";
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
		z-index: -1;
		background: url("images/world_img_mobile.webp") center/cover no-repeat;
		filter: brightness(0.9) contrast(1.5) saturate(1.8);
		background-color: rgba(73, 73, 68, 0.141);
		background-blend-mode: multiply;
		background-repeat: no-repeat;
		background-position: center;
		background-size: cover;
		pointer-events: none;
	}
}

@media (min-width: 780px) and (max-width: 1100px) {
	.master-grid-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		padding: 0 30px 40px 30px;
	}

	.bento-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
		gap: 20px;
	}
}

/* 27" Monitor "Studio Mode" */
@media (min-width: 1700px) {
	.home-hero {
		margin-top: 6vh;
		text-align: center;
	}

	.home-hero .main-title {
		font-size: 5rem;
	}
}

/* 30" Monitor "Studio Mode" */
@media (min-width: 2000px) {
	.home-hero {
		margin-top: 17vh;
		text-align: center;
	}

	.home-hero .main-title {
		font-size: 5rem;
	}
}
