/*
 * IT Source Land - Production Stylesheet
 * Google Clean Flat UI (Material 3 / Google SaaS Style)
 * Pure solid colors (NO gradients), soft ambient shadows, rounded pill buttons & cards,
 * and 100% mobile-responsive layout without text clipping or horizontal overflow.
 */

:root {
  /* Google Clean Flat Solid Colors - NO GRADIENTS */
  --itsl-primary: #1a73e8;
  --itsl-primary-hover: #1557b0;
  --itsl-primary-active: #174ea6;
  --itsl-primary-light: #e8f0fe;
  --itsl-navy: #202124;
  --itsl-dark: #0f172a;
  --itsl-bg: #f8fafd;
  --itsl-surface: #ffffff;
  --itsl-text: #3c4043;
  --itsl-text-secondary: #5f6368;
  --itsl-border: #dadce0;
  --itsl-border-subtle: #f1f3f4;

  /* Google Elevation Shadows (Multi-layer Ambient Soft Shadows) */
  --shadow-xs: 0 1px 2px 0 rgba(60, 64, 67, 0.06);
  --shadow-sm: 0 1px 3px 0 rgba(60, 64, 67, 0.1), 0 1px 2px 0 rgba(60, 64, 67, 0.06);
  --shadow-card: 0 2px 6px 0 rgba(60, 64, 67, 0.08), 0 1px 2px 0 rgba(60, 64, 67, 0.04);
  --shadow-card-hover: 0 10px 24px -2px rgba(26, 115, 232, 0.15), 0 4px 10px -2px rgba(60, 64, 67, 0.08);
  --shadow-btn: 0 2px 4px 0 rgba(26, 115, 232, 0.25);
  --shadow-btn-hover: 0 4px 12px 0 rgba(26, 115, 232, 0.35);
  --shadow-float: 0 8px 24px 0 rgba(60, 64, 67, 0.12), 0 2px 6px 0 rgba(60, 64, 67, 0.06);

  /* Rounded Corner Radii */
  --radius-pill: 9999px;
  --radius-xl: 22px;
  --radius-card: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;

  /* Transitions */
  --transition-smooth: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

/* Global Reset & Mobile Viewport Protection */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Prompt', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--itsl-text);
  background-color: var(--itsl-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Text Wrapping Protection - Prevents text touching/overflowing screen edges */
h1, h2, h3, h4, h5, h6, .display-5, .display-6, p, .lead, a, span, label, strong, dt, dd {
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

h1, h2, h3, h4, h5, h6, .display-5, .display-6, .h5, .h6 {
  font-family: 'Plus Jakarta Sans', 'Prompt', sans-serif;
  color: var(--itsl-navy);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.text-navy { color: var(--itsl-navy) !important; }
.text-secondary { color: var(--itsl-text-secondary) !important; }

/* Responsive Container Padding */
.container, .container-fluid {
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
@media (max-width: 575.98px) {
  .container, .container-fluid {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
}

/* Header & Clean Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}
.site-header .navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--itsl-border) !important;
  box-shadow: var(--shadow-xs);
  padding: 0.75rem 0;
}
.navbar-nav .nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: #3c4043;
  padding: 0.45rem 0.9rem !important;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
}
.navbar-nav .nav-link:hover {
  color: var(--itsl-primary);
  background-color: var(--itsl-primary-light);
}
.navbar-nav .nav-link.active {
  color: var(--itsl-primary);
  background-color: var(--itsl-primary-light);
  font-weight: 700;
}

/* Brand Mark (Solid Flat Colors) */
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--itsl-primary-light);
  color: var(--itsl-primary);
  border: 1px solid #c2e7ff;
  border-radius: 12px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.brand-mark-sm { width: 32px; height: 32px; border-radius: 10px; }

/* Google-Style Pill Search Input */
form[role="search"] {
  max-width: 100%;
}
form[role="search"] .form-control {
  border-radius: var(--radius-pill);
  background-color: #f1f3f4;
  border: 1px solid transparent;
  padding: 0.45rem 1.15rem;
  font-size: 0.9rem;
  transition: var(--transition-smooth);
}
form[role="search"] .form-control:focus {
  background-color: #ffffff;
  border-color: #c2e7ff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}
form[role="search"] .btn {
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.85rem;
}

/* Language Switcher */
.lang-switch .btn {
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--itsl-border);
}

/* Google-Style Buttons (Pure Flat Solids - NO Gradients) */
.btn {
  border-radius: var(--radius-pill);
  font-weight: 600;
  padding: 0.55rem 1.35rem;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}
.btn-lg {
  padding: 0.75rem 1.65rem;
  font-size: 1.05rem;
}

.btn-primary {
  background-color: var(--itsl-primary);
  color: #ffffff;
  border-color: var(--itsl-primary);
  box-shadow: var(--shadow-btn);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--itsl-primary-hover);
  border-color: var(--itsl-primary-hover);
  box-shadow: var(--shadow-btn-hover);
  transform: translateY(-1px);
  color: #ffffff;
}
.btn-primary:active {
  background-color: var(--itsl-primary-active);
  transform: translateY(0);
}

.btn-outline-primary {
  color: var(--itsl-primary);
  border: 1.5px solid #dadce0;
  background-color: #ffffff;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--itsl-primary-light);
  border-color: var(--itsl-primary);
  color: var(--itsl-primary-hover);
  transform: translateY(-1px);
}

.btn-navy {
  background-color: var(--itsl-navy);
  border-color: var(--itsl-navy);
  color: #ffffff;
}
.btn-navy:hover, .btn-navy:focus {
  background-color: #000000;
  color: #ffffff;
}

/* Hero Section (Clean Flat Solid - NO Gradients) */
.hero {
  background-color: #ffffff;
  border-bottom: 1px solid var(--itsl-border);
  padding: 3.5rem 0 4rem;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--itsl-primary);
  background-color: var(--itsl-primary-light);
  border: 1px solid #c2e7ff;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.25rem;
}
.hero-art {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8fafd;
  border: 2px dashed #dadce0;
  border-radius: var(--radius-xl);
  color: #94a3b8;
}
.hero-art svg { width: 72px; height: 72px; }

.hero-img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-float);
  border: 1px solid var(--itsl-border) !important;
  background-color: #ffffff;
}

/* Sections & Layout Spacing */
.section { padding: 4.25rem 0; }
.section-tight { padding: 2.5rem 0; }
.section-alt {
  background-color: #ffffff;
  border-top: 1px solid var(--itsl-border);
  border-bottom: 1px solid var(--itsl-border);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--itsl-border);
  padding-bottom: 1rem;
  gap: 1rem;
}
.section-head h2 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--itsl-navy);
}

