/*
Theme Name: SPACE
Text Domain: space
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.0
Description: SPACE Basel – custom theme skeleton
Author: You
License: GPL-2.0-or-later
*/

:root {
  /* --- Text Colors --- */
  --text-primary: #000000;      /* main text */
  --text-secondary: #9d9ea0;    /* accent / secondary text */
  --text-hover: #9d9ea0;        /* hover color (same as secondary) */
  --text-secondary-hover: #596259; /* darker secondary hover tone */
  --background-primary: #fafafa;	/*vary light etc */
  --background-secondary: #cbcbcb;	/*darker etc */
	  
}

/* HEADER LAYOUT – SPACE */

body{
	display: block;
	margin:8px;
	font-family: 'Neue Haas Grotesk Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--text-primary);
	font-weight: 100;
}

h1, h2, h3 {
  font-family: 'Neue Haas Grotesk Display', sans-serif;
  font-weight: 500;
}

h4, h5, h6 {
  font-weight: 400;
}

p, li, a, span {
  font-weight: 100;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  color: var(--text-hover);
}

section {
	margin-bottom: 50px;
}
.site-header,
.site-main,
.site-footer {
  width: 100%;
  padding: 24px 0px;
  box-sizing: border-box;
}

.site-header-inner {

  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

/* Logo top-left */
.site-logo img {
  display: block;
  height: 60px;      /* tweak as needed */
  width: auto;
}
.site-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.site-nav > a {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.site-nav > a:hover {
  color: var(--text-hover);
}
.site-nav > a.lang-switch {
  opacity: 0.75;
  font-weight: 500;
}
.site-nav > a.lang-switch:hover { opacity: 1; }

.header-toggle, .mobile-overlay {
  display: none;
}

/* Mobile – stack logo & nav */
@media (max-width: 640px) {
  .site-header,
  .site-main,
  .site-footer {
    padding: 16px 0px;
  }

  .site-header-inner {
    flex-direction: row;
    align-items: flex-end;
  }

	
	.header-toggle {
	  display: inline-flex;
	  flex-direction: column;
	  justify-content: flex-end;
	  gap: 6px;
	  width: 40px;
	  height: 40px;
	  background: none;
	  border: 0;
	  cursor: pointer;
	  position: relative;   /* needed for X animation */
	  z-index: 99999;       /* above overlay */
	}

	.header-toggle span {
	  display: block;
	  height: 2px;
	  width: 100%;
	  background: #000;
	  transition: transform 0.3s ease, opacity 0.3s ease;
	}

	.site-nav {
		display:none;
	}
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(4px);
    display: none;              /* hidden by default */
    z-index: 9999;
  }

  .mobile-menu {
    max-width: 90%;
    padding-top:160px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 1.5rem;
    text-align: right;
  }

  .mobile-link {
    font-size: 1.5rem;
	font-weight: 300;
    text-decoration: none;
    color: var(--text-primary);
  }

  .mobile-link:hover {
    color: var(--text-hover);
  }

  /* When header has .is-open (JS toggles this) */
  .site-header.is-open .mobile-overlay {
    display: block;
  }

  /* X state – animate burger into a cross (optional but nice) */
  .site-header.is-open .header-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .site-header.is-open .header-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.is-open .header-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
	
  /* If later you want a burger, we can swap this out.
     For now: just tighten spacing. */
  .primary-nav {
    gap: 8px;
    font-size: 12px;
  }
  .primary-nav a {
  	font-size: 12px;
  }
}

/* ======================
   HOME PAGE LAYOUT
   ====================== */

.home-hero {

  margin: 0;
  padding: 0;
}

.home-headline {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.home-intro {
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.home-events {
  margin-top: 60px;
  padding: 0;
}

.home-events-title {
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.home-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.home-event-card {
  background: var(--background-secondary);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.home-event-image img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 12px;
}

.home-event-title {
  font-size: 1.25rem;
  margin: 0 0 6px;
}

.home-event-sub {
  font-size: 0.95rem;
  margin: 0 0 6px;
  color: var(--text-secondary);
}

.home-event-meta {
  font-size: 0.9rem;
  color: var(--text-primary);
}


/* === About: People section === */

.about-people {
  width: 100%;
  box-sizing: border-box;
}

.about-people-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row */
  gap: 32px;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

.person-card {
  background: var(--background-primary);
  padding: 20px 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.person-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.person-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.person-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
}

.person-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
}

.person-description {
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.person-description p {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  line-height: 1.35;
}

.person-description br {
  line-height: 1.2;
}

.person-link-wrap {
  margin: 6px 0 0;
}

.person-link {
  font-size: 0.9rem;
  text-decoration: underline;
  color: var(--text-primary);
}

.person-link:hover {
  color: var(--text-hover);
}

/* === About: Sponsors === */

.about-sponsors {
  width: 100%;
  padding: 40px 24px 60px;
  box-sizing: border-box;
  max-width: 1200px;
  margin: 0 auto;
}

.about-sponsors-heading {
  margin: 0 0 16px;
  color: var(--text-primary);
}

.about-sponsors-text {
  margin: 0 0 24px;
  font-size: 0.98rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.sponsor-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px 24px;
}

.sponsor-card {
  background: var(--background-primary);
  display: flex;
  padding: 16px 18px;
  box-sizing: border-box;
  text-align: center;
}

.sponsor-logo img {
  max-width: 140px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
}

.sponsor-name {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.sponsor-name a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.sponsor-name a:hover {
  color: var(--text-hover);
  border-color: currentColor;
}


/* Mobile: stack image above text */
@media (max-width: 1400px) {
   .about-people-list {
    grid-template-columns: 1fr; /* one per row */
  }

  .person-card {
    grid-template-columns: 1fr;  /* image above */
	align-items: center;
    text-align: left;
  }

  .person-avatar {
    margin-bottom: 12px;
  }
}

@media (max-width: 640px) {
  .about-sponsors {
    padding: 32px 16px 48px;
  }

  .sponsor-card {
    text-align: left;
  }

  .sponsor-logo img {
    margin-left: 0;
  }
}

/* main layout: image left, text right */
.event-main {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* constrain main image */
.event-image img {
  max-height: 140px;
  width: auto;
  display: block;
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr;   /* <-- ALWAYS one item per row */
  gap: 30px;
  margin: 0 auto;
  box-sizing: border-box;
}

.event-card {
  display: flex;
  flex-direction: column;
  padding: 24px 28px;
  background: var(--background-secondary);
  border: 0;
  overflow: hidden;
  transition: box-shadow .2s ease;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.event-title {
  font-size: 1.5rem;
  margin: 0 0 .35rem;
  font-weight: 500;
}

.event-subtitle {
  margin: 0 0 .5rem;
  font-style: italic;
  color: #666;
}

.event-meta {
  margin: 0 0 .75rem;
  font-size: 0.95rem;
  color: #555;
}

.event-main-image img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 .75rem;
}

/* Masonry-style gallery inside event-extra */
.event-gallery {
  column-count: 3;          /* desktop: 3 columns */
  column-gap: 16px;
  margin-top: 16px;
}

.event-gallery-item {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 16px;
}

.event-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
}


.event-description {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.event-description p {
  margin: 0 0 12px;
  line-height: 1.4;
}
.event-link-wrap {
  margin-top: .75rem;
}

.event-link {
  text-decoration: none;
  color: var(--text-primary);
  border-bottom: 1px solid currentColor;
}

.event-link:hover {
  color: var(--text-hover);
}


/* collapsed state by default */
.event-extra {

  height:0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition:
	height 0.9s ease,
    opacity 0.9s ease,
    transform 0.9s ease;
}

/* when the card is "open" */
.event-card.is-open .event-extra {
  
  opacity: 1;
  transform: translateY(0);
}
.event-toggle {
  margin: 12px 0;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-primary);
  text-decoration: underline;
}
/* tablet-ish: 2 columns */
@media (max-width: 900px) {
  .event-gallery {
    column-count: 2;
  }
}

/* on mobile: stack vertically */
@media (max-width: 640px) {
  .event-main {
    flex-direction: column;
  }
   .event-gallery {
    column-count: 1;
  }
}