/*
Theme Name: BaroCool
Author: Kacper Toliński
Description: BaroCool custom theme stylesheet
Version: 1.0
*/


@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

/* --- CSS VARIABLES --- */
:root {
  --primary: #1e3a8a;
  --primary-light: #38bdf8;
  --accent: #059669;
  --bg-light: #f8fafc;
  --bg-dark: #1e293b;
  --text-main: #1e293b;
  --text-white: #f1f5f9;
  --nav-bg: #f8fafc;
  --font-heading: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --transition: 0.3s ease-in-out;
  --transition-nav: 0.15s ease-in-out;
}

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

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

body {
  font-family: var(--font-heading);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* --- Navigation Bar --- */
nav {
  background-color: var(--nav-bg);
  padding: 1rem 5%;
  /* padding: 10px 70px; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.nav-links-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-links-list a {
  text-decoration: none;
  color: var(--primary);
  /* font-size: 1.1rem; */
  font-size: clamp(0.8rem, 1vw, 1.1rem);
  font-weight: 500;
  transition: color var(--transition-nav);
}

.nav-links-list a:hover {
  color: var(--primary-light);
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  user-select: none;
  -moz-user-select: none;
  cursor: pointer;
}

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

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* --- Burger Menu --- */
.menu-btn {
  display: none;
  height: 100%;
  appearance: none;
  background: none;
  box-sizing: border-box;
  cursor: pointer;
  /* line-height: normal; */
  /* margin: 0; */
  /* height: fit-content; */
  border: none;
  touch-action: manipulation;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.menu-icon {
  width: 2rem;
  height: 2rem;
}

.menu-btn.activated {
  rotate: 90deg;
}

/* --- Header --- */
header {
  /* padding: 60px 20px;
  text-align: center;
  width: 100%;
  height: 70vh;
  display: flex;
  align-items: center;
  padding-top: 80px; */

  /* height: 70vh; */
  min-height: fit-content;
  max-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 5%;
  /* padding-top: 180px;
  padding-bottom: 180px; */
  /* padding-top: 7%; */
  padding-top: calc(3.5vw + 80px);
  /* padding-bottom: 7%; */
  padding-bottom: 3.5vw;
}

.header-content {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.header-main {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.header-text-side {
  /* width: 50%; */
  text-align: left;
  display: flex;
  flex: 1 1 400px;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
}

.header-text-side h1 {
  font-size: clamp(3rem, 8vw, 5rem);
  /* font-size: 4.5rem; */
}

.header-text-side h2 {
  font-size: 1.45rem;
  color: #444;
}

.header-text-side h3 {
  font-size: 1rem;
  color: #3d3d3d;
}

.header-logo-side {
  /* width: 50%; */
  flex: 0 1 400px;
  text-align: right;
}

.header-logo-side img {
  /* text-align: right; */
  /* width: 100%; */
  width: 60vh;
	height: auto;

}

.header-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.header-buttons .header-button {
  appearance: none;
  background-color: transparent;
  border: 2px solid var(--primary);
  box-sizing: border-box;
  color: #3b3b3b;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  line-height: normal;
  margin: 0;
  height: fit-content;
  flex: 1;
  max-width: 220px;
  /* min-width: 150px; */
  white-space: nowrap;
  outline: none;
  padding: 16px 24px;
  text-align: center;
  text-decoration: none;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  will-change: transform;
}

@media (max-width: 605px) {
  .header-buttons {
    flex-direction: column;
    align-items: center;
  }

  .header-buttons .header-button {
    width: 100%;
  }
}

.header-buttons .header-button:hover {
  color: white;
  background-color: var(--primary);
  box-shadow: rgba(0, 0, 0, 0.25) 0 6px 10px;
  transform: translateY(-2px);
}

/* --- Main --- */
main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ------ */
/* SECTIONS */
/* ------ */
section {
  scroll-margin-top: 70px;
  display: flex;
  justify-content: center;
  padding: 20px;
  padding-top: 50px;
  padding-bottom: 60px;
}

.section-content {
  width: 100%;
  /* max-width: 1100px; */
  max-width: 57vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.section-content h1 {
  font-size: 2.5rem;
}

.section-content h2 {
  font-size: 1.8rem;
}

.section-content p {
  font-family: var(--font-body);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* --- Color Variations */
.about-project,
.project-team,
.highlights {
  background-color: var(--bg-light);
}

.capabilities,
.contact {
  background: var(--bg-dark);
  color: var(--text-white);
}

.publications,
.links,
.caloric-effects {
  color: var(--text-dark);
}

/* About Project */
.about-project-img-box {
  width: 100%;
  display: flex;
  justify-content: center;
}

.about-project h1 {
  /* font-size: 2.4rem; */
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
}

.about-project img {
  width: 70%;
  height: auto;
  margin-top: 20px;
}

/* Caloric Effects */
.caloric-effects .image2 {
  width: 50%;
  height: auto;
  margin-top: 20px;
  margin-bottom: 30px;
}

.caloric-effects-image-content-box img {
  width: 90%;
  height: auto;
}

/* Project Team */
.team-section {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding: 30px;
  padding-left: 10%;
  padding-right: 10%;
}

.team-names {
  display: flex;
  flex: 1 1 400px;
  flex-direction: column;
  justify-content: center;
}

.team-names ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.team-logo {
  display: flex;
  flex: 1 1 300px;
  justify-content: center;
  align-items: center;
  max-width: 500px;
}

.team-logo img {
  max-width: 100%;
  height: auto;
}

.team-logo .logo2 {
  width: 150px;
}

.team-logo .logo3 {
  width: 100px;
}

/* Capabilities */
.capabilities ul {
  padding-left: 3%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.capabilities .first-lists {
  display: flex;
  flex-direction: column;
}

.capabilities .first-lists .second-p {
  margin-top: 20px;
}

.capabilities .other-eq {
  margin-top: 20px;
}

.capabilities .capabilities-ul3 {
  list-style: none;
  padding-left: 0;
  margin-top: 30px;
}

/* Publications */
.publications-list {
  list-style: none;
  counter-reset: item;
  padding-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.publications-list li {
  counter-increment: item;
  margin-bottom: 0.5em;
}

.publications-list li::before {
  content: "[" counter(item) "] ";
  font-weight: bold;
}

/* Highlights */
.highlights code {
  background-color: #e0e7ff;
  padding: 10px;
  border-radius: 5px;
  font-size: 1.4rem;
}

.highlights-center-paragraph {
  text-align: center;
  margin-top: 20px;
}

.highlights-center-paragraph2 {
  text-align: center;
}

.highlights img {
  width: 40%;
}

/* Contact */
.contacts-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  /* margin-top: 10px; */
  gap: 40px;
}

.contact-tile {
  width: fit-content;
  border: 3px solid #38bdf8;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  max-width: 90%;
  -webkit-box-shadow: 6px 6px 18px 0px rgb(22, 22, 22);
  -moz-box-shadow: 6px 6px 18px 0px rgb(22, 22, 22);
  box-shadow: 6px 6px 18px 0px rgb(22, 22, 22);
  transition: background-color 0.3s ease;
}

.contact-tile a {
  text-decoration: none;
  color: #1acd94;
  /* font-size: 1.2rem; */
  font-size: clamp(0.5rem, 0.9rem, 1.2rem);
  max-width: 100%;
  word-wrap: break-word;
  text-align: center;
}

.contact-tile:hover {
  background-color: #28354c;
}

.contact-tile h3 {
  font-size: 1rem;
}

.contact-tile h2 {
font-size: 1.2rem;
}

/* Links */
.links h3 {
  font-size: 1.5rem;
  margin-top: 15px;
}

.links .conference-link {
  max-width: 600px;
}

.links-list {
  list-style: none;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-left: 20px;
}

.links-list li {
  font-size: 1.2rem;
}

.links-list li a {
  text-decoration: none;
  color: #2563eb;
  word-wrap: break-word;
}

.links-list li a:hover {
  color: rgb(108, 137, 216);
}

.links-list h3 {
  font-size: 1.1rem;
  margin-top: 0;
}

/* Footer */
footer {
  background-color: #1e293b;
  color: #f1f5f9;
  font-size: 1.1rem;
  text-align: center;
  padding: 10px;
}

/* Additionals */
.highlight {
  color: #059669;
}

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

#toTop {
  position: fixed;
  bottom: 30px;
  right: 30px;

  width: 50px;
  height: 50px;
  border-radius: 50%;

  border: none;
  background: #222;
  color: white;

  cursor: pointer;

  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;

  display: flex;
  justify-content: center;
  align-items: center;
}

#toTop svg {
  height: 2rem;
  width: 2rem;
}

#toTop.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (min-width: 1151px) {
  .nav-links {
    position: static;
    width: auto;
    background-color: transparent;
    max-height: none !important; /* Resetujemy max-height */
    opacity: 1 !important;
    padding: 0;

    /* KLUCZ: Wyłączamy animację, żeby nie "migało" przy resize */
    transition: none !important;
  }

  .nav-links-list {
    display: flex;
    flex-direction: row;
    gap: 30px;
  }

  .nav.active {
    display: flex;
  }
}

@media (max-width: 1150px) {
  #toTop {
    right: 15px;
    bottom: 15px;
  }

  .menu-btn {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #f8fafc;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;

    /* KLUCZ DO ŚRODKOWANIA: */
    display: flex; /* Musi być flexem */
    justify-content: center; /* Środkuje listę UL w poziomie */
    align-items: center; /* Środkuje listę UL w pionie (opcjonalnie) */
  }

  .nav-links.activated {
    max-height: 500px; /* Zwiększyłem, żeby na pewno wszystko weszło */
    opacity: 1;
    padding: 2rem 0;
  }

  .nav-links-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center; /* Środkuje elementy LI względem siebie */
    width: 100%; /* Lista zajmuje całą szerokość */
    padding: 0; /* Usuwa domyślne wcięcia przeglądarki */
  }
	
  .nav-links-list a {
  /* font-size: 1.1rem; */
    font-size: clamp(1rem, 1.1rem, 1.5rem);
  }

  .nav.active {
    display: flex;
  }
	
  .section-content {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .team-names {
    text-align: center;
  }
}

.img-box {
  width: 100%;
  display: flex;
  justify-content: center;
}