:root {
    --color-primary: #6f6af8;
    --color-primary-light: hsl(242, 91%, 69%, 18%);
    --color-primary-variant: #5854c7;
    --color-red: #da0f3f;
    --color-red-light: hsl(346, 87%, 46%, 15%);
    --color-green: #00c476;
    --color-green-light: hsl(156, 100%, 38%, 15%);
    --color-gray-900: #1e1e66;
    --color-gray-700: #2d2b7c;
    --color-gray-300: rgba(242, 242, 254, 0.3);
    --color-gray-200: rgba(242, 242, 254, 0.7);
    --color-white: #f2f2fe;
    --color-bg: #0f0f3e;
    --color-gray: #333;

    --transition: all 300ms ease;

    --container-width-lg: 74%;
    --container-width-md: 88%;
    --form-width: 40%;

    --card-border-radius-1: 0.3rem;
    --card-border-radius-2: 0.5rem;
    --card-border-radius-3: 0.8rem;
    --card-border-radius-4: 2rem;
    --card-border-radius-5: 5rem;
}

/* =========================================================================
GENERAL
============================================================================
*/

body {
    background: #f1f3f6;
    display: flex;
    flex-direction: column;
}

.primary-nav button {
    color: var(--color-bg);
}

.primary-nav {
    background: white;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(36px);
    transition: box-shadow 0.3s ease;
}

.primary-nav.scrolled {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.primary-nav a {
    color: var(--color-gray);
}

.primary-nav .nav_profile ul li {
    background: var(--color-white);
}

.primary-nav .nav_profile ul li a {
    color: var(--color-gray);
}

.nav_profile ul li:last-child{
    background: var(--color-red);
}

.nav_profile ul li:last-child a{
    color: var(--color-white);
}

section {
    width: 100vw;
}

.alert_message {
    width: 400px;
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin: 2rem 16rem 24rem;
    border-radius: var(--card-border-radius-2);
    font-size: 0.9rem;
    animation: slideDown 0.5s ease;
}

.alert_message.success {
    background-color: var(--color-green-light);
    color: var(--color-green);
}

.alert_message.error {
    background-color: var(--color-red-light);
    color: var(--color-red);
}

@keyframes slideDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

h2 {
    color: black;
    font-size: 1.4rem;
    font-weight: 600;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

a {
    color: black;
}

footer {
    background: #3586ff;
    display: flex;
    flex-flow: column nowrap;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: 6rem;
    box-shadow: none;
}

footer a {
    color: white;
}

.footer_socials a {
    background: var(--color-white);
    color: var(--color-bg);
}

.footer_socials a:hover {
    background-color: var(--color-bg);
    color: var(--color-white);
}

footer ul a {
    opacity: 1;
}

.footer_copyright {
    border: none;
    border-top: 2px solid var(--color-white);
    width: 100%;
    color: var(--color-white);
}

footer .wave {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100px;
    background: url(../image/wave.png);
    background-size: 1000px 100px;
    box-shadow: none;
}

footer .wave#wave1 {
    z-index: 999;
    opacity: 1;
    bottom: 0;
    animation: animateWave_1 4s linear infinite;
}

footer .wave#wave2 {
    z-index: 998;
    opacity: 0.5;
    bottom: 10px;
    animation: animateWave_2 4s linear infinite;
}

footer .wave#wave3 {
    z-index: 999;
    opacity: 0.2;
    bottom: 15px;
    animation: animateWave_1 3s linear infinite;
}

footer .wave#wave4 {
    z-index: 998;
    opacity: 0.7;
    bottom: 20px;
    animation: animateWave_2 3s linear infinite;
}

@keyframes animateWave_1{
    0% {
        background-position-x: 1000px;
    }
    100% {
        background-position-x: 0px;
    }
}

@keyframes animateWave_2{
    0% {
        background-position-x: 0px;
    }
    100% {
        background-position-x: 1000px;
    }
}

/* =========================================================================
HERO
============================================================================
*/

.event-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: var(--container-width-lg);
    height: 400px;
    border-radius: 1.5rem;
    overflow: hidden;
    margin-top: 4rem;
    margin-inline: auto;
}

.event-hero-overlay {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45); 
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 4rem;
}

.event-hero-content {
  color: #fff;
  max-width: 600px;
}

.event-hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.event-hero-content h1 span {
  font-weight: 800;
  color: #fff;
}

.event-hero-content p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* =========================================================================
GENERAL POST
============================================================================
*/

.posts {
    min-height: 1000px;
}

.posts .header-row {
    width: var(--container-width-lg);
    max-width: 1800px;
    margin-inline: auto;
}

.posts .header-row h2 {
    margin-left: 0rem;
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    color: black;
}

.posts_container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.post {
    display: flex;
    flex-direction: column;
    height: auto;
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    overflow: hidden;
    position: relative;    
    transition: all ease .17s;
}

.post:hover {
    transform: scale(1.02);
    box-shadow: 0 3px 8px #ddd;
}

.post_thumbnail {
  width: 100%;
  height: auto;
  position: relative;
}

.post_thumbnail img{
    width: 100%;
    height: auto;
    max-height: 8.5rem;
    object-fit: cover;
    border-radius: 1.5rem;
}

.post_title {
    width: 100%;
    color: #22215B;
    padding: 1rem 0 0.3rem;
    font-size: 1.1rem;
}

.post_title a {
    color: #22215B;
}

.post_organization {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-flow: row nowrap;
    color: #22215B;
    font-size: 0.9rem;
    font-weight: 500;
}

.post_info {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    cursor: default;
}

.post_location, .post_date {
    color: #22215B;
    font-size: .8rem;
    font-weight: 500;
}

.description{
  padding: 1rem 0;
  color: #22215ba6;
  font-size: 1rem;
}

.options{
    padding: 0.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.read {
    font-size: 0.9rem;
    font-weight: 600;
    color: #22215B;
}

.category {
    font-size: 0.8rem;
    padding: .5rem 1rem;
    border-radius: .5rem;
    font-weight: 400;
    background: #EEF7FE;
    color: #22215B;
    cursor: pointer;
}

/* =========================================================================
MEDIA QUERIES (SMALL DEVICES)
============================================================================
*/

@media screen and (max-width: 600px) {
    section {
        margin-top: 2rem;
    }

    h1 {
        font-size: 2rem;
    }

    .search_bar-container {
        width: var(--container-width-md);
     }

    .posts_container {
        grid-template-columns: 1fr;
    }
}