/*!
 * Nik Web Solutions | CMS components
 * Layered on style.css / pages.css / services.css and uses their tokens.
 *
 *  01 Utilities (honeypot, busy buttons, form errors)
 *  02 Link-based filters & pagination
 *  03 Newsletter
 *  04 Blog: image covers, tag links, comments
 *  05 Contact page
 *  06 Rich text blocks & service overview
 *  07 Project gallery & single testimonial
 *  08 Error / message pages
 */

/* ==========================================================================
   01. Utilities
   ========================================================================== */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button.is-busy,
.btn-brand.is-busy {
  position: relative;
  pointer-events: none;
  opacity: .75;
}

button.is-busy > i,
.btn-brand.is-busy > i {
  animation: cms-spin .9s linear infinite;
}

@keyframes cms-spin {
  to { transform: rotate(360deg); }
}

.quote-error--form:empty {
  display: none;
}

.quote-error--form {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  color: #B42318;
  background: #FEF3F2;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: .75rem;
  padding: 56px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--muted);
  background: var(--bg-soft);
}

.empty-state__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.4rem;
  color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   02. Link-based filters & pagination
   ========================================================================== */
.filter-btn[aria-current="page"] {
  color: #fff;
  border-color: transparent;
  background: var(--grad-primary);
  box-shadow: 0 10px 24px -10px rgba(46, 42, 255, .8);
}

.filter-bar--light .filter-btn[aria-current="page"] {
  color: #fff;
  border-color: transparent;
  background: var(--grad-primary);
}

.pager {
  margin: 48px 0 0;
}

.pager__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pager__link,
.pager__gap {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 .9rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
}

.pager__link {
  border: 1px solid var(--border);
  color: #3B4A6B;
  background: #fff;
  transition: color .3s, border-color .3s, box-shadow .3s, transform .3s var(--ease);
}

a.pager__link:hover {
  color: var(--primary);
  border-color: rgba(46, 42, 255, .35);
  transform: translateY(-2px);
}

.pager__link.is-current {
  color: #fff;
  border-color: transparent;
  background: var(--grad-primary);
  box-shadow: 0 10px 24px -12px rgba(46, 42, 255, .8);
}

.pager__gap {
  color: var(--muted);
}

/* ==========================================================================
   03. Newsletter
   ========================================================================== */
.newsletter {
  margin-top: 1.5rem;
}

.newsletter__title {
  margin: 0 0 .6rem;
  font-size: .85rem;
  font-weight: 700;
}

.newsletter__row {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border-radius: 999px;
}

.newsletter__input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 1.1rem;
  border: 0;
  font: inherit;
  font-size: .88rem;
  outline: none;
}

.newsletter__btn {
  display: grid;
  place-items: center;
  width: 52px;
  border: 0;
  color: #fff;
  background: var(--grad-primary);
  transition: filter .3s;
}

.newsletter__btn:hover {
  filter: brightness(1.12);
}

.newsletter__btn:focus-visible,
.newsletter__input:focus-visible {
  outline: 2px solid var(--azure);
  outline-offset: -2px;
}

.newsletter__status {
  min-height: 1.2em;
  margin: .5rem 0 0;
  font-size: .8rem;
}

.newsletter__status[data-state="error"] {
  color: #F97066;
}

.newsletter__status[data-state="ok"] {
  color: #47CD89;
}

/* Footer (dark) */
.newsletter--footer .newsletter__title {
  color: rgba(255, 255, 255, .85);
}

.newsletter--footer .newsletter__row {
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
}

.newsletter--footer .newsletter__input {
  color: #fff;
  background: transparent;
}

.newsletter--footer .newsletter__input::placeholder {
  color: rgba(255, 255, 255, .45);
}

/* Blog sidebar (light) */
.aside-newsletter {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.aside-newsletter .newsletter {
  margin: 0;
}

.newsletter--aside .newsletter__row {
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
}

.newsletter--aside .newsletter__input {
  color: var(--text);
  background: transparent;
}

.newsletter--aside .newsletter__status[data-state="ok"] {
  color: #067647;
}

.newsletter--aside .newsletter__status[data-state="error"] {
  color: #B42318;
}

/* ==========================================================================
   04. Blog: image covers, tag links, comments
   ========================================================================== */
.post-cover--image {
  background: #0B1240;
}

.post-cover--image::before,
.post-cover--image::after {
  display: none;
}

.post-cover__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.post-card:hover .post-cover__img,
.post-featured:hover .post-cover__img {
  transform: scale(1.04);
}

a.post-chip {
  color: #fff;
}

a.post-chip:hover {
  color: #fff;
  filter: brightness(1.1);
}

.post-tags .tag-list li {
  padding: 0;
}

.post-tags .tag-list a {
  display: block;
  padding: .35rem .8rem;
  border-radius: 999px;
  color: inherit;
}

.post-tags .tag-list a:hover {
  color: var(--primary);
}

.comments {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.comments__title,
.comment-form__title {
  margin: 0 0 1.5rem;
  font-size: 1.35rem;
  font-weight: 800;
}

.comments__list {
  display: grid;
  gap: 1.25rem;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}

.comments__list--replies {
  margin: 1.25rem 0 0;
  padding-left: clamp(16px, 4vw, 48px);
  border-left: 2px solid var(--bg-tint);
}

.comment {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
}

.comment__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--bg-tint);
}

