/* =====================================================================
   DIMENSION SERVICE — Global Stylesheet
   Brand: Navy #0A1628 | Blue #1BA8D8 | Orange #F7941D
   ===================================================================== */

:root {
  --navy:      #0A1628;
  --navy-mid:  #0D2240;
  --blue:      #1BA8D8;
  --blue-light:#E8F6FD;
  --orange:    #F7941D;
  --orange-lt: #FEF3E6;
  --white:     #FFFFFF;
  --light-bg:  #F4F7FA;
  --card-bg:   #EEF4F8;
  --dark-text: #1A1A2E;
  --mid-text:  #5A6A7A;
  --light-text:#9AABB8;
  --divider:   #D0DCE8;
  --green:     #27AE60;
  --yellow:    #F39C12;
  --red:       #E74C3C;
  --font-head: 'Segoe UI', Arial, sans-serif;
  --font-body: 'Segoe UI', Calibri, sans-serif;
  --radius:    8px;
  --shadow:    0 4px 20px rgba(10,22,40,0.10);
  --shadow-sm: 0 2px 10px rgba(10,22,40,0.07);
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4,h5 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { color: var(--mid-text); line-height: 1.7; }

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.5rem;
}
.section-title { color: var(--navy); margin-bottom: 1rem; }
.section-sub   { color: var(--mid-text); max-width: 640px; }

