/**
 * Theme Name: Cresca Teaching Materials Hub
 * Theme URI: https://crescateachinghub.com
 * Author: Cresca
 * Author URI: https://crescateachinghub.com
 * Description: A custom theme for the Cresca Teaching Materials Hub.
 * Version: 1.0.0
 * Text Domain: cresca-teaching-materials-hub
 */

:root {
	--cresca-background: #090b15;
	--cresca-surface: rgba(9, 11, 21, 0.72);
	--cresca-surface-strong: rgba(15, 23, 42, 0.92);
	--cresca-field: rgba(15, 23, 42, 0.9);
	--cresca-border: rgba(255, 255, 255, 0.08);
	--cresca-border-hover: rgba(245, 158, 11, 0.58);
	--cresca-text: #f8fafc;
	--cresca-muted: #94a3b8;
	--cresca-primary: #f59e0b;
	--cresca-primary-light: #fbbf24;
	--cresca-radius: 1.5rem;
}

html {
	background: var(--cresca-background);
}

body *,
body *::before,
body *::after {
	box-sizing: border-box;
}

body {
	position: relative;
	isolation: isolate;
	min-height: 100vh;
	overflow-x: hidden;
	background:
		radial-gradient(ellipse 70% 55% at 12% 8%, rgba(234, 88, 12, 0.2), transparent 62%),
		radial-gradient(ellipse 70% 60% at 88% 15%, rgba(30, 64, 175, 0.2), transparent 64%),
		radial-gradient(ellipse 60% 55% at 52% 70%, rgba(126, 34, 206, 0.14), transparent 65%),
		linear-gradient(145deg, #0d111f 0%, #090b15 48%, #0b1020 100%) !important;
	color: var(--cresca-text);
}

body::before {
	position: fixed;
	z-index: -1;
	inset: 0;
	content: "";
	pointer-events: none;
	opacity: 0.52;
	background-image:
		radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.5px),
		radial-gradient(circle at 78% 12%, rgba(255, 255, 255, 0.6) 0 1px, transparent 1.5px),
		radial-gradient(circle at 34% 72%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.5px),
		radial-gradient(circle at 88% 68%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.5px);
	background-size: 173px 173px, 211px 211px, 257px 257px, 307px 307px;
}

a,
button,
input,
select,
textarea {
	transition-duration: 200ms;
}

body .text-gray-400 {
	color: #94a3b8 !important;
}

body .text-gray-500,
body .text-gray-600 {
	color: #cbd5e1 !important;
}

body .border-gray-100,
body .border-gray-200,
body .border-gray-300 {
	border-color: var(--cresca-border) !important;
}

body .bg-gray-50,
body .bg-gray-100 {
	background-color: rgba(30, 41, 59, 0.78) !important;
}

.cresca-header,
.cresca-sidebar,
.cresca-footer,
.cresca-material-bar {
	background: rgba(9, 11, 21, 0.68) !important;
	border-color: var(--cresca-border) !important;
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
}

.cresca-header {
	position: relative;
	z-index: 40;
	box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);
}

.cresca-sidebar {
	position: relative;
	z-index: 10;
}

.cresca-card,
.cresca-viewer {
	min-width: 0;
	background: var(--cresca-surface) !important;
	border-color: var(--cresca-border) !important;
	border-radius: var(--cresca-radius) !important;
	-webkit-backdrop-filter: blur(18px);
	backdrop-filter: blur(18px);
	box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35) !important;
}

.cresca-material-card:hover {
	border-color: var(--cresca-border-hover) !important;
	transform: translateY(-3px);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.44) !important;
}

.cresca-course-link {
	min-height: 5.1rem;
	color: #fff !important;
	background: linear-gradient(90deg, #f4510b, #f59e0b, #f8c40c) !important;
	border: 0 !important;
	border-radius: 1.5rem;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.cresca-course-link:hover,
.cresca-course-link.is-active {
	color: #fff !important;
	background: linear-gradient(90deg, #fb6518, #f8ad12, #facc15) !important;
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22) !important;
}

.cresca-course-link.is-active {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88), 0 12px 28px rgba(245, 158, 11, 0.24) !important;
}

.cresca-course-count {
	min-width: 1.75rem;
	text-align: center;
	background: rgba(15, 23, 42, 0.2) !important;
}

.cresca-course-link.is-active .cresca-course-count {
	color: #fff !important;
	background: rgba(15, 23, 42, 0.32) !important;
}

.cresca-btn {
	min-height: 2.75rem;
	padding: 0.7rem 1.5rem;
	border-radius: 9999px;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	cursor: pointer;
	transition: transform 200ms ease, box-shadow 200ms ease, color 200ms ease, border-color 200ms ease, background 200ms ease;
}

.cresca-btn:hover {
	transform: translateY(-2px);
}

.cresca-btn:active {
	transform: scale(0.98);
}

.cresca-btn-primary {
	color: #fff !important;
	background: linear-gradient(90deg, #ea580c, #f59e0b, #eab308) !important;
	border: 0;
	box-shadow: 0 8px 22px rgba(245, 158, 11, 0.2);
}

.cresca-btn-primary:hover {
	background: linear-gradient(90deg, #fb923c, #fbbf24, #facc15) !important;
	box-shadow: 0 10px 25px rgba(245, 158, 11, 0.25);
}

.cresca-btn-secondary {
	color: #fff !important;
	background: rgba(30, 41, 59, 0.85) !important;
	border: 1px solid var(--cresca-border);
}

.cresca-btn-secondary:hover {
	color: var(--cresca-primary) !important;
	border-color: var(--cresca-primary);
	box-shadow: 0 10px 25px rgba(245, 158, 11, 0.12);
}

body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body select,
body textarea {
	max-width: 100%;
	color: var(--cresca-text) !important;
	background: var(--cresca-field) !important;
	border-color: var(--cresca-border) !important;
	border-radius: 0.75rem !important;
}

body input::placeholder,
body textarea::placeholder {
	color: var(--cresca-muted);
}

body input:not([type="checkbox"]):not([type="radio"]):focus,
body select:focus,
body textarea:focus {
	border-color: var(--cresca-primary) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

body input[type="checkbox"] {
	accent-color: var(--cresca-primary);
}

.cresca-viewer {
	background: rgba(2, 6, 23, 0.84) !important;
}

.cresca-footer {
	color: var(--cresca-muted);
}

@media (max-width: 767px) {
	.cresca-card {
		width: 100% !important;
		max-width: calc(100vw - 3rem) !important;
	}

	.cresca-sidebar {
		border-right: 0;
		border-bottom: 1px solid var(--cresca-border);
	}

	.cresca-header h1 {
		line-height: 1.15;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
