@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&family=Young+Serif&display=swap');

html {
    overflow-y: scroll; /* always reserve scrollbar space */
}


body{
    font-family: 'Public Sans', sans-serif;
    font-weight:200;
    font-size: 15px;
    justify-items: center;
}

.navbar{
    place-items: center;
    flex:1;
    display:flex;
    justify-content:center;

}

.nav-list{
    
    list-style:none;
    display:flex;
    gap:60px;
    margin:0;
    padding:0;
}

.nav-item{

    position:relative;
}

.nav-toggle{
    font-family: "Young Serif", serif;
    background:none;
    border:none;
    font-size:18px;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:6px;
}

.nav-toggle:hover{
    color: #046fe3;

}
.arrow{
    width:12px;
    transition: transform 0.25s ease;
}

.nav-item.active .arrow{
    transform: rotate(180deg);
}

.dropdown{
    position:absolute;
    top:25px;
    left:0;
    list-style:none;
    padding: 0px 0;
    margin:0;
    min-width:200px;

    max-height: 0;           /* collapsed by default */
    overflow: hidden;
    opacity: 0;              /* invisible initially */
    transition: max-height 0.3s ease, opacity 0.3s ease;

    
    
}


.dropdown li{
    font-size: 16px;
    padding:5px 5px;
    
}

.dropdown li a{
    text-decoration: none;
    color:grey;
}


.dropdown li a:hover{
    color: #046fe3;
}

.nav-item.active .dropdown{
    max-height: 500px;   /* large enough to fit all items */
    opacity: 1;
}


.contents-container{
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;                  
}

.A-image{
    width: 40%;

}

.A-text{
    width: 40%;

}

h1{
    font-size: 35px;
    font-family: "Young Serif", serif;
    font-weight:lighter;
    margin-bottom: 12px;
    margin-top: 0px;

}

a{
    color: #046fe3;
    text-decoration: none;
}

a:hover{
    text-decoration: underline;
    text-decoration-style: dotted;

}

#contact-buttons{
    display: flex;
    justify-content: left;
    gap: 1rem;
    margin: 25px 0;
}

.contact-button{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;

}



#go-home{
    color: #d2d2db;
}

.page-content{
    margin-top: 80px;
    width: 40%;
}

h2{
    font-size: 30px;
    text-align: center;
    font-family: "Young Serif", serif;
    font-weight:lighter;
    margin-bottom: 20px;
    margin-top: 0px;

}

@media (max-width: 768px) {
    .A-image, .A-text {
        width: 100%;
    }
    .contents-container {
        flex-direction: column;
        align-items: center;
    }

    .nav-list {
        gap: 20px;
    }
    .nav-toggle{
        font-size:14px;
    }

    .dropdown li{
        font-size: 12px;
    }
    .contents-container h1{
        font-size: 25px;
    }

    .page-content{
        width: 95%;
        margin-top: 60px;

    }
}



.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 150px;
    gap: 10px;
    grid-auto-flow: dense;
}

.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover img {
    filter: brightness(70%);
    transform: scale(1.05);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* grid spans for your size system */
.item-small {
    grid-row: span 1;
    grid-column: span 1;
}

.item-wide {
    grid-row: span 1;
    grid-column: span 2;
}

.item-tall {
    grid-row: span 2;
    grid-column: span 1;
}

.item-big {
    grid-row: span 2;
    grid-column: span 2;
}

.item-biggest {
    grid-row: span 2;
    grid-column: span 3;
}

/* responsive: stack items on small screens */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr; /* 1 column, all images same width */
        grid-auto-rows: auto;       /* auto height so image scales naturally */
    }

    .gallery-item {
        grid-column: span 1 !important; /* override all size classes */
        grid-row: span 1 !important;    /* override height spans */
        height: auto;
    }

    .gallery-item img {
        height: auto;
    }
}

.top-container {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

#nav-left, #nav-right{
    width:200px; /* equal spacing */
    padding-left: 30px;
}

@media (max-width:768px){

    .top-container{
        flex-direction:column;
        align-items:center;
        gap:10px;
        margin-top: 20px;
    }

    .navbar{
        margin-top: 20px;
    }
    #nav-left{
        width:100%;
        padding-left: 15px;
    }

    #nav-right{
        display:none;
    }
}
