﻿@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;0,900;1,400&display=swap');

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
  --blue:        #2A5C9A;
  --blue-dark:   #1E4373;
  --yellow:      #FFCC00;
  --text:        #333333;
  --text-sec:    #666666;
  --bg:          #FFFFFF;
  --bg-alt:      #F4F4F4;
  --bg-stone:    #F8F8F8;
  --border:      #DDDDDD;
  --sidebar-w:   288px;
  --content-max: 896px;
  --radius:      12px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', Arial, sans-serif;
  color: var(--text);
  background: var(--bg-alt);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
h1,h2,h3,h4,h5,h6 { color: var(--blue); font-weight: 700; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin-bottom: .9rem; }
p:last-child { margin-bottom: 0; }
ul, ol { padding-left: 1.6rem; margin-bottom: 1rem; }
li { margin-bottom: .3rem; line-height: 1.65; }
strong { font-weight: 700; }
em { font-style: italic; }
sup { font-size: .65em; vertical-align: super; }
blockquote {
  border-left: 4px solid var(--yellow);
  padding-left: 1rem;
  font-style: italic;
  color: var(--text-sec);
  margin: 1rem 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--blue);
  border-right: 1px solid var(--blue-dark);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 40;
}

.sidebar-brand {
  padding: 2rem;
  border-bottom: 1px solid var(--blue-dark);
  flex-shrink: 0;
}
.sidebar-brand .brand-label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--yellow);
  margin-bottom: .5rem;
}
.sidebar-brand .brand-label svg { opacity: .8; }
.sidebar-brand .brand-name {
  font-size: 2rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -.02em;
}
.sidebar-brand .brand-year {
  font-size: 1.25rem;
  font-weight: 300;
  opacity: .9;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.nav-index-label {
  font-size: .625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(255,255,255,.4);
  padding: 0 1rem;
  margin-bottom: 1rem;
  display: block;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  text-align: left;
  transition: background .15s, color .15s;
  margin-bottom: .15rem;
  font-family: inherit;
}
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.nav-btn.active { background: var(--yellow); color: var(--blue); font-weight: 700; }
.nav-btn .num { font-size: .7rem; color: rgba(255,255,255,.3); flex-shrink: 0; }
.nav-btn.active .num { color: rgba(42,92,154,.6); }
.nav-btn:hover:not(.active) .num { color: rgba(255,255,255,.5); }

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--blue-dark);
  flex-shrink: 0;
}
.sidebar-footer p {
  font-size: .625rem;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .1em;
  text-align: center;
  margin: 0;
}

/* ============================================================
   MOBILE HEADER
   ============================================================ */
.mobile-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.mobile-brand .brand-sub {
  display: block;
  font-size: .625rem;
  text-transform: uppercase;
  font-weight: 700;
  opacity: .6;
  color: var(--text-sec);
}
.mobile-brand .brand-name-m {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
}
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 30;
  backdrop-filter: blur(4px);
}
.mobile-overlay.active { display: block; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  background: var(--bg);
  border-left: 1px solid var(--border);
  overflow: hidden;
  position: relative;
  min-width: 0;
}
.main-content::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(42,92,154,.08) 0%, transparent 70%);
  pointer-events: none;
  transform: rotate(-45deg) translate(30%, -30%);
}

.chapter-wrapper {
  padding: 4rem 1.5rem 5rem;
  max-width: var(--content-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ============================================================
   CHAPTERS (show/hide)
   ============================================================ */
.chapter { display: none; }
.chapter.active {
  display: block;
  animation: fadeUp .4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION COVER
   ============================================================ */
.section-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 80vh;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0,0,0,.12);
  margin-bottom: 4rem;
  background: #fff;
  color: var(--blue);
}
.cover-svg-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .4;
}
.cover-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}
.cover-subtitle {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.cover-subtitle::before,
.cover-subtitle::after {
  content: '';
  height: 1px;
  width: 3rem;
  background: currentColor;
  opacity: .4;
}
.cover-subtitle span {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 500;
  opacity: .8;
}
.cover-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  opacity: .9;
  margin-bottom: .25rem;
  color: inherit;
}
.cover-main {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: 1;
  color: inherit;
}
.cover-main .muted { opacity: .5; }

