/* FONT */

@font-face {
    font-family: 'Tomatoes';
    src: url('../fonts/Tomatoes.woff') format('woff');
    font-weight: 200;
    font-style: normal;
}

* {
    box-sizing: border-box;
}

/* DARK MODE STYLES */

body.dark-mode {
    background-color: #1b2027;
    color: #ddecf4;
}

.dark-mode .flex-item {
    background-color: #1f2530;
}

.dark-mode .bordered-section {
    border-color: #444;
}

.dark-mode a {
    color: #dca7a7;
}

.dark-mode button {
    background-color: #501f1f;
    color: #ddecf4; 
}

.dark-mode .nav-menu {
    background-color: #1e1e1e;
}

.dark-mode .hamburger-menu .bar {
    background-color: #ddecf4;
}

.dark-mode table tbody tr:nth-child(odd) {
    background-color: #1e2029;
}

.dark-mode .contact-form {
    border: 1px solid #444;
    background-color: #1b2027;
}

.dark-mode .contact-form label {
    color: #ddecf4;
}

.dark-mode .contact-form input[type="text"],
.dark-mode .contact-form input[type="email"],
.dark-mode .contact-form input[type="tel"],
.dark-mode .contact-form textarea {
    background-color: #333;
    color: #ddecf4;
    border: 1px solid #444;
}

.dark-mode .contact-form input[type="submit"] {
    background-color: #501f1f; 
    color: #ddecf4;
}

.dark-mode .contact-form input[type="submit"]:hover {
    background-color: #662828; /* darker shade for hover */
}

/* OTHER DEFAULT TEXT SETTINGS */

body {
    background-color: #f1f4f6;
    font-family: 'Georgia', serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #182d42;
    text-align: left;
    margin: 0;
    padding: 20px;
}

h1 {
    font-family: 'Tomatoes', sans-serif;
    font-weight: 200;
    font-size: 60px;
    margin: 0;
    padding: 0;
}

h2 {
    font-family: 'Georgia', serif;
    font-weight: 300;
    font-size: 20px;
}

h3 {
    font-family: 'Tomatoes', sans-serif;
    font-weight: 200;
    font-size: 20px;
}

h4 {
    font-family: 'Tomatoes', serif;
    font-weight: 400;
    font-size: 20px;
    margin: 0;
}

p {
    font-family: 'Georgia', serif;
    font-weight: 400;
    font-size: 15px;
    margin: 0;
    padding: 0;
}

a {
    color: #22164a;
    text-decoration: underline;
}

#parkingErrorMessage, #petErrorMessage {
    color: rgb(144, 51, 51);
}


/* SITE LAYOUT */ 

.site-container {
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
}

.bordered-section {
    border: 1px solid #333; 
    border-radius: 8px;
}

.flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.flex-item {
    flex: 1 1 300px; /* grow, shrink, basis */
    padding: 20px;    
    margin: 10px;
    background-color: #eaeff2;
    box-sizing: border-box; /* include padding and border in width */
    max-width: 100%;   
}

footer {
    flex: 0 100%; /* Full width, no wrap */
    text-align: center;
}

/* NON-WRAP ITEMS */

#about, #contact, #playground-info, #puffins {
    flex: 0 100%; /* Full width, no wrap */
}


/* NAV BAR */

/* hamburger icon */
.hamburger-menu {
    position: relative;
    display: flex; /* always visible */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    z-index: 10; /* make sure it's on top */
    margin: 20px;
}

/* hamburger icon bars */
.hamburger-menu .bar {
    width: 100%;
    height: 4px;
    background-color: #333;
    margin: 3px 0;
    border-radius: 2px;
}

.nav-menu {
    display: none; /* hide the menu by default */
    position: absolute; /* position the menu */
    border: 1px solid #ddd; 
    background-color: #f1f4f6; 
    border-radius: 5px; /* rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* shadow */
    padding-right: 20px;
}

/* when active, show the menu */
.nav-menu.active {
    display: block;
}

/* styling for menu items */
nav ul {
    list-style: none;
    padding-left: 25px;
    margin: 0;
}
nav ul li {
    margin: 5px 0;
    padding: 0;
}
nav ul li a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
}


/* BUTTONS */

button {
    background-color: #2e5a7a;
    font-family: 'Georgia', serif;
    color: white; 
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    margin: 10px 0; /* add extra space between buttons */
}

#fetchTimeButton {
    margin-bottom: 20px;
}


/* TABLES */

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 15px;
    text-align: left;
    overflow-x: auto;
}

table, th, td {
    border: 1px solid #ddd;
    padding: 8px;
}

table tbody tr:nth-child(odd) {
    background-color: #e2eaee;
}

.carParkTable th, .carParkTable td {
    border: 1px solid #ddd;
    padding: 8px;
}

#carParkTable th {
    cursor: pointer;
    position: relative; /* needed to position the sort icon */
}

/* sort label for user interaction */
#carParkTable th::after {
    content: ' ⇅';
}


/* CONTACT FORM */ 

.contact-form {
    border: 1px solid #8e8e8e;
    padding: 20px;
    background-color: #f8f8f8;
    max-width: 400px;
    margin: 0 auto; /* center the form */
    border-radius: 4px;
    box-sizing: border-box;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}
/* submit button */
.contact-form input[type="submit"] {
    background-color: #2e5a7a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.contact-form input[type="submit"]:hover {
    background-color: #244969;
}


/* PICTURES */

img {
    max-width: 100%;
    height: auto;
}

.puffin-gallery {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
    height: 400px;
}

.puffin-gallery img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
}

#dogPic, #catPic {
    display: flex;
    max-width: 100%;
    height: auto;
    justify-content: center;
    align-items: center;
}


/* SMALL SCREENS */

@media (max-width: 860px) {

    .site-container {
        margin: 0px; /* remove margin around the container */
        padding: 10px;
        }

    .flex-container {
        flex-direction: column; /* stack items vertically */
        margin: 0; /* remove additional margin */
        padding: 0; /* remove padding to avoid unnecessary spacing */
        justify-content: center; /* center items in the flex container */
        align-items: center; /* center items in the flex container */
    }

    .flex-item {
        flex: 1 1 auto; /* allow items to adjust based on content size */
        padding: 12px; /* keep padding for spacing between border and content*/
        margin: 10px 0 0; /* add vertical margin for spacing between items */
        width: 100%; /* make sure items take full width */
        box-sizing: border-box; /* include padding and border in width */
        overflow-x: auto;
    }

    .puffin-gallery {
        height: 275px; 
    }
    
    button {
        margin: 10px 0; /* space between buttons */
    }

    h1 {
        font-size: 45px;
    }
    
}

@media (max-width: 400px) {
    
    h1 {
        font-size: 30px;
    }
}
