/* Pierre Robin România — shared styles */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3f0e8;
  --primary: #3f7566;
  --primary-dark: #2c5449;
  --primary-light: #e8f2ee;
  --accent: #d98a5f;
  --accent-light: #fbeee3;
  --text: #2b2b28;
  --text-muted: #66655d;
  --border: #e4ded3;
  --shadow: 0 2px 10px rgba(43, 43, 40, 0.06);
  --radius: 14px;
  --max-width: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 18px;
}

img { max-width: 100%; }

a { color: var(--primary-dark); text-decoration: underline; text-decoration-color: var(--border); }
a:hover { text-decoration-color: currentColor; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0.6em 1em;
  z-index: 100;
}
.skip-link:focus { left: 0.5em; top: 0.5em; }

/* Header / Nav */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.7em 1.2em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--primary-dark);
}
.brand-icon { font-size: 1.4rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--primary-dark);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2em;
}

.site-nav a {
  display: inline-block;
  padding: 0.5em 0.7em;
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--primary-light); }
.site-nav a.active {
  background: var(--primary);
  color: #fff;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 3;
    padding-top: 0.4em;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.75em 0.6em; }
}

/* Layout */
main { display: block; }

.page-header {
  background: linear-gradient(180deg, var(--primary-light), var(--bg));
  padding: 2.4em 1.2em 1.6em;
  text-align: center;
}
.page-header h1 {
  margin: 0 0 0.3em;
  color: var(--primary-dark);
  font-size: 2rem;
}
.page-header .lede {
  max-width: var(--max-width);
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1em 1.2em 0;
  font-size: 0.9rem;
}
.breadcrumb a { color: var(--text-muted); }

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.4em 1.2em 3em;
}

.content h2 {
  color: var(--primary-dark);
  margin-top: 2em;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 0.3em;
}
.content h3 {
  color: var(--primary-dark);
  margin-top: 1.6em;
  font-size: 1.15rem;
}
.content p { margin: 0.9em 0; }
.content ul, .content ol { padding-left: 1.4em; }
.content li { margin: 0.4em 0; }

/* Cards / grid on homepage */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1em;
  margin: 1.6em 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2em;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(43,43,40,0.1); }
.card .card-icon { font-size: 1.6rem; }
.card h3 { margin: 0; color: var(--primary-dark); font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* Callout boxes */
.note {
  background: var(--surface-2);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 1em 1.2em;
  margin: 1.4em 0;
}
.note.warning {
  background: var(--accent-light);
  border-left-color: var(--accent);
}
.note p:first-child { margin-top: 0; }
.note p:last-child { margin-bottom: 0; }

blockquote.book-quote {
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  margin: 1.4em 0;
  padding: 1em 1.3em;
  border-radius: 10px;
  font-style: italic;
}
blockquote.book-quote cite {
  display: block;
  margin-top: 0.6em;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Tables (Medici page) */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0 2em;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
table caption {
  text-align: left;
  font-weight: 600;
  color: var(--primary-dark);
  padding-bottom: 0.4em;
}
th, td {
  text-align: left;
  padding: 0.7em 0.9em;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--primary-light);
  color: var(--primary-dark);
}
tr:last-child td { border-bottom: none; }

/* Story cards */
.story {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4em 1.6em;
  margin: 1.4em 0;
  box-shadow: var(--shadow);
}
.story h3 { margin-top: 0; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 0.7em 1.3em;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary {
  background: transparent;
  color: var(--primary-dark) !important;
  border: 1px solid var(--primary);
}

.contact-list { list-style: none; padding: 0; }
.contact-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1em 1.3em;
  margin-bottom: 0.8em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 2em 1.2em;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--primary-dark); }
.site-footer p { margin: 0.3em 0; max-width: var(--max-width); margin-inline: auto; }
