/* ==========================================================================
   Ecorazzi — base styles
   Foundation only: variables, typography, header, generic card, badges,
   poll bars. The homepage grid layout (matching the mockup) is next.
   ========================================================================== */

:root {
	--ecorazzi-red: #dc2626;
	--ecorazzi-dark: #111827;
	--ecorazzi-gray: #6b7280;
	--ecorazzi-border: #e5e7eb;
	--ecorazzi-bg: #f9fafb;
	--ecorazzi-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
	font-family: var(--ecorazzi-font);
	color: var(--ecorazzi-dark);
	background: #fff;
	margin: 0;
}

a { text-decoration: none; color: inherit; }

/* ---- Header ---- */
.ecorazzi-header {
	border-bottom: 1px solid var(--ecorazzi-border);
}
.ecorazzi-header-inner {
	max-width: 1400px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 24px;
	padding: 16px 24px;
}
.ecorazzi-logo { font-size: 1.5rem; font-weight: 800; }
.ecorazzi-search { flex: 1; display: flex; max-width: 480px; }
.ecorazzi-search input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--ecorazzi-border);
	border-radius: 6px 0 0 6px;
}
.ecorazzi-search button {
	border: 1px solid var(--ecorazzi-border);
	border-left: none;
	background: var(--ecorazzi-bg);
	border-radius: 0 6px 6px 0;
	padding: 0 14px;
	cursor: pointer;
}
.ecorazzi-header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.ecorazzi-subscribe-btn {
	background: var(--ecorazzi-red);
	color: #fff;
	padding: 10px 18px;
	border-radius: 6px;
	font-weight: 600;
}
.ecorazzi-primary-nav ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0;
	padding: 12px 24px;
	max-width: 1400px;
	margin-inline: auto;
}
.ecorazzi-primary-nav a { font-weight: 600; font-size: 0.95rem; }

/* ---- Category badge ---- */
.ecorazzi-badge {
	display: inline-block;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 4px;
}

/* ---- Generic post card (used by index.php fallback; homepage grid cards come next) ---- */
.ecorazzi-post-card {
	margin-bottom: 32px;
}
.ecorazzi-post-card img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
	margin-bottom: 12px;
}
.ecorazzi-post-card h2 { font-size: 1.2rem; margin: 8px 0; }
.ecorazzi-post-card p { color: var(--ecorazzi-gray); }

/* ---- Poll widget ---- */
.ecorazzi-poll-option { margin-bottom: 10px; }
.ecorazzi-poll-bar {
	background: var(--ecorazzi-bg);
	border-radius: 4px;
	height: 8px;
	overflow: hidden;
}
.ecorazzi-poll-bar-fill {
	background: var(--ecorazzi-red);
	height: 100%;
	width: 0%;
	transition: width 0.4s ease;
}
.ecorazzi-poll-vote-btn {
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	text-align: left;
	width: 100%;
}
.ecorazzi-poll.is-voted .ecorazzi-poll-vote-btn { pointer-events: none; }

/* ---- Sidebar boxes (generic container; homepage pass refines per-box) ---- */
.ecorazzi-sidebar-box {
	border: 1px solid var(--ecorazzi-border);
	border-radius: 8px;
	padding: 16px;
	margin-bottom: 20px;
}
.ecorazzi-sidebar-box h3 { margin-top: 0; font-size: 1rem; }

/* ---- Footer ---- */
.ecorazzi-footer {
	border-top: 1px solid var(--ecorazzi-border);
	padding: 24px;
	text-align: center;
	color: var(--ecorazzi-gray);
	font-size: 0.85rem;
}
