body{
    font-family: "Titillium Web", sans-serif;
}

body, header, nav, main, footer, h1, div, img, ul, figure, figcaption, section, article, aside, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
}

img, video { 
    max-width: 100%;
    display: block;
}

* {box-sizing: border-box;}

h1{
    text-align: center;
}

header img {margin: 0 auto;
    width: 220px;}

#welcome{
    font-family: "Libre Baskerville", serif;
    font-style: italic;
    color:#d1c3dc;
    text-align: center;
    margin-top: -1em;
}
nav li a:link{color: #d9a755;}
nav li a:visited{color: #d9a755;}


nav #home:hover{background-color: crimson;}
nav #about:hover{background-color:forestgreen;}
nav #gallery:hover{background-color:dodgerblue;}
nav #contact:hover{background-color:blueviolet;}

/* Style rules for hamburger menu */
.mobile-nav a {
    color: black;
    text-align: center;  
    font-size: 2em;
    text-decoration: none;
    padding: 3%;
    display: block;
    font-family: "Libre Baskerville", serif;
}

.mobile-nav a:hover{
    background-color:coral;
    color: white;
}

.mobile-nav a.menu-icon {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
}

/* Show mobile class, hide tablet-desktop class and menu-links id */
.mobile {
    display: block;
}

.tablet-desktop, #menu-links {
    display: none;
}

/* Slider start */
.slider{
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color:#d1c3dc;
    position: relative;
}
.slides{
    width: 200%;
    height: 200px;
    display:flex;
    transition: all 0.5 ease-in-out;
}

.slide{
    width: 50%;
    transition: 2s;
    position: relative;
}

.slide img{
    height: 200px;
    display: block;
}

input[name="rbutton"] {display: none;}

#radio1:checked ~ .slide{transform: translateX(13%);}
#radio2:checked ~ .slide{transform: translateX(-80%);}

.message1 {
    position: absolute;
    transform: translate(50%, 40%);
    color: white;
    font-size: 1.5rem;
    text-shadow: 4px 2px 4px black;
    z-index: 1;
    text-align: center;
    float:left;
}

.message2 {
    position: absolute; 
    right: 0;
    transform: translate(-50%, 40%);
    color: white;
    font-size: 1.5rem;
    text-shadow: 4px 2px 4px black;
    z-index: 1;
    text-align: center;
    float: right;
}

/* Slider end */

main{
    font-size: 1em;
}

.aboutContent, .gallerySection, .contactSection{
    font-size: 150%;
    margin: 4%;
    text-align: center;
}

.aboveContent img, .gallerySection img, .contactSection img{
    border-radius: 10%;
    justify-self: center;
}

.categoryImg{
    width: 40%;
    transition-duration: 2s;
    box-shadow: 0px 0px 10px 10px rgba(0, 0, 0, 0.685);
    margin-left: auto;
    margin-right: auto;
}

.categoryImg:hover{
    transform: scale(1.15,1.15);
    box-shadow: 0px 0px 10px 10px rgba(66, 240, 23, 0.685);
}

.contentImg{
    width: 100%;
}

#mediaSection{
    background-color: #d1c3dc;
    padding-top: 2em;
}

#mediaSection h1{
    font-size: 1.6em;
    padding-left: 2%;
    padding-right: 2%;
}

.educate{
    padding: 2em;
    background-color:#d1c3dc;
}

#dialogue{font-size: 20px;}

.adoptables h1{
    padding: 2%;
}

.aboutPage{
    grid-area: aboutP;
    align-self: center; 
}
.aboutDesc{
    grid-area: aboutD;
}
.aboutImg{
    grid-area: aboutI;
    align-self: center;
}
.shelterVid{
    grid-area: shelterV;
}
#audioInfo{
    grid-area: audioI;
    justify-self: center; 
    align-self: end;
    padding: 2%;
}
.audioCap{
    grid-area: audioC;
}
.galleryImage{
    grid-area: galleryI;
    align-self: center;
}
.galleryDesc{
    grid-area: galleryD;
}
.galleryPage{
    grid-area: galleryP;
    align-self: center;
}
.contactPage{
    grid-area: contactP;
    align-self: center;
}
.contactDesc{
    grid-area: contactD;
}
.contactImg{
    grid-area: contactI;
    align-self: center;
}

