/* GLOBAL PAGE SETTINGS */
* {margin: 0; padding: 0; box-sizing: border-box;}
:root {
    --button-1: 10em; --button-2: 15em;--button-3: 20em;--button-4: 25em;
    --fs-1: 1rem; --fs-2: 2rem; --fs-3: 3rem; --fs-4: 4rem;
    --height-1: 2dvh; --height-2: 4dvh; -height-3: 6dvh; --height-4: 8dvh;
    --margin-1: 1dvw; --margin-2: 2dvw; --margin-3: 6dvw; --margin-4: 8dvw;
    --padding-1: 2dvw; --padding-2: 4dvw; --padding-3: 6dvw; --padding-4: 8dvw;
    --width-1: 2dvw; --width-2: 4dvw; --width-3: 6dvw; --width-4: 8dvw;--width-5: 10dvw;--width-6: 12dvw;
    --s: .5dvw; --c:darkgrey 70% 35%; --d: blue;
    --main-color: red; --secondary-color: lightgreen;  --txt-color: aliceblue;
    --img-bg-color: rgba(240, 240, 240, 0.9);
    --bg-color: repeating-linear-gradient(45deg, rgba(231, 222, 222, 0.52) 5%, rgba(17, 238, 146, 0.048) 10%), repeating-linear-gradient(-45deg, rgba(104, 112, 117, 0.753) 5%, rgba(221, 199, 215, 0.068) 10%);
}
html{scroll-behavior: smooth;}
body {font-family: system-ui, apple-system, sans-serif; color:#333; margin: 0; padding: 0; box-sizing: border-box; overscroll-behavior-y: contain; line-height: 1.5 }

/* container general settings */
#container{position: relative; box-sizing: border-box; display: grid; grid-template-columns: repeat(auto-fit, minmax(auto-fill, 1fr)); grid-auto-rows: minmax(3dvh, auto); grid-auto-flow: column; max-width: 200rem; width: 100%; height: auto; margin-inline: auto ; overflow: auto; will-change: scroll-position; outline: 1dvw solid lightgreen; }
#container{container-type: inline-size; container-name: parent;}

/* grid settings */
#heading{grid-column: 1/5; grid-row: 1/2; }
section{grid-column: 1/5; grid-row: 2/3; }
main{grid-column: 1/5; grid-row: 3/4;}

/*** HEADING settings ***/
#heading{display: grid; grid-template-columns: 14% 85%; max-width: 200rem; width: 100%; max-height: 18dvh; height: 100%; }
#heading{--s: 0.5dvw; --c: lightgrey; --_s: calc(2*var(--s)) calc(2*var(--s)); --_g: 35.36% 35.36% at; --_c: #0000 66%,black 40% 70%, #0000 72%; background: radial-gradient(var(--_g) 100% 25%,var(--_c)) var(--s) var(--s)/var(--_s), radial-gradient(var(--_g) 0 75%,var(--_c)) var(--s) var(--s)/var(--_s),  radial-gradient(var(--_g) 100% 25%,var(--_c)) 0 0/var(--_s), radial-gradient(var(--_g) 0 75%,var(--_c)) 0 0/var(--_s), repeating-conic-gradient(var(--c) 0 25%,#0000 0 50%) 0 0/var(--_s), radial-gradient(var(--_c)) 0 calc(var(--s)/2)/var(--s) var(--s) var(--c); }

/* navigation section formatting*/
#menu button{position: fixed; max-width: 7%; width: 100%; height: 5%; background:skyblue; opacity:1; color:white; box-shadow:inset 0 0 0 1px black; border:0.2dvw solid white; display: flex; justify-content: center; align-items: center; border-radius: 1dvw; margin-block: 5dvh; z-index: 10;}
#menu button a{width: 100%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem); }
#menu button:hover{background:grey; color:aliceblue; box-shadow:inset 0 0 0 1px white; border:0.2dvw solid black; cursor: pointer;}
/* formatting header */
header{width: 55dvw;  height: 15dvh; }
header h1{position: relative; display: flex; flex-flow: row nowrap; justify-content: center; align-items: center; width: 50%; margin-inline: 30%;  margin-block: 2%; color: blue; font-size: clamp(1rem, calc(var(--fs-4)*1), 3rem); text-align: center;  animation: infinite linear 30s styling; z-index: 99; }
@keyframes styling{
    0%{ translate: 0dvw 0dvw  1dvw; color: black; }
    25%{ translate: -.4dvw -1dvw 2dvw; color:blue; }
    50%{ translate: 0dvw 0dvw 3dvw; color: red;}
    75%{ translate: .4dvw 1dvw 2dvw; color: navy; }
    100%{ translate: 0dvw 0dvw 1dvw; color: black;}
}

/* 2 - formatting the section */
section{display: grid; grid-template-rows: 50% 50% ;position: relative; height: 5dvh; max-width: 200rem; width: 100%;  }
section #enlarge{font-size: clamp(1rem, calc(var(--fs-1)*1.5), 2rem); color: black; font-weight: normal;}
section .number{font-size:clamp(1rem, calc(var(--fs-1)*1.5), 2rem); color: black;  font-weight:normal; }
.number span{margin-left: 0.5dvw; color: red;}

/* 3 - formatting the container section */

/* 3.1 - formatting the lw-container */
.lw-container{max-width: 200rem; width: 100%; margin-top: -3dvh;}
.lw-box{display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: minmax(4dvw, auto); gap: .1dvw; margin-left: 1dvw;counter-reset: image-number; }
.gallery-item:not(.city, .distr){display: flex; flex-flow: column nowrap; width: 10dvw; height: auto; justify-content: space-between;counter-increment: image-number; }
.lw-box .gallery-item:not(.city, .distr)::before{ content: counter(image-number); position: relative;  top: 90%; right: 0%; width: max-content;  background: aqua;  padding: 0.2dvw 0.4dvw; font-weight: normal; border-radius: 0.5dvw; z-index: 11;}
.lw-box .city p, .lw-box .distr p{position: relative; display: flex; justify-content: center; align-items: center; width: 10dvw; height: 20dvh;color: rgb(207, 213, 29); font-size:clamp(1rem, calc(var(--fs-2)*1), 3rem); background-color: grey; margin-top: 8dvh;;border-radius: 2dvw;}
.gallery-item img{display: flex; flex-flow: row wrap; width: 10dvw; aspect-ratio: 1 / 1; object-fit: fill; cursor: pointer; border-radius: 5%; z-index: 1;}
.lw-box p{display: flex; flex-flow: row nowrap; justify-content: center; align-items: stretch; color: darkblue; font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); height: 2dvh; width: 10dvw; background-color: aquamarine; border-radius: 2dvw; z-index: 10; }
.gallery-item .content{-webkit-transition: all 1s ease-out; -moz-transition: all 1s ease-out; -o-transition: all 1s ease-out; transition: all 1s ease-out; }
.gallery-item .content:hover {opacity: 0.98; scale: 1.1;}

