/* ============================================
   Mapsoft.com - Static Site Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --brand-blue: #046BD2;
  --brand-blue-dark: #0355A8;
  --brand-blue-light: #E8F1FC;
  --dark: #1E293B;
  --dark-muted: #475569;
  --light-bg: #F0F5FA;
  --white: #FFFFFF;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --header-height: 72px;
  --transition: 0.2s ease;
}

/* --- Reset --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--brand-blue-dark);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* --- Skip Link (Accessibility) --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--brand-blue);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 8px;
}

/* --- Focus Styles (Accessibility) --- */
a:focus-visible, .btn:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--light-bg);
}

.text-center {
  text-align: center;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--dark-muted);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 48px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn--primary {
  background: var(--brand-blue);
  color: var(--white);
  border-color: var(--brand-blue);
}

.btn--primary:hover {
  background: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: var(--white);
}

.btn--outline {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.btn--outline:hover {
  background: var(--brand-blue);
  color: var(--white);
}

.btn--small {
  padding: 8px 20px;
  font-size: 0.875rem;
}

/* --- Header / Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--brand-blue);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.logo:hover {
  color: var(--brand-blue);
}

.logo svg {
  width: 36px;
  height: 36px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand-blue);
  background: var(--brand-blue-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--dark);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Hero --- */
.hero {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--light-bg) 0%, var(--white) 100%);
}

.hero--home {
  padding: 100px 0;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  max-width: 700px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--dark-muted);
  max-width: 600px;
  margin-bottom: 32px;
}

.hero .btn-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero with split layout (text + image) */
.hero--split .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero--split .hero__content {
  order: 1;
}

.hero--split .hero__image {
  order: 2;
}

.hero__image img,
.hero__image svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Product screenshot in content */
.screenshot {
  margin: 32px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.screenshot img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot--centered {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.screenshot figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--dark-muted);
  background: var(--light-bg);
  text-align: center;
}

.hero--centered {
  text-align: center;
}

.hero--centered h1,
.hero--centered p {
  margin-left: auto;
  margin-right: auto;
}

.hero--centered .btn-group {
  justify-content: center;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  background: var(--brand-blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--brand-blue);
}

.card__icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.card p {
  color: var(--dark-muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.card__links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.card__links a {
  font-size: 0.9rem;
  font-weight: 600;
}

/* --- Product Cards (compact) --- */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--brand-blue);
}

.product-card p {
  color: var(--dark-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 16px;
}

.product-card__price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: 8px;
}

.product-card__links {
  display: flex;
  gap: 12px;
}

.product-card__links a {
  font-size: 0.85rem;
  font-weight: 600;
}

/* --- Blog Post Thumbnails --- */
.post-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

/* --- Feature List --- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.feature-item {
  display: flex;
  gap: 16px;
}

.feature-item__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--brand-blue-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
}

.feature-item h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.feature-item p {
  color: var(--dark-muted);
  font-size: 0.9rem;
}

/* --- Content Sections --- */
.content-block {
  max-width: 800px;
  margin: 0 auto;
}

.content-block h2 {
  margin-bottom: 16px;
}

.content-block h3 {
  margin-top: 32px;
  margin-bottom: 12px;
}

.content-block p {
  color: var(--dark-muted);
  margin-bottom: 16px;
}

.content-block ul {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-block ul li {
  color: var(--dark-muted);
  margin-bottom: 8px;
}

/* --- Contact Info --- */
.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
}

.contact-card__icon {
  width: 56px;
  height: 56px;
  background: var(--brand-blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--brand-blue);
}

.contact-card h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.contact-card p,
.contact-card a {
  color: var(--dark-muted);
  font-size: 0.95rem;
}

/* --- CTA Section --- */
.cta {
  background: var(--brand-blue);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}

.cta h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 500px;
  margin: 0 auto 32px;
  font-size: 1.1rem;
}

.cta .btn--outline {
  color: var(--white);
  border-color: var(--white);
}

.cta .btn--outline:hover {
  background: var(--white);
  color: var(--brand-blue);
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer h4 {
  color: var(--white);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-about p {
  font-size: 0.9rem;
  margin-bottom: 20px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--brand-blue);
  color: var(--white);
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero--split .container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero--split .hero__image {
    order: -1;
    max-width: 400px;
    margin: 0 auto;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 56px 0;
  }

  .hero--home {
    padding: 64px 0;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  /* Mobile nav */
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 14px;
    width: 100%;
  }

  .header .container {
    position: relative;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 10px 22px;
    font-size: 0.9rem;
  }

  .card {
    padding: 24px;
  }
}

/* --- Print Stylesheet --- */
@media print {
  .header,
  .footer,
  .skip-link,
  .nav-toggle,
  .cta,
  .cookie-consent,
  .cookie-banner {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
    line-height: 1.5;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }

  .hero {
    background: none;
    padding: 20px 0;
  }

  .section {
    padding: 20px 0;
  }

  .section--alt {
    background: none;
  }

  .card, .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .card:hover, .product-card:hover {
    transform: none;
    box-shadow: none;
  }

  .btn {
    border: 1px solid #000;
    padding: 4px 8px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  img {
    max-width: 100%;
  }

  .screenshot {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  @page {
    margin: 2cm;
  }
}