.page-head {
  background-color: #ffffff;
  border-bottom: 1px solid var(--itsl-border);
  padding: 3rem 0;
  margin-bottom: 2rem;
}

/* Cards System: Rounded Corners & Soft Light Shadow */
.card {
  background-color: var(--itsl-surface);
  border: 1px solid var(--itsl-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition-smooth);
}
.card-body {
  padding: 1.35rem;
}

.card:hover {
  border-color: #c2e7ff;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.card-product:hover, .card-article:hover, .card-tool:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: #bad3f7;
}

/* Card Images */
.card-img-top, .thumb {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.card:hover .card-img-top {
  transform: scale(1.02);
}
.card-img-link {
  display: block;
  overflow: hidden;
}

/* Category Tiles */
.cat-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background-color: #ffffff;
  border: 1px solid var(--itsl-border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--itsl-text);
  transition: var(--transition-smooth);
  height: 100%;
  text-align: center;
}
.cat-tile:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
  color: var(--itsl-primary);
}
.cat-tile strong {
  font-size: 1rem;
  margin-top: 0.4rem;
  color: var(--itsl-navy);
}
.cat-tile small {
  color: var(--itsl-text-secondary);
  font-size: 0.85rem;
}

/* Badges & Pills */
.badge {
  border-radius: var(--radius-pill);
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  display: inline-block;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}
.badge.text-bg-light {
  background-color: #f1f3f4 !important;
  color: #3c4043 !important;
  border: 1px solid #dadce0 !important;
}
.badge-affiliate {
  background-color: #fef7e0;
  color: #b06000;
  border: 1px solid #fce8b2;
}

