/* styles.css */

/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

:root {
  --bg: #f9fafb;
  --text: #0f172a;
  --accent: #1e2a47;
  --accent-purple: #5a18cd; /* purple that matches homepage gradient */
  --radius: 8px;
  --spacing-large: 4rem;
  --spacing-medium: 2rem;
  --spacing-small: 1rem;
}

* {
  box-sizing: border-box;
}

html, body {
  scroll-behavior: smooth;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.28s ease;
}

a:hover {
  color: var(--accent-purple);
}

/* Change link color to a purple on click/visited to match homepage */
a:active,
a:focus {
  color: var(--accent-purple);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg);
  border-bottom: 1px solid #e5e7eb;
  z-index: 1000;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-small) var(--spacing-medium);
}

.navbar .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
}

.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: var(--spacing-medium);
}

.navbar .nav-links a {
  padding: var(--spacing-small) var(--spacing-small);
  font-weight: 500;
}

.navbar .nav-links a.active {
  color: var(--accent);
}

/* Mobile menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 24px;
  height: 3px;
  background-color: var(--text);
  border-radius: 2px;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  flex-direction: column;
  background-color: var(--bg);
}

/* Main content and footer layout */
main {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.section {
  width: 100%;
  position: relative;
  z-index: 1;
}

.hero.section {
  min-height: calc(100vh - 300px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* Hero background image for index page
   Place your chosen image at images/hero-bg.jpg (or update the URL below).
*/
#hero.hero {
  background-image: url("images/hero-bg.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
  color: #ffffff; /* default text color on image */
}

/* subtle dark overlay so white text is readable */
#hero.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(6,10,20,0.45), rgba(6,10,20,0.25));
  z-index: 0;
}

/* ensure hero contents are above overlay */
#hero.hero > * {
  position: relative;
  z-index: 1;
}

/* adjust heading and paragraph color specifically inside hero */
#hero.hero h1,
#hero.hero p {
  color: #ffffff;
}

@media (max-width: 768px) {
  #hero.hero {
    background-position: center top;
    padding-top: calc(var(--spacing-large) * 1.25);
    padding-bottom: calc(var(--spacing-large) * 0.75);
  }
  #hero.hero h1 {
    font-size: 1.75rem;
  }
}
/* Main content */
main {
  flex: 1 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: var(--spacing-large);
}

.mobile-nav a {
  padding: var(--spacing-small) var(--spacing-medium);
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .navbar .nav-links {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-nav.open {
    display: flex;
  }
}

/* Section spacing & animation */
.section {
  padding: var(--spacing-large) var(--spacing-medium);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Section */
.hero {
  text-align: center;
  padding-top: calc(var(--spacing-large) * 1.5);
  padding-bottom: var(--spacing-large);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--spacing-small);
}

.hero p {
  font-size: 1.125rem;
  color: var(--text);
  margin-bottom: var(--spacing-medium);
}

.hero .buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-small);
}

.hero .btn-primary {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
}

.hero .btn-secondary {
  background: transparent;
  color: var(--accent);
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
}

/* Make the hero 'See services' button text white for readability over the hero image */
#hero.hero .btn-secondary {
  color: #ffffff;
}

.hero .btn-primary:hover,
.hero .btn-secondary:hover {
  opacity: 0.9;
}

/* Generic primary button styles (used across pages) */
.btn-primary,
a.btn-primary {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.btn-primary:hover,
a.btn-primary:hover {
  opacity: 0.9;
}

/* Cards container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-medium);
}

.cards {
  display: grid;
  gap: var(--spacing-medium);
  width: 100%;
}

/* Recent Work: horizontal scrolling list (stay on one row and allow horizontal scroll) */
#recent-work .cards {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: var(--spacing-medium);
  padding-bottom: 1rem; /* allow space for scroll */
  scroll-snap-type: x mandatory;
}

