/* ==========================================================================
   DeshipOS — Guides / How-to widget
   Filterable card grid; each card expands into a numbered step timeline.
   Depends on assets/css/base.css for design tokens.
   ========================================================================== */

.deshipos-guides {
	--dgd-accent:      var(--dew-brand, #16A34A);
	--dgd-accent-2:    var(--dew-brand-strong, #15803D);
	--dgd-soft:        var(--dew-brand-soft, rgba(22, 163, 74, .12));
	--dgd-bg:          var(--dew-bg, #FFFFFF);
	--dgd-surface:     var(--dew-surface, #F8FAFC);
	--dgd-surface-2:   var(--dew-surface-2, #F1F5F9);
	--dgd-divider:     var(--dew-divider, #E2E8F0);
	--dgd-ink:         var(--dew-ink, #0F172A);
	--dgd-text:        var(--dew-text, #1E293B);
	--dgd-muted:       var(--dew-muted, #475569);
	--dgd-faint:       var(--dew-faint, #94A3B8);

	--dgd-container-w: 1200px;
	--dgd-cols:        2;

	color: var(--dgd-text);
	width: 100%;
	max-width: var(--dgd-container-w);
	margin: 50px auto;
	padding-left: var(--dew-space-4);
	padding-right: var(--dew-space-4);
	box-sizing: border-box;
}

.deshipos-guides *,
.deshipos-guides *::before,
.deshipos-guides *::after { box-sizing: border-box; }

/* ----- Intro header ----- */
.deshipos-guides__head {
	max-width: 720px;
	margin: 0 0 var(--dew-space-8);
}
.deshipos-guides__eyebrow {
	display: inline-block;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--dgd-accent-2);
	background: var(--dgd-soft);
	padding: 6px 12px;
	border-radius: 999px;
	margin-bottom: var(--dew-space-4);
}
.deshipos-guides__title {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	letter-spacing: var(--dew-tracking-tight);
	color: var(--dgd-ink);
	margin: 0 0 var(--dew-space-3);
	font-weight: 800;
}
.deshipos-guides__subtitle {
	font-size: clamp(16px, 2vw, 18px);
	line-height: 1.6;
	color: var(--dgd-muted);
	margin: 0;
}

/* ==========================================================================
   Filter tabs
   ========================================================================== */
.deshipos-guides__filters {
	display: flex;
	flex-wrap: wrap;
	gap: var(--dew-space-2);
	margin-bottom: var(--dew-space-6);
}
.deshipos-guides__filter {
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--dgd-muted);
	background: var(--dgd-surface);
	border: 1px solid var(--dgd-divider);
	border-radius: 999px;
	cursor: pointer;
	transition: color var(--dew-dur-fast) var(--dew-ease-out),
	            background var(--dew-dur-fast) var(--dew-ease-out),
	            border-color var(--dew-dur-fast) var(--dew-ease-out);
}
.deshipos-guides__filter:hover {
	color: var(--dgd-ink);
	border-color: var(--dgd-border-strong, #CBD5E1);
}
.deshipos-guides__filter.is-active {
	color: #fff;
	background: var(--dgd-accent);
	border-color: var(--dgd-accent);
}

/* ==========================================================================
   Card grid
   ========================================================================== */
.deshipos-guides__grid {
	display: grid;
	grid-template-columns: repeat(var(--dgd-cols), minmax(0, 1fr));
	gap: var(--dew-space-5);
	align-items: start;
}
.deshipos-guides__grid[data-columns="1"] { --dgd-cols: 1; }
.deshipos-guides__grid[data-columns="2"] { --dgd-cols: 2; }
.deshipos-guides__grid[data-columns="3"] { --dgd-cols: 3; }

.deshipos-guides__card {
	background: var(--dgd-bg);
	border: 1px solid var(--dgd-divider);
	border-radius: 16px;
	overflow: hidden;
	transition: border-color var(--dew-dur-base) var(--dew-ease-out),
	            box-shadow var(--dew-dur-base) var(--dew-ease-out),
	            transform var(--dew-dur-base) var(--dew-ease-out);
}
.deshipos-guides__card:hover {
	border-color: var(--dgd-accent);
	box-shadow: var(--dew-shadow-md);
}
.deshipos-guides__card.is-open {
	border-color: var(--dgd-accent);
	box-shadow: var(--dew-shadow-lg);
}
.deshipos-guides__card[hidden] { display: none; }

/* ----- Card header (button) ----- */
.deshipos-guides__card-head {
	display: flex;
	align-items: flex-start;
	gap: var(--dew-space-4);
	width: 100%;
	padding: var(--dew-space-5);
	text-align: left;
	background: none;
	border: 0;
	cursor: pointer;
	color: inherit;
	font: inherit;
}

.deshipos-guides__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	flex: none;
	border-radius: 12px;
	background: var(--dgd-soft);
	color: var(--dgd-accent-2);
	font-size: 22px;
}
.deshipos-guides__icon svg,
.deshipos-guides__icon i { width: 22px; height: 22px; font-size: 22px; }

.deshipos-guides__card-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.deshipos-guides__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--dew-space-2);
}
.deshipos-guides__badge {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
}
.deshipos-guides__badge--beginner     { color: #15803D; background: rgba(22, 163, 74, .12); }
.deshipos-guides__badge--intermediate { color: #B45309; background: rgba(245, 158, 11, .14); }
.deshipos-guides__badge--advanced     { color: #B91C1C; background: rgba(239, 68, 68, .12); }

.deshipos-guides__time,
.deshipos-guides__steps-count {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 600;
	color: var(--dgd-faint);
}
.deshipos-guides__time svg { color: var(--dgd-faint); }
.deshipos-guides__steps-count::before {
	content: "";
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: var(--dgd-faint);
	margin-right: 2px;
}

.deshipos-guides__card-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--dgd-ink);
	letter-spacing: var(--dew-tracking-snug);
}
.deshipos-guides__card-summary {
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--dgd-muted);
}

.deshipos-guides__chevron {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin-top: 2px;
	border-radius: 8px;
	color: var(--dgd-muted);
	background: var(--dgd-surface);
	transition: transform var(--dew-dur-base) var(--dew-ease-out),
	            background var(--dew-dur-fast) var(--dew-ease-out),
	            color var(--dew-dur-fast) var(--dew-ease-out);
}
.deshipos-guides__card.is-open .deshipos-guides__chevron {
	transform: rotate(180deg);
	background: var(--dgd-soft);
	color: var(--dgd-accent-2);
}

/* ==========================================================================
   Expandable step panel
   ========================================================================== */
.deshipos-guides__panel {
	overflow: hidden;
}
.deshipos-guides__panel[hidden] { display: none; }

.deshipos-guides__steps {
	list-style: none;
	margin: 0;
	padding: 0 var(--dew-space-5) var(--dew-space-5);
	counter-reset: none;
}
.deshipos-guides__step {
	position: relative;
	display: flex;
	gap: var(--dew-space-4);
	padding-bottom: var(--dew-space-5);
}
.deshipos-guides__step:last-child { padding-bottom: 0; }

/* Connector line between step numbers */
.deshipos-guides__step::before {
	content: "";
	position: absolute;
	left: 14px;
	top: 30px;
	bottom: -2px;
	width: 2px;
	background: var(--dgd-divider);
}
.deshipos-guides__step:last-child::before { display: none; }

.deshipos-guides__step-num {
	position: relative;
	z-index: 1;
	flex: none;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	background: var(--dgd-accent);
	box-shadow: 0 0 0 4px var(--dgd-bg);
}
.deshipos-guides__step-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	padding-top: 3px;
}
.deshipos-guides__step-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--dgd-ink);
	line-height: 1.4;
}
.deshipos-guides__step-desc {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--dgd-muted);
}

.deshipos-guides__no-results {
	font-size: 15px;
	color: var(--dgd-muted);
	text-align: center;
	padding: var(--dew-space-8) 0;
	margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
	.deshipos-guides__grid[data-columns="3"] { --dgd-cols: 2; }
}
@media (max-width: 620px) {
	.deshipos-guides__grid { --dgd-cols: 1 !important; }
	.deshipos-guides__card-head { padding: var(--dew-space-4); gap: var(--dew-space-3); }
	.deshipos-guides__icon { width: 40px; height: 40px; font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.deshipos-guides *,
	.deshipos-guides *::before,
	.deshipos-guides *::after {
		transition-duration: .01ms !important;
	}
}
