/*
 * iWebAndSEO theme — components layer
 * Cards, grids, testimonials, FAQ accordion, CTA panel, forms, comments.
 */

/* ---------- Card grid ---------- */

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1.5rem;
}

/* ---------- Cards ---------- */

.card {
	display: flex;
	flex-direction: column;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform var(--duration) ease, box-shadow var(--duration) ease;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow);
}

.card-media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 300ms ease;
}

.card:hover .card-media img {
	transform: scale(1.04);
}

.card-body {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	padding: 1.5rem;
	flex: 1;
}

.card-title {
	font-size: 1.2rem;
	line-height: 1.3;
	letter-spacing: -0.01em;
}

.card-title a {
	color: var(--ink);
	text-decoration: none;
}

.card-title a:hover {
	color: var(--brand-strong);
	text-decoration: underline;
}

.card-eyebrow {
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--brand);
}

.card-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.card-eyebrow a:hover {
	text-decoration: underline;
}

.card-excerpt {
	color: var(--text-muted);
	font-size: 0.9375rem;
}

.card-icon {
	color: var(--brand);
}

.card-icon svg {
	width: 1.75rem;
	height: 1.75rem;
}

.card-link {
	margin-top: auto;
	padding-top: 0.35rem;
}

.card-link a {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	color: var(--brand-strong);
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
}

.card-link a:hover {
	text-decoration: underline;
}

.card-link a:hover .icon svg {
	transform: translateX(3px);
}

/* ---------- Case study metrics ---------- */

.case-metrics {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 1.75rem;
	list-style: none;
	padding: 0;
	margin-top: 0.5rem;
}

.case-metric .metric-value {
	display: block;
	font-weight: 800;
	color: var(--accent-strong);
	font-size: 1.05rem;
	letter-spacing: -0.01em;
}

.case-metric .metric-label {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.case-project-link {
	margin-top: 2rem;
}

/* ---------- Testimonials ---------- */

.testimonial-card {
	padding: 1.75rem;
}

.testimonial-quote {
	margin: 0 0 1.25rem;
}

.testimonial-quote p {
	font-size: 1.05rem;
	line-height: 1.55;
	color: var(--text);
	text-wrap: pretty;
}

.testimonial-quote p + p {
	margin-top: 0.75rem;
}

.testimonial-attribution {
	display: flex;
	align-items: center;
	gap: 0.85rem;
}

.testimonial-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
}

.testimonial-initials {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--brand-soft);
	color: var(--brand-strong);
	font-weight: 700;
	font-size: 0.9rem;
	flex-shrink: 0;
}

.testimonial-person {
	display: flex;
	flex-direction: column;
	line-height: 1.35;
}

.testimonial-name {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--ink);
}

.testimonial-role {
	color: var(--text-muted);
	font-size: 0.8125rem;
}

.testimonial-feature {
	margin: 2.5rem 0 0;
	border-left: 4px solid var(--accent);
}

/* ---------- FAQ accordion ---------- */

.faq-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.faq-item {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	overflow: hidden;
}

.faq-question {
	font-size: 1.05rem;
	font-weight: 700;
}

.faq-trigger {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	width: 100%;
	background: none;
	border: 0;
	padding: 1rem 1.25rem;
	font: inherit;
	font-weight: 600;
	text-align: left;
	color: var(--ink);
	cursor: pointer;
}

.faq-trigger .icon svg {
	color: var(--brand);
	flex-shrink: 0;
	transition: transform var(--duration);
}

.faq-item.is-open .faq-trigger .icon svg {
	transform: rotate(90deg);
}

.faq-panel {
	padding: 0 1.25rem 1.1rem;
	color: var(--text-muted);
	font-size: 0.95rem;
}

.faq-panel p + p {
	margin-top: 0.75rem;
}

/* Without JS, all answers stay visible. */
html:not(.iweb-js) .faq-panel[hidden] {
	display: block;
}

