/*
 Theme Name:   Quartierwerk
 Author:       Ann-Sophie Junele
 Version:      1.0
 Text Domain:  quartierwerk
*/

/* ========== Fonts ========== */

@font-face {
  font-family: 'Roboto Slab';
  src: url('assets/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

/* ========== Root Variables ========== */

:root {
  --primary-color: #ec008c;
  --secondary-color: #ffffff;
  --background-color: #ffffff;
  --text-color: #000000;

  --font-size-small: 0.875rem;   /* 14px */
  --font-size-base: 1rem;        /* 16px */
  --font-size-medium: 1.5rem;    /* 24px */
  --font-size-large: 3rem;       /* 48px */
  --font-size-heading: 1.75rem;  /* 28px */

  --font-weight-light: 100;
  --font-weight-regular: 300;
  --font-weight-medium: 400;
  --font-weight-bold: 600;
}

/* ========== Base Styles ========== */

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Roboto Slab';
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  padding: 0 1.5rem;
  margin: 0 auto;
}

h1, h2,
strong {
  font-weight: var(--font-weight-bold);
}

h1 {
  font-size: var(--font-size-heading);
}

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

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

/* ========== Gutenberg Overrides ========== */

.wp-block-table td,
.wp-block-table th {
  border: none;
}

.wp-block-columns.is-layout-flex {
  gap: 2rem;
  flex: 1;
}

.wp-block-table thead {
  border-bottom: 1px solid;
}

/* ========== Header ========== */

#site-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 1rem; 
}

.logo img {
  height: 40px;
  flex: 0;
}

.site-title-container {
  position: absolute;
  left: 50%;
  text-align: center;
  transform: translateX(-50%);
}

.site-title {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-medium);
}

.site-subtitle {
  font-size: var(--font-size-base);
}

/* ========== Navigation ========== */

.main-nav {
  display: none;
  flex-direction: row;
  text-align: right;
}

.main-nav ul {
  list-style-type: none;
  text-transform: uppercase;
}

.main-nav .current-menu-item a {
  color: var(--primary-color);
}

.hamburger-menu {
  padding: 0;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

/* Mobile Menu Overlay */

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  display: none;
  justify-content: center;
  flex-direction: column;
  width: 100%;
  height: 100%;
  visibility: hidden;
  opacity: 0;
  background: var(--background-color);
}

.mobile-menu-overlay.active {
  display: flex;
  visibility: visible;
  opacity: 1;
}

.mobile-menu-overlay .close-menu {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 0;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
}

.mobile-nav ul {
  width: 100%;
  padding: 0;
  list-style-type: none;
}

.mobile-nav li {
  width: 100%;
  text-align: center;
}

.mobile-nav a {
  display: block;
  padding: 25px 0;
  font-size: var(--font-size-medium);
  font-weight: var(--font-weight-medium);
}

.mobile-nav .current-menu-item a {
  background: var(--primary-color);
  color: var(--secondary-color);
}

/* ========== Content Styles ========== */

#site-content {
  margin: 1.5rem 0;
}

.not-found-error-page {
  text-align: center;
}

/* Portfolio Overview */

.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.post-thumbnail {
  position: relative;
  margin: 0;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.project-title {
  position: absolute;
  bottom: 20px;
  left: -10px;
  padding: 0.5rem;
  padding: 6px;
  font-weight: 400;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  cursor: pointer;
}

.project-title a.post-link {
  color: var(--secondary-color);
}

article:hover a.post-link,
article:hover .tag-links {
  color: var(--primary-color);
}

article:hover .project-title {
  background-color: var(--background-color);
}

/* Project Listing Table */

.list-of-works {
  padding-top: 2rem;
}

.list-of-works table {
  width: 100%;
  border-collapse: collapse;
}

.list-of-works table td,
.list-of-works table th {
  border: none;
  hyphens: auto;
  word-break: break-word;
  overflow-wrap: break-word;
}

.list-of-works table tr {
  border-bottom: 1px solid black;
}

.list-of-works table tr:last-child {
  border-bottom: none;
}

/* on mobile screens, the table only consists of two columns, year and project title */
.list-of-works table td:nth-child(2), .list-of-works table th:nth-child(2) {
  width: 70%;
  text-align: right;
}

td:last-child, th:last-child {
  display: none; /* on mobile screens, don't show the phase column */
}

/* Single Post Styles */

.project-text-columns {
  flex-direction: column-reverse; /* wrap columns on mobile screens: first show description, then the key data list */
}

.project-key-data-list {
  list-style-type: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.project-key-data-list li {
  width: 50%;
  box-sizing: border-box;
  padding: 0 10px 10px 0;
}

/* Profile Page -- Services */

.services-text-columns {
  flex-direction: column-reverse;
}

.services-list {
  list-style-type: none;
  padding: 0;
}

.services-list li {
  padding: 0.5rem 0;
  font-weight: var(--font-weight-medium);
}


/* ========== Footer ========== */

#site-footer {
  margin-top: auto;
  padding: 2rem 0;
}

#site-footer .centered {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.instagram-logo {
  height: 25px;
}

.footer-items-container {
  display: flex;
  flex-wrap: wrap;
}

.footer-item {
  display: flex;
  flex: 1 0 100%;
  justify-content: center;
}

.contact {
  text-align: center;
  font-style: normal;
  margin-top: 10px;
}

.legal-links {
  font-size: var(--font-size-small);
}

/* ========== Responsive Design ========== */

/* ---------- Tablet and Up (≥768px) ---------- */
@media (min-width: 768px) {
  body {
    width: 80vw;
    margin: 0 10vw;
  }

  .projects {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Landscape orientation overrides body width */
  @media (orientation: landscape) {
    body {
      max-width: 60vw;
      margin: 0 20vw;
    }
  }
}

/* ---------- Desktop and Up (≥1024px) ---------- */
@media (min-width: 1024px) {
  body {
    width: 60vw;
    margin: 0 20vw;
  }

  .logo img {
    height: 50px;
  }

  .project-text-columns,
  .services-text-columns {
    flex-direction: row;
  }

  .project-key-data-list,
  .services-list,
  .services-title {
    text-align: right;
  }

  .project-key-data-list li {
    width: 100%;
  }

  .services-list {
    list-style-type: none;
  }
}

/* ---------- Large Desktop and Up (≥1200px) ---------- */
@media (min-width: 1200px) {
  .main-nav {
    display: flex;
  }

  .hamburger-menu {
    display: none;
  }

  .projects {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .project-description p, .profile-description p {
    max-width: 20vw;
  }

  .list-of-works table td:last-child,
  .list-of-works table th:last-child {
    display: block;
  }

  .list-of-works table td:nth-child(1),
  .list-of-works table th:nth-child(1) {
    text-align: left;
    width: 10%;
  }

  .list-of-works table td:nth-child(2),
  .list-of-works table th:nth-child(2) {
    text-align: left;
    width: 60%;
  }
}
