* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #e5e5e5;
    line-height: 1.3;
}

.wrapper { 
    width: 100%;
    position: relative;
    margin: 0 auto;
}

.headcontainer {
    width: 80%;
    min-width: 1000px;
    max-width: 2000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    margin: 0 auto;
    padding-bottom: 40px;
    font-size: 16px;
}

.logo {
    margin-left: 30px;
    font-size:32px;
    font-weight: bold;
    font-family: "Arial Black", sans-serif;
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    padding: 8px 15px;
} 

nav ul li a, .logo{
    text-decoration: none;
    color: black;
    font-weight: bold;
    position: relative;
    transition: all 0.35s ease;
    background: linear-gradient(90deg, cadetblue 50%, black 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav a:hover, .logo:hover, .ToC a:hover { 
    background-position: 0 0;
}

.foot a:hover, #eventDesc a:hover, #eventDesc2 a:hover, .AboutMain a:hover, .ArticleDate a:hover, .ArticleImage a:hover, .ArticleContent a:hover, .RecentHeading a:hover, nav a:hover, .logo:hover, .ToC a:hover {
    color: cadetblue;  /* <- change later */ 
}

nav ul li a.activePage {
    color: cadetblue;
    border-bottom: 2px solid cadetblue;
    transition: all 0.25s ease;
    background: linear-gradient(90deg, #0bc5f9 50%, cadetblue 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-image: linear-gradient(90deg,cadetblue 50%, cadetblue 50%) 1;
    border-bottom: 2px solid transparent; /* makes the bottom border transparent */
}

nav ul li a.activePage:hover { 
    background-position: 0 0;
    border-image: linear-gradient(90deg, #0bc5f9 50%, #0bc5f9 50%) 1; 
    border-bottom: 2px solid transparent; /* Make the bottom border transparent */
}

main { 
    width: 75%;
    min-width: 800px;
    max-width: 2000px;
    display: block;
    position: relative;
    margin: 0 auto;
} 

footer {
    padding-top: 10px;
    width: 100%;
    position: relative;
}

.foot {
    width: 100%;
    height: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 0 auto;
    padding: 1.5rem 0;
    font-size: 12px;
}

.foot a { 
    text-decoration: none;
    color: black;
    transition: all 0.3s ease;
}

/* HOME PAGE */

.maincontainer {
    display: grid;
    grid-template-columns: 1fr 40%;
    grid-template-rows: auto 6.8rem;
    gap: 2rem 4rem;
    align-items: end;
}

.calendar {
    width: 30rem;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    grid-column: 1 / 2;
    grid-row: 1 / 3;
}

.box1 { 
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    position: relative;
    margin: 0 auto;

    background-color: #FFFFFF; 
    border-radius: 8px;
    width: 350px;
    height: 100%;
}

.box2 { 
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    position: relative;
    margin: 0 auto;

    background-color: #FFFFFF; 
    border-radius: 8px;
    width: 350px;
    height: 100%;
}

.calheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calheader button {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.calheader button:hover{
    color: cadetblue;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    width: 14%;
    height: 4rem;
    text-align: center;
    border: 1px solid #dddddd;
    cursor: pointer;
}

td:hover {
    background: #dddddd;
}


.event-day {
    background-color: #f06060; 
    font-weight: bold;
}

.event-mixed {
    background-color: #fbab00; 
}

.event-long {
    background-color: #f06060; 
}

.event-accident {
    background-color: #fff700; 
}

.event-gloom {
    background-color: #56befe; 
}


#eventBox { 
    display: none; 
}

#eventText, #eventDesc, #eventText2, #eventDesc2 { 
    padding-left: 10px;
    padding-right: 5px;
    line-height: 1.6;
    padding-top: 4px;
}

#eventDesc, #eventDesc2 { 
    font-size: 12px;
}

#eventDesc a, #eventDesc2 a{ 
    text-decoration: none;
}

#eventImage {
    width: 100%;
    height: 100%;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    object-fit: cover;
}

/* BOX 1 */