/* ── Layout ─────────────────────────────────────────────── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 80px 0; }
.section-light { background: var(--light-bg); }
.section-dark  { background: var(--navy); color: var(--white); }
.section-blue  { background: var(--blue); color: var(--white); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }

@media (max-width: 900px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 50px 0; }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: #e8850f; }
.btn-outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--navy); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-blue:hover { background: #17a0cc; }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: var(--white); }

/* ── Navbar ─────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--orange);
  transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.3); }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1140px; margin: 0 auto;
}
.nav-logo { display: flex; flex-direction: column; line-height: 1; }
.nav-logo .logo-dim { font-size: 1.2rem; font-weight: 900; color: var(--white); letter-spacing: 2px; }
.nav-logo .logo-svc { font-size: 0.85rem; font-weight: 700; color: var(--blue); letter-spacing: 3px; }
.nav-logo-img {
  height: 50px;
  max-width: 180px;
  width: auto;
  opacity: 0.95;
  transition: opacity 0.2s;
}
.nav-logo-img:hover { opacity: 1; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a {
  padding: 0.5rem 0.9rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(27,168,216,0.15); }
.nav-links a.cta-nav {
  background: var(--orange); color: var(--white); margin-left: 0.5rem;
}
.nav-links a.cta-nav:hover { background: #e8850f; }
.lang-btn {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 0.75rem;
  transition: all 0.2s;
}
.lang-btn:hover { background: rgba(255,255,255,0.2); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-toggle span { width: 25px; height: 2px; background: var(--white); border-radius: 2px; transition: all 0.3s; }
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--navy); padding: 1rem; gap: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; }
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  padding: 140px 0 90px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 45%; height: 100%;
  background: linear-gradient(135deg, #0D2240 0%, #112B50 100%);
  clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}
.hero::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px; background: var(--orange);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-block;
  background: rgba(247,148,29,0.15);
  color: var(--orange);
  border: 1px solid rgba(247,148,29,0.3);
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero h1 { color: var(--white); margin-bottom: 0.5rem; }
.hero h1 span { color: var(--blue); }
.hero-sub { font-size: 1.1rem; color: rgba(255,255,255,0.75); margin-bottom: 2rem; max-width: 580px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
  display: flex; gap: 2.5rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat .val { font-size: 1.8rem; font-weight: 800; color: var(--white); }
.hero-stat .val span { color: var(--orange); }
.hero-stat .lbl { font-size: 0.8rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-top-bar { height: 5px; }
.card-body { padding: 1.5rem; }
.card-icon {
  width: 48px; height: 48px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}
.card-dark { background: var(--navy-mid); }
.card-dark h3, .card-dark p { color: rgba(255,255,255,0.85); }
.card-dark .card-icon { background: rgba(27,168,216,0.15); }

.service-card .card-top-bar { background: var(--blue); }
.service-card.new-service { background: var(--navy); }
.service-card.new-service .card-top-bar { background: var(--orange); }
.service-card.new-service h3 { color: var(--white); }
.service-card.new-service p  { color: rgba(255,255,255,0.7); }
.new-badge {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 0.65rem; font-weight: 800;
  padding: 0.15rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

/* ── Steps ─────────────────────────────────────────────── */
.step-flow { display: flex; gap: 0; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 180px;
  background: var(--navy-mid);
  padding: 2rem 1.5rem;
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.step:last-child { border-right: none; }
.step-num {
  font-size: 2rem; font-weight: 900;
  color: var(--blue);
  display: block; margin-bottom: 0.75rem;
}
.step h3 { color: var(--white); font-size: 1rem; margin-bottom: 0.5rem; }
.step p  { font-size: 0.9rem; color: rgba(255,255,255,0.6); }
.step.highlight { background: linear-gradient(135deg, #1BA8D8 0%, #1595BE 100%); }
.step.highlight .step-num { color: rgba(255,255,255,0.5); }
.step.highlight h3, .step.highlight p { color: var(--white); }

/* ── Portfolio grid ────────────────────────────────────── */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.portfolio-item {
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--navy-mid);
  position: relative; cursor: zoom-in;
}
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.portfolio-item:hover img { transform: scale(1.05); }
@media (max-width: 768px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* ── CTA Banner ─────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, #112B50 100%);
  padding: 60px 0;
  text-align: center;
  border-top: 4px solid var(--orange);
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-banner p  { color: rgba(255,255,255,0.7); margin-bottom: 2rem; }

/* ── Contact Form ───────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; align-items: start; }
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-block { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.25rem;
  background: var(--light-bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--blue);
}
.contact-item-icon {
  font-size: 1.4rem; line-height: 1;
  width: 2.5rem; flex-shrink: 0; text-align: center;
}
.contact-item-label { font-size: 0.75rem; font-weight: 700; color: var(--blue); text-transform: uppercase; letter-spacing: 0.1em; }
.contact-item-val { color: var(--dark-text); font-size: 0.95rem; }
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark-text); margin-bottom: 0.4rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 0.75rem 1rem;
  border: 1.5px solid var(--divider);
  border-radius: 4px;
  font-family: var(--font-body); font-size: 0.95rem;
  color: var(--dark-text);
  background: var(--white);
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(27,168,216,0.12);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-success {
  display: none; background: #d4edda; color: #155724;
  padding: 1rem; border-radius: 4px; margin-top: 1rem; text-align: center;
}

/* ── Analytics Tool ─────────────────────────────────────── */
.upload-zone {
  border: 2.5px dashed var(--blue);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  background: var(--blue-light);
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
}
.upload-zone.dragging { border-color: var(--orange); background: var(--orange-lt); }
.upload-zone .upload-icon { font-size: 3rem; margin-bottom: 1rem; color: var(--blue); }
.upload-zone h3 { color: var(--navy); margin-bottom: 0.5rem; }
.upload-zone p { color: var(--mid-text); font-size: 0.9rem; }
.upload-zone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
#analysis-results { display: none; }
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--navy);
  border-radius: var(--radius) var(--radius) 0 0;
  color: var(--white);
}
.results-header h3 { color: var(--white); font-size: 1rem; }
.file-info { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
  margin-bottom: 2rem;
}
.stat-box {
  background: var(--white); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
  text-align: center; border-top: 4px solid var(--blue);
}
.stat-box .stat-val { font-size: 1.8rem; font-weight: 800; color: var(--navy); }
.stat-box .stat-lbl { font-size: 0.75rem; color: var(--mid-text); text-transform: uppercase; letter-spacing: 0.08em; }
@media (max-width: 600px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }

/* Stats table */
.stats-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stats-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
  background: var(--white);
}
.stats-table th {
  background: var(--navy); color: var(--white);
  padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.stats-table td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--divider); }
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:nth-child(even) td { background: #F8FAFC; }
.stats-table .cv-badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 3px;
  font-size: 0.8rem; font-weight: 700; color: var(--white);
}
.cv-target   { background: var(--green); }
.cv-attn     { background: var(--yellow); }
.cv-intervento { background: #E67E22; }
.cv-critico  { background: var(--red); }

/* Charts section */
.charts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.chart-wrap {
  background: var(--white); border-radius: var(--radius);
  padding: 1.25rem; box-shadow: var(--shadow-sm);
}
.chart-wrap h4 { font-size: 0.95rem; color: var(--navy); margin-bottom: 1rem; }
@media (max-width: 700px) { .charts-grid { grid-template-columns: 1fr; } }

/* Heatmap */
.heatmap-wrap {
  background: var(--white); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-sm); overflow-x: auto;
}
.heatmap-wrap h4 { font-size: 0.95rem; color: var(--navy); margin-bottom: 1rem; }
#heatmap-table { border-collapse: collapse; font-size: 0.82rem; }
#heatmap-table th { padding: 0.4rem 0.6rem; background: var(--navy); color: var(--white); white-space: nowrap; }
#heatmap-table td { padding: 0.35rem 0.6rem; text-align: center; font-weight: 600; color: var(--white); }
#heatmap-table .col-label { background: #F4F7FA; color: var(--dark-text); font-weight: 600; text-align: left; white-space: nowrap; }