/* ============================================================
   IMAGE BLOCK (placeholder)
   ============================================================ */
.image-block {
  width: 100%;
  min-height: 220px;
  background: var(--bg-alt);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}
.image-block-inner {
  text-align: center;
  color: var(--text-sec);
  padding: 2rem;
}
.image-block-inner .img-ico {
  display: block;
  margin: 0 auto .75rem;
  opacity: .25;
}
.image-block-inner p { font-size: .8rem; opacity: .6; margin: 0; }

/* ============================================================
   SECTION SPACING
   ============================================================ */
.chapter-section { margin-top: 4rem; }
.chapter-section:first-child { margin-top: 0; }
.chapter-section + .chapter-section { padding-top: 1rem; }

/* ============================================================
   HEADINGS
   ============================================================ */
.h2-line {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
  border-left: 3px solid var(--blue);
  padding-left: 1rem;
  padding-top: .2rem;
  padding-bottom: .2rem;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}
.h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

/* ============================================================
   QUOTE BLOCK
   ============================================================ */
.quote-block {
  font-size: 1.2rem;
  font-weight: 300;
  font-style: italic;
  border-left: 3px solid var(--blue);
  padding-left: 1.5rem;
  color: var(--blue-dark);
  margin: 2rem 0;
  line-height: 1.65;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-alt);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid rgba(42,92,154,.1);
  transition: border-color .2s;
}
.card:hover { border-color: rgba(42,92,154,.3); }
.card-label {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--yellow);
  margin-bottom: 1rem;
  display: block;
  filter: saturate(1.5) brightness(.85); /* legible en fondo claro */
}
.card-quote {
  font-weight: 700;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.45;
  color: var(--text);
}

/* ============================================================
   GRIDS
   ============================================================ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }
.col-span-2 { grid-column: span 2; }

/* ============================================================
   STAT BOXES
   ============================================================ */
.stat-primary {
  background: var(--blue);
  color: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.stat-primary .stat-num {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: .5rem;
}
.stat-primary .stat-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: rgba(255,255,255,.6);
}
.stat-box {
  background: var(--bg-stone);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.stat-box .stat-val {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
  margin-bottom: .4rem;
}
.stat-box .stat-lbl {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-sec);
}

/* ============================================================
   STAT ROW (metrics)
   ============================================================ */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
}
.stat-row-item .val {
  font-size: 2rem;
  font-weight: 700;
  color: var(--blue);
}
.stat-row-item .lbl {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-sec);
  margin-top: .25rem;
}

/* ============================================================
   VALORES LIST
   ============================================================ */
.valores-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.valor-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .75rem 1rem;
  text-align: left;
  font-size: .7rem;
}
tbody td { padding: .75rem 1rem; color: var(--text); vertical-align: top; }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }

.table-group-header td {
  background: rgba(42,92,154,.08);
  font-weight: 700;
  color: var(--blue);
  border-bottom: none;
}
.table-highlight {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}
.table-highlight td { color: #fff; }

/* Stakeholders table */
.table-stakeholders thead th { font-size: .7rem; }

/* Small table (materiality) */
.table-sm td { font-size: .82rem; padding: .65rem .85rem; }

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
}
.info-box-title {
  font-size: .875rem;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
  margin-bottom: 1rem;
}

/* ============================================================
   HIGHLIGHT BOX
   ============================================================ */
.highlight-box {
  background: var(--bg-stone);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
}

/* ============================================================
   SECTION BOX (like the Zarcam en Números)
   ============================================================ */
.section-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  margin-top: 4rem;
}
.section-box-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}
.section-box-header h2 {
  font-size: 1.5rem;
  text-transform: uppercase;
  margin: 0;
}

/* ============================================================
   GRID TAGS (proveedores)
   ============================================================ */
.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
  margin: 1.5rem 0;
}
.tag-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .75rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

/* ============================================================
   ALLIANCE LIST
   ============================================================ */
