/* --- Events Section --- */
.events-section {
	padding: 4rem 0;
	background-color: #f9f9f9;
}

.events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 2rem;
}

.event-card {
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
	padding: 1.5rem;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
	position: relative;
}

.event-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.event-date {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 0.5rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.event-title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
	color: #333;
}

.event-location {
	font-size: 0.95rem;
	color: #555;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.event-description {
	font-size: 0.9rem;
	color: #666;
	line-height: 1.5;
	margin-bottom: 1rem;
}

.event-hostname {
	font-size: 0.9rem;
	color: #555;
	margin-bottom: 0.75rem;
	padding: 0.5rem;
	background-color: #f8f9fa;
	border-radius: 6px;
}

.event-hostname strong {
	color: #333;
}

.event-attendees {
	margin-top: auto;
	font-size: 0.9rem;
	color: #777;
	margin-bottom: 1rem;
	padding: 0.5rem;
	border-radius: 6px;
	background-color: #f0f0f0;
	font-weight: 600;
}

.event-attendees.almost-full {
	background-color: #fff3cd;
	color: #856404;
}

.event-attendees.full {
	background-color: #f8d7da;
	color: #721c24;
}

.event-attendees-list {
	margin-top: 0.5rem;
	font-size: 0.85rem;
	color: #666;
	line-height: 1.4;
}

.event-games-list {
	margin-top: 0.75rem;
	margin-bottom: 0.75rem;
	padding: 0.75rem;
	background-color: #e8f4f8;
	border-left: 4px solid #4a90e2;
	border-radius: 6px;
	font-size: 0.9rem;
	color: #333;
	line-height: 1.5;
}

.event-games-list strong {
	color: #2c5aa0;
}

.event-location .maps-link {
	color: #4a90e2;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s;
}

.event-location .maps-link:hover {
	color: #357abd;
	text-decoration: underline;
}

.event-full-badge {
	position: absolute;
	top: 1rem;
	right: 1rem;
	background-color: #dc3545;
	color: white;
	padding: 0.4rem 0.8rem;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.event-actions {
	margin-top: 1rem;
}

.btn-rsvp {
	width: 100%;
	text-align: center;
	background-color: var(--primary-color, #4a90e2);
	/* Fallback color */
	color: white;
	padding: 0.75rem;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: background-color 0.2s;
}

.btn-rsvp:hover {
	background-color: var(--primary-dark, #357abd);
}

.btn-rsvp:disabled,
.btn-rsvp.disabled {
	background-color: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.btn-rsvp.disabled:hover {
	background-color: #ccc;
}

/* --- Modal --- */
.modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.modal-content {
	background-color: #fefefe;
	margin: 10% auto;
	padding: 2rem;
	border: 1px solid #888;
	width: 90%;
	max-width: 500px;
	border-radius: 12px;
	position: relative;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.close-modal {
	color: #aaa;
	float: right;
	font-size: 28px;
	font-weight: bold;
	cursor: pointer;
	line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
	color: black;
	text-decoration: none;
	cursor: pointer;
}

.loading-spinner {
	grid-column: 1 / -1;
	text-align: center;
	padding: 2rem;
	color: #666;
	font-size: 1.1rem;
}

/* --- Form Styles --- */
.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: #333;
}

.form-group input {
	width: 100%;
	padding: 0.75rem;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 1rem;
	transition: border-color 0.2s;
	font-family: 'Poppins', sans-serif;
}

.form-group input:focus {
	outline: none;
	border-color: var(--primary-color, #4a90e2);
}

.form-message {
	margin-top: 1rem;
	padding: 0.75rem;
	border-radius: 8px;
	display: none;
	font-size: 0.9rem;
}

.form-message.success {
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

.form-message.error {
	background-color: #f8d7da;
	color: #721c24;
	border: 1px solid #f5c6cb;
}

.btn-primary {
	background-color: var(--primary-color, #4a90e2);
	color: white;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s;
	width: 100%;
}

.btn-primary:hover {
	background-color: var(--primary-dark, #357abd);
}