/* ========================================
   PROMISE PROJECT - UNIFIED STYLESHEET
   Main CSS combining all styles and optimized for mobile
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
  --accent: #0a5a3e;
  --muted: #70858f;
  --alt-bg: #f6f8f7;
  --action: #1fb34f;
  --action-green: #33AB6D;
  --card-bg: #ffffff;
  --card-border: rgba(6,48,71,0.04);
  --dot: #cfeee0;
  --max-width: 1200px;
  --primary-text: #0b1220;
  --secondary-text: #10303b;
  --dark-text: #07323a;
  --link-color: #063047;
  --footer-bg: #104d2d;
}

/* ---------- Base & Reset ---------- */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--primary-text);
  background: #fff;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Sticky Navigation ---------- */
header.site-header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 99999;
  background: transparent;
  pointer-events: auto;
}

.nav-shell {
  display: flex;
  justify-content: center;
  padding: 18px 12px;
}

nav.navbar {
  width: 95%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 60px;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.78));
  box-shadow: 0 10px 30px rgba(2,6,23,0.16);
  border: 1px solid rgba(6,48,71,0.06);
  backdrop-filter: blur(8px);
}

/* Logo */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-box {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: none;
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand-text {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Navigation Links */
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
  flex: 1;
}

.nav-links a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.nav-links a:hover {
  background: rgba(6,48,71,0.06);
}

/* Navigation Actions */
.nav-actions {
  display: flex;
  gap: 40px;
  align-items: center;
}

.cta-pill {
  display: inline-block;
}

.btn-cta {
  padding: 10px 20px;
  border-radius: 20px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
  background: #1a7953;
  color: white;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26,121,83,0.3);
}

.btn-search {
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.btn-search:hover {
  background: rgba(6,48,71,0.06);
}

.btn-search img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.05rem;
  padding: 8px;
  cursor: pointer;
}

/* Mobile Panel Overlay */
.mobile-panel-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-panel-overlay.show {
  display: block;
  opacity: 1;
}

/* Mobile Panel - Full screen slide from right */
.mobile-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100vw;
  background: #ffffff;
  z-index: 9999;
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-panel.show {
  transform: translateX(0);
}

/* Mobile Panel Close Button */
.mobile-panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(6, 48, 71, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #063047;
  line-height: 1;
  padding: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.mobile-panel-close:hover {
  background: #f5f5f5;
  transform: scale(1.05);
}

.mobile-panel-close span {
  margin-top: -4px;
}

/* Mobile Panel Logo */
.mobile-panel-logo {
  display: flex;
  justify-content: center;
  padding: 60px 20px 40px;
}

.mobile-panel-logo a {
  display: block;
}

.mobile-panel-logo img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 50%;
}

/* Mobile Panel Navigation */
.mobile-panel-nav {
  display: flex;
  flex-direction: column;
  padding: 0 32px;
  flex: 1;
}

.mobile-panel-nav > a,
.mobile-panel-nav > .mobile-drop {
  display: block;
  padding: 18px 0;
  text-decoration: none;
  color: var(--link-color);
  font-weight: 700;
  font-size: 1.15rem;
  border-bottom: 1px solid rgba(6, 48, 71, 0.08);
  cursor: pointer;
}

.mobile-panel-nav > a:last-child {
  border-bottom: none;
}

