/**
 * Event Calendar Frontend Styles
 */

/* Reset and Base */
.ec-carousel-wrapper,
.ec-archive-wrapper,
.ec-single-event {
	max-width: 100%;
	margin: 0 auto;
}

/* Carousel */
.ec-carousel-wrapper {
	position: relative;
	padding: 0 60px;
	margin: 40px 0;
	max-width: 100%;
	box-sizing: border-box;
}

.ec-carousel {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 20px 0;
	max-width: 100%;
	box-sizing: border-box;
}

.ec-carousel::-webkit-scrollbar {
	display: none;
}

/* Default carousel item width */
.ec-carousel-item {
	flex: 0 0 auto;
	min-width: 280px;
	width: calc((100% - (3 * 16px)) / 3);
}

/* Dynamic carousel item width based on data attributes - Desktop with peek effect */
.ec-carousel[data-desktop-cards="1"] .ec-carousel-item {
	flex: 0 0 auto;
	width: calc(100% - 60px);
	min-width: calc(100% - 60px);
	margin-right: 16px;
}

.ec-carousel[data-desktop-cards="2"] .ec-carousel-item {
	flex: 0 0 auto;
	width: calc((100% - 16px - 60px) / 2);
	min-width: calc((100% - 16px - 60px) / 2);
	margin-right: 16px;
}

.ec-carousel[data-desktop-cards="3"] .ec-carousel-item {
	flex: 0 0 auto;
	width: calc((100% - (2 * 16px) - 60px) / 3);
	min-width: calc((100% - (2 * 16px) - 60px) / 3);
	margin-right: 16px;
}

.ec-carousel[data-desktop-cards="4"] .ec-carousel-item {
	flex: 0 0 auto;
	width: calc((100% - (3 * 16px) - 60px) / 4);
	min-width: calc((100% - (3 * 16px) - 60px) / 4);
	margin-right: 16px;
}

.ec-carousel[data-desktop-cards="5"] .ec-carousel-item {
	flex: 0 0 auto;
	width: calc((100% - (4 * 16px) - 60px) / 5);
	min-width: calc((100% - (4 * 16px) - 60px) / 5);
	margin-right: 16px;
}

.ec-carousel[data-desktop-cards="6"] .ec-carousel-item {
	flex: 0 0 auto;
	width: calc((100% - (5 * 16px) - 60px) / 6);
	min-width: calc((100% - (5 * 16px) - 60px) / 6);
	margin-right: 16px;
}

/* Add padding to show peek effect */
.ec-carousel[data-desktop-cards] {
	padding-right: 20px;
}

/* Event Card */
.ec-event-card {
	background: #ffffff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
	max-width: 100%;
}

.ec-event-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.ec-event-image {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f5f5f5;
}

.ec-event-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ec-event-card:hover .ec-event-image img {
	transform: scale(1.05);
}

.ec-event-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.ec-event-content {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}

.ec-event-label {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 10px;
	align-self: flex-start;
}

.ec-event-upcoming .ec-event-label {
	background: #e8f5e9;
	color: #2e7d32;
}

.ec-event-finished .ec-event-label {
	background: #f3e5f5;
	color: #7b1fa2;
}

.ec-event-title {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 12px 0;
	color: #1a1a1a;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphens: auto;
}

.ec-event-title a {
	color: inherit;
	text-decoration: none !important;
	transition: color 0.2s;
	border-bottom: none !important;
}

.ec-event-title a:hover {
	color: #2271b1;
}

.ec-event-date {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #666;
	margin-bottom: 12px;
}

.ec-event-date svg {
	flex-shrink: 0;
	color: #999;
}

.ec-event-time {
	margin-left: 4px;
}

.ec-event-location {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #666;
	margin-bottom: 12px;
}

.ec-event-location svg {
	flex-shrink: 0;
	color: #999;
}

.ec-event-excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin-bottom: 16px;
	flex: 1;
}

