/* =========================================================================
GENERAL
============================================================================
*/

body {
    background: #f1f3f6;
}

.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);
}

@media screen and (max-width: 1024px) {
    /* =========================== GENERAL ============================*/
     .container {
         width: var(--container-width-md);
     }
 
     h2 {
         font-size: 1.6rem;
     }
 
     h3 {
         font-size: 1.2rem;
     }
 
     h5 {
         font-size: 0.8rem;
     }

     /* =========================== NAV ============================*/

     .primary-nav ul li, .primary-nav .nav_profile ul li {
        background: rgba(255, 255, 255, 0.7);
     }

     .primary-nav ul li:not(:last-child):hover {
        background: var(--color-white);
     }

     .primary-nav ul li:last-child:hover {
        background: var(--color-white);
     }

     .primary-nav li:last-child a {
        color: var(--color-gray);
    }

 }

section {
    margin-top : 3rem;
    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: 500px;
    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;
  padding-bottom: 2rem;
}

.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 {
    margin-top: 3rem;
    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:3rem;
    font-size: 1.5rem;
    color: black;
}

.posts_container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
    width: var(--container-width-lg);
}

.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 {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; 
  height: auto;
    max-height: 10rem;
    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: 1024px) {
    .posts_container {
    grid-template-columns: repeat(2, 1fr);
}
    
/* =========================================================================
MOBILE STYLES
============================================================================ */
@media screen and (max-width: 768px) {
    /* HERO SECTION */
    .event-hero {
        width: 100%;
        height: auto;
        border-radius: 0;
        margin-top: 0rem;
    }

    .event-hero-overlay {
        padding: 2rem;
        justify-content: center;
        text-align: center;
    }

    .event-hero-content {
        max-width: 100%;
    }

    .event-hero-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .event-hero-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* POSTS GRID */
    .posts_container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    /* POST CARDS */
    .post {
        padding: 1rem;
        border-radius: 1rem;
    }

    .post_thumbnail img {
        max-height: 10rem;
        border-radius: 1rem;
    }

    .post_title {
        font-size: 1rem;
    }

    .post_organization {
        font-size: 0.85rem;
    }

    .post_location, .post_date {
        font-size: 0.75rem;
    }

    /* ALERT MESSAGES */
    .alert_message {
        width: 90%;
        margin: 1rem auto 2rem;
        font-size: 0.85rem;
    }
}