/*IST239-W01 Datum and JavaScript
    Final Project, 12/1/2024 - 12/6/2024
    Author: Indy Hinton */

/* General Styles */

/* Ensures consistent box model calculations for all elements */

*, *::before, *::after {
    box-sizing: border-box;
}

/* Resets default margin and padding for the body, and sets line height for readability */

body {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Header Layout */

/* Styles the header with a background color, image, padding, and text shadow */

div.header {
    background-color: rgba(90, 136, 149, 0.84);
    background-image: url(flat-linear-pattern.jpg);
    width: 100%;
    padding: 10px;
    text-align: center;
    text-shadow: gray 4px 6px 5px;
}

/* Styles the header image with grayscale and shadow effects */

div.headerImage {
    display: inline-flex;
    margin: 0;
    padding: 0;
    filter: grayscale(90%);
    box-shadow: gray 4px 6px 5px; 
    transition: 0.5s all ease-in-out;
}

/* Enlarges the header image on hover for emphasis */

div.headerImage:hover {
    transform: scale(1.2);
}

/* Styles for the text section of the header */

div.headerText {
    display: inline-block;
    width: 60%;
    vertical-align: top;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    text-shadow: gray 4px 6px 5px;
}

/* Nav Layout */

/* Styles the navigation bar with a background color and borders */

nav {
    background-color: rgba(90, 136, 149, 0.84);
    padding: 10px 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    border-top: solid rgba(188,188,178,255);
    border-bottom: solid rgba(188,188,178,255);
}

/* Project Portfolio Style */

/* Styles the header of the project portfolio section */

.portfolio-header {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: rgba(49, 77, 85, 0.84);
    background-color: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(90, 136, 149, 0.8);
    border-radius: 10px;
    text-align: center;
    margin: 20px auto;
    padding: 10px;
}

/* Adds spacing below the heading */

.portfolio-header h2 {
    margin-bottom: 10px;
}

/* Removes margin for portfolio paragraph */

.portfolio-header p {
    margin: 0;
}

/* Styles the project group as hidden by default */

.project-group {
    max-height: 0;
    overflow: hidden;
    margin: 0;
    margin-left: 0;
    padding: 0;
    list-style: none;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* Expands the project group when active */

.project-group.expanded {
    max-height: 500px;
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background-color: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(90, 136, 149, 0.8);
    border-radius: 10px; 
    transition: opacity 0.3s ease, visibility 0.3s ease;  
}

/* Styles links inside the project group */

.project-group li a {
    color: rgba(90, 136, 149, 0.84);
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

/* Changes link color and underline on hover */

.project-group li a:hover {
    color: rgba(49, 77, 85, 0.84);
    text-decoration: underline;
}

/* Hidden description for project links */

.project-description {
    display: none;
    font-size: 0.9rem;
    color: rgba(49, 77, 85, 0.8);
    margin-top: 5px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* Shows description on hover */

.project-link:hover + .project-description {
    display: block;
    opacity: 1;
}

/* Styles toggle buttons for project groups */

.toggle-group {
    cursor: pointer;
    background-color: rgba(90, 136, 149, 0.84);
    color: white;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1.10em;
    display: block;
    border: none;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
}

/* Changes button color on hover */

.toggle-group:hover {
    background-color: rgba(49, 77, 85, 0.84);
}

/* Adds '+' or '-' to the toggle button */

.toggle-group::after {
    content: "+";
    font-weight: bold;
    margin-left: 10px;
}

.toggle-group.expanded::after {
    content: "-";
}

/* Ordered List Styles */

/* Removes default list styling */

ol {
    list-style: none;
}

/* Unordered List Styles */

/* Ensures the list is visually consistent */

ul {
    margin: 0;
    padding: 0;
    text-align: center;
    list-style-type: none;
    overflow: hidden;
}

/* Navigation List Item Styles */

/* Ensures navigation items are displayed inline */

nav ul li {
    display:inline-block;
}

/* Navigation Links Styles */

/* Styles navigation links */

nav ul li a {
    display: block;
    color: white;
    font-size: 20px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    text-decoration: none;
}

/* Row Layout */

/* Defines the layout for rows */

div.row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

/* Column Layout */

/* General column styling */

div.column {
    float: left;
    padding: 10px;
}

/* Side Column Layout */

/* Styles side columns with a specific width */

div.column.side {
    width: 25%;
}

/* Left Column Layout */

/* Adds a background pattern to the left column */

#leftColumn {
    background-image: url(flat-linear-pattern.jpg);
}

/* Article Styles */

/* General article styling */

article {
    margin-top: 10px;
    background-color: #ffffff;
    border: 2px solid rgba(90, 136, 149, 0.905);
    border-radius: 10px;
    text-align: center;
    opacity: 0.7;
}

/* Article Heading Styles */

/* Styles headings inside articles */

article h2 {
    color:rgba(90, 136, 149, 0.84);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* Article List Items */

/* Styles list items within articles */

article ol li {
    list-style-type: none;
    font-family:Verdana, Geneva, Tahoma, sans-serif;
    text-decoration: none;
    padding: 5px;
}

/* Submenu Styles */

/* Styles submenus within articles */

p.submenu {
    display: none;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    padding: 5px;
    word-wrap: normal;
}

/* Submenu Hover */

/* Displays submenu when its parent is hovered */

article ol li:hover > .submenu {
    display: block;
}

/* Ensures submenu stays visible when hovered */

p.submenu:hover {
    display: block;
}

/* Article Links */

/* Styles links inside articles */

article a:link {
    text-decoration: none;
    color: rgba(49, 77, 85, 0.84);
}

/* Visited Links */

/* Ensures visited links match the original style */

article a:visited {
    color: rgba(49, 77, 85, 0.84);
}

/* Hover Links */

/* Adds hover effects to links */

article a:hover {
    opacity: 0.9;
}

/* Active Links */

/* Styles active links */

article a:active {
    color:rgba(49, 77, 85, 0.84);
    background-color: rgba(188,188,178,255);
}

/* Static Blog Layout */

/* Styles the blog feature section */

#blogFeature {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background-color: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(90, 136, 149, 0.8);
    border-radius: 10px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}


/* Blog Header Styles */

/* Styles the blog heading */

#blogFeature h2 {
    color: rgba(90, 136, 149, 0.8);
    text-align: center; 
    margin-bottom: 10px; 
}

/* Blog Post Styles */

/* General styling for blog posts */

.blog-post {
    margin: 20px auto;
    padding: 10px;
    border: 1px solid rgba(90, 136, 149, 0.8);
    border-radius: 5px;
    background-color: white;
    text-align: left;
    max-width: 800px;
}

/* Blog Post Heading */

/* Styles the heading of each blog post */
.blog-post h3 {
    margin-bottom: 5px;
    color: rgba(49, 77, 85, 0.84);
}

/* Blog Post Date */

/* Styles the date of each blog post */

.blog-post .blog-date {
    font-size: 0.9rem;
    color: gray;
    margin-bottom: 10px;
}

/* Blog Post Content */


/* Styles the content of each blog post */

.blog-post .blog-content {
    font-size: 1rem;
    line-height: 1.5;
}



/* Right Column Layout */

/* Adds a background pattern to the right column */

#rightColumn {
    background-image: url(flat-linear-pattern.jpg);
}

/* Feedback and Details Form Styles */

/* Shared styles for the feedback and details forms */

.feedback-form, .details-form {
    margin-top: 20px;
    background-color: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(90, 136, 149, 0.8);
    border-radius: 10px;
    padding: 20px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.feedback-form legend, .details-form legend {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feedback-form .formRow, .details-form .formRow {
    margin-bottom: 15px;
}

/* Feedback Form Labels */

/* Ensures labels in the feedback and details forms are styled consistently */

.feedback-form label, .details-form label {
    display: block;
    margin-bottom: 5px;
    color: rgba(49, 77, 85, 0.8);
}

/* Input and Textarea Styles */

/* Shared styles for input fields, select dropdowns, and textareas */

.feedback-form input, .details-form input,
.feedback-form select, .details-form select,
.feedback-form textarea, .details-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(90, 136, 149, 0.8);
    border-radius: 5px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

/* Submit and Reset Buttons */

/* Shared styles for submit and reset buttons */

.feedback-form input[type="submit"], .details-form input[type="submit"],
.feedback-form input[type="reset"], .details-form input[type="reset"] {
    background-color: rgba(90, 136, 149, 0.84);
    color: white;
    border: none;
    cursor: pointer;
    width: auto;
    padding: 10px 20px;
    border-radius: 5px;
}

/* Hover Effects for Buttons */

/* Adds hover effects to buttons */

.feedback-form input[type="submit"]:hover, .details-form input[type="submit"]:hover,
.feedback-form input[type="reset"]:hover, .details-form input[type="reset"]:hover {
    background-color: rgba(49, 77, 85, 0.84);
}

/* Checkbox and Label Styles */

/* Ensures checkboxes and their labels are horizontally aligned */

.formRow label {
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
    font-family: Verdana, Geneva, Tahoma, sans-serif; 
    font-size: 1rem;
    background: none;
    border: none; 
    padding: 0; 
    margin: 0; 
}

/* Checkbox Styles */

/* Customizes the appearance of checkboxes */

.formRow input[type="checkbox"] {
    width: auto; 
    height: auto; 
    margin: 0; 
    vertical-align: middle; 
    box-shadow: none; 
}

/* Legend Styles */

/* Styles the legend for form sections */

legend {
    background-color: rgba(90, 136, 149, 0.84);
    color:#ffffff;
    border: 2px solid rgba(188,188,178,255);
    border-radius: 10px;
    padding: 5px;
    text-align: center;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 1.20em;
}

/* Input Focus Styles */

/* Adds a highlight effect when an input is focused */

input:focus, select:focus, textarea:focus {
    background-color: rgba(188,188,178,255);
} 

/* Reset Button */

/* Styles reset buttons specifically */

input[type='reset'] {
    background-color: rgba(90, 136, 149, 0.84);
    color: #ffffff;
    border: 1px solid rgba(49, 77, 85, 0.84);
    border-radius: 5px;
    width: 25%;
    padding: 5px 5px;
    cursor: pointer;    
}

/* Select Dropdown Styles */

/* Styles select dropdown fields */

select {
    color: rgba(49, 77, 85, 0.84);
    border: 1px solid rgba(49, 77, 85, 0.84);
    border-radius: 5px;
    padding: 5px;
    margin: 5px;
}

/* Option Styles */

/* Styles individual options within dropdowns */

option {
    color: rgba(49, 77, 85, 0.84);
    font-weight: normal;
    display: block;
    min-height: 1.2em;
    padding: 0px 2px 1px;
    white-space: nowrap;
}

/* Range Container Styles */

/* Styles the container for range inputs */

.range-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
}

/* Range Label Styles */

/* Styles labels for range inputs */

.range-label {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 14px;
    margin: 0 5px;
}

/* Range Input Styles */

/* Styles the range input */

input[type="range"] {
    flex-grow: 1;
    margin: 0 10px;
}

/* Textarea Styles */

/* Styles textarea fields */
textarea {
    font-family: Verdana, Geneva, Tahoma, sans-serif; 
    width: 100%; 
    height: 80px; 
    margin-top: 5px; 
    border: 1px solid rgba(49, 77, 85, 0.84); 
    border-radius: 10px; 
}

/* Interactive Graphic */

/* Styles the interactive graphic section */

#graphicFeature {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background-color: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(90, 136, 149, 0.8);
    border-radius: 10px;
}

/* Canvas Styles */

/* Ensures the canvas for the chart is responsive */

canvas {
    max-width: 100%;
    height: auto;
}

/* Interactive Game */

/* Styles the interactive game section */

#gameFeature {
    text-align: center;
    margin: 20px auto;
    padding: 10px;
    background-color: rgba(240, 240, 240, 0.8);
    border: 2px solid rgba(90, 136, 149, 0.8);
    border-radius: 10px;
}

