/*
Theme Name: PSY-NET
Theme URI: https://psy-net.uni-dev.eu
Author: PSY-NET Team
Author URI: https://psy-net.uni-dev.eu
Description: Custom theme for PSY-NET COST Action CA24130 — Advancing Psychedelic Science
Version: 1.0.0
Requires at least: 5.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: psy-net
*/

/* ========== CSS Reset & Variables ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy-deep: #11132a;
  --lavender: #d8bbf3;
  --blue: #3c93da;
  --navy: #2b3161;
  --orange: #ff7c47;
  --orange-dark: #ed7a45;
  --white: #ffffff;
  --gray-light: #f4f6fb;
  --gray: #8892a4;
  --text: #333;
  --font: 'Poppins', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== Navigation ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}

.nav--subpage {
  background: rgba(17, 19, 42, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav.scrolled {
  background: rgba(17, 19, 42, 0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  padding: 10px 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  color: var(--orange);
}

.nav-links .btn-nav {
  background: var(--orange);
  color: #fff !important;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.3s, transform 0.3s;
}

.nav-links .btn-nav:hover {
  background: var(--orange-dark);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* WP Nav Menu Overrides */
.nav-links ul {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
  padding: 0;
}

/* ========== Section Common ========== */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  display: inline-block;
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--navy-deep);
  line-height: 1.3;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--gray);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.section-dark {
  background: var(--navy-deep);
  color: #fff;
}

.section-dark .section-header h2 {
  color: #fff;
}

.section-dark .section-header p {
  color: rgba(255,255,255,0.6);
}

.section-alt {
  background: var(--gray-light);
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,124,71,0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
  border-color: var(--lavender);
  color: var(--lavender);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy-deep);
  border: 2px solid #dde2ed;
}

.btn-outline-dark:hover {
  border-color: var(--navy-deep);
  color: var(--navy-deep);
}

/* ========== Page Hero (shared for archive, page, 404) ========== */
.page-hero {
  background: var(--navy-deep);
  padding: 140px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-hero-bg img {
  width: 60%;
  max-width: 600px;
  height: auto;
  filter: blur(40px);
}

.page-hero-content {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.page-hero p {
  color: rgba(255,255,255,0.6);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
}

.breadcrumb a {
  color: rgba(255,255,255,0.5);
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb span {
  color: rgba(255,255,255,0.3);
}

.breadcrumb .current {
  color: var(--lavender);
}

/* ========== Funding Acknowledgement ========== */
.funding-acknowledgement {
  background: #fff;
  padding: 48px 0;
  border-top: 1px solid #eef1f7;
}

.funding-block {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.funding-logos {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.cost-logo-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cost-logo-block .cost-logo {
  height: 55px;
  width: auto;
}

.cost-logo-block .cost-logo-url {
  font-size: 0.78rem;
  color: var(--blue);
  font-weight: 600;
  transition: color 0.3s;
}

.cost-logo-block .cost-logo-url:hover {
  color: var(--orange);
}

.funding-logos .eu-emblem {
  height: 50px;
  width: auto;
}

.funding-text p {
  color: #555;
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ========== Footer ========== */
.footer {
  background: var(--navy-deep);
  padding: 60px 0 30px;
  color: rgba(255,255,255,0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about img {
  height: 32px;
  margin-bottom: 16px;
}

.footer-about p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
  padding: 4px 0;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 0.8rem;
}

/* ========== Animations ========== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 968px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .funding-block {
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17,19,42,0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 999;
  }

  .nav-links.active,
  .nav-links ul.active {
    display: flex;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .nav-links ul {
    flex-direction: column;
    gap: 24px;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