/* 3D Tool App Canvas & Interface */
.tool-app {
  border-radius: var(--radius-xl);
  border: 1px solid var(--itsl-border);
  box-shadow: var(--shadow-float);
  background-color: #ffffff;
  overflow: hidden;
}
.canvas-wrap {
  background-color: #f8fafd;
  border-radius: var(--radius-md);
  padding: 6px;
  border: 1px solid var(--itsl-border);
  max-width: 100%;
  overflow: hidden;
}
.tool-canvas {
  width: 100%;
  height: 380px;
  background-color: #ffffff;
  border-radius: 8px;
  outline: none;
  cursor: grab;
  touch-action: none;
  display: block;
}
.tool-canvas:active { cursor: grabbing; }

/* Forms & Inputs */
.form-control, .form-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--itsl-border);
  padding: 0.6rem 0.95rem;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  max-width: 100%;
}
.form-control:focus, .form-select:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

/* Pros & Cons Boxes */
.procon {
  padding: 1.35rem;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.procon.pros { background-color: #f0fdf4; border: 1px solid #bbf7d0; }
.procon.cons { background-color: #fef2f2; border: 1px solid #fecaca; }
.procon h2 { font-size: 1.15rem; margin-bottom: 0.85rem; }
.procon.pros h2 { color: #166534; }
.procon.cons h2 { color: #991b1b; }
.procon ul li { margin-bottom: 0.5rem; display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.95rem; }
.procon.pros ul li svg { color: #16a34a; flex-shrink: 0; margin-top: 3px; }
.procon.cons ul li svg { color: #dc2626; flex-shrink: 0; margin-top: 3px; }

/* Editorial Prose Article Styling */
.prose {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #374151;
}
.prose h2 { font-size: 1.65rem; font-weight: 800; color: var(--itsl-navy); margin-top: 2rem; margin-bottom: 0.9rem; }
.prose h3 { font-size: 1.3rem; font-weight: 700; color: var(--itsl-navy); margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1.25rem; }
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--itsl-border);
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}
.prose table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose th, .prose td {
  border: 1px solid var(--itsl-border);
  padding: 0.65rem 0.85rem;
  white-space: nowrap;
}
.prose th { background-color: var(--itsl-bg); }

/* Table of Contents */
.toc-box {
  background-color: #f8fafd;
  border: 1px solid var(--itsl-border);
  border-radius: var(--radius-card);
  padding: 1.35rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-xs);
}
.toc-box ol { padding-left: 1.25rem; margin-bottom: 0; }
.toc-box li { margin-bottom: 0.4rem; }
.toc-box a { color: var(--itsl-primary); text-decoration: none; font-weight: 500; }
.toc-box a:hover { text-decoration: underline; }

/* Breadcrumb */
.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}
.breadcrumb-item a {
  color: var(--itsl-text-secondary);
  text-decoration: none;
  font-weight: 500;
}
.breadcrumb-item a:hover { color: var(--itsl-primary); }
.breadcrumb-item.active { color: var(--itsl-navy); font-weight: 600; }

/* Disclosure / Callout */
.disclosure-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.15rem 1.25rem;
  background-color: #ffffff;
  border: 1px solid var(--itsl-border);
  border-left: 4px solid var(--itsl-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

/* Guide Box (Clean Flat Solid - NO Gradients) */
.guide-box {
  background-color: var(--itsl-dark);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.75rem 2rem;
}
.guide-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: background-color 0.15s ease;
}
.guide-list a:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Footer (Clean Flat Solid - NO Gradients) */
.site-footer {
  background-color: var(--itsl-dark);
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 3.5rem;
}
.site-footer a { color: #cbd5e1; text-decoration: none; transition: color 0.15s ease; }
.site-footer a:hover { color: #ffffff; }

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 380px;
  background-color: var(--itsl-dark);
  color: #ffffff;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-float);
  z-index: 9999;
}
.cookie-notice a { color: #60a5fa; }

/* Skip Link */
.skip-link {
  position: absolute;
  top: -50px;
  left: 10px;
  background-color: var(--itsl-primary);
  color: #ffffff;
  padding: 8px 18px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-pill);
  transition: top 0.2s ease;
}
.skip-link:focus { top: 10px; }

/* Admin Sidebar */
.admin-sidebar {
  width: 260px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  z-index: 1050;
}
.admin-sidebar .nav-link {
  border-radius: var(--radius-pill);
  font-weight: 500;
  padding: 0.55rem 0.95rem;
  color: #374151;
  margin-bottom: 0.2rem;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  background-color: var(--itsl-primary-light);
  color: var(--itsl-primary);
  font-weight: 600;
}

/* -------------------------------------------------------------
   MOBILE RESPONSIVENESS OVERRIDES (Resolves Text Touching Edges)
   ------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
  }
  .admin-sidebar.show {
    transform: translateX(0);
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
  }
}

@media (max-width: 767.98px) {
  /* Typography Scaling */
  .hero h1, .display-5 {
    font-size: 1.85rem !important;
    line-height: 1.3 !important;
  }
  .display-6 {
    font-size: 1.65rem !important;
    line-height: 1.35 !important;
  }
  .hero .lead, .lead {
    font-size: 1.02rem !important;
  }
  
  /* Section Spacing */
  .section {
    padding: 2.75rem 0;
  }
  .section-tight {
    padding: 2rem 0;
  }
  .page-head {
    padding: 2.25rem 0;
    margin-bottom: 1.5rem;
  }
  
  /* Section Header on Mobile: stack button below title without pushing edges */
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .section-head h2 {
    font-size: 1.45rem !important;
    line-height: 1.3;
  }

  /* Category Tiles in 2-column mobile layout */
  .cat-tile {
    padding: 1.15rem 0.65rem;
    border-radius: 14px;
  }
  .cat-tile strong {
    font-size: 0.9rem;
    white-space: normal;
  }
  .cat-tile small {
    font-size: 0.78rem;
  }

  /* Card Paddings on Mobile */
  .card-body {
    padding: 1.15rem;
  }

  /* Buttons on Mobile */
  .btn-lg {
    padding: 0.65rem 1.35rem;
    font-size: 0.95rem;
  }

  /* Hero Banner Image Margin */
  .hero-img {
    margin-top: 1.25rem;
    border-radius: 16px !important;
  }
  .hero {
    padding: 2.25rem 0 2.75rem;
  }

  /* 3D Tool Canvas */
  .tool-canvas {
    height: 300px;
  }
  .tool-app {
    border-radius: 16px;
  }

  /* Guide Box */
  .guide-box {
    padding: 1.75rem 1.25rem;
    border-radius: 16px;
  }

  /* Cookie Notice */
  .cookie-notice {
    bottom: 12px;
    right: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 480px) {
  .hero h1, .display-5 {
    font-size: 1.65rem !important;
  }
  .prose h2 {
    font-size: 1.35rem;
  }
  .prose h3 {
    font-size: 1.15rem;
  }
  .card-body {
    padding: 1rem;
  }
  .btn {
    padding: 0.5rem 1.1rem;
    font-size: 0.9rem;
  }
}
