/*
Theme Name: Swiss Smartway
Theme URI: https://www.swiss-smartway.ch
Author: Swiss-Smartway GmbH
Description: Company website theme for Swiss-Smartway GmbH, Widnau. Block theme based on the SandaCare brand look. All texts and images can be edited in Appearance > Editor.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: swiss-smartway
*/

html { scroll-behavior: smooth; }
:where(section, .wp-block-group)[id] { scroll-margin-top: 90px; }

/* Sticky header */
.ssw-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .ssw-header { top: 32px; }
.ssw-header .wp-block-navigation a:hover { color: var(--wp--preset--color--red); }

/* Small uppercase label above headings */
.ssw-kicker { font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--red); margin-bottom: -.4rem !important; }
.ssw-kicker.is-sandacare { color: var(--wp--preset--color--magenta); }

/* Swiss cross accent line under hero heading */
.ssw-accent { width: 64px; height: 4px; background: var(--wp--preset--color--red); border: 0; margin-left: 0 !important; opacity: 1; }

/* Hero image */
.ssw-hero-img img { border-radius: 28px; aspect-ratio: 4/4.4; object-fit: cover; width: 100%; box-shadow: 0 30px 60px -30px rgba(31,52,67,.45); }
.ssw-hero-img { position: relative; }

/* Cards */
.ssw-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 20px; transition: transform .25s ease, box-shadow .25s ease; height: 100%; }
.ssw-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(31,52,67,.35); }
.ssw-card .ssw-num { font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--steel); font-size: .95rem; letter-spacing: .08em; }
.wp-block-column > .ssw-card { height: 100%; }

/* Stats */
.ssw-stat-value { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3rem); line-height: 1; color: var(--wp--preset--color--steel-dark); margin: 0; }
.ssw-stat-label { color: var(--wp--preset--color--muted); font-size: .95rem; margin-top: .4rem !important; }

/* SandaCare category chips */
.ssw-chips { gap: .6rem !important; }
.ssw-chip { background: #fff; color: var(--wp--preset--color--plum); border: 1px solid #f0d3e5; border-radius: 999px; padding: .45rem 1rem !important; font-family: var(--wp--preset--font-family--heading); font-weight: 600; font-size: .95rem; margin: 0 !important; }
.ssw-brand-img img { border-radius: 24px; aspect-ratio: 1/1.05; object-fit: cover; width: 100%; }
.ssw-btn-magenta .wp-block-button__link { background: var(--wp--preset--color--magenta); }
.ssw-btn-magenta .wp-block-button__link:hover { background: var(--wp--preset--color--plum); }

/* Timeline */
.ssw-timeline { margin-top: var(--wp--preset--spacing--40) !important; }
.ssw-step { position: relative; border-top: 3px solid var(--wp--preset--color--steel); padding: 1.6rem 1.4rem 0 0; }
.ssw-step::before { content: ""; position: absolute; top: -10px; left: 0; width: 17px; height: 17px; border-radius: 50%; background: var(--wp--preset--color--steel-dark); box-shadow: 0 0 0 4px #fff; }
.ssw-step.is-future { border-top: 3px dashed var(--wp--preset--color--red); }
.ssw-step.is-future::before { background: #fff; border: 3px solid var(--wp--preset--color--red); box-sizing: border-box; }
.ssw-step.is-future::after { content: ""; position: absolute; top: -9px; right: 0; border-left: 12px solid var(--wp--preset--color--red); border-top: 7.5px solid transparent; border-bottom: 7.5px solid transparent; }
.ssw-step.is-future .ssw-year { color: var(--wp--preset--color--red); }
.ssw-year { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.6rem; color: var(--wp--preset--color--steel-dark); margin: 0; }
@media (max-width: 781px) {
	.ssw-timeline { gap: 0 !important; }
	.ssw-step { border-top: 0; border-left: 3px solid var(--wp--preset--color--steel); padding: 0 0 1.6rem 1.6rem; }
	.ssw-step::before { top: 4px; left: -10px; }
	.ssw-step.is-future { border-top: 0; border-left: 3px dashed var(--wp--preset--color--red); }
	.ssw-step.is-future::after { top: auto; bottom: -8px; right: auto; left: -9px; border-top: 12px solid var(--wp--preset--color--red); border-left: 7.5px solid transparent; border-right: 7.5px solid transparent; border-bottom: 0; }
}

/* Region list */
.ssw-region { border-left: 3px solid var(--wp--preset--color--red); padding-left: 1rem !important; }

/* Contact block */
.ssw-contact a { color: #fff; text-decoration-color: rgba(255,255,255,.4); }
.ssw-contact a:hover { color: #fff; text-decoration-color: #fff; }

/* Footer */
.ssw-footer a { color: inherit; text-decoration: none; }
.ssw-footer a:hover { color: var(--wp--preset--color--red); }

@media (max-width: 781px) {
	.ssw-hero-img img { aspect-ratio: 4/3; }
	.admin-bar .ssw-header { top: 0; }
}

/* Reset default figure margins */
figure.wp-block-image { margin-left: 0; margin-right: 0; }