/* Mobile Dropdown in panel */
.mobile-panel-nav .mobile-drop::after {
  content: " ▾";
  font-size: 0.9em;
  margin-left: 6px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.mobile-panel-nav .mobile-drop.active::after {
  transform: rotate(180deg);
}

.mobile-panel-nav .mobile-submenu {
  display: none;
  flex-direction: column;
  padding-left: 16px;
  background: rgba(6, 48, 71, 0.02);
  border-radius: 8px;
  margin: 8px 0;
}

.mobile-panel-nav .mobile-submenu a {
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  border-bottom: none;
  color: var(--muted);
}

.mobile-panel-nav .mobile-submenu a:hover {
  color: var(--accent);
}

.mobile-bottom-actions {
  padding: 24px 32px;
  margin-top: auto;
}

/* Desktop Dropdown */
.nav-links .dropdown {
  position: relative;
}

.nav-links .dropdown > a::after {
  content: " ▾";
  font-size: 0.8em;
  margin-left: 4px;
}

.nav-links .dropdown-content {
  list-style: none;
  padding-left: 0;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 160px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  z-index: 2000;
  flex-direction: column;
}

.nav-links .dropdown-content a {
  padding: 8px 16px;
  display: block;
  color: var(--link-color);
  font-weight: 600;
  text-decoration: none;
}

.nav-links .dropdown-content a:hover {
  background: rgba(6,48,71,0.06);
}

.nav-links .dropdown:hover .dropdown-content {
  display: flex;
  flex-direction: column;
}

/* Mobile Dropdown - legacy (keeping for compatibility) */
.mobile-panel .mobile-drop::after {
  content: " ▾";
  font-size: 0.9em;
  margin-left: 6px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.mobile-panel .mobile-submenu {
  display: none;
  flex-direction: column;
  padding-left: 12px;
}

.mobile-panel .mobile-submenu a {
  padding: 6px 0;
}

.mobile-panel .mobile-drop.active::after {
  transform: rotate(180deg);
}

/* ---------- Hero Section ---------- */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background-image: url("Media/Homepage/hero-placeholder.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  margin-top: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6,48,71,0.55), rgba(6,48,71,0.12));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 32px 16px;
  margin-bottom: 8vh;
}

.hero-title {
  font-size: clamp(28px, 6vw, 56px);
  color: #ffffff;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero-slogan {
  color: rgba(255,255,255,0.92);
  margin-top: 12px;
  font-size: 1.5rem;
  font-weight: 600;
  max-width: 80%;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Main Content Layout ---------- */
main {
  padding-top: 120px;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 0;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 24px 24px;
}

/* ---------- Page Headers ---------- */
.page-head {
  text-align: center;
  margin-bottom: 40px;
}

.page-head h1 {
  font-size: clamp(26px, 4vw, 34px);
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 800;
}

.page-head p {
  color: var(--muted);
  max-width: 95%;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 0.98rem;
}

/* ---------- About Section ---------- */
.about-hero {
  text-align: center;
  margin: 24px 0;
}

.about-hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.about-hero p {
  max-width: 68ch;
  margin: 12px auto 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

.about-section {
  text-align: center;
  margin: 40px 0;
}

.about-section h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 12px;
  font-weight: 700;
}

.about-section p,
.about-section li {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.about-section ul {
  display: inline-block;
  margin: 0 auto;
  padding-left: 1.05rem;
  text-align: left;
  list-style-position: outside;
}

/* ---------- At a Glance Section ---------- */
.at-glance {
  padding: 80px 40px;
  background: #ffffff;
}

.at-glance h2 {
  color: #142b2e;
  margin: 40px 0;
  font-size: clamp(22px, 3.6vw, 34px);
  letter-spacing: -0.01em;
}

/* ---------- CTA Buttons ---------- */
.cta-dark {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 28px;
  background: var(--action-green);
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 0;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.cta-dark:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(51,171,109,0.25);
}

.cta-labs {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 28px;
  background: var(--action-green);
  color: white;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 0;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-labs:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(51,171,109,0.25);
}

/* ---------- Living Labs Section ---------- */
.living-labs {
  padding: 80px 20px;
  background: #f4f7f9;
}

.labs-wrapper {
  max-width: 90%;
  margin: 0 auto;
  padding: 6px 0;
}

.labs-grid {
  display: flex;
  gap: 28px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 8px 6px;
}

.labs-card {
  background: transparent;
  box-shadow: none;
  padding: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  width: 200px;
}

.labs-card img {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 4px solid rgba(51,171,109,0.08);
}

.labs-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f3940;
}

.labs-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #29424a;
  opacity: 0.9;
}

/* ---------- Living Lab Detail Sections ---------- */
.lab-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 80px 20px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.lab-section:nth-child(even) {
  background: var(--alt-bg);
  flex-direction: row-reverse;
}

.lab-section:nth-child(odd) {
  background: #fff;
}

.lab-text {
  flex: 1;
  color: var(--muted);
}

.lab-text h2 {
  color: var(--accent);
  font-size: clamp(22px, 3vw, 26px);
  margin-bottom: 12px;
  font-weight: 800;
}

.lab-text p {
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.lab-img {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(2,6,23,0.08);
}

.lab-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- News Section ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.news-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(2,6,23,0.06);
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 320px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(2,6,23,0.08);
}

.news-thumb {
  width: 100%;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  background: #e9f5ef;
  flex-shrink: 0;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-meta {
  display: flex;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  align-items: center;
}

.news-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--dark-text);
  margin-top: 6px;
  line-height: 1.15;
}

.news-desc {
  margin-top: 8px;
  color: var(--secondary-text);
  font-size: 0.95rem;
  line-height: 1.5;
  flex: 1;
}

.news-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.read-more {
  color: var(--action);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.read-more .arrow {
  font-size: 1rem;
}

/* News Slider (Homepage) */
.news-slider-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 44px;
}

.news-slider {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 12px 0 20px;
  scrollbar-width: thin;
}

.news-slider::-webkit-scrollbar {
  height: 6px;
}

.news-slider::-webkit-scrollbar-track {
  background: rgba(6,48,71,0.04);
  border-radius: 10px;
}

.news-slider::-webkit-scrollbar-thumb {
  background: rgba(6,48,71,0.2);
  border-radius: 10px;
}

.news-slider .news-card {
  flex: 0 0 30%;
  max-width: 30%;
  min-width: 260px;
}

.news-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: white;
  box-shadow: 0 4px 12px rgba(2,6,23,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--link-color);
  z-index: 10;
}