/* ---------- CTA panel ---------- */

.cta-section {
	background: var(--ink);
	padding-block: clamp(3rem, 7vw, 5rem);
}

.cta-panel {
	text-align: center;
	color: var(--text-inverse);
	padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem;
	border-radius: var(--radius-lg);
	background: linear-gradient(160deg, rgb(37 99 235 / 0.22), rgb(16 185 129 / 0.09));
	border: 1px solid rgb(255 255 255 / 0.12);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	max-width: 820px;
	margin-inline: auto;
}

.cta-title {
	color: #fff;
	font-size: var(--h2);
	margin-bottom: 0.9rem;
}

.cta-text {
	color: var(--text-inverse-muted);
	font-size: var(--lead);
	max-width: 560px;
	margin: 0 auto 2rem;
}

.cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	justify-content: center;
}

/* ---------- Contact form ---------- */

.contact-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 3rem;
	padding-block: 3.5rem;
}

.contact-intro {
	margin-bottom: 2rem;
}

.form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.25rem;
}

.contact-form p + p {
	margin-top: 1rem;
}

.form-actions {
	margin-top: 1.75rem;
}

.hp-field {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-weight: 400;
	font-size: 0.9rem;
	color: var(--text-muted);
}

.form-consent input[type="checkbox"] {
	width: auto;
	margin-top: 0.25rem;
}

.form-notice {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-radius: var(--radius-sm);
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

.form-success {
	background: #e8f8f1;
	color: #065f46;
	border: 1px solid #a7e3cd;
}

.form-error {
	background: #fdecec;
	color: #7f1d1d;
	border: 1px solid #f5c2c2;
}

.contact-details {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.75rem;
	background: var(--paper-2);
	height: fit-content;
	position: sticky;
	top: calc(var(--header-h) + 1.5rem);
}

.contact-detail {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--text);
	font-size: 0.95rem;
}

.contact-detail .icon {
	color: var(--brand);
}

.contact-detail a {
	color: var(--brand-strong);
	text-decoration: none;
	font-weight: 600;
}

.contact-detail a:hover {
	text-decoration: underline;
}

.contact-cta {
	margin-top: 1rem;
}

@media (max-width: 900px) {
	.contact-layout {
		grid-template-columns: 1fr;
		gap: 1rem;
		padding-block: 2.5rem;
	}

	.contact-details {
		position: static;
	}
}

@media (max-width: 600px) {
	.form-grid {
		grid-template-columns: 1fr;
	}
}

/* ---------- Search form ---------- */

.search-form {
	display: flex;
	gap: 0.5rem;
	max-width: 520px;
}

.search-field {
	flex: 1;
	border-radius: 999px;
	padding: 0.7rem 1.25rem;
}

.search-submit {
	display: inline-flex;
	width: 46px;
	height: 46px;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--brand);
	color: #fff;
	border: 0;
	cursor: pointer;
	flex-shrink: 0;
	transition: background-color var(--duration);
}

.search-submit:hover {
	background: var(--brand-strong);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumbs {
	margin-bottom: 1.25rem;
	font-size: 0.85rem;
}

.breadcrumbs-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	padding: 0;
	color: var(--text-muted);
}

.breadcrumb-item + .breadcrumb-item::before {
	content: "/";
	margin-right: 0.4rem;
	opacity: 0.5;
}

.breadcrumb-item a {
	color: inherit;
	text-decoration: none;
}

.breadcrumb-item a:hover {
	text-decoration: underline;
	color: var(--brand-strong);
}

.breadcrumb-item.is-current {
	color: var(--text);
}

/* ---------- Pagination ---------- */