/* 3.2 - formatting the pop-up image */

#lw-screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;  top: 1dvw; left: 1dvw; overflow: hidden; background: var(--backdrop-color); z-index: 9999; }
#lw-screen .lw-image {height: 100%; display: inline-flex; justify-content: center; align-items: center;scale: 1.1;}
#lw-screen .lw-image img {max-width: 100%; max-height:100%; margin-block: 0dvw; margin-inline: 0dvw; transition: 5s ease;border-radius: 1dvw;}
#lw-screen.dragging{cursor: grabbing;}
.lw-btn {width: 3dvw; height: 3dvw; background: var(--main-color); color: var(--txt-color); text-align: center; line-height: 3dvw;  cursor: pointer; -moz-transition: all 0.4s ease; -o-transition: all 0.4s ease;  -webkit-transition: all 0.4s ease;  transition: all 0.4s ease; font-size: 2dvw; box-sizing: border-box;  position: fixed; bottom: 2dvw;}
.lw-btn:hover { background: var(--secondary-color); }
.lw-close {position: absolute; bottom: 15dvw; right: 35dvw;}


/** SETTINGS FOR OTHER DEVICES AND OTHER SIZES**/

/*max-width: 107rem = 1,712px */
@media only screen and (96rem <= width <= 107rem){
   #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*1), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1.5), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1.5), 2rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1.25), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw; margin-top: 2dvh;}
   .gallery-item p{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); width: 20dvw;}
   .gallery-item img{width: 20dvw; max-height: 31dvh;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1.4); margin-inline: 1dvw;}
}