/* Game Area */

/* Styles the container for game content */

#gameArea {
    margin-top: 20px;
}

/* Game Area Buttons */

/* Shared styles for buttons in the game area */

#gameArea button {
    display: block;
    margin: 10px auto;
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: rgba(90, 136, 149, 0.84);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}


/* Hover Effect for Game Buttons */

/* Darkens the button color on hover */

#gameArea button:hover {
    background-color: rgba(49, 77, 85, 0.84);
}

/* Start Game Button */

/* Specific styles for the start game button */

#startGame {
    display: inline-block;
    margin: 20px auto; 
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: rgba(90, 136, 149, 0.84);
    color: white;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

/* Hover Effect for Start Game Button */

/* Darkens the button color on hover */

#startGame:hover {
    background-color: rgba(49, 77, 85, 0.84);
}

/* Middle Column Layout */

div.column.middle {
    width: 50%;
    border-left: solid rgba(188,188,178,255);
    border-right: solid rgba(188,188,178,255);
}

/* Styles for headings in the middle column */

#middleColumn h2 {
    color:rgba(90, 136, 149, 0.84);
    font-family: Verdana, Geneva, Tahoma, sans-serif; 
    padding-top: 5px;
}

/* Middle Column Paragraphs */

/* Styles for paragraphs in the middle column */