#recent-work .cards .card {
  flex: 0 0 300px; /* fixed card width for horizontal layout, max 300px */
  scroll-snap-align: start;
}

@media (min-width: 1200px) {
  /* on very wide screens, allow cards to breathe a little more */
  #recent-work .cards .card {
    flex: 0 0 300px; /* maintain 300px max width on very wide screens */
  }
}

@media (min-width: 768px) {
  .cards.three-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Card style */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  padding: var(--spacing-medium);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative; /* needed for absolute-positioned status note */
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}

.card h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: var(--accent);
}

.card p {
  margin-bottom: 0;
}

.gallery-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.gallery-link:hover {
  opacity: 0.8;
}

/* Status icon and note for in-progress projects */
.status-toggle {
  background: transparent;
  border: none;
  color: #d97706; /* amber-ish to indicate in-progress */
  font-weight: 700;
  margin-left: 0.5rem;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  vertical-align: middle;
}

.status-toggle:focus {
  outline: 2px solid rgba(30,42,71,0.15);
  border-radius: 4px;
}

.status-note {
  position: absolute;
  top: 52px;
  left: 12px;
  z-index: 30;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(2,6,23,0.08);
  padding: 0.6rem 0.9rem;
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text);
  max-width: 260px;
}

.status-note[hidden] {
  display: none;
}

/* show note when hovering or focusing the toggle, or when expanded */
.status-toggle:hover + .status-note,
.status-toggle:focus + .status-note,
.status-toggle[aria-expanded="true"] + .status-note {
  display: block;
}

.status-label {
  color: #d97706;
  font-weight: 600;
  margin-left: 0px;
  font-size: 0.95rem;
  vertical-align: middle;
}

/* Service block style for services page */
.service-block {
  margin-bottom: var(--spacing-large);
}

.service-block h2 {
  font-size: 1.75rem;
  color: var(--accent);
}

.service-block p {
  font-size: 1rem;
  margin-bottom: var(--spacing-small);
}

.service-block small {
  display: block;
  color: #6b7280; /* gray‑500 */
  font-size: 0.875rem;
}

/* About page profile + contact layout */
.about-top {
  display: flex;
  gap: var(--spacing-medium);
  align-items: flex-start;
  /* place photo on the right of the text on desktop */
  flex-direction: row-reverse;
}

.about-photo img {
  width: 220px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(2,6,23,0.06);
  object-fit: cover;
  display: block;
}

/* Slightly nudge the profile image up on desktop while keeping mobile stacking unchanged */
@media (min-width: 768px) {
  .about-photo {
    /* ensure the photo sits at the top of the flex container */
    align-self: flex-start;
  }

  .about-photo img {
    /* negative translate to move image up a bit; adjust value if you want more/less */
    transform: translateY(-12px);
    transition: transform 180ms ease;
  }
}

/* Mobile: make profile image smaller, centered, add a subtle border, and limit height so it stays proportional */
@media (max-width: 767px) {
  .about-top {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
  }

  /* wrapper: center and constrain width so the border sits tightly around the image */
  .about-photo {
    display: block;
    margin: 0 auto;
    border: 1px solid #e5e7eb;
    padding: 4px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(2,6,23,0.04);
    max-width: 300px; /* tighten wrapper */
  }

  .about-photo img {
    width: 100%;         /* fill the wrapper exactly */
    height: auto;
    max-height: 420px;   /* prevent extremely tall images on phones */
    object-fit: cover;
    transform: none !important; /* remove desktop nudge on small screens */
    display: block;
    border-radius: 6px;
  }

  .about-info {
    text-align: left;
    width: 100%;
    max-width: 720px;
  }
}

.about-info .lead {
  margin-bottom: var(--spacing-medium);
  color: var(--text);
}

.about-info h3 {
  padding-top: var(--spacing-medium);
  margin-bottom: 0.5rem;
}

.contact-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: var(--spacing-small);
}