.alliance-list { list-style: none; padding: 0; }
.alliance-item {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.alliance-item:last-child { border-bottom: none; }
.alliance-icon { color: var(--yellow); flex-shrink: 0; margin-top: .2rem; }
.alliance-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .4rem;
}
.alliance-item p { font-size: .875rem; color: var(--text-sec); margin: 0; }

/* ============================================================
   BENEFITS GRID
   ============================================================ */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
}
.benefit-item {
  font-size: .875rem;
  font-weight: 500;
  color: var(--blue);
  background: var(--bg);
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  text-align: center;
}

/* ============================================================
   FOOTNOTES
   ============================================================ */
.footnote {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 2rem;
  font-size: .75rem;
  color: var(--text-sec);
}

/* ============================================================
   SIGNATURE BLOCK
   ============================================================ */
.signature-block {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.signature-block .from {
  font-style: italic;
  color: var(--text-sec);
  margin-bottom: .5rem;
}
.signature-block .sig-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue);
  margin: .5rem 0 0;
}
.signature-block .sig-title {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: .25rem;
}
.signature-block .sig-role {
  font-size: .75rem;
  color: var(--text-sec);
}

/* ============================================================
   COLUMNS (two col text)
   ============================================================ */
.cols-2-text {
  columns: 2;
  column-gap: 2rem;
}

/* ============================================================
   ONG / COMMUNITY SECTION
   ============================================================ */
.community-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
}

/* ============================================================
   ETHICS BOX (2 col)
   ============================================================ */
.ethics-box {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}
.ethics-col { display: flex; flex-direction: column; gap: 1.5rem; }
.ethics-group h4 {
  font-size: .875rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .5rem;
}
.ethics-group ul { margin-bottom: 0; font-size: .875rem; }

/* ============================================================
   MATERIALITY STEPS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.step-card {
  background: var(--bg-alt);
  border: 1px solid rgba(42,92,154,.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step-card h4 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .75rem;
}
.step-card p { font-size: .72rem; color: var(--text-sec); margin: 0; }

/* ============================================================
   PORTADA SPECIAL
   ============================================================ */
.portada-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 4rem;
  padding-bottom: 3rem;
}


/* ============================================================
   IMÁGENES INSERTADAS (editor y exportado)
   ============================================================ */
img.report-img {
  max-width: 100%; height: auto;
  border-radius: 8px;
  display: block;
  cursor: default;
}
img.report-img.fl-left   { float: left;  margin: .25rem 1.5rem 1rem 0; display: inline; }
img.report-img.fl-right  { float: right; margin: .25rem 0 1rem 1.5rem; display: inline; }
img.report-img.fl-center { display: block; margin: 1rem auto; float: none; }
img.report-img.al-left   { display: block; float: none; margin: 1rem auto 1rem 0; }
img.report-img.al-right  { display: block; float: none; margin: 1rem 0 1rem auto; }
.prose::after, .chapter-wrapper::after { content: ''; display: table; clear: both; }
/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .mobile-header { display: flex; }

  .sidebar {
    position: fixed;
    left: 0; top: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform .3s ease;
    z-index: 40;
  }
  .sidebar.open { transform: translateX(0); }

  .app { flex-direction: column; }
  .main-content { border-left: none; }

  .chapter-wrapper { padding: 2rem 1.25rem 4rem; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cols-2-text { columns: 1; }
  .col-span-2 { grid-column: span 1; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .ethics-box { grid-template-columns: 1fr; }
  .valores-grid { grid-template-columns: 1fr 1fr; }
  .benefits-grid { grid-template-columns: 1fr 1fr; }
  .tags-grid { grid-template-columns: repeat(2, 1fr); }

  .section-cover { min-height: 380px; }
  .cover-main { font-size: clamp(2.5rem, 12vw, 4rem); }
  .cover-title { font-size: clamp(1.5rem, 6vw, 2.5rem); }
}

@media (max-width: 480px) {
  .steps-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
  .stat-row { flex-direction: column; gap: 1.5rem; }
}
