: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
============================================================================
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: 0;
    border: 0;
    list-style: none;
    text-decoration: none;
}

body {
    display: flex;
    width: 100%;
    flex-flow: row wrap;
    font-size: 0.9rem;
    overflow-x: hidden;
    font-family: 'Helvetica', sans-serif;
    scroll-behavior: smooth;
    line-height: 1.6;
    background: #f1f3f6;
    color: var(--color-gray-900);
}

.container {
    width: 80%;
    max-width: 1800px;
    margin-inline: auto;
}

section {
    margin-top : 3rem;
    width: 100vw;
}

.section_extra-margin {
    margin-top: 7rem;
}

h1, h2, h3, h4, h5 {
    
    line-height: 1.3;
}

h1 {
    font-size: 3rem;
    margin: 1rem 0;
}

h2 {
    font-size: 1.7rem;
    margin: 1rem 0;
}

h3 {
    font-size: 1.1rem;
    margin: 0.8rem 0 0.5rem;
}

h4 {
    font-size: 1rem;
}

img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.btn {
    cursor: pointer;
}

/* =========================================================================
HERO
============================================================================
*/

.event-hero {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 100%;
    height: 350px;
    background: url('../image/mountain.jpg') center/cover no-repeat;
    overflow: hidden;
    margin-inline: auto;
    margin-top: 0;
}

.event-hero-overlay {
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); 
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.event-hero-content {
    color: #fff;
    width: 900px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 40px 0px;
}

.search-title {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 20px;
    margin-inline: 0;
    position: relative;
    width: 100%;
    max-width: 900px;
}

.search-title ion-icon{
    margin: 0px;
    text-decoration: none;
    font-size: 2rem;
    position: absolute;
    left: 0px;
    color: white;
}

.search-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 50px;
    max-width: 900px;
    position: relative;
    background-color: #fff;
}

.search-bar ion-icon{
    font-size: 1.5rem;
    padding: 0 12px 0 22px;
    background-color: #fff;
    color: black;
    height: 50px;
}

.search-bar input{
    color: #30363e;
    width: 100%;
    max-width: 700px;
    height: 50px;
    font-size: 16px;
    text-indent: 2px;
}

.search-bar .btn{
    font-size: 1rem;
    background-color: orange;
    color: black;
    width: 100%;
    max-width: 150px;
    height: 50px;
}

/* =========================================================================
GENERAL POST
============================================================================
*/

.posts {
    margin-top: 1rem;
    min-height: 400px;
}

.posts .header-row {
    width: 80%;
    max-width: 1300px;
    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;
    max-width: 1300px;
}

.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 screen and (max-width: 1024px) {
    .posts_container {
    grid-template-columns: repeat(2, 1fr);
}

/* =========================================================================
MOBILE LAYOUT (MAX WIDTH 768PX)
============================================================================ */
@media screen and (max-width: 768px) {

    /* HERO SECTION */
    .event-hero {
        height: auto;
        border-radius: 0;
    }

    .event-hero-overlay {
        padding: 2rem 1rem;
        justify-content: center;
        text-align: center;
    }

    .event-hero-content {
        width: 100%;
        max-width: 100%;
        gap: 15px;
        padding: 20px 0;
    }

    .search-title {
        justify-content: center;
        position: relative;
        margin-bottom: 15px;
    }

    .search-title ion-icon {
        left: 10px;
        top: 0px;
        font-size: 1.8rem;
    }

    .search-title h2 {
        font-size: 1.5rem;
        margin: 0 auto;
    }

    /* SEARCH BAR */
    .search-bar {
        align-items: stretch;
        height: auto;
        gap: 10px;
        border-radius: 8px;
        overflow: hidden;
    }

    .search-bar ion-icon {
        padding-left: 10px;
        padding-right: 0;
        height: 40px;
    }

    .search-bar input {
        width: 100%;
        height: 40px;
        font-size: 14px;
        text-indent: 5px;
    }

    .search-bar .btn {
        width: 100%;
        height: 40px;
        font-size: 0.9rem;
        display: none;
    }

    /* POSTS GRID */
    .posts_container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
        width: var(--container-width-md);
    }

    .post {
        padding: 1rem;
        border-radius: 1rem;
    }

    .post_thumbnail img {
        max-height: 8rem;
        border-radius: 1rem;
    }

    .post_title {
        font-size: 1rem;
    }

    .post_organization {
        font-size: 0.85rem;
    }

    .post_location, .post_date {
        font-size: 0.75rem;
    }

    .options {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .read {
        font-size: 0.85rem;
    }

    .category {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    /* HEADER ROW */
    .posts .header-row {
        width: var(--container-width-md);
    }
    
    .posts .header-row h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }
}

/* =========================================================================
VERY SMALL DEVICES (MAX WIDTH 400PX)
============================================================================ */
@media screen and (max-width: 400px) {
    .event-hero-content h2 {
        font-size: 1.2rem;
    }

    .search-bar input {
        font-size: 13px;
    }

    .search-bar .btn {
        font-size: 0.8rem;
    }

    .post_title {
        font-size: 0.95rem;
    }

    .post_organization, .post_location, .post_date {
        font-size: 0.7rem;
    }

    .category {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}