/*max-width: 96rem = 1,528px */
@media only screen and (85rem <= width <= 96rem){
   #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*.91), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.9), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1.4); margin-inline: 1dvw;}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
}

/* max-width: 85rem = 1,360px */
@media screen and (75rem <= width <= 85rem) {
   #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*.91), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.9), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1.4); margin-inline: 1dvw;}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
}

/* max-width: 75rem = 1,200px */
@media screen and (65rem <= width <= 75rem) {
   #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*.91), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.7), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1); margin-inline: 1dvw;}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
}


 /* max-width : 65rem  = 1,040px */
 @media screen and (55rem <= width <= 65rem) {
   #menu button{max-width: 15%; height: 8%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-3)*1), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.5), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: clamp(0.5rem, calc(var(--fs-1)*1), 1.5rem); margin-inline: 1dvw;}
    #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
}

/* max-width: 55rem =  880px */
 @media screen and (45rem <= width <= 55rem){
   #menu button{max-width: 20%; height:10%; font-size: clamp(0.3rem, calc(var(--fs-1)*0.5), 0.8rem);}
   #heading{height: 18dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-2)*1), 4rem); margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(0.3rem, calc(var(--fs-1)*0.6), 1rem); }
   section .number{font-size: clamp(0.3rem, calc(var(--fs-1)*0.6), 1rem);}
   #number{font-size: clamp(0.3rem, calc(var(--fs-1)*0.6), 1rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.3rem, calc(var(--fs-1)*0.5), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: clamp(0.3rem, calc(var(--fs-1)*0.9), 1rem); margin-inline: 1dvw;}
   .lw-box .gallery-item:not(.city, .distr)::before{font-size: clamp(0.3rem, calc(var(--fs-1)*0.7), 1rem);}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
 }

/* max-width: 45rem =  720px */
 @media screen and (35rem <= width <= 45rem){
   #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*.91), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.9), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1.4); margin-inline: 1dvw;}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
 }

/* max-width: 35rem =  560px */
 @media screen and (25rem <= width <= 35rem){
     #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*.91), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.9), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1.4); margin-inline: 1dvw;}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
 }

/* max-width: 25rem =  400px */
 @media screen and (20rem <= width <= 25rem){
  #menu button{max-width: 12%; height: 5%; font-size: clamp(1rem, calc(var(--fs-2)*1), 3rem);}
   #heading{height: 15dvh;}
   header h1{font-size:  clamp(1rem, calc(var(--fs-4)*.91), 5rem);; margin-top: 3%; margin-left: 10dvw; width: 60dvw;}
   section #enlarge div{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   section .number{font-size: clamp(1rem, calc(var(--fs-1)*1), 1.5rem);}
   #number{font-size: clamp(1rem, calc(var(--fs-1)*1), 2rem); }
   .lw-box{grid-template-columns: repeat(4, 1fr); gap: 0.2dvw;}
   .gallery-item img{width: 20dvw; aspect-ratio: 1 / 1; object-fit: fill;}
   .gallery-item p{font-size: clamp(0.5rem, calc(var(--fs-1)*0.9), 1rem); width: 20dvw; height: auto;}
   .lw-box .distr p, .lw-box .city p{width: 16dvw; font-size: calc(var(--fs-1)*1.4); margin-inline: 1dvw;}
   #lw-screen .lw-image img{width: 40dvw; max-width: 100%; height: auto;}
    #lw-screen {width: 60%; height: 60%;  top: 20%; left: 30%; }
    .lw-close {position: absolute; bottom: 5%; right: 10%;}
 }