.news-left {
  left: 0;
}

.news-right {
  right: 0;
}

.news-arrow:hover {
  background: var(--action-green);
  color: white;
}

.news-cta {
  text-align: center;
  margin-top: 24px;
}

.news-cta a {
  color: var(--action);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Events Section ---------- */
.events-hero {
  text-align: center;
  margin-top: 12px;
  margin-bottom: 18px;
}

.events-hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin: 0;
  color: var(--accent);
  font-weight: 800;
}

.events-hero p {
  max-width: 68ch;
  margin: 12px auto 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.98rem;
}

.events-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 18px 0 28px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid var(--dot);
  background: transparent;
  padding: 10px 14px;
  border-radius: 28px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: var(--dot);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 600;
}

.events-list {
  margin-top: 12px;
  display: block;
}

.year-group {
  margin: 40px 0;
}

.year-group h2 {
  font-size: 1.5rem;
  color: var(--accent);
  margin: 0 0 10px;
}

.year-divider {
  border-bottom: 2px dotted var(--dot);
  margin: 10px 0 20px;
  height: 0;
}

.event-row {
  display: grid;
  grid-template-columns: 160px 160px 1fr 56px;
  gap: 18px;
  align-items: center;
  padding: 16px 8px;
  border-bottom: 1px dotted rgba(0,0,0,0.04);
}

.event-date {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.3;
}

.event-location {
  font-size: 0.95rem;
  color: var(--muted);
}

.event-title {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--dark-text);
}

.event-action {
  justify-self: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--action);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(31,179,79,0.18);
  transition: transform 0.2s ease;
}

.event-action:hover {
  transform: scale(1.1);
}

/* Homepage Events Teaser */
.home-events {
  padding: 48px 20px;
  background: transparent;
}

.home-events-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.home-events-head {
  text-align: center;
  margin-bottom: 22px;
}

.home-events-head h2 {
  color: var(--accent);
  font-size: clamp(22px, 2.8vw, 28px);
  margin-bottom: 8px;
  font-weight: 800;
}

.home-events-intro {
  color: var(--muted);
  max-width: 64ch;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 0.98rem;
}

.home-events-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 18px;
  align-items: start;
}

.home-event {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #fff;
  align-items: flex-start;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-event:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(2,6,23,0.06);
}

.home-event-date {
  min-width: 86px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.3;
}

.home-event-meta {
  flex: 1;
}

.home-event-title {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--dark-text);
  margin-bottom: 6px;
  line-height: 1.15;
}

.home-event-loc {
  color: var(--muted);
  font-size: 0.9rem;
}

