/* ============================================
   THE PORTAVOZ PROJECT — SHARED STYLES
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --navy: #08345b;
  --navy-light: #0a4070;
  --green: #4ba24c;
  --green-hover: #3a8a3b;
  --blue: #2da5e3;
  --blue-hover: #1d8fc9;
  --cream: #f6f5e3;
  --cream-dark: #ecebd0;
  --text-dark: #08345b;
  --text-mid: #3a5068;
  --text-light: #7a95b0;
  --white: #ffffff;
  --border: #dddcbe;
  --card-shadow: 0 2px 16px rgba(8,52,91,0.08);
  --card-shadow-hover: 0 8px 40px rgba(8,52,91,0.16);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Libre Baskerville', Georgia, serif;
  color: var(--text-dark);
  background: var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 48px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}

.nav.transparent {
  background: transparent;
}

.nav.navy {
  background: var(--navy);
  box-shadow: 0 1px 24px rgba(8,52,91,0.25);
}

.nav.scrolled {
  background: var(--navy);
  box-shadow: 0 1px 24px rgba(8,52,91,0.25);
}

.nav.cream {
  background: var(--navy);
  box-shadow: 0 1px 24px rgba(8,52,91,0.25);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-logo {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter 0.2s ease;
}

/* all nav states use navy background — always white icon */
.nav-logo img {
  filter: brightness(0) invert(1);
}

/* hover brand: icon turns green */
.nav-brand:hover .nav-logo img {
  filter: brightness(0) saturate(100%) invert(58%) sepia(50%) saturate(500%) hue-rotate(85deg) brightness(95%) contrast(95%) !important;
}

.nav-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  font-size: 19px;
  transition: color 0.2s ease;
}

.nav-name { color: var(--white); }
.nav-brand:hover .nav-name { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a { color: rgba(255,255,255,0.82); }
.nav-links a:hover { color: var(--green); }

.nav-links a.active {
  color: var(--green) !important;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(75,162,76,0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.5);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
}

.btn-navy:hover {
  background: var(--navy-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(8,52,91,0.25);
}

/* ============================================
   TRANSLATION CARDS
   ============================================ */

.card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
}

.card-featured-banner {
  background: var(--green);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-body {
  padding: 24px 24px 16px;
  flex: 1;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 8px;
}

.card-original {
  font-family: 'Libre Baskerville', serif;
  font-style: italic;
  font-size: 13.5px;
  color: var(--text-mid);
  margin-bottom: 16px;
}

.card-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 16px;
}

.card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.card-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-meta-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-meta-value {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  color: var(--text-dark);
  font-weight: 500;
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  transition: background 0.2s, color 0.2s;
}

.card:hover .card-footer {
  background: var(--navy);
  color: var(--white);
}

.card-footer-arrow {
  transition: transform 0.2s;
}

.card:hover .card-footer-arrow {
  transform: translateX(4px);
}

/* ── NAV SEPARATOR LINE ── */
.nav-separator {
  position: fixed;
  top: 68px;
  left: 48px;
  right: 48px;
  height: 1px;
  background: rgba(255,255,255,0.15);
  z-index: 999;
  transition: opacity 0.35s ease, background 0.35s ease;
}

.nav-separator.hidden {
  opacity: 0;
}

.nav-separator.navy {
  background: rgba(255,255,255,0.15);
}

/* ============================================
   SEARCH BAR
   ============================================ */

.search-wrap {
  position: relative;
  max-width: 480px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text-dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder { color: var(--text-light); }

.search-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(8,52,91,0.08);
}

/* ============================================
   PAGE HEADERS (non-hero pages)
   ============================================ */

.page-header {
  padding: 120px 0 48px;
  background: var(--cream);
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  text-align: center;
  padding: 32px 48px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  margin-top: auto;
}

footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

footer a:hover { color: var(--white); }


/* ============================================
   HAMBURGER / MOBILE NAV
   ============================================ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.2s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-dropdown {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(8,52,91,0.3);
  z-index: 1001;
  flex-direction: column;
}

.nav-dropdown.open {
  display: flex;
}

.nav-dropdown a {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
  background: rgba(255,255,255,0.07);
  color: var(--green);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .container { padding: 0 20px; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
}

/* When links would overflow: hide them and show hamburger */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}