.rainbox {
    position: relative;
    background: #f9f9f9;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
  
.imgbg {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    
    background-image: url("images/essential-workers-unsplash.jpg");
    background-size: cover;        
    background-position: center;   
    background-repeat: no-repeat;  

    transition: filter 0.6s ease;
}

.blurBtn {
    display: inline-block;
    transition: transform 0.3s ease;
}

.blurBtn:hover{
    transform: scale(1.05); 
}

.rainTxt:hover {
    transform: scale(1.15); 
}

.raincontainer {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}
  
/* for each individual drops */
.raindrop {
    position: absolute;
    top: -20px;
    width: 2px;
    height: 40px;
    background: rgba(0, 0, 255, 0.2);
    animation: rainfall 1s linear infinite;
    opacity: 0;
}

/* It ain't efficient but gets the job done :) */
/* I love rain effects too much to not use this */
#drop1 { 
    left: 10%; 
    animation-delay: 0s;
}

#drop2 { 
    left: 22%; 
    animation-delay: 0.3s;
}

#drop3 { 
    left: 35%; 
    animation-delay: 0.6s;
}

#drop4 { 
    left: 46%; 
    animation-delay: 0.1s;
}

#drop5 { 
    left: 54%; 
    animation-delay: 0.5s;
}

#drop6 { 
    left: 66%; 
    animation-delay: 0.2s;
}

#drop7 { 
    left: 78%; 
    animation-delay: 0.4s;
}

#drop8 { 
    left: 83%; 
    animation-delay: 0.6s;
}

#drop9 { 
    left: 95%; 
    animation-delay: 0.1s;
}