.home-events-cta {
  text-align: center;
  margin-top: 20px;
}

.btn-see-all {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 28px;
  background: var(--action-green);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-see-all:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(31,179,79,0.12);
}

/* ---------- Consortium Section ---------- */
.consortium-section {
  padding: 80px 20px;
  background: #f4f7f9;
  text-align: center;
}

.consortium-section h2 {
  font-size: clamp(28px, 5vw, 44px);
  margin-bottom: 16px;
  color: #1f3940;
}

.consortium-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 60px;
  max-width: 80%;
  margin: 0 auto;
  justify-items: center;
}

.consortium-card {
  width: 100%;
  max-width: 500px;
  background: white;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.consortium-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.18);
}

.consortium-card .circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: #d9d9d9;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.consortium-card .circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.consortium-card .name {
  font-weight: 600;
  color: #1f3940;
  font-size: 1rem;
  text-align: center;
}

.consortium-card .country {
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Partner Detail Page ---------- */
.partner-container {
  max-width: 80%;
  margin: 0 auto 120px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.partner-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.partner-logo {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(123,123,123,0.388);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.partner-contact {
  width: 100%;
  text-align: center;
}

.partner-contact h3 {
  margin: 8px 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1f3940;
}

.partner-contact h4 {
  margin: 20px 0 8px;
  font-size: 1rem;
  font-weight: 500;
  color: #1f3940;
}

.partner-contact p {
  margin: 0 0 10px;
  font-style: italic;
  color: var(--link-color);
  font-weight: 600;
}

.partner-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--link-color);
  background: rgba(6,48,71,0.08);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.partner-cta:hover {
  background: rgba(6,48,71,0.16);
  color: #000;
}

.partner-right {
  text-align: left;
}

.partner-right h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.4vw, 36px);
  font-weight: 800;
  color: var(--primary-text);
  line-height: 1.05;
  text-align: left;
}

.partner-right .partner-desc {
  max-width: 70ch;
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--secondary-text);
  text-align: justify;
  margin-bottom: 0;
}

.partner-right h2 {
  font-size: 1.15rem;
  margin: 18px 0 8px;
  color: #1f3940;
  font-weight: 700;
  line-height: 1.2;
}

.partner-section-divider {
  height: 1px;
  width: 100%;
  background: var(--card-border);
  margin: 28px 0 0;
}

/* ---------- Footer ---------- */
footer {
  padding: 36px 0;
  text-align: center;
  color: var(--muted);
}

.promise-footer {
  background-color: var(--footer-bg);
  color: white;
  padding: 48px 20px 24px;
  border-radius: 24px 24px 0 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
}

.promise-footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 24px;
}

.promise-footer-about {
  flex: 1 1 300px;
  min-width: 250px;
}

.promise-footer-logo {
  height: 60px;
  width: auto;
  margin-bottom: 16px;
}

.promise-footer-about p {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 16px;
  max-width: 320px;
}

.promise-footer-eu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promise-footer-eu img {
  height: 60px;
  width: auto;
}

.promise-footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 200px;
}

.promise-footer-links a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
}

.promise-footer-links a:hover {
  text-decoration: underline;
}

.promise-footer-social {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 0 0 150px;
  align-items: flex-start;
}

