/* =========================================================================
   WordPress integration styles for the Sugar Sense theme.
   Loaded after style.css; holds everything the original static CSS lacked:
   list restoration inside content, core WP classes, comments, pagination,
   the contact-form notice, and small fixes (footer icon colour, admin bar).
   ========================================================================= */

/* ---- Footer social icons inherit colour via currentColor ---- */
.footer-socials svg { color: #fff; }

/* ---- Store badges / download button: dimmed + non-clickable until a URL is set ---- */
.store-disabled {
	opacity: 0.4;
	cursor: default;
	pointer-events: none;
	filter: grayscale(40%);
}
a.store-link { display: inline-flex; }

/* ---- Admin-bar offset for the fixed header (logged-in editing only) ---- */
body.admin-bar .main-header { top: 48px; }
@media screen and (max-width: 782px) {
	body.admin-bar .main-header { top: 62px; }
}

/* ---- Custom logo sizing (when one is uploaded in the Customizer) ---- */
.custom-logo-link { display: inline-flex; }
.custom-logo { max-height: 48px; width: auto; height: auto; }

/* ---- Restore list markers inside editable content (theme resets ul globally) ---- */
.content-box ul,
.entry-content ul,
.legal-content ul,
.accordion-content ul { list-style: disc; padding-left: 1.4em; margin: 0 0 1.4em; }
.content-box ol,
.entry-content ol,
.legal-content ol,
.accordion-content ol { list-style: decimal; padding-left: 1.6em; margin: 0 0 1.4em; }
.content-box li,
.entry-content li,
.legal-content li,
.accordion-content li { margin-bottom: 0.5em; line-height: 1.7; }
.content-box ul ul,
.content-box ol ol,
.entry-content ul ul,
.entry-content ol ol { margin-bottom: 0; }

/* ---- Content typography for WordPress-generated markup ---- */
.content-box blockquote,
.entry-content blockquote,
.legal-content blockquote {
	margin: 1.6em 0;
	padding: 18px 24px;
	border-left: 4px solid var(--orange);
	background: #fff7f0;
	border-radius: 8px;
	color: #333;
}
.content-box blockquote p:last-child,
.entry-content blockquote p:last-child { margin-bottom: 0; }

.content-box img,
.entry-content img { max-width: 100%; height: auto; border-radius: 12px; }

.content-box figure,
.entry-content figure { margin: 1.6em 0; }
.content-box figcaption,
.entry-content figcaption,
.wp-caption-text { font-size: 0.85em; color: #777; text-align: center; margin-top: 8px; }

.content-box table,
.entry-content table,
.legal-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.6em 0;
	font-size: 0.95em;
}
.content-box th, .content-box td,
.entry-content th, .entry-content td,
.legal-content th, .legal-content td {
	border: 1px solid #e6e9ec;
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}
.content-box th,
.entry-content th,
.legal-content th { background: #f7f9fa; font-weight: 700; }

.content-box p,
.entry-content p,
.legal-content p { line-height: 1.8; }

/* ---- WordPress core alignment + caption classes ---- */
.alignleft  { float: left;  margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { clear: both; }
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; }

/* ---- Accessibility helper ---- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px; width: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: #fff;
	clip: auto !important;
	clip-path: none;
	color: var(--orange);
	display: block;
	height: auto; width: auto;
	left: 6px; top: 6px;
	padding: 12px 18px;
	z-index: 100000;
	border-radius: 8px;
	box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* ---- Pagination (archives / blog index) ---- */
.sugarsense-pagination { margin: 48px 0 16px; }
.sugarsense-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	justify-content: center;
}
.sugarsense-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: 12px;
	border: 1px solid #e6e9ec;
	color: var(--black);
	text-decoration: none;
	font-weight: 600;
	transition: 0.2s;
}
.sugarsense-pagination .page-numbers:hover { border-color: var(--orange); color: var(--orange); }
.sugarsense-pagination .page-numbers.current { background: var(--orange); color: #fff; border-color: var(--orange); }
.sugarsense-pagination .page-numbers.dots { border: none; }

/* ---- Single-post tags ---- */
.entry-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.entry-tags .tag-label { font-weight: 700; }
.entry-tags a {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 999px;
	background: #f7f9fa;
	color: #333;
	text-decoration: none;
	font-size: 0.9em;
	transition: 0.2s;
}
.entry-tags a:hover { background: var(--orange); color: #fff; }

/* ---- Contact form notice ---- */
.ss-form-notice {
	margin-bottom: 24px;
	padding: 14px 18px;
	border-radius: 12px;
	font-weight: 600;
}
.ss-form-notice--success { background: #e8f7ee; color: #1c7a43; border: 1px solid #b8e6c8; }
.ss-form-notice--error   { background: #fdecec; color: #b3261e; border: 1px solid #f3c4c1; }
.ss-honeypot { position: absolute; left: -9999px; top: -9999px; height: 0; width: 0; overflow: hidden; }

/* ---- Comments ---- */
.comments-area { margin-top: 56px; }
.comments-area .comments-title,
.comments-area .comment-reply-title { font-size: 26px; font-weight: 700; margin-bottom: 24px; }
.comment-list { padding-left: 0; margin: 0 0 32px; }
.comment-list,
.comment-list .children { list-style: none; }
.comment-list .children { padding-left: 28px; }
.comment-body { padding: 18px 0; border-bottom: 1px solid #eef1f3; }
.comment-author { display: flex; align-items: center; gap: 12px; }
.comment-author .avatar { border-radius: 50%; }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-metadata { font-size: 0.85em; color: #888; margin: 4px 0 10px; }
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #e6e9ec;
	border-radius: 12px;
	margin-bottom: 14px;
	font-size: 16px;
}
.comment-respond .submit {
	background: var(--orange);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 12px 28px;
	font-weight: 700;
	cursor: pointer;
}

/* ---- Search form ---- */
.search-form { display: flex; gap: 10px; max-width: 520px; }
.search-form .search-field {
	flex: 1;
	padding: 12px 16px;
	border: 1px solid #e6e9ec;
	border-radius: 12px;
	font-size: 16px;
}
.search-form .search-submit {
	background: var(--orange);
	color: #fff;
	border: none;
	border-radius: 12px;
	padding: 12px 24px;
	font-weight: 700;
	cursor: pointer;
}

/* ---- Smart Download page (/download) ---- */
.download-page { padding: 90px 0 120px; }
.download-inner { max-width: 620px; margin: 0 auto; text-align: center; }
.download-logo {
	width: 96px; height: 96px;
	border-radius: 24px;
	box-shadow: 0 14px 36px rgba(253, 141, 56, 0.28);
	margin-bottom: 28px;
}
.download-title { font-size: 46px; font-weight: 800; line-height: 1.1; margin: 0 0 16px; color: var(--black); }
.download-subtext { font-size: 20px; line-height: 1.6; color: #555; max-width: 520px; margin: 0 auto 36px; }
.download-store {
	display: flex;
	gap: 16px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}
.download-store img { height: 56px; width: auto; }
.download-redirect-note { font-size: 15px; color: #777; margin: 0 0 24px; }
.download-redirect-note a { color: var(--orange); font-weight: 600; }
.download-hint { font-size: 14px; color: #999; margin-top: 18px; }
@media (max-width: 768px) {
	.download-page { padding: 56px 0 80px; }
	.download-title { font-size: 32px; }
	.download-subtext { font-size: 17px; }
	.download-store img { height: 48px; }
}

/* ---- Empty-state / 404 ---- */
.ss-empty { padding: 40px 0 60px; }
.ss-empty .ss-empty-title { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.ss-empty p { margin-bottom: 20px; color: #555; }

/* ---- Avatar fallback for testimonials without a photo ---- */
.testimonial-img-box .ratio-img { background: #f0f3f5; }

/* ---- Testimonials: professional horizontal scroll carousel
        (peek of the next card + scroll-snap + drag + arrows). ---- */
.testimonial-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.testimonial-head .section-title { margin-bottom: 0; }
.ts-controls { display: flex; gap: 10px; }
.ts-nav {
	width: 48px; height: 48px;
	border-radius: 50%;
	border: 2px solid var(--orange);
	background: #fff;
	color: var(--orange);
	font-size: 26px; line-height: 1;
	cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	transition: 0.2s;
	padding: 0;
}
.ts-nav:hover { background: var(--orange); color: #fff; }
.ts-nav[disabled] { opacity: 0.35; cursor: default; }
.ts-nav[disabled]:hover { background: #fff; color: var(--orange); }

.testimonial-grid {
	flex-wrap: nowrap;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	gap: 20px;
	margin-left: 0;
	margin-top: 24px;
	padding: 4px 2px 14px;
	cursor: grab;
	scrollbar-width: none; /* Firefox */
}
.testimonial-grid::-webkit-scrollbar { height: 0; width: 0; } /* WebKit */
.testimonial-grid.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.testimonial-grid > * {
	flex: 0 0 46%;
	width: auto;
	padding-left: 0;
	margin-bottom: 0;
	scroll-snap-align: start;
}
@media (max-width: 1100px) { .testimonial-grid > * { flex-basis: 64%; } }
@media (max-width: 768px)  {
	.testimonial-grid { margin-left: 0; }
	.testimonial-grid > * { flex-basis: 86%; min-width: 0; margin-bottom: 0; padding-left: 0; }
	.ts-controls { display: none; } /* native swipe on touch */
}

/* ---- Hero heading as an <h1> (mirrors the original .hero h2 styling for SEO) ---- */
.hero h1 {
	font-weight: 700;
	font-size: 44px;
	line-height: 100%;
	text-align: center;
	color: var(--black);
	margin-top: 0;
	margin-bottom: 20px;
	margin-left: auto;
	margin-right: auto;
}
@media (max-width: 1600px) { .hero h1 { font-size: 36px; } }
@media (max-width: 1200px) { .hero h1 { font-size: 30px; margin-bottom: 16px; } }
@media (max-width: 768px)  { .hero h1 { font-size: 20px; line-height: 26px; margin-bottom: 10px; } }
@media (max-width: 480px)  { .hero h1 { max-width: 214px; } }

/* Keep the hero subheading in a comfortable centred column (not edge-to-edge). */
.hero p { max-width: 780px; padding-left: 16px; padding-right: 16px; }

/* =========================================================================
   Motion — scroll reveal + hover polish.
   Elements are fully visible by default (no JS / reduced-motion = nothing
   hidden); the entrance animation only plays once .is-visible is added, so
   there is never a flash or hidden content.
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
	/* Scroll reveal — elements are pre-hidden via the early <head> .ss-anim flag
	   (set before first paint, so there is no flash), then fade up smoothly once
	   .is-visible is added on scroll. .ss-anim-done is a fallback that reveals
	   everything if the main script never runs. */
	html.ss-anim :is(.section-title, .features-card, .dark-and-light-grid, .app-control-grid, #accordion .accordion-item, .blog-card, .aside-banner, .contact-form-box, .contact-info-box, .main-blog-img) {
		opacity: 0;
		transform: translateY(20px);
		transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
	}
	html.ss-anim :is(.section-title, .features-card, .dark-and-light-grid, .app-control-grid, #accordion .accordion-item, .blog-card, .aside-banner, .contact-form-box, .contact-info-box, .main-blog-img).is-visible,
	html.ss-anim-done :is(.section-title, .features-card, .dark-and-light-grid, .app-control-grid, #accordion .accordion-item, .blog-card, .aside-banner, .contact-form-box, .contact-info-box, .main-blog-img) {
		opacity: 1;
		transform: none;
	}

	/* Card hover lift */
	.features-card:hover,
	.blog-card:hover,
	.testimonial-card:hover { transform: translateY(-6px); }
	/* Button micro-lift */
	.header-btn:not(.store-disabled):hover,
	.btn-submit:hover,
	.hero-btns a.store-link:hover,
	.footer-grid a.store-link:hover { transform: translateY(-2px); }
}

/* Hover transitions + shadow (kept subtle; shadow is fine under reduced motion) */
.features-card,
.blog-card,
.testimonial-card {
	transition: transform 0.28s ease, box-shadow 0.28s ease;
	will-change: transform;
}
.features-card:hover,
.blog-card:hover,
.testimonial-card:hover { box-shadow: 0 18px 42px rgba(20, 30, 40, 0.12); }

.header-btn,
.btn-submit,
.read-more,
.see-all,
.store-link { transition: transform 0.2s ease, opacity 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease; }
.read-more:hover svg { transform: translateX(3px); }
.read-more svg { transition: transform 0.2s ease; }