.contact-btn {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.contact-btn:hover {
  background: #f8fafc;
}

.contact-btn svg {
  display: inline-block;
  vertical-align: middle;
}

.contact-btn .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .about-top {
    flex-direction: column;
    align-items: stretch;
  }
  .about-photo img {
    width: 100%;
    max-width: 320px;
  }
}

/* Service tiers expandable section */
.service-details {
  margin-top: var(--spacing-medium);
}

.expand-button {
  width: 100%;
  padding: var(--spacing-small);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.expand-button:hover {
  background: #f8fafc;
}

.expand-button::after {
  content: '↓';
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.expand-button[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.service-tiers {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-medium);
  margin-top: var(--spacing-medium);
  padding: var(--spacing-medium);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
}

.service-tiers[aria-hidden="false"] {
  display: grid;
}

/* Ensure hidden attribute always hides the tiers (stronger rule for browsers/overrides) */
.service-tiers[hidden] {
  display: none !important;
}

/* Ensure the expand button is actually hidden when the hidden attribute is present */
.expand-button[hidden] {
  display: none !important;
}

/* Service description block (toggled separately from tiers) */
.service-description {
  display: none;
  margin-top: var(--spacing-medium);
  padding: var(--spacing-medium);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
}

.service-description[aria-hidden="false"] {
  display: block;
}

.service-description[hidden] {
  display: none !important;
}

.tier {
  padding: var(--spacing-medium);
  background: #f8fafc;
  border-radius: var(--radius);
}

.tier h3 {
  color: var(--accent);
  margin-top: 0;
  margin-bottom: var(--spacing-small);
}

.tier ul {
  padding-left: 1.5rem;
  margin: var(--spacing-small) 0;
}

.tier li {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .service-tiers {
    grid-template-columns: 1fr;
  }
  
  .tier {
    margin-bottom: var(--spacing-medium);
  }
}

/* Contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  margin-bottom: var(--spacing-medium);
  font-size: 1rem;
}

.contact-form button {
  background-color: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button:hover {
  opacity: 0.9;
}

.contact-form .note {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: var(--spacing-small);
}

/* Footer */
.footer {
  flex-shrink: 0;
  width: 100%;
  background: #fff;
  text-align: center;
  padding: var(--spacing-medium) var(--spacing-medium);
  border-top: 1px solid #e5e7eb;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: auto;
  position: relative;
  z-index: 2;
}

.footer a {
  color: var(--accent);
}
/* margin variables */
:root {
  --spacing-small: 0.5rem;
  --spacing-medium: 1rem;
  --spacing-large: 3rem;
}

/* margin classes */

.mt-small {
  margin-top: var(--spacing-small);
}

.mt-medium {
  margin-top: var(--spacing-medium);
}

.mt-large {
  margin-top: var(--spacing-large);
}

.mb-0 {
  margin-bottom: 0;
}

.mb-small {
  margin-bottom: var(--spacing-small);
}

.mb-medium {
  margin-bottom: var(--spacing-medium);
}

.mb-large {
  margin-bottom: var(--spacing-large);
}

.marginleft-medium {
  margin-left: var(--spacing-medium);
}

/* padding classes */

.paddingtop-small {
  padding-top: var(--spacing-small);
}

.paddingtop-medium {
  padding-top: var(--spacing-medium);
}

.section-padding {
  padding-left: var(--spacing-medium);
  padding-right: var(--spacing-medium);
}

.paddingtop-large {
  padding-top: var(--spacing-large);
}

.padding-zero {
  padding-bottom: 0;
}

/* Analytics Service Block */
.services-block {
  display: flex;
  gap: var(--spacing-large);
  align-items: center;
}

.service-content {
  flex: 1;
  padding: 10px;
}

.services-block {
  background: white;
  border-radius: var(--radius);
  padding: var(--spacing-medium);
  margin-bottom: var(--spacing-large);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-large);
  align-items: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.services-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.05);
}

