/*
Theme Name: U-Skill.com
Theme URI: https://www.u-skill.com
Author: PhranakornSoft
Author URI: https://www.phranakornsoft.com
Description: Block themes for U-Skill.com — an accessible, mobile-first block theme for the U-Skill e-learning platform. Designed for the WordPress Site Editor with full support for Tutor LMS / Tutor LMS Pro and the Fluent suite (Fluent Forms, FluentCRM, FluentCommunity, FluentAuth, Fluent Booking, FluentSMTP, FluentAffiliate).
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License
License URI: license.txt
Text Domain: u-skill-com
Tags: education, blog, one-column, wide-blocks, block-patterns, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, threaded-comments, translation-ready, accessibility-ready
*/

/* --------------------------------------------------------------
 * Base / Accessibility
 * -------------------------------------------------------------- */

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Visible focus ring for keyboard users (brand accent on purple, purple on white). */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent, #ffc428);
	outline-offset: 2px;
	border-radius: 2px;
}

:where(.has-base-background-color, .has-white-background-color) :focus-visible {
	outline-color: var(--wp--preset--color--primary, #800080);
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Screen-reader-only helper (used by patterns). */
.u-skill-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------
 * Header
 * -------------------------------------------------------------- */

.u-skill-header {
	box-shadow: 0 2px 12px rgba(25, 29, 58, 0.08);
}

.wp-block-search {
	max-width: 100%;
}

.u-skill-404-search {
	max-width: 420px;
	margin-left: auto;
	margin-right: auto;
}

.u-skill-header .wp-block-search__input {
	border-radius: 8px 0 0 8px;
	border: 1px solid var(--wp--preset--color--primary);
	min-width: 0;
}

.u-skill-header .wp-block-search__button {
	border-radius: 0 8px 8px 0;
	margin-left: 0;
}

/* --------------------------------------------------------------
 * Block styles
 * -------------------------------------------------------------- */

/* Card: white surface with the soft brand shadow from the Figma design. */
.is-style-u-card {
	background-color: var(--wp--preset--color--base, #ffffff);
	border-radius: 16px;
	box-shadow: 0 4px 20px rgba(105, 105, 105, 0.25);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.is-style-u-card:hover,
.is-style-u-card:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 10px 28px rgba(105, 105, 105, 0.35);
}

/* Pill button (e.g. "Join Us", category chips). */
.wp-block-button.is-style-u-pill .wp-block-button__link {
	border-radius: 999px;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

/* Ghost button on dark/purple surfaces. */
.wp-block-button.is-style-u-ghost .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
	color: var(--wp--preset--color--base, #ffffff);
}

/* Accent (yellow) button with dark text — matches Figma CTA buttons. */
.wp-block-button.is-style-u-accent .wp-block-button__link {
	background-color: var(--wp--preset--color--accent, #ffc428);
	color: var(--wp--preset--color--contrast, #191d3a);
}

.wp-block-button.is-style-u-accent .wp-block-button__link:hover {
	background-color: #e6ad14;
	color: var(--wp--preset--color--contrast, #191d3a);
}

/* Underlined section heading accent (yellow bar under heading). */
.is-style-u-underline {
	padding-bottom: 0.5rem;
	background-image: linear-gradient(var(--wp--preset--color--accent, #ffc428), var(--wp--preset--color--accent, #ffc428));
	background-repeat: no-repeat;
	background-size: 96px 6px;
	background-position: 0 100%;
}

.has-text-align-center.is-style-u-underline {
	background-position: 50% 100%;
}

/* --------------------------------------------------------------
 * Content niceties
 * -------------------------------------------------------------- */

.wp-block-post-title a {
	text-decoration: none;
}

.wp-block-post-title a:hover {
	color: var(--wp--preset--color--primary, #800080);
	text-decoration: underline;
}

/* Keep media responsive inside patterns. */
.wp-block-image img,
.wp-block-post-featured-image img {
	height: auto;
	max-width: 100%;
}

/* Comfortable tap targets on small screens. */
@media (max-width: 781px) {
	.wp-block-button__link,
	.wp-block-navigation .wp-block-navigation-item__content {
		padding-top: 0.65rem;
		padding-bottom: 0.65rem;
	}
}