.adoptables{
    background-color:#d9a755;
    color: white;
    padding: 2%;
}

.frame {
    position: relative;
    max-width: 450px;
    margin: 2% auto;
    align-self: center;
}

.frame img{
    border-radius: 20px;
}
.pic-text {
    display: none;
    position:relative;
    bottom: 0;
    background-color: #000;
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 2%;
}

.frame img:hover{
    border-radius: 20px 20px 0 0;
}

.frame:hover figcaption{
    display: block;
    font-size: 2em;
    border-radius: 0 0 20px 20px;
}

footer{
    background-color:#d1c3dc;
    text-align: center;
    padding: 1.5em;
    color: black;
    padding-bottom: 0.5em;
}

/* Style rules for form elements */
fieldset, input  {margin-bottom: 2%;}

.homeFooter input[type="email"] {
    text-align: center;
    height: 3em;
    width: 80%;
}

#rowsocial{
    margin-bottom: 50%;
}

.form {
    padding: 2%;
}

.form h2 {
    text-align: center;
}

fieldset, legend {
    font-weight: bold;
    font-size: 1.25em;
}

fieldset, input, select, textarea  { 
    margin-bottom: 2%;
}

label {
    display: block;
    padding-top: 3%;
}

form #submit, #seemore, #readbtn, #subscribe, #contactContent #submit {
    margin: 0 auto;
    border: none;
    display: block;
    padding: 2%;
    background-color:#d9a755;
    font-size: 1.5em;
    border-radius: 2em;
}

#seemore{
    background-color:#d1c3dc;
    margin-top: 2%;
    width: 80%;
    font-size: 2em;
    padding: 1%;
}

#seemore:hover{
    background-color:#a46ccf;
    color: white;
}

#readbtn{
    padding: 4%;
}

#readbtn:hover, #subscribe:hover{
    color: white;
}

form #submit:active, #contactContent #submit:active{
    background-color: #3e8e41;
    box-shadow: 0 5px #666;
    transform: translateY(4px);
}

#footerLinks{
    margin-top: 1%;
}

#footerLinks a:link{
    color: black;
    font-weight: bolder;
    text-decoration: none;
    font-size: 2em;
    margin-right: 1em;
}

#footerLinks a:visited{
    color: black;
}

#footerLinks a:hover{
    color: white;
}

/* About section */
#aboutcontainer{
    text-align: center;
}

h1, caption, #seemore, #subscribe, #readbtn{
    font-family: "Libre Baskerville", serif;
}

#aboutbanner{
    width: 100%;
    border-radius: 0%;
}

#aboutSection p{
    padding-left: 5%;
    padding-right: 5%;
}

#azia{
    background-color: #d1c3dc;
    padding: 2%;
}

.tableInfo{
    padding-bottom: 4%;
}

#shelterInfo{
    background-color: #d9a755;
    padding: 2%;
}

.images:hover{
    animation: shake 0.5s;
    animation-iteration-count: infinite 
}

#Other-Information-About-Animal-Shelters{
    background-color: #d1c3dc;
    padding: 2%;
}

@keyframes shake {
    0% {transform: translate(1px,1px)rotate(0deg);}
    10% {transform: translate(-1px,-2px)rotate(-1deg);}
    20% {transform: translate(-3px,0px)rotate(5deg);}
    30% {transform: translate(3px,2px)rotate(0deg);}
}

.fa {
    padding: 25px;
    width: 2em;
    text-align: center;
    text-decoration: none;
    margin: 10px 8px;
    border-radius: 75%;
}
  
  .fa:hover {
      opacity: 0.7;
}
  
  .fa-facebook {
    background: #3B5998;
    color: white;
}
  .fa-twitter {
    background: #55ACEE;
    color: white;
}
  
  .fa-youtube {
    background: #bb0000;
    color: white;
}
  
  .fa-instagram {
    background: #125688;
    color: white;
}

