/*
Student Name: Samuel Reeder
File Name: styles.css
Date: 11/10/2025
*/

/* CSS Reset */
/*-------------------------------------------------------*/
*, *::before, *::after {
    box-sizing: border-box;
}
body, img, h1, h2, h3, p, ul, li, a {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Prevent page content from shifting when scrollbar appears */
html {
    overflow-y: scroll;
}

/* General text styling */
/*-------------------------------------------------------*/

html, body {
    height: 100%; /* html and body fill viewport */
}

body {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    background-color: #333;
    color: #ebe8e8;
    line-height: 1.6;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h2 {
    margin-top: 10px;
    margin-bottom: 10px;
}

/* About me box on homepage */
.aboutme {
    line-height: 1.6rem;
    display: inline-block;
    border: 2px solid #759FBC;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    max-width: 800px;
    margin: 16px auto;
}

#mytravelsparagraph{
    color: rgb(159, 209, 209);
}

#mytravelslink {
    font-size: 18px;
    color: #759FBC;
    text-decoration: none;
}

#mytravelslink:hover {
    text-decoration: underline;
}


.p-group {
  margin-bottom: 1.5rem;  /* gap after each group of two <p> elements */
}

/* Header / top banner */
/*-------------------------------------------------------*/
.topbanner {
    background-color: #184f6d;
    width: 80%;
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.profileimage {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #759FBC;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
    object-fit: cover;
}

.profileimage:hover {
    border-color: rgba(161, 200, 228, 0.9);
}

h1 {
    color: #f5fcff;
    font-size: 2.5rem;
    margin: 10px 0;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.tagline {
    color: #c0e4ff;
    font-style: italic;
    font-size: 1.1875rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Navigation */
/*-------------------------------------------------------*/
nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 26px;
    margin: 20px 0;
    flex-wrap: wrap; /* If all the items don’t fit in one row, move extra items down to the next line. */
}

nav a {
    color: #759FBC;
    text-decoration: none;
    font-size: 1.375rem;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

nav a.activelink {
    text-decoration: underline;
    font-size: 1.5rem;
}


/* Main content */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;   /* centers the content */
    flex: 1;
}

/* My Travels page map and overlays*/
/*-------------------------------------------------------*/
#redcircle{
    color: red;
}

.usmap {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
}

.overlay-backdrop {
    position: fixed; /* keep backdrop fixed when scrolling through state-overlay */
    top: 0;       /* make sure backdrop doesn't shrink to the size of the current state-overlay */
    left: 0;      /* ^ */
    width: 100%;  /* ^ */
    height: 100%; /* ^ */
    background-color: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999; /* arbitrary number, just to keep overlays on top of My Travels page*/
}

.hidden { 
    display: none; 
}

.state-overlay {
    background-color: #184f6d;
    color: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0,0,0, 0.8);
    text-align: center;
}

.state-overlay img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 8px;
    margin: 10px 0 2px;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

/* Text styling for h3 headings inside state overlays */
.state-overlay h3{
    font-size: 1.9rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    margin-bottom: 0.5rem;
}

/* Small italic caption directly under each photo */
.state-overlay p.photo-caption {
    font-size: 0.9rem;
    font-style: italic;
    margin: 0.1rem 0 0.2rem;
    color: #e2f3ff; 
}

/* Text styling for paragraphs inside state overlays */
.state-overlay p.photo-description {
    width: fit-content;
    max-width: 800px;
    background-color: #333;
    border-radius: 8px;
    padding: 15px; 
    font-size: 1.375rem;
    line-height: 1.5;
    margin: 0.6rem auto 6rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
}

.close-overlay-button {
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: bold;
    background: #759FBC;
    color: #000000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Clips page */
/*--------------------------------------------------------*/
.clips-section { 
    margin-top: 3rem;
    margin-bottom: 0.5rem;
}

.video-grid {
    display: grid;
    gap: 2rem 3rem;           
    margin: 1.5rem auto 0;    
    max-width: 1400px; 
    padding: 0 20px;

    /* flexible number of columns for videos, centered */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    justify-items: center;
    justify-content: center;   
}

/* Creates black boxes before the embedded video loads in for smoother appearance */
.video-absence {
  background-color: #000;  
  aspect-ratio: 16 / 9;
}

.video-absence iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}


/* Keep consistent sizing for videos */
.video-grid iframe {
    width: 600px;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    box-shadow: 0 0 15px rgba(0,0,0,0.6);
    border: 1px solid rgba(117, 159, 188, 0.3)
}

.video-grid iframe:hover {
    border-color: rgba(117, 159, 188, 0.9);
    box-shadow: 0 0 18px rgba(117, 159, 188, 0.75);
}


/* Contact form */
/*-------------------------------------------------------*/
#contact-form {
    max-width: 500px;
    margin: 2rem auto;
    border: 2px solid #759FBC;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
}

#contact-form label {
    font-weight: bold;
}

#contact-form input,
#contact-form textarea {
    padding: 0.6rem;
    border-radius: 6px;
    border: 1px solid #759FBC;
    background: #444;
    color: #fff;
}

#contact-form button {
    margin: auto;
    padding: 0.6rem 1.5rem;
    background: #759FBC;
    font-size: 16px;
    font-weight: bold;
    color: #000000;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Feedback message after submitting contact form */
#form-status {
    margin-top: 1rem;
    font-weight: bold;
}

/* Footer                                                 */
footer {
    background-color: #184f6d;
    color: #fff;
    width: 80%;
    max-width: 1100px;
    margin: 2rem auto 1.5rem auto;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    font-size: 0.9rem;
}

/* RESPONSIVE DESIGN */
/*-------------------------------------------------------*/
/* Tablet media queries */
@media (max-width: 900px) {
    .topbanner {
        width: 90%;
    }
    
    nav ul {
        flex-direction: column;
        gap: 15px;
    }
    
    /* 2 columns video grid on tablet */
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile media queries */
@media (max-width: 600px) {
    .profileimage {
        width: 120px;
        height: 120px;
    }
    
    h1 { 
        font-size: 2em; 
    }
    
    /* 1 video grid column on phones */
    .video-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin: 3rem 0;
    }
    
    .aboutme {
        padding: 15px;
    }

/* Mobile text style rules for descriptions in state overlays  */
    .state-overlay p.photo-description {
        font-size: 18px;
        line-height: 1.5;
        margin: 0.6rem 0 0.6rem;
}
}