.service-content {
  padding: var(--spacing-small);
}

.service-image {
  padding: var(--spacing-small);
  display: flex;
  justify-content: center;
  align-items: start;
}

.service-image img {
  max-width: 280px;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.services-block h4 {
  margin: var(--spacing-medium) 0 var(--spacing-small);
  color: var(--accent);
  font-size: 1.1rem;
}

.services-block h2 {
  color: var(--accent);
  margin-top: 0;
  font-size: 1.75rem;
}

.services-block ul {
  list-style: none;
  padding: 0;
  margin: var(--spacing-medium) 0;
}

.services-block li {
  padding: var(--spacing-small) 0;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
}

.services-block li:before {
  content: "•";
  color: var(--accent);
  font-weight: bold;
  margin-right: 10px;
}

.services-block li:last-child {
  border-bottom: none;
}

.services-block small {
  display: block;
  margin-top: var(--spacing-medium);
  color: #6b7280;
  font-style: italic;
}

/* Gallery Modal Styles */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: var(--spacing-medium);
  overflow: auto;
}

.gallery-modal.active {
  display: flex;
}

.gallery-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.gallery-close {
  position: fixed; /* fixed to viewport */
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  z-index: 3001; /* above modal */
  transition: background 0.18s ease, transform 0.12s ease, opacity 0.6s ease;
  box-shadow: 0 6px 18px rgba(2,6,23,0.35);
}

.gallery-close:hover {
  background: rgba(0,0,0,0.95);
  transform: translateY(-2px);
}

.gallery-images {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 2rem 0;
  min-height: 400px;
}

.gallery-images img {
  max-width: 100%;
  height: auto;
  max-height: 115vh; /* limit gallery image height to 115% of viewport height */
  object-fit: contain;
  padding: 0 1rem;
}

.gallery-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
  gap: 1rem;
}

.gallery-prev,
.gallery-next {
  position: fixed; /* fixed to viewport */
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.6); /* more translucent white circle */
  color: var(--accent); /* arrow color */
  border: none;
  width: 56px;
  height: 56px;
  padding: 0; /* icon centered by flex */
  border-radius: 50%;
  font-size: 1.25rem; /* size of arrow glyph */
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, opacity 0.6s ease;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(2,6,23,0.18);
  backdrop-filter: blur(4px);
}

.gallery-caption {
  flex: 1 1 auto;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
  padding: 0 0.5rem;
  background: transparent;
  border-top: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hide photo titles in the gallery footer - we only show the Visit link */
/* gallery caption element removed from HTML; this rule is intentionally omitted */

.gallery-prev:hover,
.gallery-prev:hover,
.gallery-next:hover {
  color: #16324a; /* slightly darker accent on hover */
  background: rgba(255,255,255,0.98);
  transform: translateY(-50%) translateY(-4px) scale(1.03);
  box-shadow: 0 8px 22px rgba(2,6,23,0.22);
}

/* position specific arrows */
.gallery-prev { left: 64px; }
.gallery-next { right: 64px; }

@media (max-width: 768px) {
  .gallery-prev { left: 12px; }
  .gallery-next { right: 12px; }
  .gallery-close { right: 0.75rem; top: 0.75rem; }
  .gallery-prev, .gallery-next { font-size: 1.6rem; min-width: 40px; min-height: 40px; }
}

/* hide UI when modal has ui-hidden class */
.gallery-modal.ui-hidden .gallery-close,
.gallery-modal.ui-hidden .gallery-prev,
.gallery-modal.ui-hidden .gallery-next {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.98);
}

/* Loading / skeleton for gallery images */
.gallery-img {
  max-width: 100%;
  height: auto;
  max-height: 115vh; /* keep the same limit */
  object-fit: contain;
  padding: 0 1rem;
  display: block;
}

