/*
  Global styles for the Philosophy Club St. Gallen website.
  This stylesheet defines a clean, modern look with a muted colour palette
  that takes inspiration from the original WordPress site but keeps the
  markup lightweight and easy to maintain. You can edit any colours or
  spacing values here to completely change the look and feel of the site.
*/

:root {
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --accent: #0b2f5e; /* deep navy */
  --accent-soft: #f3f4f6;
  --accent-strong: #0b2f5e;
  --text-main: #12284a;
  --text-muted: #3a4a5f;
  --border-subtle: #d6dbe4;
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.08);
  --radius-large: 1.5rem;
  --radius-med: 1rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: var(--text-main);
  line-height: 1.6;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.01em;
}

/* Utility containers */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Accessibility skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.75rem;
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
}

.logo-img {
  max-height: 50px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: #0b2f5e;
}

.nav-links a {
  position: relative;
  font-weight: 500;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease-out;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  padding: 0;
  min-height: 80vh;
  background: url("../images/banner-greeks.jpg") center center / cover no-repeat fixed;
}

.hero-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80vh;
  background: rgba(255, 255, 255, 0.14);
}

.hero h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.8rem, 5vw, 3.8rem);
  line-height: 1.1;
  margin: 0;
  color: #0b2f5e;
  letter-spacing: 0.01em;
}

.hero-subtitle {
  display: none;
}

.hero-actions {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #000;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, background 0.12s ease-out, color 0.12s ease-out;
}

.btn.primary {
  background: #000;
  color: #fff;
  border-color: #000;
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.btn.secondary {
  background: transparent;
  border-color: #000;
  color: #000;
}

.btn.secondary:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.btn.ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: #000;
}

.btn.ghost:hover {
  background: #fff;
}

/* Section spacing */
.section {
  padding: 3.5rem 0;
}

.section-heading h2 {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  margin-bottom: 0.4rem;
  color: #000;
}

.section-heading p {
  color: var(--text-muted);
  margin: 0;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.7rem;
}

.feature-card {
  background: var(--bg-alt);
  border-radius: var(--radius-med);
  padding: 1.4rem 1.4rem 1.3rem;
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.feature-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
  color: #000;
  font-family: "Cormorant Garamond", serif;
}

.feature-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Membership accent section */
.section-accent {
  background: #fff;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.membership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  align-items: center;
}

.membership-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: #032245;
  color: #e5e7eb;
  padding: 3rem 0 2.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: center;
  font-size: 1rem;
}

.footer-title {
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.footer-text {
  margin: 0 0 0.3rem;
  color: #cbd5f5;
}

.footer-text a {
  color: #e5e7eb;
  text-decoration: none;
}

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

.footer-links a {
  color: #cbd5f5;
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

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

.footer-icons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.footer-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: transparent;
  border: none;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
  color: #e5e7eb;
}

.footer-icon:hover {
  transform: translateY(-1px);
  color: #ffffff;
}

.footer-smallprint {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Board grid styles for the “About Us” and former board pages */
.board-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.2rem;
  justify-content: center;
}

.board-card {
  padding: 0;
  border: none;
  background: transparent;
  flex: 0 1 230px;
  max-width: 240px;
}

.board-card h3 {
  margin: 0;
  font-size: 1.35rem;
  color: #fff;
  font-family: "Cormorant Garamond", serif;
}

.board-card p {
  margin: 0;
  color: #e8ecf5;
}

.board-card a {
  color: var(--accent);
  font-size: 0.9rem;
}

.board-photo {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.board-photo .board-initials {
  font-size: 1.4rem;
  text-transform: uppercase;
  opacity: 0.65;
  transition: opacity 0.2s ease;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.board-photo.has-photo .board-initials {
  display: none;
}

.board-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 34, 69, 0) 40%, rgba(3, 34, 69, 0.85) 100%);
  display: flex;
  align-items: flex-end;
  padding: 1.1rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.board-photo:hover .board-overlay,
.board-photo:focus-within .board-overlay {
  transform: translateY(0);
}

/* Facts list */
.facts-list ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 1rem;
  color: var(--text-muted);
}

.facts-list li {
  margin-bottom: 0.5rem;
}

.board-accordion {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.board-accordion details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-med);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.board-accordion summary {
  cursor: pointer;
  padding: 0.9rem 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--accent-strong);
  list-style: none;
}

.board-accordion summary::-webkit-details-marker {
  display: none;
}

.board-accordion .chevron {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.board-accordion details[open] .chevron {
  transform: rotate(90deg);
}

.board-panel {
  padding: 0 1rem 1rem;
}

.board-panel__loading,
.board-panel__error {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Instagram embed */
.ig-section {
  padding: 3rem 0;
}

.ig-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-med);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.ig-card__header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.ig-card__title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--accent-strong);
}

.ig-card__link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.ig-card__body {
  position: relative;
  padding-bottom: 120%;
  background: #f8fafc;
}

.ig-embed-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

.ig-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  gap: 0.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.96));
}

.ig-fallback a {
  color: var(--accent);
  font-weight: 600;
}

/* Events */
.events-section {
  padding: 3rem 0;
}

.events-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.events-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.event-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-med);
  padding: 1rem;
  box-shadow: none;
  display: grid;
  gap: 0.4rem;
  overflow: hidden;
}

.event-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--accent-strong);
  word-break: break-word;
}

.event-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-med);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.event-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  word-break: break-word;
}

.event-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0.4rem;
  word-break: break-word;
}

.event-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.admin-only {
  display: none;
}

.admin-only.is-visible {
  display: inline-flex;
}

/* Posts */
.posts-section {
  background: #f7f9fc;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.posts-subtitle {
  margin: 0;
  color: var(--text-muted);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.post-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-med);
  padding: 1rem;
  display: grid;
  gap: 0.4rem;
}

.post-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--accent-strong);
}

.post-meta {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.post-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.post-link {
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.event-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.form-field {
  display: grid;
  gap: 0.35rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-med);
  font: inherit;
  color: #000;
  background: #fff;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-note {
  margin: 0;
  color: var(--text-muted);
}

.form-status {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 600;
}

/* Former boards ordered list */
.former-boards {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
  color: var(--accent);
}

.former-boards li {
  margin-bottom: 0.4rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .hero {
    padding: 3rem 0 2.5rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .membership-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