#middleColumn p {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    padding: 5px;
    word-wrap: normal;
}

/* Row layout */

/* Ensures row layout is properly cleared */

div.row:after {
    content: "";
    display: table;
    clear: both;
}

/* Footer Layout */

/* Styles for the footer */

footer {
    background-color: rgba(90, 136, 149, 0.84);
    color: white;
    text-align: center;
    padding: 10px 0;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    border-top: solid rgba(188,188,178,255);
    border-bottom: solid rgba(188,188,178,255);
}

/* Footer Span Text */

/* Styles for bold text in the footer */

footer span {
    font-weight: bold;
}

/* Back to Top Button */

/* Styles for the back-to-top button */

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(90, 136, 149, 0.84);
    color: white;
    border: solid 2px rgba(0, 0, 0, 0.2);
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Back to Top Button - Visible */

/* Shows the button when certain conditions are met */

#backToTop.show {
    opacity: 1;
    visibility: visible; 
}

/* Hover Effect for Back to Top Button */

/* Enlarges and darkens the button on hover */

#backToTop:hover {
    background-color: rgba(49, 77, 85, 0.84);
    transform: scale(1.1);
}

/* Responsive Layout */

/* Styles for smaller screen sizes */

@media (max-width: 800px) {
    .header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .headerImage {
        margin-right: 0;
    }

    nav.horizontal ul {
        flex-direction: column;
        align-items: center;
    }

    .column.middle {
        border-top: solid rgba(188,188,178,255);
        border-bottom: solid rgba(188,188,178,255);
    }

    .column {
        flex-basis: 100%;
    }

    h2,
    p,
    th,
    td {
        text-align: center;
        padding: 4px;
        font-size: 1rem;
        word-wrap: break-word;
    }

    img,
    iframe {
        max-width: 100%;
        height: auto;
    }

    .formRow input[type="text"],
    .formRow input[type="email"],
    .formRow input[type="tel"],
    .formRow select,
    .formRow textarea {
        width: 100%;
    }
}