*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.fredoka {
  font-family: "Fredoka", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}
 

section{

    width: 100%;
    background: linear-gradient(-45deg, #5de0e6, #004aad); 
    display: flex;
    flex-direction: column;
    overflow-y: scroll;    
    height: auto;       
    overflow-y: visible;
}

h1{
    font-family: fantasy;
    color: white;
    font-size: 60px;
    padding: 20px;
    text-align: center;
    position: static;
    left: 40%;
}

.gallery{
    padding: 10px;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    margin-top: 10px;
}

.v{
    grid-row: span 2;
}
 
.h{
    grid-column: span 2;
}

.vh{
    grid-column: span 2;
    grid-row: span 2;
}

.gallery div img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 1px 1px 4px black ;
}



@media (min-width: 561px) and (max-width: 991px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr); /* exactly 2 equal columns */
    grid-auto-rows: 220px;
    max-width: 100%;
    padding: 15px;
    grid-gap: 15px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.05);
  }

  .v, .h, .vh {
    grid-row: span 1 !important;
    grid-column: span 1 !important;
  }

  .gallery div img {
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.35);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }

  .gallery div img:hover {
    transform: scale(1.1);
    box-shadow: 6px 6px 25px rgba(0, 0, 0, 0.5);
  }

  h1 {
    font-size: 52px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
    margin-bottom: 15px;
  }
}

@media (max-width: 560px) {
  .gallery {
    grid-template-columns: 1fr;  /* single full-width column */
    grid-auto-rows: auto;        /* allow rows to adjust height naturally */
    padding: 10px;
    max-width: 100%;
  }

  .v, .h, .vh {
    grid-row: span 1 !important;
    grid-column: span 1 !important;
  }

  .gallery div img {
    width: 100%;
    height: auto;               /* keep natural aspect ratio */
    object-fit: cover;
    border-radius: 10px;
    box-shadow: none;
  }
}

img:hover{
  transform: scale(1.1);
  border-radius: 10px;
}

