:root {
    --border-color: #e1e1e1;
}

* {
    box-sizing: border-box;
    margin: 0px;
    padding: 0px;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 100%;
    vertical-align: baseline;
}

img, figure {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder {
    height: 100%;
    width: 100%;
    border: 1px solid var(--border-color);
}

.wide-container {
    padding: 0px 40px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.main {
    display: flex;
    flex-flow: column;
    gap: 96px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font1);
    font-weight: 800;
}

html, body {
    color: var(--text-color);
    background-color: var(--background-color);
    font-family: var(--font2);
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    scroll-behavior: smooth;
}

p {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
}

h1 {
    font-size: 56px;
    line-height: 64px;
    text-transform: uppercase;
}

h2 {
    font-size: 40px;
    line-height: 48px;
}

h3 {
    font-size: 28px;
    line-height: 48px;
    text-transform: uppercase;
}

.light * {
    color: var(--background-color);
}

.subtitle {
    font-weight: 300;
    text-transform: uppercase;
}

.subtitle.smaller {
    font-size: 12px;
    line-height: 16px;
    font-weight: 400;
}

.uppercase {
    text-transform: uppercase;
}

.section-header {
    display: flex;
    flex-flow: column;
    gap: 8px;
}

.subtitle-wrapper {
    display: flex;
    align-items: center;
    column-gap: 8px;
}

.subtitle-line-wrapper {
    display: flex;
    align-items: center;
}

.subtitle-circle {
    width: 5px;
    min-width: 5px;
    height: 5px;
    min-height: 5px;
    background-color: var(--text-color);
    border-radius: 100%;
}

.subtitle-line {
    height: 1px;
    width: 48px;
    background-color: var(--text-color);
}

.flex-wrapper {
    display: flex;
    flex-flow: column;
    gap: 24px;
}

.tag {
    margin: 0px;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    width: fit-content;
}

strong,
b {
    font-weight: bolder;
}

.tag p {
    font-size: 14px;
    line-height: 20px;
    opacity: 0.7;
}

.one-line {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.two-lines {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.three-lines {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.big-text {
    font-weight: 700;
    font-size: 20px;
    line-height: 28px;
}

small {
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
    opacity: 0.6;
}

.unstyled-button {
    padding: 0;
    border: none;
    outline: none;
    background-color: transparent;
    color: currentColor;
}

.offset-section {
    margin-top: -270px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
}

.relative {
    position: relative;
    z-index: 2;
}

.grid-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.grid.one-column {
    grid-template-columns: 1fr !important;
}

.grid.two-column {
    grid-template-columns: 1fr 1.15fr;
}

.grid.five-column {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.underline-link {
    padding: 12px 24px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
    margin-top: 15px;
}

.underline-link:hover {
    text-decoration: underline;
}

.accent-background-color {
    background-color: var(--accent-background-color);
}

.section-header-vertical {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    margin-bottom: 16px;
}

.section-header-vertical .subtitle-line-wrapper {
    opacity: 0.6;
    flex-direction: column;
}

.section-header-vertical .subtitle-line {
    width: 1px;
    height: 50px;
}

.section-header-vertical .subtitle {
    font-weight: 400;
}

.section-padding {
    padding: 40px 0px;
}

.number-text {
    font-weight: 300;
    font-size: 36px;
    line-height: 100%;
}

.medium-text {
    font-weight: 700;
}

.button {
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 0px 32px;
    display: flex;
    width: auto;
    height: 40px;
    background: var(--background-color);
    color: var(--text-color);
    border-radius: 32px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    outline: none;
}

button {
    font-family: var(--font2);
    cursor: pointer;
}

.button.border {
    border: 1px solid var(--text-color);
}

.button.transparent {
    background-color: transparent;
    color: var(--background-color);
    border: 1px solid var(--background-color);
}

.button.accent {
    background: var(--text-color);
    color: var(--background-color);
    border: 2px solid var(--text-color);
}

.hide-on-desktop {
    display: none !important;
}

.narrow-container {
    width: 100%;
    max-width: 880px;
    padding: 0px 24px;
    margin-left: auto;
    margin-right: auto;
}

.medium-container {
    width: 100%;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

.button.bigger {
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
    padding: 12px 24px;
}

.circle {
    width: 12px;
    min-width: 12px;
    background-color: currentColor;
    height: 12px;
    border-radius: 100%;
}

.post-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 32px;
}

.previous-button {
    gap: 4px;
    font-size: 14px;
    line-height: 20px;
}

.arrow-icon {
    width: 18px;
    transition: transform .3s ease;
}

.tag-content-header {
    display: flex;
    flex-direction: column;
    gap: 36px;
    margin-top: 80px;
}

.posts-grid {
    margin-top: 24px;
}

.pagination {
    flex-direction: column;
    gap: 16px;
    margin-top: 32px;
}

.pagination-text {
    opacity: 1;
    font-weight: 400;
}

.post-card-mobile {
    display: none;
}

.tag-filterable .wide-container {
    max-width: 880px;
}

.form-alerts {
    display: none;
}

.form-alert {
    display: none;
    margin-top: 12px;
}

.error-alert {
    color: red !important;
}

.form-alert {
    opacity: 1;
    font-weight: 400;
    color: var(--background-color);
}

form.error .form-alerts,
form.loading .form-alerts,
form.success .form-alerts,
form.error .error-alert, 
form.success .success-alert, 
form.loading .loading-alert {
    display: block;
}

.space-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.library-main {
    margin-top: 160px;
    min-height: 100vh;
}

.hidden {
    display: none;
}

@media (max-width: 991px) { 
    h1 {
        font-size: 46px;
    }

    .slider-on-mobile {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; 
    }

    .slider-on-mobile > div,
    .slider-on-mobile > a {
        scroll-snap-align: start;
    }

    .slider-on-mobile::-webkit-scrollbar {
        display: none;
    }

    .grid.two-column,
    .grid.five-column {
        grid-template-columns: 1fr;
    }

    .grid.five-column {
        gap: 16px;
    }

    .button.smaller {
        padding: 7px 18px;
        height: auto;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .hide-on-desktop {
        display: flex !important;
    }

    .narrow-container {
        max-width: 100%;
        padding: 0px 40px;
    }

    .medium-container {
        max-width: 600px;
    }

    .grid.three-column {
        grid-template-columns: 1fr 1fr;
        max-width: 664px;
    }

    .grid {
       grid-template-columns: 1fr 1fr; 
    }

    .posts-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 767px) { 
    html, body, p {
        font-size: 12px;
        line-height: 16px;
    }
    .wide-container {
        padding: 0px 16px;
    }

    h1 {
        font-size: 20px;
        line-height: normal;
    }

    h2 {
        font-size: 20px;
        line-height: 28px;
    }

    h3 {
        font-size: 14px;
        line-height: 28px;
    }

    .subtitle {
        font-weight: 400;
    }

    .subtitle.smaller {
        font-size: 10px;
        line-height: normal;
    }

    .offset-section {
        margin-top: -225px;
    }

    .big-text {
        font-size: 14px;
        line-height: normal;
    }

    small {
        font-size: 12px;
        line-height: 16px;
    }

    .tag p {
        font-size: 12px;
        line-height: 16px;
        font-weight: 300;
    }

    .grid,
    .grid-column {
        gap: 16px;
    }

    .grid {
       grid-template-columns: 1fr; 
    }

    .underline-link {
        font-size: 12px;
        margin-top: 7px;
    }

    .section-header-vertical.bigger-on-mobile h2 {
        font-size: 40px;
        line-height: 48px;
    }

    .section-header-vertical.bigger-on-mobile .subtitle {
        font-size: 16px;
        line-height: 24px;
    }

    .section-header-vertical.normal-on-mobile h2 {
        font-size: 24px;
        line-height: 48px;
    }

    .section-header-vertical.smaller-on-mobile .subtitle-line-wrapper {
        display: none;
    }

    .section-header-vertical.smaller-on-mobile .section-header-title-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .button.smaller {
        font-size: 8px;
        line-height: normal;
    }

    .narrow-container {
        padding: 0px 24px;
    }

    .button.bigger {
        font-size: 12px;
        line-height: 16px;
    }

    .medium-container {
        max-width: 100%;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .grid.three-column {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .post-card-mobile {
        display: block;
    }

    .post-card-desktop {
        display: none;
    }

    .form-alert {
        font-size: 14px !important;
        line-height: 18px !important;
    }

    .library-main {
        margin-top: 120px;
    }
}