table {
    border: 1px solid #000;
    border-collapse: collapse;
    margin: 0 auto;
    width: 80%;
}

caption {
    font-size: 1.5em;
    font-weight: bold;
    padding: 1%;
}

th, td {
    border: 1px solid #000;
    padding: 2%;
}

th {
    background-color: #000;
    color: #fff;
    font-size: 1.15em;
}

tr:nth-child(even) {
    background-color:#d9a755
}

tr:nth-child(odd) {
    background-color:#d1c3dc;
}

/* gallery section */
.galleryContent{
    background-color: #d1c3dc;
    margin-bottom: -60px;
    border-bottom: #d1c3dc solid 10px;
}

#contactContent{
    margin-bottom: -40px;
    border-bottom:#d9a755 solid 5px;
}

#galleryBanner, #contactBanner{
    width: 100%;
}

.galleryContent .header {
    text-align: center;
    padding: 30px;
    background-color: #d9a755;
    color: white;
}
.galleryContent h1 {
    font-family: "Libre Baskerville", serif;
    font-size: 2.5em;
    margin: 0;
}
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.gallery-item img {
    width: 100%;
    height: 300px; /* Consistent height for all images */
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-item figcaption {
    position: absolute;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 1em;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-item:hover figcaption {
    opacity: 1;
}

/* Contact section */
#cBanner{
    background-color:#d9a755;

}

#contactContent{
    background-color: #d1c3dc;
    border-bottom: #d1c3dc solid 10px;
}

#contactForm{
    border:#d9a655b6 solid 5px;
    background-color: white;
    width: 80%;
    justify-self: center;
    margin-bottom: 2%;
}

#contactContent input, #contactContent textarea {
    width: 80%;
    font-size: 1em;
    background-color: rgba(241, 241, 241, 0.863);
}

#contactContent input{
    height: 3em;
    margin-bottom: -20px;
    text-align: center;
}

#contactContent textarea{
    font-size: 1.5em;
    font-family: "Titillium Web";
}

#contactContent textarea::placeholder{
    text-align: center;
    font-size: 0.8em;
}

#contactContent label{
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 2%;
}

#contactContent #submit{
    margin-bottom: 2em;
    width: 60%;
}

@media screen and (min-width: 450px), print {
    #radio1:checked ~ .slide{transform: translateX(20%);}
    #radio2:checked ~ .slide{transform: translateX(-75%);}
}

@media screen and (min-width: 600px), print {
    #radio1:checked ~ .slide{transform: translateX(30%);}
    #radio2:checked ~ .slide{transform: translateX(-70%);}
}

