/* 
   Author: Rich Robichaud
   Course: ITWP 1050
   Project 3 - Photo Gallery Assignment
*/

/* setting up color variable so I can reuse it */
:root {
    --pageColor: #4a6741;
}

/* got this font from Google Fonts */
@font-face {
    font-family: 'headlineFont';
    src: url('webfonts/dancingscript-regular.ttf') format('truetype');
}

/* basic body styles */
body {
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
    margin: 2rem;
    padding: 0;
    box-sizing: border-box;
    background: url(images/background.jpg) no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
    color: #ffffff;
}

/* heading styles with the web font */
h1 {
    font-family: 'headlineFont', Georgia, serif;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
}

/* footer styles */
footer {
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    font-size: .85rem;
    margin: 60px 0;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 8px;
}

/* link styles */
a {
    text-decoration: underline;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* link styles when not clicked */
a:link {
    text-decoration: underline;
    color: #ffffff;
    font-weight: bold;
}

/* link styles after being visited */
a:visited {
    text-decoration: underline;
    color: #d8d8d8;
}

/* link styles when mouse is over */
a:hover {
    text-decoration: none;
    color: #e67e22;
    font-weight: bold;
}

/* link styles when clicked */
a:active {
    text-decoration: underline wavy #c0392b;
    font-weight: bold;
}

/* styles for the responsive text class */
.responsive-text {
    font-size: 3rem;
    line-height: 1.5;
    color: #ffffff;
}

/* paragraph text styles */
p.responsive-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #ffffff;
    text-align: justify;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    background-color: rgba(0, 0, 0, 0.25);
    padding: 20px;
    border-radius: 10px;
}

/* styles for the image captions */
.image-text {
    font-size: 1.1rem;
    text-align: center;
    margin-top: 15px;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    padding: 5px 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    display: inline-block;
}

/* this makes the text smaller on phones and tablets */
@media screen and (max-width: 600px) {
    .responsive-text {
        font-size: 1.8rem;
    }
    
    p.responsive-text {
        font-size: 1rem;
        padding: 15px;
    }
    
    body {
        margin: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
}

/* container for the intro text */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 25px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    margin-bottom: 40px;
}

/* grid layout for the gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* styles for the images */
.gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease-in-out;
    object-fit: cover;
    aspect-ratio: 4/5;
}

/* hover effect for images - makes them bigger */
.gallery img:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* centers the images and captions */
.gallery > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 15px;
}