.ec-event-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #2271b1;
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	margin-top: auto;
	transition: gap 0.2s;
}

.ec-event-link:hover {
	gap: 12px;
}

/* Carousel Navigation */
.ec-carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	pointer-events: none;
	width: 100%;
	left: 0;
	right: 0;
}

.ec-carousel-prev {
	position: absolute;
	left: 0;
	pointer-events: auto;
}

.ec-carousel-next {
	position: absolute;
	right: 0;
	left: auto;
	pointer-events: auto;
}

.ec-carousel-prev,
.ec-carousel-next {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ec-carousel-prev:hover,
.ec-carousel-next:hover {
	background: #f5f5f5;
	border-color: #2271b1;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ec-carousel-prev svg,
.ec-carousel-next svg {
	color: #333;
	width: 20px;
	height: 20px;
}

/* Archive Page */
.ec-archive-wrapper {
	padding: 40px 20px;
	max-width: 1200px;
	margin: 0 auto;
}

.ec-archive-header {
	margin-bottom: 40px;
}

.ec-archive-title {
	font-size: 36px;
	font-weight: 700;
	margin: 0 0 30px 0;
	color: #1a1a1a;
}

.ec-archive-filters {
	background: #f9f9f9;
	padding: 24px;
	border-radius: 12px;
}

.ec-filter-form {
	display: flex;
	gap: 20px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.ec-filter-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	min-width: 150px;
}

.ec-filter-group label {
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

.ec-filter-select {
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.2s;
}

.ec-filter-select:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.ec-filter-submit {
	padding: 10px 24px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.ec-filter-submit:hover {
	background: #135e96;
}

.ec-events-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.ec-no-events {
	text-align: center;
	padding: 60px 20px;
	background: #f9f9f9;
	border-radius: 12px;
	color: #666;
}

.ec-no-events p {
	font-size: 16px;
	margin: 0;
}

/* Single Event */
.ec-single-event {
	max-width: 1400px;
	margin: 0 auto;
	padding: 40px 20px;
}

.ec-club-signup {
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid #e0e0e0;
}

.ec-club-signup-content {
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border: 1px solid #e8e8e8;
	border-radius: 16px;
	padding: 32px;
	display: flex;
	align-items: center;
	gap: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.3s ease;
}

.ec-club-signup-content:hover {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ec-club-signup-icon {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	background: #e8f5e9;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #2e7d32;
}

.ec-club-signup-icon svg {
	width: 28px;
	height: 28px;
}

.ec-club-signup-text {
	flex: 1;
	min-width: 0;
}

.ec-club-signup-title {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: #1a1a1a;
	line-height: 1.4;
}

.ec-club-signup-subtitle {
	margin: 0;
	font-size: 14px;
	color: #666;
	line-height: 1.6;
}

.ec-club-signup-action {
	flex-shrink: 0;
}

.ec-club-signup-btn {
	display: inline-block;
	padding: 12px 24px;
	background: #1a1a1a;
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.ec-club-signup-btn:hover {
	background: #333333;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ec-single-carousel {
	margin-top: 60px;
}

.ec-carousel-header {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 30px 0;
	color: #1a1a1a;
	text-align: center;
}

.ec-carousel-note {
	text-align: center;
	margin-top: 10px;
	margin-bottom: 30px;
	font-size: 16px;
	color: #666;
	font-style: italic;
}

.ec-view-all-events {
	text-align: center;
	margin-top: 40px;
}

.ec-view-all-btn {
	display: inline-block;
	padding: 12px 32px;
	background: #1a1a1a;
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.ec-view-all-btn:hover {
	background: #333333;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ec-single-wrapper {
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

.ec-single-image {
	flex: 0 0 500px;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	background: #f5f5f5;
	aspect-ratio: 3 / 4;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ec-single-image img {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: center center;
	min-width: 100%;
	min-height: 100%;
}

.ec-single-content {
	flex: 1;
	background: #fff;
	border-radius: 16px;
	padding: 40px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	min-width: 0;
}

.ec-single-content.ec-event-upcoming .ec-event-label {
	background: #e8f5e9;
	color: #2e7d32;
}

.ec-single-content.ec-event-finished .ec-event-label {
	background: #f3e5f5;
	color: #7b1fa2;
}

.ec-single-meta {
	margin-bottom: 30px;
	padding-bottom: 30px;
	border-bottom: 1px solid #e0e0e0;
}

.ec-single-title {
	font-size: 36px;
	font-weight: 700;
	margin: 16px 0;
	color: #1a1a1a;
	line-height: 1.3;
}

.ec-single-date,
.ec-single-location {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	color: #666;
	margin-top: 16px;
}

.ec-single-date svg,
.ec-single-location svg {
	flex-shrink: 0;
	color: #999;
}

.ec-single-body {
	font-size: 16px;
	line-height: 1.8;
	color: #333;
	margin-bottom: 40px;
}

.ec-single-body p {
	margin-bottom: 20px;
}

.ec-single-gallery {
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid #e0e0e0;
}

.ec-single-gallery h2 {
	font-size: 24px;
	font-weight: 600;
	margin: 0 0 24px 0;
	color: #1a1a1a;
}

.ec-gallery-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
}

.ec-gallery-grid .ec-gallery-item {
	aspect-ratio: 1;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.2s;
}

.ec-gallery-grid .ec-gallery-item:hover {
	transform: scale(1.05);
}

.ec-gallery-grid .ec-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Pagination */
.ec-archive-content .wp-pagination,
.ec-archive-content .pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 40px;
}

.ec-archive-content .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-decoration: none;
	color: #333;
	font-weight: 500;
	transition: all 0.2s;
}

.ec-archive-content .page-numbers:hover,
.ec-archive-content .page-numbers.current {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

/* Tablet Responsive (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
	.ec-carousel-wrapper {
		padding: 0 50px;
	}
	
	/* Tablet carousel with peek effect */
	.ec-carousel[data-desktop-cards="1"] .ec-carousel-item,
	.ec-carousel[data-desktop-cards="2"] .ec-carousel-item,
	.ec-carousel[data-desktop-cards="3"] .ec-carousel-item,
	.ec-carousel[data-desktop-cards="4"] .ec-carousel-item {
		width: calc((100% - (2 * 16px) - 60px) / 3);
		min-width: calc((100% - (2 * 16px) - 60px) / 3);
		margin-right: 16px;
	}
	
	.ec-carousel[data-desktop-cards] {
		padding-right: 20px;
	}
	
	.ec-carousel-prev {
		left: 0;
	}
	
	.ec-carousel-next {
		right: 0;
		left: auto;
	}
}

/* Laptop Responsive (1024px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
	.ec-carousel-wrapper {
		padding: 0 60px;
	}
	
	/* Laptop carousel with peek effect - show 3 cards */
	.ec-carousel[data-desktop-cards="4"] .ec-carousel-item {
		width: calc((100% - (2 * 16px) - 60px) / 3);
		min-width: calc((100% - (2 * 16px) - 60px) / 3);
		margin-right: 16px;
	}
	
	.ec-carousel[data-desktop-cards="5"] .ec-carousel-item,
	.ec-carousel[data-desktop-cards="6"] .ec-carousel-item {
		width: calc((100% - (3 * 16px) - 60px) / 4);
		min-width: calc((100% - (3 * 16px) - 60px) / 4);
		margin-right: 16px;
	}
	
	.ec-carousel[data-desktop-cards] {
		padding-right: 20px;
	}
	
	.ec-carousel-next {
		left: calc(100% - 70px);
	}
}

/* Desktop Responsive (above 1440px) */
@media (min-width: 1441px) {
	.ec-carousel-wrapper {
		padding: 0 70px;
	}
	
	.ec-carousel-prev {
		left: 0;
	}
	
	.ec-carousel-next {
		right: 0;
		left: auto;
	}
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.ec-carousel-wrapper {
		padding: 0 0;
	}
	
	.ec-carousel {
		gap: 12px;
	}
	
	/* Dynamic mobile carousel item width - override desktop styles */
	/* Peek effect for mobile with 1 card - shows partial next card */
	.ec-carousel[data-mobile-cards="1"] .ec-carousel-item {
		flex: 0 0 auto;
		width: calc(100% - 60px);
		min-width: calc(100% - 60px);
		margin-right: 12px;
	}
	
	.ec-carousel[data-mobile-cards="1"] {
		padding-left: 20px;
		padding-right: 20px;
	}
	
	.ec-carousel[data-mobile-cards="2"] .ec-carousel-item {
		flex: 0 0 auto;
		width: calc((100% - 12px) / 2);
		min-width: calc((100% - 12px) / 2);
	}
	
	.ec-carousel[data-mobile-cards="3"] .ec-carousel-item {
		flex: 0 0 auto;
		width: calc((100% - (2 * 12px)) / 3);
		min-width: calc((100% - (2 * 12px)) / 3);
	}
	
	.ec-carousel-prev {
		left: 5px;
	}
	
	.ec-carousel-next {
		left: calc(100% - 55px);
	}
	
	.ec-carousel-prev,
	.ec-carousel-next {
		width: 40px;
		height: 40px;
	}
	
	.ec-carousel-prev svg,
	.ec-carousel-next svg {
		width: 16px;
		height: 16px;
	}
	
	.ec-archive-title {
		font-size: 28px;
	}
	
	.ec-filter-form {
		flex-direction: column;
	}
	
	.ec-filter-group {
		width: 100%;
	}
	
	.ec-filter-submit {
		width: 100%;
	}
	
	.ec-events-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}
	
	.ec-single-wrapper {
		flex-direction: column;
		gap: 24px;
	}
	
	.ec-single-image {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		aspect-ratio: 1 / 1;
	}
	
	.ec-single-content {
		padding: 24px;
		width: 100%;
	}
	
	.ec-single-title {
		font-size: 24px;
	}
	
	.ec-single-meta {
		margin-bottom: 24px;
		padding-bottom: 24px;
	}
	
	.ec-club-signup-content {
		flex-direction: column;
		text-align: center;
		padding: 24px;
		gap: 20px;
	}
	
	.ec-club-signup-icon {
		width: 48px;
		height: 48px;
	}
	
	.ec-club-signup-icon svg {
		width: 24px;
		height: 24px;
	}
	
	.ec-club-signup-title {
		font-size: 16px;
	}
	
	.ec-club-signup-subtitle {
		font-size: 13px;
	}
	
	.ec-single-title {
		font-size: 28px;
	}
	
	.ec-gallery-grid {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	}
}

@media (max-width: 480px) {
	.ec-carousel-wrapper {
		padding: 0 40px;
	}
	
	/* Small mobile - keep responsive */
	.ec-carousel-item {
		min-width: 260px;
		max-width: 85%;
	}
	
	.ec-event-title {
		font-size: 15px;
	}
	
	.ec-event-date {
		font-size: 12px;
	}
	
	.ec-event-label {
		font-size: 10px;
		padding: 3px 8px;
	}
	
	.ec-archive-wrapper,
	.ec-single-event {
		padding: 20px 15px;
	}
	
	.ec-archive-title {
		font-size: 24px;
	}
	
	.ec-single-title {
		font-size: 22px;
	}
	
	.ec-single-image {
		aspect-ratio: 1 / 1;
	}
	
	.ec-single-content {
		padding: 20px;
	}
	
	.ec-single-body {
		font-size: 15px;
		line-height: 1.7;
	}
	
	.ec-club-signup-content {
		padding: 20px;
		gap: 16px;
	}
	
	.ec-carousel-header {
		font-size: 24px;
		margin-bottom: 20px;
	}
	
	.ec-carousel-note {
		font-size: 14px;
		margin-top: 20px;
	}
}

