/* ===== Header & Background ===== */
header {
    background-image: url(img/raining.gif);
    box-shadow: 10px 10px 9px #5d4069;
    border-right: solid #fdfffe;
    border-bottom: solid #fdfffe;
}

body::before {
    background-image: url('/deepdives/umbrellas/img/background1.jpeg') !important;
    z-index: -1;
    background-repeat: repeat;
    background-size: 50%;
    background-position: top left;
    background-blend-mode: lighten;
}

.vibebox {
    flex-direction: column;
    display: flex;
    align-items: center;
}

/* ===== Generic Box ===== */
.box {
    background-color: #d3bee8;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 10px 10px 9px #5d4069;
    border-right: solid #fdfffe;
    border-bottom: solid #fdfffe;
    overflow: visible;
}

.titleimg img {
    width: 100%;
}

.titleimg {
    margin-bottom: 20px;
}
/* ===== Definition Section ===== */
.definiton {
    display: flex;
    align-items: center;
    align-content: center;
    overflow: scroll;
    background-image: url(img/opening.gif);
    background-size: 75px;
    background-repeat: repeat;
}
.definiton img {
    width: 70%;
    margin: 0 auto;
}

/* ===== History Section ===== */
.history {
    margin: 20px 0;
    flex-wrap: wrap;
}
.ancientegypt {
    width: 20%;
    float: right;
    padding: 10px;
}
.ancientumbrella {
    width: 20%;
    float: left;
}
.jonas {
    width: 20%;
    float: right;
}


.leftcolumn1 {
    height: 100%;
}
/* ===== Columns ===== */
.leftcolumn1,
.rightcolumn1,
.leftcolumn,
.rightcolumn {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.why {
    overflow: auto;
}
.leftcolumn1,
.rightcolumn1 {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; /* important */
}

/* Right column boxes scroll individually */
.leftcolumn .box,
.rightcolumn .box {
    flex: 1;        /* stretch equally */
    overflow: auto; /* scroll if content too tall */
}

/* ===== Twocolumn Layouts ===== */
.twocolumn {
    display: flex;
    width: 100%;
    gap: 20px;
    align-items: stretch;
    height: 55vh;
}

.twocolumn2 {
    display: flex;
    width: 100%;
    gap: 20px;
    height: 120vh;
   
}

.wordmeaning strong {
    background-color: #fdfffe;
    border-radius: 20px;
    padding:3px;
}

.wordmeaning h2 {
    text-decoration: wavy underline;
}
/* ===== Expensive / Centered Section ===== */
.expensive h1 {
    text-align: center;
}
.expensive img {
    width: 100%;
}

/* ===== Why Section ===== */
.why {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.why img {
    width: 30%;
}

/* ===== Lists ===== */
ul {
    list-style-image: url(img/rain1.gif);
}

/* ===== Masonry Grid ===== */
.masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}
.faveimage {
    break-inside: avoid;
    background-color: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.faveimage img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

/* ===== Famous Box ===== */

.famous {
    overflow: scroll;
    flex:2;
    background-image: url(img/rainfall1.gif);
}
.famousimg {
    display: flex;
    flex-wrap: wrap;       /* allow images to wrap to next line */
    justify-content: center; /* center them horizontally */
    gap: 20px;             /* spacing between images */
    margin-top: 20px;
}

.famous img {
    width: 200px;
    height: auto;
    -webkit-mask-image: url('img/umbsilhouette.png');
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: cover;      /* scale mask to cover image */
    -webkit-mask-position: center; /* center mask */
    
    mask-image: url('img/umbsilhouette.png');
    mask-repeat: no-repeat;
    mask-size: cover;               /* scale mask to cover image */
    mask-position: center;          /* center mask */
}

.twocolumn3 {
    display: flex;
    margin-top: 20px;
    gap: 20px;
    height: 50vh;
}

.wordmeaning {
    flex: 1;
    overflow: scroll;
}
/* ===== Special Layout Tweaks ===== */
.leftcolumn .box:last-child,
.rightcolumn .box:last-child {
    margin-top: auto;
}

@media (max-width: 768px) {

    body {
        display: flex;
        flex-direction: column;
    }

  
    .page-wrapper {
        display: flex;
        flex-direction: column;
    }

    @media (max-width: 768px) {

    /* Remove fixed heights so sections can grow */
    
    .twocolumn2,
    .twocolumn3 {
        height: auto;
        min-height: unset;
        flex-direction: column;
    }

    .twocolumn {
         height: auto;
        min-height: unset;
        flex-direction: column-reverse;
    }

    /* Kill floats on mobile */
    .ancientegypt,
    .ancientumbrella,
    .jonas {
        float: none;
        width: 100%;
        display: block;
        margin: 10px auto;
    }

    /* Stop nested scrolling */
    .leftcolumn .box,
    .rightcolumn .box,
    .wordmeaning,
    .famous {
        overflow: visible;
    }

    /* Reduce gaps for small screens */
    .twocolumn,
    .twocolumn2,
    .twocolumn3 {
        gap: 15px;
    }

    /* Images scale better */
    img {
        max-width: 100%;
        height: auto;
    }
}


}