/**
 * Frontend Styles for WooCommerce Easy Custom Sections
 */

/* Container */
.wcecs-frontend-container {
	margin-top: 30px;
	margin-bottom: 30px;
	color: #334155;
	font-family: inherit; /* Inherits from active WordPress theme */
}

/* Base Section Styling */
.wcecs-section {
	margin-bottom: 45px;
}

.wcecs-section:last-child {
	margin-bottom: 0;
}

.wcecs-section-tagline {
	text-transform: uppercase;
	font-size: 11px;
	font-weight: 700;
	color: #059669; /* green */
	letter-spacing: 0.1em;
	margin-bottom: 8px;
}

.wcecs-section-desc {
	font-size: 15px;
	line-height: 1.6;
	color: #64748b; /* slate gray */
}

.wcecs-section-title {
	font-size: 26px;
	font-weight: 700;
	color: #0f172a;
	margin-top: 0;
	margin-bottom: 15px;
}

/* 1. Paragraph Section */
.wcecs-paragraph-content {
	font-size: 16px;
	line-height: 1.7;
	color: #475569;
}

.wcecs-paragraph-content p {
	margin-bottom: 15px;
}

.wcecs-paragraph-content p:last-child {
	margin-bottom: 0;
}

/* 2. Table Section */
.wcecs-table-wrapper {
	overflow-x: auto;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
	border: 1px solid #e2e8f0;
	margin-bottom: 20px;
}

.wcecs-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	font-size: 15px;
}

.wcecs-table th,
.wcecs-table td {
	padding: 14px 18px;
	border-bottom: 1px solid #e2e8f0;
}

.wcecs-table th {
	background-color: #14532d;
	color: #ffffff;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wcecs-table tbody tr:last-child td {
	border-bottom: none;
}

.wcecs-table tbody tr:nth-child(even) {
	background-color: #f8fafc;
}

.wcecs-table tbody tr:hover {
	background-color: #f1f5f9;
}

/* 3. Cards Section */
.wcecs-cards-grid {
	display: grid;
	gap: 25px;
	margin-top: 10px;
}

/* Responsive Desktop Columns */
.wcecs-cards-grid.wcecs-cols-1 { grid-template-columns: 1fr; }
.wcecs-cards-grid.wcecs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.wcecs-cards-grid.wcecs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.wcecs-cards-grid.wcecs-cols-4 { grid-template-columns: repeat(4, 1fr); }
.wcecs-cards-grid.wcecs-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* Responsive Tablet Fallback */
@media (max-width: 992px) {
	.wcecs-cards-grid.wcecs-cols-3,
	.wcecs-cards-grid.wcecs-cols-4,
	.wcecs-cards-grid.wcecs-cols-5 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* Responsive Mobile Fallback */
@media (max-width: 576px) {
	.wcecs-cards-grid {
		grid-template-columns: 1fr !important;
		gap: 20px;
	}
}

/* Centered premium Card item matching the design reference */
.wcecs-card-item {
	background: #ffffff;
	border-width: 1.5px; /* Slightly thicker, cleaner border */
	border-radius: 16px; /* Premium curvature */
	padding: 35px 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s;
	display: flex;
	flex-direction: column;
	align-items: center; /* Center-align elements horizontally */
	text-align: center; /* Center text align */
	height: 100%;
	box-sizing: border-box;
}

.wcecs-card-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.wcecs-card-icon {
	width: calc(var(--wcecs-icon-size, 24px) * 2);
	height: calc(var(--wcecs-icon-size, 24px) * 2);
	border-radius: 12px;
	background-color: var(--wcecs-icon-bg, #eff6ff);
	color: var(--wcecs-icon-color, #3b82f6);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	flex-shrink: 0;
	transition: background-color 0.3s, color 0.3s;
}

.wcecs-card-item:hover .wcecs-card-icon {
	background-color: var(--wcecs-icon-color, #3b82f6) !important;
	color: #ffffff !important;
}

.wcecs-card-icon svg {
	width: var(--wcecs-icon-size, 24px);
	height: var(--wcecs-icon-size, 24px);
}

.wcecs-card-title {
	font-size: 16px;
	font-weight: 700;
	color: #005f5f; /* Premium dark forest green/teal as shown in image */
	margin-top: 0;
	margin-bottom: 12px;
	line-height: 1.4;
}

.wcecs-card-desc {
	font-size: 14px;
	line-height: 1.6;
	color: #475569;
	margin-bottom: 0;
	flex-grow: 1;
}

.wcecs-card-desc p {
	margin: 0 0 10px 0;
}

.wcecs-card-desc p:last-child {
	margin-bottom: 0;
}

/* Button (Centered block style) */
.wcecs-card-button {
	margin-top: 18px;
	display: inline-block;
	text-align: center;
	background-color: #3b82f6;
	color: #ffffff;
	font-weight: 600;
	font-size: 14px;
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none !important;
	transition: background-color 0.2s, transform 0.15s;
}

.wcecs-card-button:hover {
	background-color: #1d4ed8;
	color: #ffffff !important;
}

.wcecs-card-button:active {
	transform: scale(0.98);
}

/* 4. FAQ Accordion Section */
.wcecs-faq-accordion {
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #ffffff;
	overflow: hidden;
}

.wcecs-faq-item {
	border-bottom: 1px solid #e2e8f0;
}

.wcecs-faq-item:last-child {
	border-bottom: none;
}

.wcecs-faq-trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	background: transparent;
	border: none;
	cursor: pointer;
	text-align: left;
	transition: background-color 0.2s;
}

.wcecs-faq-trigger:hover {
	background-color: #f8fafc;
}

.wcecs-faq-question {
	font-size: 16px;
	font-weight: 600;
	color: #0f172a;
	padding-right: 15px;
}

.wcecs-faq-icon {
	color: #64748b;
	transition: transform 0.3s ease, color 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.wcecs-faq-item.is-active .wcecs-faq-icon {
	transform: rotate(180deg);
	color: #3b82f6;
}

.wcecs-faq-panel {
	display: none; /* Controlled by jQuery slideToggle */
	background-color: #ffffff;
	border-top: 1px solid #f1f5f9;
}

.wcecs-faq-content {
	padding: 18px 24px;
	font-size: 15px;
	line-height: 1.65;
	color: #475569;
}

.wcecs-faq-content p {
	margin: 0 0 15px 0;
}

.wcecs-faq-content p:last-child {
	margin-bottom: 0;
}