.comment--team .comment__avatar {
  color: #fff;
  background: var(--grad-primary);
}

.comment__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .75rem;
  margin: 0 0 .35rem;
  font-size: .85rem;
}

.comment__meta time {
  color: var(--muted);
}

.comment__badge {
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--bg-tint);
}

.comment__text {
  font-size: .95rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.comment__reply {
  margin-top: .4rem;
  padding: 0;
  border: 0;
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  background: none;
}

.comments__empty {
  color: var(--muted);
}

.comment-form {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
}

.comment-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 1rem;
}

.comment-form__replying {
  margin: -0.75rem 0 1rem;
  font-size: .85rem;
  color: var(--muted);
}

.comment-form__cancel {
  margin-left: .5rem;
  padding: 0;
  border: 0;
  font-weight: 700;
  color: #B42318;
  background: none;
}

.comment-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.comment-form__note {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.comment-form__status {
  margin: 1rem 0 0;
  padding: .75rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  color: #067647;
  background: #ECFDF3;
}

/* ==========================================================================
   05. Contact page
   ========================================================================== */
.contact-block {
  background: var(--bg-soft);
}

.contact-block__points {
  margin: 1.5rem 0 2rem;
}

.contact-cards {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: #fff;
  transition: border-color .3s, transform .3s var(--ease), box-shadow .3s;
}

a.contact-card:hover {
  color: var(--text);
  border-color: rgba(46, 42, 255, .35);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -22px rgba(46, 42, 255, .7);
}

.contact-card__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: var(--grad-primary);
}

.contact-card__icon--wa {
  background: linear-gradient(135deg, #2BD36B, #128C4B);
}

.contact-card small {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-card strong {
  font-size: .95rem;
  overflow-wrap: anywhere;
}

.contact-panel {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.contact-panel__title {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  font-weight: 800;
}

.contact-panel .quote-success {
  padding: 24px 0;
}

/* ==========================================================================
   06. Rich text blocks & service overview
   ========================================================================== */
.rich-block--tint {
  background: var(--bg-soft);
}

.rich-block__body {
  max-width: 860px;
  margin: 0 auto;
}

.prose--narrow {
  max-width: 860px;
  margin: 0 auto;
}

.svc-overview {
  padding-top: 90px;
}

/* Feature list beside the overview heading (detail pages without an image) */
.svc-overview__card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
  box-shadow: var(--shadow-card);
}

.svc-features--card {
  gap: 1rem 1.5rem;
  margin: 0;
}

.svc-tags--overview {
  margin-bottom: 0;
}

/* A single related project is centred instead of filling half the grid */
.work-grid--single {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.svc-figure {
  overflow: hidden;
  margin: 0;
  border-radius: 22px;
  box-shadow: var(--shadow-card);
}

.svc-figure img {
  width: 100%;
}

.loc-chip__code--icon {
  font-size: .85rem;
}

/* ==========================================================================
   07. Project gallery & single testimonial
   ========================================================================== */
.project-gallery {
  background: var(--bg-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid__link {
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-card);
}

.gallery-grid__link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform .8s var(--ease);
}

.gallery-grid__link:hover img {
  transform: scale(1.04);
}

.gallery-grid figcaption {
  margin-top: .6rem;
  font-size: .85rem;
  color: var(--muted);
}

.testimonials--single {
  padding: 80px 0;
}

.testimonial-card--single {
  max-width: 760px;
  margin: 0 auto;
}

/* ==========================================================================
   08. Error / message pages
   ========================================================================== */
.error-page,
.message-page {
  text-align: center;
}

.error-page .page-hero__lead,
.message-page .page-hero__lead {
  margin-inline: auto;
}

.error-page .page-hero__actions,
.message-page .page-hero__actions {
  justify-content: center;
  margin-top: 1.75rem;
}

.error-page__code {
  margin: 0;
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  background: var(--grad-text-dark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.error-page__links a {
  font-weight: 700;
  color: rgba(255, 255, 255, .8);
}

.error-page__links a:hover {
  color: #fff;
}

.message-page__icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 1.25rem;
  border-radius: 50%;
  font-size: 1.8rem;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 991.98px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .gallery-grid,
  .comment-form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .comment-form {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  button.is-busy > i,
  .btn-brand.is-busy > i {
    animation: none;
  }
}
