*,
*::before,
*::after{
  box-sizing:border-box;
  margin:0;
  padding:0;
}

body{
  font-family:'Raleway', sans-serif;
  background:url("https://www.cemeterycleaners.co.nz/bgtissue11.webp") repeat;
  line-height:1.5;
  color:#222;
}

/* HEADER */

header{
  position:sticky;
  top:0;
  z-index:1000;
  border: 0px solid red;
  background:#299B1B;
  box-shadow:0 2px 8px rgba(0,0,0,0.2);
}

nav{
font-family: 'Open Sans', sans-serif;
  max-width:1300px;
  margin:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  background-color:#299B1B;
}

nav ul{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:4px;
  list-style:none;
}

nav a{
  text-decoration:none;
  color:#fff;
  font-weight:700;
  padding:0px 10px;
  border-radius:6px;
  border:1px solid transparent;
  transition:
  background-color .3s ease,
    color .3s ease,
    border-color .3s ease;
}

nav a:hover{
  background-color:#eaeaea;
  color:#8d4254;
  border-color:#1c232c;
}	
/* MAIN */
main{
  max-width:1300px;
  margin:auto;
  padding:0px 5px;
}

h1{
  text-align:center;
  font-family:'Oswald', sans-serif;
  font-size:2rem;
  margin-bottom:15px;
}

.subtitle{
  text-align:center;
  margin-bottom:35px;
  font-size:20px;
  font-weight:600;
}
/* GALLERY GRID */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:20px;
}

.cool-link{
  position:relative;
  color:white;
  text-decoration:none;
  display:inline-block;
  transition:color .3s ease;
  border:0px solid red;
  }
  .cool-link::after{
    content:'';
    display:block;
    width:100%;
    height:3px;
    background:#1c232c;
    transform:scaleX(0);
    transform-origin:left;
    transition:transform .4s ease;
}
.cool-link:hover::after{
    transform:scaleX(1);
}
/* GALLERY CARD */
.gallery{
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 3px 10px rgba(0,0,0,0.15);
  transition:transform 0.3s ease;
}
.gallery:hover{
  transform:translateY(-4px);
}
.gallery img{
  width:100%;
  height:auto;
  display:block;
  transition:transform 0.4s ease;
}
.gallery img:hover{
  transform:scale(1.03);
}
.desc {
	font-family: "arial", "Helvetica", sans-serif;
	font-size:16px;
	font-weight:600;
	padding: 15px;
	text-align: center;
	margin:0 auto;
	width: 100%;
	color:#ffffff;
	background-color:#089c20;
	border: 3px solid gold;
	border-radius:8px;
	text-shadow: 1px 0 0 #333333;
	}
/* FOOTER */
footer{
  background:url("https://www.cemeterycleaners.co.nz/bgtissue2.webp");
  color:#111;
  text-align:center;
  font-size:17px;
  font-weight:700;
  padding:10px 15px;
   padding-bottom:25px;
  margin-top:8px;
}
footer a{
  color:#111;
  text-decoration:none;
}
footer a:hover{
  text-decoration:underline;
  color:navy;
}
.footer-text1{
  margin-top:5px;
  color:red;
  font-style:italic;
   font-size:18px;
  font-weight:700;
}
.email-link{
  margin-bottom:10px;
} 		
/* RESPONSIVE */
/* LARGE TABLET */
@media (max-width:1200px){
  .gallery-grid{
    grid-template-columns:repeat(3, 1fr);
  }
}

@media (max-width:900px){
  .gallery-grid{
    grid-template-columns:repeat(2, 1fr);
  }
}


.topnav{
    max-width:1200px;
    margin:auto;
    display:flex;
    align-items:center;
    padding:10px;
    background-color:#299B1B;
    position:relative;
}



	
/*==============================*/
/* MOBILE */
@media only screen and (max-width:640px){
    header{
        position:sticky;
        top:0;
        z-index:1000;
        border:0 solid red;
        background:#299B1B;
        box-shadow:0 2px 8px rgba(0,0,0,0.2);
    }
	 .gallery-grid{
    grid-template-columns:1fr;
  }
  
  .desc {
	margin:0 auto;
	max-width:300px;
	}
  
  .gallery img{
    max-width:300px;  
	display:block;
	margin: 0 auto;
	}

.gallery img:active{
transform:scale(1.03);}
}
