/* AdvertMedia CMS — dynamic sections & templates. Uses the theme's tokens (--am-*) and type classes. */

/* ---------- Template sections (project page, Insights) ---------- */
.amsk-section { padding: var(--am-section, 100px) var(--am-gutter, 24px); }
.amsk-section--hero { padding-top: clamp(40px, 6vw, 90px); padding-bottom: clamp(48px, 7vw, 100px); }
.amsk-section--top0 { padding-top: 0; }
.amsk-bg-soft { background: var(--am-soft, #f7f7f7); }
.amsk-bg-grey { background: var(--am-grey, #f0f1f0); }
.amsk-wrap { max-width: var(--am-wrap, 1200px); margin: 0 auto; }
.amsk-stack > * + * { margin-top: 24px; }
.amsk-stack > .am-projects, .amsk-stack > .am-slider, .amsk-stack > .am-form { margin-top: 44px; }
.amsk-section .elementor-heading-title { margin: 0; }
.amsk-section .am-text-dark p:last-child, .amsk-section .am-lead p:last-child { margin-bottom: 0; }
.amsk-section .am-breadcrumb { margin-bottom: 18px; }
.amsk-hero-row { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 48px; align-items: center; }
.amsk-hero-text > * + * { margin-top: 14px; }
.amsk-hero-logo { display: flex; justify-content: center; align-items: center; }
.amsk-hero-logo img { max-height: 160px; width: auto; max-width: 100%; object-fit: contain; }
.amsk-facts { display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 22px 0 0 !important; padding: 0; list-style: none; font-size: 15px; color: var(--am-black, #0e0e0e); }
.amsk-facts span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--am-red, #c82929); }
.amsk-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.amsk-head-row > div:first-child > * + * { margin-top: 14px; }

/* Gallery (tiles use the theme's .am-gallery grid) */
.am-gallery figure, .amsk-masonry figure { position: relative; }
.am-gallery figure > a, .amsk-masonry figure > a { display: block; width: 100%; height: 100%; cursor: zoom-in; }
.am-gallery figcaption, .amsk-masonry figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 18px 14px 10px; font-size: 13px; color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.65));
	opacity: 0; transition: opacity .3s;
	pointer-events: none;
}
.am-gallery figure:hover figcaption, .amsk-masonry figure:hover figcaption { opacity: 1; }
.amsk-masonry { columns: 3 280px; column-gap: 18px; }
.amsk-masonry figure { margin: 0 0 18px; break-inside: avoid; overflow: hidden; background: #eee; }
.amsk-masonry img { display: block; width: 100%; height: auto; transition: transform .6s var(--am-ease, ease); }
.amsk-masonry figure:hover img { transform: scale(1.03); }

/* Project details */
.amsk-details { display: grid; gap: 0; border-top: 1px solid #e3e3e3; }
.amsk-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 40px; padding: 36px 0; border-bottom: 1px solid #e3e3e3; }
.amsk-detail__title .elementor-heading-title { font-size: 20px; }
.amsk-detail__body ul { padding-left: 20px; }
.amsk-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.amsk-chips li { padding: 8px 14px; border: 1px solid var(--am-black, #0e0e0e); font-size: 14px; font-weight: 600; color: var(--am-black, #0e0e0e); }

/* ---------- Client logos ---------- */
.am-clients { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.am-clients .am-logo { display: block; }
a.am-logo:focus-visible { outline: 2px solid var(--am-red, #c82929); outline-offset: 2px; }

/* ---------- Testimonials (same look as the original slider) ---------- */
.amsk-slider { position: relative; padding: 0 72px; margin-top: 40px; }
.amsk-slide { position: relative; display: flex; align-items: flex-start; gap: 40px; margin: 0; padding-bottom: 54px; }
.amsk-slide::after { content: "\201D"; position: absolute; right: 0; bottom: -42px; font-family: Georgia, serif; font-size: 140px; font-weight: 700; line-height: 1; color: var(--am-red, #c82929); }
.amsk-slide .am-avatar { flex: 0 0 104px; }
.amsk-initials { display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; background: var(--am-red, #c82929); color: #fff; font-size: 34px; font-weight: 700; }
.amsk-slide__body { flex: 1 1 auto; min-width: 0; }
.amsk-slide figcaption { margin: 0; }
.amsk-slide .am-quote-name { margin: 0; }
.amsk-slide .am-quote-name .elementor-heading-title { font-size: 18px; font-weight: 700; color: var(--am-black, #0e0e0e); }
.amsk-slide blockquote { margin: 0; padding: 0; border: 0; font-style: normal; }
.amsk-slide blockquote p { margin: 0; }

/* ---------- Projects: excerpt, filter, load more ---------- */
.am-project__excerpt { margin: 8px 0 0; font-size: 14px; font-weight: 300; line-height: 1.65; color: var(--am-muted, #777); }
.amsk-noimg { display: block; width: 100%; height: 100%; background: var(--am-grey, #f0f1f0); }
.amsk-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 36px; }
.amsk-filter button, .amsk-filter a {
	padding: 8px 16px; border: 1px solid #cfcfcf; border-radius: 0; background: #fff;
	font-family: var(--am-font-alt, inherit); font-size: 13px; font-weight: 600; letter-spacing: .02em;
	color: var(--am-black, #0e0e0e); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.amsk-filter button:hover, .amsk-filter a:hover { border-color: var(--am-black, #0e0e0e); color: var(--am-black, #0e0e0e); }
.amsk-filter .is-active, .amsk-filter button.is-active:hover { background: var(--am-black, #0e0e0e); border-color: var(--am-black, #0e0e0e); color: #fff; }
.amsk-filter--links { margin: 10px 0 0; }
.amsk-more { display: flex; justify-content: center; margin-top: 44px; }
.amsk-more__btn {
	padding: 14px 28px; border: 2px solid var(--am-black, #0e0e0e); border-radius: 0; background: transparent;
	font-family: var(--am-font-alt, inherit); font-size: 14px; font-weight: 700; color: var(--am-black, #0e0e0e); cursor: pointer;
	transition: background-color .25s, color .25s;
}
.amsk-more__btn:hover { background: var(--am-black, #0e0e0e); color: #fff; }
.am-project.is-filtered { display: none; }

/* ---------- Article cards with cover image ---------- */
.am-post.amsk-post--img { padding: 0; }
.amsk-post__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--am-grey, #f0f1f0); }
.amsk-post__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--am-ease, ease); }
.am-post:hover .amsk-post__media img { transform: scale(1.04); }
.amsk-post__body { display: flex; flex-direction: column; flex: 1 1 auto; }
.am-post.amsk-post--img .amsk-post__body { padding: 22px 24px 26px; }
.am-post__date { margin: 0; }
.amsk-post__cat { margin-left: 8px; padding-left: 8px; border-left: 1px solid #d0d0d0; color: var(--am-red, #c82929); font-weight: 500; }
.amsk-pagination { margin-top: 48px; }
.amsk-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.amsk-pagination a, .amsk-pagination span { display: inline-block; min-width: 42px; padding: 9px 14px; border: 1px solid #d0d0d0; text-align: center; font-weight: 600; color: var(--am-black, #0e0e0e); }
.amsk-pagination .current { background: var(--am-black, #0e0e0e); border-color: var(--am-black, #0e0e0e); color: #fff; }

/* ---------- Single article extras ---------- */
.amsk-post-meta a { color: var(--am-red, #c82929); }
.amsk-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; background: var(--am-grey, #f0f1f0); font-size: 13px; color: var(--am-ink, #383838); }
.amsk-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 36px 0; padding: 18px 0; border-top: 1px solid #e5e5e5; border-bottom: 1px solid #e5e5e5; font-size: 14px; }
.amsk-share span { font-weight: 700; color: var(--am-black, #0e0e0e); margin-right: 6px; }
.amsk-share a { padding: 6px 12px; border: 1px solid #d0d0d0; color: var(--am-black, #0e0e0e); font-weight: 600; }
.amsk-share a:hover { border-color: var(--am-red, #c82929); color: var(--am-red, #c82929); }
.amsk-related { margin-top: 56px; }
.amsk-related h2 { margin: 0 0 24px; font-size: 26px; }
.single-post .amsk-related .am-posts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.single-post .amsk-related .am-post__title { font-size: 18px; }

/* ---------- Lightbox ---------- */
.amsk-lb { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 60px 70px; background: rgba(10,10,10,.94); opacity: 0; transition: opacity .25s; }
.amsk-lb.is-open { opacity: 1; }
.amsk-lb figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.amsk-lb img { max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.amsk-lb figcaption { margin-top: 12px; font-size: 14px; color: #ddd; }
.amsk-lb button { position: absolute; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 0; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.amsk-lb button:hover, .amsk-lb button:focus-visible { background: var(--am-red, #c82929); }
.amsk-lb__close { top: 16px; right: 16px; }
.amsk-lb__prev { left: 14px; top: 50%; margin-top: -23px; }
.amsk-lb__next { right: 14px; top: 50%; margin-top: -23px; }
.amsk-lb__count { position: absolute; top: 26px; left: 24px; font-size: 13px; color: #aaa; }
body.amsk-lb-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.am-clients { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.amsk-slider { padding: 0 56px; }
	.single-post .amsk-related .am-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.am-clients { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
	.amsk-hero-row { grid-template-columns: 1fr; gap: 28px; }
	.amsk-hero-logo { justify-content: flex-start; }
	.amsk-hero-logo img { max-height: 110px; }
	.amsk-detail { grid-template-columns: 1fr; gap: 12px; padding: 26px 0; }
	.amsk-slider { padding: 0; }
	.amsk-slide { flex-direction: column; gap: 18px; padding-bottom: 72px; }
	.amsk-slide::after { bottom: -26px; right: auto; left: 0; font-size: 110px; }
	.amsk-masonry { columns: 2 140px; column-gap: 10px; }
	.amsk-masonry figure { margin-bottom: 10px; }
	.amsk-lb { padding: 56px 10px; }
	.amsk-lb__prev, .amsk-lb__next { top: auto; bottom: 14px; margin: 0; }
	.amsk-lb__prev { left: calc(50% - 52px); }
	.amsk-lb__next { right: calc(50% - 52px); }
	.single-post .amsk-related .am-posts { grid-template-columns: 1fr; }
}
.amsk-slide figcaption, .amsk-slide .am-quote-role { font-style: normal; }
@media (max-width: 767px) {
	.amsk-project .am-gallery > figure { grid-column: auto !important; grid-row: auto !important; }
	.amsk-project .am-gallery > figure:first-child { grid-column: span 2 !important; grid-row: span 2 !important; }
	.amsk-project .am-gallery > figure:last-child:nth-child(even) { grid-column: span 2 !important; }
}

/* ---------- Team carousel ([am_team]) ---------- */
.amsk-team { --amsk-team-gap: 48px; --amsk-team-cols: 3; position: relative; width: 100%; }
.amsk-team__track {
	display: flex;
	gap: var(--amsk-team-gap);
	margin: 0;
	padding: 0 0 4px;
	list-style: none;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.amsk-team__track::-webkit-scrollbar { display: none; }
.amsk-team__track:focus-visible { outline: 2px solid #ed1c24; outline-offset: 6px; }
.amsk-team__card {
	flex: 0 0 calc((100% - (var(--amsk-team-cols) - 1) * var(--amsk-team-gap)) / var(--amsk-team-cols));
	min-width: 0;
	margin: 0;
	scroll-snap-align: start;
}
.amsk-team__card > * + * { margin-top: 6px; }
.amsk-team__card .am-avatar img { display: block; }
.amsk-team__card .elementor-heading-title { margin: 0; }
.amsk-initials--sm { width: 64px; height: 64px; font-size: 20px; }
.amsk-team__nav { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; }
.amsk-team__nav[hidden] { display: none; }
.amsk-team__btn {
	display: grid; place-items: center;
	width: 52px; height: 52px; padding: 0;
	border: 0; border-radius: 0; background: transparent;
	color: #ed1c24; cursor: pointer;
	transition: transform .25s ease, opacity .25s ease, color .25s;
}
.amsk-team__btn:hover, .amsk-team__btn:focus { background: transparent; color: #ff3b41; }
.amsk-team__btn svg { width: 30px; height: 46px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.amsk-team__btn--prev:hover:not([disabled]) { transform: translateX(-4px); }
.amsk-team__btn--next:hover:not([disabled]) { transform: translateX(4px); }
.amsk-team__btn:focus-visible { outline: 2px solid #ed1c24; outline-offset: 4px; }
.amsk-team__btn[disabled] { opacity: .3; cursor: default; transform: none; }
@media (max-width: 1024px) { .amsk-team { --amsk-team-cols: 2; --amsk-team-gap: 32px; } }
@media (max-width: 767px) {
	.amsk-team { --amsk-team-cols: 1.15; --amsk-team-gap: 20px; }
	.amsk-team__nav { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) { .amsk-team__track { scroll-behavior: auto; } }
