﻿/* CaraCore-PDV Portal (docs/) â€” Unified styles
   Purpose: centralize shared CSS used across docs/*.html pages.
   Notes:
   - Pages still use Tailwind CDN; this file covers shared custom classes.
   - Keep class names already used in HTML to avoid refactors.
*/

:root{
  --brand-a: #0b1f3a;
  --brand-b: #111827;
  --brand-c: #0f766e;

  --green: #059669;
  --green2: #10b981;

  --grad-a: #667eea;
  --grad-b: #764ba2;

  --page-gutter: clamp(1rem, 3vw, 1.75rem);
}

html {
  overflow-x: clip;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  overflow-x: hidden;
}

img, svg, video, canvas {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

figure,
picture {
  max-width: 100%;
}

.container {
  width: 100%;
  padding-left: max(var(--page-gutter), env(safe-area-inset-left));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right));
}

.portal-header {
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.portal-hero {
  margin: var(--page-gutter);
  margin-top: clamp(0.75rem, 2vw, 1.5rem);
  border-radius: clamp(1.25rem, 2.6vw, 2rem);
  overflow: clip;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.page-shell {
  padding-top: clamp(1rem, 2vw, 1.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.portal-panel {
  border-radius: clamp(1.25rem, 2.4vw, 2rem);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.1);
}

/* Gradients / accents */
.brand-bg { background: linear-gradient(135deg, var(--brand-a) 0%, var(--brand-b) 55%, var(--brand-c) 100%); }
.brand-chip { background: linear-gradient(135deg, rgba(16,185,129,0.18) 0%, rgba(16,185,129,0.08) 100%); }
.green-bg { background: linear-gradient(135deg, var(--green) 0%, var(--green2) 100%); }
.green-accent { color: var(--green); }

.gradient-bg { background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%); }
.gradient-text {
  background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Motion */
.smooth-scroll { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Cards / focus */
.card { background: white; border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.card-hover { transition: all 0.3s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); }

.focus-ring:focus { outline: none; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35); }
.window-shadow { box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55), 0 10px 25px rgba(2, 6, 23, 0.35); }

/* Shared page breathing room */
section,
header,
main,
footer {
  min-width: 0;
}

/* Floating CTA must respect mobile safe areas */
a[aria-label="Represente a Tecnologia Cara Core"] {
  right: max(1rem, env(safe-area-inset-right)) !important;
  bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  max-width: min(22rem, calc(100vw - 2rem));
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 1.125rem;
  }

  .portal-hero {
    margin-top: 0.75rem;
    border-radius: 1.5rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
  }

  .page-shell {
    padding-top: 1rem;
    padding-bottom: 2rem;
  }

  .portal-panel {
    border-radius: 1.5rem;
  }

  .card,
  .section-card,
  .service-card,
  .sol-card,
  .step-box {
    border-radius: 18px;
  }

  .window-shadow {
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28), 0 8px 18px rgba(2, 6, 23, 0.18);
  }

  a[aria-label="Represente a Tecnologia Cara Core"] {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

/* Index-specific badge */
.selo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: var(--green);
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Wiki-fiscal / consultoria helper boxes */
.info-box {
  background: #e0f2fe;
  border-left: 4px solid #0284c7;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}
.warning-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}
.success-box {
  background: #d1fae5;
  border-left: 4px solid #10b981;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.step-box {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  transition: all 0.3s ease;
}
.step-box:hover { border-color: var(--grad-a); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--grad-a) 0%, var(--grad-b) 100%);
  color: white;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 1rem;
}

.section-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Wiki image responsiveness (mobile/tablet/desktop) */
.wiki-image {
  display: block;
  width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 20px rgba(17, 24, 39, 0.08);
}

.wiki-image-frame {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .wiki-image-frame {
    max-width: 88%;
  }
}

@media (min-width: 1280px) {
  .wiki-image-frame {
    max-width: 820px;
  }
}

/* Consultoria helpers */
.service-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.service-card:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.1); transform: translateY(-4px); }
.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green2) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  margin-bottom: 1.5rem;
}

/* Tecnologia (SoluÃ§Ãµes) cards */
.sol-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  border: 1px solid #e5e7eb;
}
.sol-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

/* Consultoria highlight */
.highlight-box {
  background: linear-gradient(135deg, #05966915 0%, #10b98115 100%);
  border-left: 4px solid var(--green);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* Table baseline (used by consultoria/wiki-fiscal) */
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table th, table td { border: 1px solid #e5e7eb; padding: 0.75rem; text-align: left; }
table th { background-color: #f9fafb; font-weight: 600; }



