/* =================================
   Base
   ================================= */
:root {
  --font-sans: "Montserrat", "Pretendard", "Zen Kaku Gothic New", sans-serif;
  --color-dark: #1d1e20;
  --color-border: #dcdcdc;
  --color-muted: #939393;
}

html {
  font-size: 17px;
}

body {
  padding-top: 70px;
  font-size: 1rem;
  background-color: var(--color-dark);
}

input,
button,
textarea,
select {
  font: inherit;
}

/* =================================
     Header
     ================================= */
header {
  z-index: 1000;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  padding: 0 20px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

header .logo,
header nav {
  flex-shrink: 0;
}

/* ---------- Logo ---------- */
.logo-icon {
  display: block;
  width: 48px;
  height: 48px;
}

/* ---------- Search ---------- */
#search-container {
  width: 450px;
  height: 40px;
  position: relative;
  display: inline-block;
  background-color: #ffffff;
  color: black;
  border: 1px solid var(--color-border);
  border-radius: 40px;
  flex: 0 1 450px;
  min-width: 0;
}

#search-bar {
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#search-bar .fa-search {
  padding: 0 7px;
  color: var(--color-muted);
}

#search-input {
  width: 90%;
  font-size: 0.95rem;
}

#search-input::placeholder {
  font-weight: 400;
  color: var(--color-muted);
}

#search-results {
  position: absolute;
  z-index: 1;
  width: 100%;
  margin-top: 7px;
  padding: 15px 0;
  border-radius: 10px;
}

#search-results,
footer {
  background-color: var(--color-dark);
  color: var(--color-border);
}

#search-results li {
  width: 90%;
  list-style-type: none;
  padding: 7px 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#search-results li a,
#search-results li a:visited,
#search-results p {
  color: var(--color-border);
  padding: 0.25rem 1.5rem;
}

/* ---------- Language menu ---------- */
.language ul {
  position: relative;
}

.language ul:hover > ul {
  display: block;
}

.language ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
}

.flag-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--color-border);
  margin: 5px 0;
}

.flag {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =================================
     Main
     ================================= */
main {
  min-height: calc(100vh - 144px);
  display: flex;
  justify-content: center;
  background-color: white;
}

#main-container {
  width: 768px;
  padding: 15px;
}

#profile {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#profile-image {
  width: 200px;
  border-radius: 70%;
  overflow: hidden;
}

#profile-name {
  font-weight: 600;
  font-size: 1.5rem;
  margin: 1rem 0 1rem 0;
}

#sns-container {
  padding-bottom: 0.5rem;
}

.sns-icon {
  color: var(--color-dark);
  font-size: 1.7rem;
  padding: 0 3px;
}

#profile-description {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#profile-description p {
  padding: 5px 0;
}

#categories {
  display: flex;
  justify-content: center;
}

.categories-list-item,
.post-categories .item {
  cursor: pointer;
  display: inline-block;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.022rem;
  min-width: 1.75rem;
  margin: 0.375rem 0.275rem;
  padding: 0.5rem 1rem 0.375rem;
  border-radius: 1.125rem;
  background: #313132;
  color: white;
  text-decoration-line: none;
  font-size: 1.125rem;
}

.post-category {
  font-weight: 600;
  font-size: 1.5rem;
  padding: 40px 0 10px 0;
}

.post-list-item-title {
  color: #313132;
  padding: 0.375rem 0 0.375rem 5px;
}

.post-list-item-title:hover {
  color: red;
}

/* =================================
     Footer
     ================================= */
footer {
  text-align: center;
  font-size: 0.75rem;
  padding: 26px 0;
}

/* =================================
     Mobile
     ================================= */
@media only screen and (max-width: 480px) {
  body {
    padding-top: 50px;
  }

  header {
    padding: 5px 12px 0;
    height: 45px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  #profile-image {
    width: 180px;
    padding-top: 30px;
  }

  #main-container {
    padding: 0 15px;
    max-width: calc(100vw - 30px);
  }

  #search-container {
    display: none;
  }
}