.gallery-img.loading {
  /* placeholder container that will show the favicon.svg centered
     Sized to match the logo width/height and centered in the gallery area */
  --logo-size: 120px; /* default; matches logo max-width in the header */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, rgba(245,247,249,1) 0%, rgba(235,240,244,1) 40%, rgba(245,247,249,1) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  width: var(--logo-size);
  height: var(--logo-size);
  max-width: var(--logo-size);
  max-height: var(--logo-size);
  border-radius: 8px;
  overflow: hidden;
}

/* On larger screens, make the shimmer placeholder span ~80% of the viewport width */
@media (min-width: 992px) {
  .gallery-img.loading {
    width: 80vw;
    height: auto;
    max-width: 1200px;
    max-height: 80vh;
    border-radius: 10px;
    background-size: 200% 100%;
  }

  /* keep the favicon icon small and centered inside the larger placeholder */
  .gallery-img.placeholder .placeholder-icon {
    width: 96px;
    height: auto;
    opacity: 0.95;
    display: block;
    object-fit: contain;
  }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Placeholder variant that contains the favicon icon */
.gallery-img.placeholder .placeholder-icon {
  /* Allow the icon to scale down to fit small placeholders but never exceed 96px */
  width: 100%;
  height: auto;
  max-width: 96px;
  max-height: 96px;
  opacity: 0.95;
  display: block;
  object-fit: contain;
}

/* shimmer overlay on top of the placeholder image to make loading effect obvious */
.gallery-img.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  mix-blend-mode: overlay;
  animation: shimmer 1.4s linear infinite;
}

/* Gallery footer center wrapper: caption + visit link */
.gallery-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  padding: 0 0.5rem;
}

/* Simple link style for Visit website (does not add extra modal height) */
.gallery-visit-link {
  color: var(--accent);
  text-decoration: none; /* remove underline */
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  vertical-align: baseline;
}

.gallery-visit-link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  /* position the arrow slightly lower relative to the text */
  transform: translateY(2px) rotate(0deg);
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.gallery-visit-link:hover {
  color: var(--accent-purple);
  text-decoration: none; /* ensure no underline on hover */
}

/* Animate the external arrow slightly on hover/focus to indicate an external link */
.gallery-visit-link {
  transition: color 0.22s ease;
}

.gallery-visit-link svg {
  transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 160ms ease;
  transform-origin: center;
}

.gallery-visit-link:hover svg,
.gallery-visit-link:focus svg {
  transform: translate(4px, -4px) rotate(-14deg);
}

.gallery-visit-link:active svg {
  transform: translate(2px, -2px) rotate(-14deg) scale(0.98);
}

/* Make keyboard focus visible for accessibility */
.gallery-visit-link:focus-visible {
  outline: 3px solid rgba(124,58,237,0.14);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .gallery-content {
    max-width: 95vw;
    max-height: 90vh;
  }

  .gallery-images {
    min-height: 300px;
    padding: 1rem 0;
  }

  .gallery-prev,
  .gallery-next {
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
  }

  /* Make shimmer placeholder span ~90% of parent width on mobile */
  .gallery-img.loading {
    width: 90%;
    height: auto;
    max-width: none;
  }

  /* Make the white gallery content container itself 90% width of viewport and center it */
  .gallery-content {
    width: 90%;
    max-width: none;
    margin: 0 auto;
    box-shadow: 0 12px 30px rgba(2,6,23,0.18);
  }

  /* Ensure the loading placeholder is centered within the gallery-content */
  .gallery-images {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gallery-img.loading {
    margin: 0 auto;
    min-height: 220px;
  }
}

@media (max-width: 768px) {
  .services-block {
    grid-template-columns: 1fr;
  }
  
  .service-image {
    order: -1;
  }
  
  .service-image img {
    max-width: 240px;
  }
}

@media (max-width: 768px) {
  .analytics-block {
    flex-direction: column;
  }
  
  .service-image {
    order: -1;
    margin-bottom: var(--spacing-medium);
  }
}