/* Media Query for Tablet Viewport */
@media screen and (min-width: 770px), print {
    
    /* Tablet Viewport: Show tablet-desktop class, hide mobile class */
    .tablet-desktop {display: block;}

    .mobile-nav {display: none;}

    #welcome{
        margin: 1%;
    }
    
    /* Tablet Viewport: Style rules for nav area */
    nav {padding: 1%;}

    nav ul {
        list-style-type: none;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }
    
    nav li {
        font-family: "Libre Baskerville", serif;
        font-style: italic;
        display: inline-block;
        font-size: 1.2em;
        font-weight: bolder;
    }

    nav li a {
        padding: 0.5em 1em;
        display: block;
        text-decoration: none;
    }

    nav li a:hover {
        color: white;
        border-radius: 2em;
    }

    .slider{
        height: 300px;
    }
    .slides{
        width: 200%;
        height: 300px;
    }
    
    .slide img{
        height: 300px;
    }

    #radio1:checked ~ .slide{transform: translateX(30%);}
    #radio2:checked ~ .slide{transform: translateX(-70%);}

    .message1{
        font-size: 2em;
        transform: translate(90%, 50%);
    }
    
    .message2{
        font-size: 2em;
        transform: translate(-90%, 50%);
    }

    .categoryImg{
        width: 80%;
    }
    .aboutContent{
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas: 
            "aboutP aboutI"
            "aboutD aboutD"
        ;
        column-gap: 5%; 
    }
    
    .gallerySection{
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas: 
            "galleryI galleryP"
            "galleryD galleryD"
        ;
        column-gap: 5%;
    }
    
    .contactSection{
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas: 
            "contactP contactI"
            "contactD contactD"
        ;
        column-gap: 5%;
    }
    
    /* Tablet Viewport: Style rules for main content area */

    /* adopt section */
    .grid {
        display: grid;
        grid-template-columns: auto auto auto;
        grid-gap: 20px;
    }
    
    /* Hidden adopt content */
    .grid-content {
        grid-template-columns: auto auto auto;
        grid-gap: 20px;
    }

    form {
        width: auto;
    }

    #map{
        grid-area: googlemap;
    }

    #socials{
        grid-area: social;
    }

    #subscribeInfo{
        grid-area: subscribe
    }

    .homeFooter {
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas: 
            "googlemap social"
            "googlemap subscribe"
        ;
        grid-gap: 20px; 
    }

    #socials .fa {
        padding: 25px;
        width: 1.5em;
        text-align: center;
        text-decoration: none;
        margin: 10px 8px;
        border-radius: 75%;
      }

    /* about form */
    
    .form-grid {
        display: grid;
        grid-template-columns: auto auto auto;
        grid-gap: 20px; 
        margin-bottom: 2%;

    }
    input[type="text"]{
        display: inline-block;
    }

    .btn {
        grid-column: 1 / span 3;
    }

    .frame  {
        opacity: 0.9;
    }
    
    .frame:hover {
        opacity: 1;
    }

    .frame:hover figcaption{
        font-size: 1.5em;
    }
}

@media screen and (min-width: 1070px), print {
    header {
    float: left;
    padding-bottom: 0;
    margin-left: 2.5em;
    }

    /* Desktop Viewport: Style rules for nav area */
    nav {
    float: right;
    width: 75%;
    margin: 3.5em 0 0 0;
    }

    #welcome{
        align-self: center;
    }

    nav ul {
    text-align: center;
    margin-top: 60px;
    }

    nav li a{
        display: inline-block;
        padding: 0.5em 3em;
    }

    .slider{
        height: 500px;
    }
    .slides{
        height: 500px;
    }
    
    .slide img{
        height: 500px;
    }

    #radio1:checked ~ .slide{
        transform: translateX(30%);
    }
    #radio2:checked ~ .slide{
        transform: translateX(-65%);
    }

    .message1 {
        transform: translate(30%, 30%);
        font-size: 4rem;
    }
    
    .message2 {
        transform: translate(-30%, 30%);
        font-size: 4rem;
    }

    /* Desktop Viewport: Style Rules for main content */
    main {
        clear: left;
    }
    
    main h1 {
        font-size: 1.8em;
    }

    .categoryImg{
        width: 60%;
    }
    
    .aboutPage, .galleryPage, .contactPage{
        margin: 2%;
    }

    .aboutContent{
        grid-template-columns: auto auto;
        grid-template-areas: 
            "aboutP aboutI"
            "aboutD aboutI"
        ;
    }
    
    .educate{
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas: 
            "shelterV audioI"
            "shelterV audioC"
        ;
    }
    
    .gallerySection{
        grid-template-columns: auto auto;
        grid-template-areas: 
            "galleryI galleryP"
            "galleryI galleryD"
        ;
    }

    .frame:hover figcaption{
        font-size: 2em;
    }
    
    .contactSection{
        grid-template-columns: auto auto;
        grid-template-areas: 
            "contactP contactI"
            "contactD contactI"
        ;
    }
    
}

@media screen and (min-width: 1650px), print {
    #welcome{
        margin-top: -0.5em;
    }
}

@media screen and (min-width: 1700px), print {
    .message1 {
        transform: translate(100%, 30%);
        font-size: 4rem;
    }
    
    .message2 {
        transform: translate(-100%, 30%);
        font-size: 4rem;
    }
}