/* Upsell CTA */
.upsell-cta {
  background: linear-gradient(135deg, var(--navy) 0%, #112B50 100%);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap;
}
.upsell-cta p { color: rgba(255,255,255,0.8); max-width: 600px; margin: 0; }
.upsell-cta h4 { color: var(--white); margin-bottom: 0.35rem; }

/* ── About page ─────────────────────────────────────────── */
.about-hero { background: var(--navy); padding: 140px 0 70px; }
.about-hero h1 { color: var(--white); }
.about-hero h1 span { color: var(--blue); }
.about-hero p { color: rgba(255,255,255,0.7); max-width: 600px; }
.value-card {
  padding: 1.75rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--blue);
}
.value-card.orange { border-left-color: var(--orange); }
.value-card h3 { color: var(--navy); margin-bottom: 0.5rem; }
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--divider); }
.timeline-item { position: relative; padding: 0 0 2rem 1.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.4rem; top: 0.35rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--blue); border: 2px solid var(--white);
  box-shadow: 0 0 0 3px var(--blue);
}
.timeline-item h4 { color: var(--navy); margin-bottom: 0.25rem; }
.timeline-item p  { font-size: 0.9rem; }

/* ── Footer ─────────────────────────────────────────────── */
footer {
  background: #06101E;
  padding: 50px 0 25px;
  border-top: 3px solid var(--orange);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .logo-dim { font-size: 1.4rem; font-weight: 900; color: var(--white); letter-spacing: 2px; }
.footer-brand .logo-svc { font-size: 0.9rem; font-weight: 700; color: var(--blue); letter-spacing: 3px; }
.footer-brand p { color: rgba(255,255,255,0.45); font-size: 0.9rem; margin-top: 0.75rem; max-width: 300px; }
.footer-col h5 { color: var(--white); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 1rem; }
.footer-col a, .footer-col span {
  display: block; color: rgba(255,255,255,0.5); font-size: 0.9rem;
  padding: 0.25rem 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-bottom p { color: rgba(255,255,255,0.3); font-size: 0.8rem; }
.footer-bottom a { color: var(--blue); }

/* ── Page header (inner pages) ──────────────────────────── */
.page-header {
  background: var(--navy);
  padding: 120px 0 50px;
  border-bottom: 4px solid var(--orange);
}
.page-header h1 { color: var(--white); }
.page-header p  { color: rgba(255,255,255,0.65); max-width: 600px; margin-top: 0.5rem; }
.breadcrumb { display: flex; gap: 0.5rem; font-size: 0.85rem; color: rgba(255,255,255,0.4); margin-bottom: 0.75rem; }
.breadcrumb a { color: var(--blue); }
.breadcrumb span { color: rgba(255,255,255,0.3); }

/* ── Utilities ──────────────────────────────────────────── */
.text-center { text-align: center; }
.text-white  { color: var(--white) !important; }
.text-blue   { color: var(--blue); }
.text-orange { color: var(--orange); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.divider { height: 1px; background: var(--divider); margin: 2rem 0; }
