/* =========================================================================
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: 350px;
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin: 2rem 0 0;
    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);
    color: var(--color-white);
}

@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);
    min-height: 450px;
    background: url('../image/mountain.jpg') center/cover no-repeat;
    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: 2rem 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;
}

.hero-search-bar {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3rem;
  padding: 0.6rem 1rem;
  width: 100%;
    max-width: 700px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  gap: 0.5rem;
}

.search-icon-circle {
  background: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-search-icon {
  font-size: 1.4rem;
  color: #333;
}

.hero-search-bar input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: #22215bc4;
  min-width: 0;
}

.hero-search-bar input::placeholder {
  color: #22215ba6;
}

.hero-search-bar .btn {
  background-color: #3659e3;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.hero-search-bar .btn:hover {
  background-color: #2641b1;
}

@media (max-width: 768px) {
    .event-hero-content h1 {
        font-size: 2rem;
    }
    .event-hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .event-hero, .posts_scroll-wrapper, .header-row {
        width: var(--container-width-md);
    }
    
    .event-hero-overlay {
        justify-content: center;
        text-align: center;
        padding: 1.5rem;
    }
    .hero-search-bar {
        flex-direction: column;
        padding: 1rem;
        border-radius: 1rem;
    }
    .hero-search-bar .btn {
        display: none;
    }
    .search-icon-circle {
        display: none;
    }
    .hero-search-icon {
        display: none;
    }
}

/* =========================================================================
CATEGORY BUTTON
============================================================================
*/

.category_buttons {
    padding: 3rem 0;
    background: #f9fafc;
    overflow-x: hidden;
}

.category_buttons h2{
    width: var(--container-width-lg);
    margin-inline: auto;
    text-align: left;
    padding-left: 1rem;
    padding-bottom: 1rem;
}

.category_scroll-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: var(--container-width-lg);
    margin-inline: auto;
    padding-bottom: 0.5rem;
}

.category_buttons-container {
    display: flex;
    gap: 1rem;
}

.category_button {
    min-width: 160px;
    background-color: rgba(151, 202, 209, .08);
    padding: 1.5rem 0.5rem;
    border-radius: 1rem;
    color: #111;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

.category_button:hover {
    background-color: #e5e9f1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #3659e3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.category_scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.category_scroll-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.category_scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}


/* =========================================================================
FEATURED
============================================================================
*/

.featured_container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.featured .post_thumbnail img {
    max-height: 350px; 
    object-fit: contain;
    border-radius: var(--card-border-radius-2);
}


/* =========================================================================
GENERAL POST
============================================================================
*/

.posts {
    margin-top: 1rem;
}

.org-posts {
    margin-bottom: 15rem;
}

.posts .header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: var(--container-width-lg);
    max-width: 1800px;
    margin-inline: auto;
}

.posts .header-row h2 {
    margin-left: 1rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.posts .header-row a {
    padding-top: 2.5rem;
    text-decoration: underline;
}

.posts_scroll-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  width: var(--container-width-lg);
  margin-inline: auto;
  padding-bottom: 0.5rem;
}

.posts_scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.posts_scroll-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.posts_scroll-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.posts_slider {
  display: flex;
  gap: 1.5rem;
}

.posts_slider .post {
    height: auto;
    min-width: 320px;
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.5rem;
    position: relative;    
    transition: all ease .2s;
    display: flex;       
  flex-direction: column;
  white-space: normal;
}

.post:hover {
    transform: scale(1.05);
    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_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;
    align-items: flex-start;
    justify-content: space-between;
    cursor: default;
}

.post_location, .post_date {
    color: #22215B;
    font-size: .8rem;
    font-weight: 500;
}

.description{
  padding: 1rem 0;
  color: #22215ba6;
  font-size: 1rem;
  white-space: normal;
  word-wrap: break-word;
}

.options{
    padding: 0.5rem 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  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 (MEDIUM DEVICES)
============================================================================
*/

@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;
    }

     /*=================== SEARCH, FEATURED, POSTS & FOOTER =================*/

     .search_bar-container {
        width: 60%;
     }

     .featured_container {
        gap: 3rem;
     }

     .posts_container {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
     }
}

/* =========================================================================
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);
     }

    .featured {
        margin-top: 6rem;
    }

    .featured_container {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .posts_container {
        grid-template-columns: 1fr;
    }

    .category_buttons-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .posts_scroll-wrapper, .posts .header-row {
        width: var(--container-width-md);
    }
}