.promise-footer-social span {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.promise-footer-social a img {
  height: 28px;
  width: 28px;
  margin-right: 8px;
}

.promise-footer-copy {
  text-align: center;
  margin-top: 32px;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ---------- Accessibility ---------- */
a:focus,
button:focus {
  outline: 3px solid rgba(0,119,182,0.18);
  outline-offset: 2px;
}

/* ---------- Go to Top Button ---------- */
.go-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #33AB6D;
  border: none;
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(51,171,109,0.3);
  transition: all 0.3s ease;
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.go-to-top.visible {
  display: flex;
}

.go-to-top:hover {
  background: #2a9159;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(51,171,109,0.4);
}

.go-to-top:active {
  transform: translateY(-1px);
}

/* Arrow icon */
.go-to-top::before {
  content: "↑";
}

/* ========================================
   RESPONSIVE DESIGN
   Mobile-first optimizations
   ======================================== */

/* Tablet - 980px and below */
@media (max-width: 980px) {
  nav.navbar {
    width: 94%;
    margin: 0 auto;
    padding: 10px 10px;
  }
  
  .nav-links {
    display: none;
  }
  
  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }
  
  .nav-actions {
    gap: 20px;
  }
  
  .labs-card {
    width: 45%;
  }
  
  .labs-card img {
    width: 140px;
    height: 140px;
  }
  
  .lab-section {
    flex-direction: column !important;
    text-align: justify;
  }
  
  .lab-img {
    width: 100%;
    max-width: 600px;
  }
  
  .partner-container {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 20px;
  }
  
  .partner-left {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-align: center;
  }
  
  .partner-contact {
    text-align: center;
  }
  
  .consortium-card {
    max-width: 220px;
  }
  
  .news-card {
    flex: 0 0 45%;
    max-width: 45%;
  }
}

/* Medium tablets/large phones - 920px and below */
@media (max-width: 920px) {
  .event-row {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 6px;
  }
  
  .event-action {
    justify-self: flex-end;
  }
}

/* Large phones - 768px and below */
@media (max-width: 768px) {
  .promise-footer-container {
    flex-direction: column;
    gap: 32px;
    align-items: flex-start;
  }
  
  .promise-footer-about p {
    max-width: 100%;
  }
  
  .promise-footer-social {
    flex-direction: row;
    gap: 12px;
  }
  
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile - 640px and below */
@media (max-width: 640px) {
  .hero-title {
    font-size: clamp(20px, 8vw, 34px);
  }
  
  .hero-slogan {
    font-size: 1.1rem;
    padding: 0 10px;
  }
  
  .logo-box {
    width: 36px;
    height: 36px;
  }
  
  .brand-text {
    font-size: 0.9rem;
  }
  
  main {
    padding-top: 110px;
  }
  
  .page {
    padding: 14px;
  }
  
  .labs-card {
    width: 80%;
  }
  
  .labs-card img {
    width: 180px;
    height: 180px;
  }
  
  .consortium-card {
    max-width: 260px;
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
  
  .news-card {
    flex: 0 0 82%;
    max-width: 82%;
  }
  
  .news-arrow {
    display: none;
  }
  
  .home-events {
    padding: 32px 14px;
  }
  
  .home-event {
    padding: 12px;
  }
  
  .home-event-date {
    min-width: 72px;
    font-size: 0.78rem;
  }
  
  .home-events-head h2 {
    font-size: 20px;
  }
  
  .at-glance {
    padding: 60px 20px;
  }
  
  .living-labs {
    padding: 60px 20px;
  }
  
  .go-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 1.3rem;
  }

  /* Mobile: make "Learn More About the Project" button text smaller */
@media (max-width: 640px) {
  .at-glance .cta-dark {
    font-size: 1.05rem; /* adjust as needed to fit in one line */
  }
}
  
  /* Mobile Footer - compact, centered, half screen height */
  .promise-footer {
    padding: 24px 16px 16px;
    max-height: 50vh;
    border-radius: 20px 20px 0 0;
  }
  
  .promise-footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  
  .promise-footer-about {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 16px;
    flex: none;
    min-width: auto;
  }
  
  .promise-footer-logo {
    height: 40px;
    margin-bottom: 0;
  }
  
  .promise-footer-eu {
    gap: 6px;
  }
  
  .promise-footer-eu img {
    height: 40px;
  }
  
  .promise-footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    flex: none;
  }
  
  .promise-footer-links a {
    font-size: 0.8rem;
  }
  
  .promise-footer-social {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex: none;
    gap: 8px;
  }
  
  .promise-footer-social span {
    font-size: 0.8rem;
    margin-bottom: 0;
  }
  
  .promise-footer-social a img {
    height: 22px;
    width: 22px;
    margin-right: 0;
  }
  
  .promise-footer-copy {
    margin-top: 12px;
    font-size: 0.75rem;
  }
}

/* Extra small mobile - 480px and below */
@media (max-width: 480px) {
  .nav-actions {
    gap: 12px;
  }
  
  .btn-cta {
    padding: 8px 16px;
    font-size: 0.85rem;
  }
  
  .hero-content {
    padding: 24px 12px;
  }
  
  .consortium-cards {
    gap: 40px;
  }
  
  .partner-logo {
    width: 160px;
    height: 160px;
  }
}

/* ============================================
   PARTNER PAGES STYLES
   ============================================ */

/* Partner Container - Two Column Layout */
.partner-container {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  justify-content: center;
}

/* Left Column - Logo & Contact */
.partner-left {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 140px;
  align-self: start;
}

/* Partner Logo - Circular */
.partner-logo {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(10, 90, 62, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid rgba(10, 90, 62, 0.1);
}

.partner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Partner Contact Box */
.partner-contact {
  background: rgba(6, 48, 71, 0.03);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid rgba(6, 48, 71, 0.08);
}

.partner-contact h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: #1f3940;
  margin: 0 0 4px 0;
  line-height: 1.4;
}

.partner-contact h4 {
  font-size: 0.8rem;
  font-weight: 500;
  color: #70858f;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.partner-contact p {
  font-size: 0.9rem;
  color: #063047;
  margin: 0 0 16px 0;
  word-break: break-word;
}

/* Visit Website Button */
.partner-cta {
  display: inline-block;
  padding: 10px 20px;
  background: rgba(6, 48, 71, 0.08);
  color: #063047;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  border: 1px solid rgba(6, 48, 71, 0.12);
}

.partner-cta:hover {
  background: rgba(6, 48, 71, 0.16);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 48, 71, 0.15);
}