.pagination,
.navigation.pagination {
	margin-top: 2.75rem;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.page-numbers {
	display: inline-flex;
	min-width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	padding: 0 0.6rem;
	border-radius: 50%;
	border: 1px solid var(--line);
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
}

a.page-numbers:hover {
	border-color: var(--brand);
	color: var(--brand-strong);
	text-decoration: none;
}

.page-numbers.current {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}

.page-numbers.dots {
	border: 0;
}

.page-links {
	margin-top: 1.5rem;
}

.page-links a {
	text-decoration: none;
	padding: 0.2em 0.5em;
	border: 1px solid var(--line);
	border-radius: 4px;
	margin-right: 0.3rem;
	display: inline-block;
}

/* ---------- Chips ---------- */

.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin-top: 1.25rem;
}

.chip {
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	background: var(--brand-soft);
	color: var(--brand-strong);
	font-size: 0.8125rem;
	font-weight: 600;
}

.chip a {
	color: inherit;
	text-decoration: none;
}

.chip a:hover {
	text-decoration: underline;
}

.service-chips {
	margin-top: 2.5rem;
}

/* ---------- Author box ---------- */

.author-box {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.5rem 1.75rem;
	margin-top: 2.5rem;
}

.author-box img {
	border-radius: 50%;
}

.author-title {
	font-size: 1.05rem;
	margin-bottom: 0.25rem;
}

.author-bio {
	color: var(--text-muted);
	font-size: 0.95rem;
}

.author-link {
	margin-top: 0.5rem;
	font-size: 0.9rem;
}

.author-link a {
	font-weight: 600;
	text-decoration: none;
}

.author-link a:hover {
	text-decoration: underline;
}

/* ---------- Comments ---------- */

.comments-area {
	margin-top: 3rem;
}

.comments-title {
	font-size: 1.35rem;
	margin-bottom: 1.5rem;
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .comment-body {
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--line);
}

.comment-list .children {
	list-style: none;
	padding-left: 2rem;
}

.comment-author img {
	float: left;
	margin-right: 0.75rem;
	border-radius: 50%;
}

.comment-author .fn {
	font-weight: 700;
	font-style: normal;
}

.comment-metadata {
	font-size: 0.8rem;
}

.comment-metadata a {
	color: inherit;
}

.comment-content p {
	margin: 0.5rem 0 0.25rem;
}

.reply {
	font-size: 0.85rem;
	margin-top: 0.5rem;
}

.reply a {
	font-weight: 600;
	text-decoration: none;
}

.reply a:hover {
	text-decoration: underline;
}

.comment-reply-title {
	font-size: 1.15rem;
}

.comment-form input[type="checkbox"] {
	width: auto;
}

.comment-form .submit {
	background: var(--brand);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.7rem 1.5rem;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background-color var(--duration);
}

.comment-form .submit:hover {
	background: var(--brand-strong);
}

.comment-navigation {
	margin: 1.5rem 0;
	display: flex;
	gap: 1rem;
}

.no-comments {
	color: var(--text-muted);
	margin-top: 1rem;
}

/* ---------- Social links ---------- */

.social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
	padding: 0;
}

.social-links a {
	display: inline-flex;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
	background: var(--paper);
	border: 1px solid var(--line);
	color: var(--text);
	transition: background-color var(--duration), color var(--duration), border-color var(--duration);
}

.social-links a:hover {
	background: var(--brand);
	border-color: var(--brand);
	color: #fff;
}

.social-links .icon svg {
	width: 1.1rem;
	height: 1.1rem;
}

/* ---------- Reveal-on-scroll (JS-enhanced, reduced-motion aware) ---------- */

.reveal-init {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity 500ms ease, transform 500ms ease;
}

.reveal-init.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.reveal-init {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ---------- No-results ---------- */

.no-results {
	padding: 2.5rem 0;
}

.no-results .page-content p {
	margin-top: 1rem;
	color: var(--text-muted);
	max-width: 560px;
}

.no-results .search-form {
	margin-top: 1.75rem;
	margin-bottom: 1.75rem;
}

.no-results .page-title {
	font-size: 1.6rem;
}