@keyframes rainfall {
    0% {
        top: -100px;
        opacity: 0;
    }
    30% {
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* for text box on top of rain */
.rainTxt{
    z-index: 2;
    position: relative;
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin: 9rem auto;
    width: 80%;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.rainTxt a {
    margin: 0;
    font-weight: bold;
    color: #333333;
    text-decoration: none;
}

/* BOX 2 */

.box2 .rainTxt{ 
    position: relative;
    z-index: 2;
    margin: 1.2rem auto;
    background: none;
    box-shadow: none;
    
}

.box2 a { 
    font-size: 24px;
    margin: 0;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
}

.box2Container{ 
    position: relative;
    background: #f9f9f9;
    border-radius: 8px;
    width: 100%;
    height: 100%;

    overflow: hidden;
}

.img2 {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    
    background-image: url("images/Jeju-aiir-crash.jpg");
    background-size: cover;        
    background-position: center;   
    background-repeat: no-repeat; 

    transition: transform 0.6s ease,  filter 0.6s ease;
}

.box2:hover .img2 {
    transform: scale(1.1);
    filter: blur(2px); 
}

/* About page */

.AboutMain h1{ 
    padding-top: 15px; 
    padding-bottom: 15px; 
}

.AboutMain ul, .AboutMain li{ 
    margin-left: 15px;
    padding-bottom: 20px;
}

.AboutMain p{ 
    line-height: 1.6;
    font-size: 16px;
    padding-bottom: 20px;
}

.AboutMain {
    flex: 1;
    max-width: 750px;
}

.AboutSec { 
    margin: 0;
    display: flex;
    justify-content: space-between;
}

.ToC {
    width: 230px;
    background: #f9f9f9;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 1em;
    position: sticky;
    display: flex;
    margin-right: 10px; 
    margin-top: 20px; 
    flex-direction: column; 
    gap: 0.5em;
    height: fit-content;
    top: 20px; 
}

.ToC h2 { 
    margin: auto;
}

.ToC ul { 
    list-style: none;
    padding-top: 5px;
}

.ToC ul li a {
    display: block;
    margin: 0.8em 0;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding-left: 20px;
    position: relative;
    transition: all 0.4s ease;
    background: linear-gradient(90deg, cadetblue 50%, black 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.AboutMain a { 
    text-decoration: none;
}

.ToC ul li a.active {
    border-left: 3px solid #2dc1ea;
    margin-left: 20px;
    background: linear-gradient(90deg, #2dc1ea 50%, #2dc1ea 50%);
    background-size: 200% 100%;
    background-position: 100% 0;
    background-clip: text;
}

.SmoothScroll{ 
    scroll-behavior: smooth;
}

/* Contact */

.formContainer > div {
    margin-bottom: 1.5em;
}

label div {
    font-weight: bold;
    margin-bottom: 0.4em;
}

input[type="text"], input[type="email"], textarea {
    padding: 0.5em;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.formInput input, .mailInpt input {
    width: 100%;
}

.subWrapper {
    display: flex;
    gap: 1em;
    flex-wrap: wrap;
    font-weight: normal;
}

.subWrapper label {
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.formSubmit input[type="submit"] {
    background-color: #444;
    color: white;
    padding: 0.7em 1.5em;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.formSubmit input[type="submit"]:hover {
    background-color: rgb(74, 194, 201);
}

.formNote {
    margin-top: 1em;
    font-size: 0.9em;
}

.requiredTag {
    color: red;
    font-weight: bold;
}

.popupOverlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popupContent {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    text-align: center;
}

.popupContent button {
    margin-top: 15px;
    padding: 8px 16px;
    border: none;
    background-color: #57bde6;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.popupContent button:hover {
    background-color: #3a67b0;
}

#contactDesc {
    padding-top: 1em;
    padding-bottom: 1.5em;
    font-weight: normal;
    line-height: 2;
    font-size: 14px;
}

#contactTitle {
    margin: 0 auto;
    text-align: center;
}

/* Relief */

.reliefTxt h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.reliefTxt p {
    font-size: 21px;
    line-height: 2;
}

.reliefContainer {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto;
    gap: 10em;
    align-items: start;
}

.logoImg { 
    height: 2.5em;
}

.reliefTxt {
    grid-column: 1/2;
    grid-row: 1/2;
    padding-top: 6em;
}

.gfm-embed {
    grid-row: 1/2;
    grid-column: 2/3;
    transform: scale(0.95);
    transform-origin: center;
}
  
.gfmWrapper {
    background: #ffffff; 
    padding: 10px;
    grid-row: 1/2;
    grid-column:  2/3;
    border-radius: 16px;
    max-width: 700px;
    margin: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.altLink {
    display: inline-flex;
    align-items: center;       
    margin-right: 3em;
    border-radius: 8px;
    padding: 8px 12px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.altLink:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* Archive */

.OVContainer {
    overflow: hidden;
}
  
.filterDiv {
    margin-top: 1em;
    display: none; 
}
  
.show {
    display: block;
}
  
.btn {
    border: none;
    outline: none;
    padding: 12px 16px;
    background-color: #f1f1f1;
    cursor: pointer;
}
  
.btn:hover {
    background-color: #ddd;
}
  
.btn.active {
    background-color: #666;
    color: white;
}

.FilterBoxContent {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    max-height: 300px;
    overflow: auto;
    line-height: 1.6;
}

.FilterBoxHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.title {
    display: flex;
    align-items: center;
    gap: 1rem;
}
  
.audioBtn {
    padding: 5px 10px;
    background-color: rgb(0, 0, 0);
    color: white;
    border: 2px solid black;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
}

.audio { 
    display: none;
}

.audioBtn:hover {
    background-color: rgba(230, 230, 230, 0.746);
    color: black;
}

.date {
    font-size: 24px;
    color: #333;
}

.type {
    display: flex;
    gap: 10px;
}

.type1 {
    background-color: #f06060;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.type2 {
    background-color: #f06060;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.FilterBoxBody {
    padding: 20px;
    font-size: 16px;
}

.filterImg { 
    float: right;
    margin: 0 0 10px 15px; 
    width: 150px; 
    height: auto;
    border-radius: 2px;
}

.viewMoreBtn {
    margin-top: 10px;
    font-size: 12px;
    padding: 6px 12px;
    background-color: #000000;
    color: white;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.viewMoreBtn:hover { 
    background-color: #6a6a6a;
}

/* Recent/Overview */

#RecentMain { 
    gap: 2rem 2rem; 
}

.disasterCard {
    background: white;
    border-left: 5px solid #e74c3c;
    margin-top: 15px;
    padding: 15px;
    width: 330px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.RecentHeading { 
    position: sticky;
    top: 0;
    background: white;
    z-index: 5;                
    padding: 16px;
    border-bottom: 1px solid rgb(228, 228, 228);
}

#RecentArticle { 
    padding-top: 10px;
    box-shadow: none;
    position: relative;
}

.FadingGradient {
    display: block;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15rem;
    background: linear-gradient(180deg, transparent 0, rgba(255, 255, 255, 0.844) 100%);
    pointer-events: none;
}

#RecentBOX { 
    width: 32.5rem;
    height: 100%;
    text-align: left;
    padding: 0;
    overflow: hidden;
}

#RecentBOX .RecentHeading {
    padding-left: 30px;
    padding-top: 25px;
}

.RecentHeading a { 
    text-decoration: none;
    color: rgb(130, 130, 130);
}

#RecentBox1 { 
    overflow-y: auto;
    width: 350px;
    height: 485px;
}

#RecentBox2 { 
    width: 350px;
    height: 100px;
}

#RecentBox2Container { 
    background: rgb(158, 11, 11);
}

.disasterTitle {
    font-size: 17px;
    font-weight: bold;
}

.disasterDate {
    color: #888;
    font-size: 13px;
    margin-top: 2px;
}

#Recentbox2btn { 
    margin-top: 3px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Articles */

#remembranceContent { 
    padding-bottom: 30px;
}

.ArticleContainer {
    margin-top: 6px;
    background: #fff;
    padding: 2.5em;
    padding-top: 2em;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.ArticleContainer h1 {
    font-size: 28px;
    margin: 10px 0;
}

.ArticleDate {
    font-size: 13px;
    color: #777;
    margin-bottom: 5px;
    line-height: 1.8;
}

.ArticleDate a, .ArticleImage a{ 
    text-decoration: none;
    color: #777;
}

.ArticleImage {
    position: relative;
}

.ArticleImage img, .ArticleImage video {
    width: 100%;
    height: auto;
}

.caption {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 12px;
    max-width: 80%;
    font-weight: bold;
    font-size: 16px;
}

#remem { 
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 12px;
    max-width: 80%;
    font-weight: bold;
    font-size: 16px;
}

.ArticleContent {
    margin-top: 20px;
}

.ArticleContent p {
    line-height: 1.6;
    font-size: 16px;
}

.ArticleContent a { 
    text-decoration: none;
}

.ArticleContent p {
    line-height: 1.6;
    font-size: 16px;
}



@media screen and (max-width: 1000px) {
    .logo { 
        margin-left: 0;
        margin-bottom: 10px;
    }

    .headcontainer{ 
       flex-direction: column;
       min-width: 0;
       padding-bottom: 20px;
    }

    nav ul {
        gap: 10px;
    }
    
    .maincontainer { 
        display: grid;
        width: 100%;
        min-width: 200px;
        max-width: 1000px;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    main { 
        width: 95%;
        min-width: 200px;
        max-width: 1000px;
    }

    .calendar {
        grid-column: 1 / 2;
        grid-row: 1/2;
        margin: auto;
    }

    .box1 { 
        grid-column: 1 / 2;
        grid-row: 2/3;
        margin: auto;
        text-align: center;
        width: 30rem;
        height: 500px;
    }

    .box2 { 
        grid-column: 1 / 2;
        grid-row: 3/4;
        margin: auto;
        text-align: center;
        width: 30rem;
        height: 100px;
    }

    footer {
        padding-top: 0;
    }

    .AboutMain {
        flex: 1;
        max-width: 400px;
    }

    .reliefContainer {
        gap: 3em;
    }

    .reliefTxt {
        padding-top: 4em;
    }

    .logoImg { 
        height: 2em;
    }

    .reliefTxt h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .reliefTxt p {
        font-size: 16px;
        line-height: 2;
    }
    
    .altLink { 
        margin-right: 1em;
    }

    #RecentBOX { 
        width: 30rem;
        height: auto;
    }

    #RecentBox1 { 
        grid-column: 1 / 2;
        grid-row: 2/3;
        margin: auto;
        text-align: center;
        width: 30rem;
        height: 500px;
    }

    #RecentBox2 { 
        grid-column: 1 / 2;
        grid-row: 3/4;
        margin: auto;
        text-align: center;
        width: 30rem;
        height: 100px;
    }

    #Recentbox2btn { 
        margin-top: 16px;
    }

    .disasterCard {
        width: auto;
    }
}