/* Right Column - Main Content */
.partner-right {
  padding: 12px 0;
}

.partner-right h1 {
  font-size: clamp(34px, 4.4vw, 36px);
  font-weight: 800;
  color: #0b1220;
  margin: 0 0 24px 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.partner-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #10303b;
  margin: 0 0 32px 0;
}

/* Section Divider */
.partner-section-divider {
  height: 1px;
  background: linear-gradient(to right, rgba(10, 90, 62, 0.3), rgba(10, 90, 62, 0.05));
  margin: 32px 0;
}

/* Content Sections */
.partner-right h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f3940;
  margin: 24px 0 12px 0;
  letter-spacing: -0.01em;
}

.partner-right section {
  margin-bottom: 24px;
}

.partner-right section p {
  font-size: 1.03rem;
  line-height: 1.7;
  color: #10303b;
  margin: 0;
}

/* Responsive - Tablet */
@media (max-width: 980px) {
  .partner-container {
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 900px;
    padding: 20px;
    margin: 0 auto;
  }
  
  .partner-left {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    position: static;
    top: auto;
  }
  
  .partner-logo {
    width: 180px;
    height: 180px;
    padding: 16px;
  }
  
  .partner-contact {
    align-self: start;
  }
  
  .partner-right h1 {
    font-size: clamp(28px, 5vw, 32px);
  }
}

/* Responsive - Mobile */
@media (max-width: 640px) {
  .partner-container {
    max-width: 100%;
    padding: 16px 20px;
    gap: 24px;
    margin: 0 auto;
  }
  
  .partner-left {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .partner-logo {
    width: 140px;
    height: 140px;
    margin: 0 auto;
    padding: 12px;
  }
  
  .partner-contact {
    text-align: center;
  }
  
  .partner-cta {
    display: block;
    width: 100%;
  }
  
  .partner-right {
    padding: 0;
  }
  
  .partner-right h1 {
    font-size: clamp(24px, 6vw, 28px);
    margin-bottom: 18px;
  }
  
  .partner-desc {
    font-size: 0.98rem;
    margin-bottom: 24px;
  }
  
  .partner-section-divider {
    margin: 24px 0;
  }
  
  .partner-right h2 {
    font-size: 1.08rem;
    margin: 20px 0 10px 0;
  }
  
  .partner-right section p {
    font-size: 0.95rem;
  }
}

/* Print styles */
@media print {
  header.site-header {
    position: relative;
    top: 0;
  }
  
  .nav-actions,
  .mobile-panel,
  .menu-toggle {
    display: none;
  }
  
  main {
    padding-top: 0;
  }
  
  .partner-left {
    position: static;
  }
  
  .partner-cta {
    display: none;
  }
}
