* {
    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;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav ul li {
    padding: 8px 15px;
}

nav ul li a {
    text-decoration: none;
    color: black;
    font-weight: bold;
}

nav a:hover {
    color: cadetblue;  /* <- change later */ 
}

main { 
    width: 75%;
    min-width: 800px;
    max-width: 2000px;
    display: block;
    position: relative;
    margin: 0 auto;
} 

/* 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; /* for equal column width */
}

th, td {
    width: 14%;
    height: 4rem;
    text-align: center;
    border: 1px solid #dddddd;
    cursor: pointer;
}

td:hover {
    background: #dddddd;
}


.event-day {
    background: lightblue;
    font-weight: bold;
}

#eventBox { 
    display: 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, .rainTxt:hover {
    transform: scale(1.1); 
}

/* Raindrops container */
.raincontainer {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}
  
/* 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/essential-workers-unsplash.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); 
}

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;
}




@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: 100%;
        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: 400px;
    }

    .box2 { 
        grid-column: 1 / 2;
        grid-row: 3/4;
        margin: auto;
        text-align: center;
        width: 30rem;
        height: 100px;
    }
}