:root {
    --primary-color: rgb(75, 80, 82);
    --secondary-color: rgb(249, 180, 7);
    --accent1-color: rgb(242, 116, 5);
    --accent2-color: rgb(242, 242, 242);
    --border-light: rgb(0 0 0 / 10%);
    --border-medium: rgb(0 0 0 / 50%);
    --border-accent1-medium: rgb(242 116 5 / 50%);
    --pure-black: rgb(0, 0, 0);
    --heading-font: "Times New Roman", "Georgia", serif;
    --body-font: Arial, Helvetica, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    color: var(--primary-color);
}

header,
main,
footer {
    width: 840px;
    margin: 0 auto;
}

h1,
h2 {
    text-align: center;
    font-family: var(--heading-font);
    color: var(--primary-color);
}

header {
    display: grid;
    grid-template-columns: 1fr 3fr;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--primary-color);
    margin-bottom: 10px;
}

header img {
    width: 100px;
    margin: 10px;
}

header nav ul {
    display: flex;
    list-style: none;
    justify-content: space-around;
}

header nav ul li {
    flex: 1 1 auto;
}

ul li a {
    text-decoration: none;
}

a:link,
a:visited {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
}

nav,
p,
section,
article {
    margin: 16px;
    padding: 8px;
}

.socialmedia a {
    text-decoration: none;
}

.hero {
    position: relative;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
}

.hero h1 {
    position: absolute;
    top: 20px;
    width: 100%;
    padding: 16px;
    text-align: center;
    opacity: 0.7;
    background-color: var(--accent1-color);
    color: var(--pure-black);
}

.hero article {
    position: absolute;
    bottom: 0px;
    background-color: var(--primary-color);
    opacity: 0.7;
    color: var(--accent2-color);
}

.hero article img {
    float: right;
    width: 125px;
    margin: 16px;
}

section h2 {
    background-color: var(--primary-color);
    text-align: center;
    color: var(--accent2-color);
    padding: 10px;
}

section p {
    color: var(--primary-color);
}

#history {
    display: grid;
    grid-template: 0.5fr 2fr / 2fr 1fr 2fr;
    align-items: center;
}

#history h2 {
    grid-area: 1 / 1 / 2 / 4;
}

#history img {
    width: 100%;
}

.gallery {
    display: flex;
}

.gallery figure {
    width: 20%;
    margin: 20px;
}

.gallery figcaption {
    font-size: .8rem;
    text-align: center;
}

.gallery figure img {
    width: 100%;
}

footer {
    border-top: 1px solid var(--secondary-color);
    display: grid;
    grid-template-columns: 1fr auto;
    justify-content: center;
    align-items: center;
}

footer p,
footer nav {
    margin: 5px 10px;
}

footer p {
    color: var(--primary-color);
    grid-column: 1 / 3;
    grid-row: 1;
    justify-self: center;
}

.socialmedia {
    grid-column: 2 / 3;
    grid-row: 1;
}

.socialmedia img {
    display: inline-block;
    width: 35px;
    height: auto;
    margin: 5px;
}

/* Section for the contact.html page */

.contact-info {
    justify-items: center;
    margin: 1.5rem 0;
}

#company-info h1,
#company-info address {
    margin: 1rem;
    text-align: center;
    font-style: normal;
}

#map-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

#map {
    width: 350px;
    height: 100%;
}

#map iframe {
    width: 100%;
    height: 100%;
    border: 2px solid var(--border-light);
}

#map-form form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 5px;
}

.form-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    margin: 5px;
}

.form-item input,
.form-item textarea {
    padding: .5rem;
}

.form-item span,
label {
    align-self: center;
}

#purpose-items {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: .5rem;
}

.message-area {
    grid-template-columns: 1fr;
}

#subs-div {
    grid-template-columns: min-content auto;
}

input[type="checkbox"] {
    height: 1rem;
    margin-right: 10px;
    justify-self: left;
    align-self: center;
}

button {
    padding: 5px;
    background-color: var(--accent1-color);
    border: 2px solid var(--border-light);
    border-radius: .2rem;
    color: var(--pure-black);
    font-size: 1rem;
    font-weight: 600;
}

#emp-section {
    border: 2px solid var(--border-light);
}

#emp-section h2 {
    width: 100%;
    padding: .8rem;
}

#employees-info {
    display: flex;
    justify-content: space-evenly;
    margin: 1rem auto;
}

#employees-info figure {
    width: 15%;
    align-items: center;
    justify-items: center;
    text-align: center;
}

#employees-info figure img {
    width: 100%;
}

/* Section for index.html page specific stylings */

#main-banner h1 {
    background-color: var(--secondary-color);
}

#main-banner p {
    position: absolute;
    bottom: 5px;
    background-color: var(--accent2-color);
}

#main-banner button {
    position: absolute;
    width: 150px;
    height: 40px;
    bottom: 1rem;
    left: calc(50% - 75px);
    background-color: var(--secondary-color);
    box-shadow: 0px 5px 15px var(--pure-black);
}

#main-banner button:hover {
    background-color: var(--accent1-color);
    box-shadow: 0px 5px 15px var(--accent2-color);
    transform: translateY(-5px);
}

#newsletter-form {
    display: flex;
    flex-wrap: wrap;
    margin: 1rem;
}

#newsletter-form h2,
#newsletter-form form {
    flex-basis: 100%;
    margin: .5rem;
}

#newsletter-form form {
    display: grid;
    justify-items: center;
    grid-template-columns: 0.5fr 2fr 2fr 1fr 0.5fr;
    place-items: center center;
}

#newsletter-form form #form-sec-one {
    grid-column: 2;
}

.news-form-item {
    display: inline-block;
    margin: 0 .5rem;
}

.news-form-item label {
    vertical-align: bottom;
    margin: 0 .5rem;
}

.news-form-item input {
    padding: .4rem;
}

#news-button {
    background-color: var(--accent2-color);
}

#news-button:hover {
    background-color: var(--primary-color);
    color: var(--accent2-color);
}

#more-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-columns: 2fr 2fr 1rem 2fr 2fr;
    row-gap: 1.2rem;
    margin: 1.2rem 0px;
    border-top: 5px dashed var(--border-light);
    padding-top: 1rem;
}

#more-details h2 {
    grid-column: 1 / 5;
    grid-column: 1 / 6;
}

#more-details figure {
    align-items: center;
    justify-items: center;
    text-align: center;
    transition: all 0.2s ease-in;
}

#more-details figure:hover {
    transform: translateX(1rem);
    transition: all 0.5s ease-out;
}

.item2 {
    grid-column: 4;
}

#more-details figure img {
    width: 100%;
}

#more-details figcaption {
    padding: 1rem 0;
    place-self: center left;
}

#more-details p {
    margin-top: 2.5rem;
}

/* ------------------------------- */
/* Section for the trips.html page */
#trips-banner {
    position: relative;
}

#trips-banner h1 {
    width: fit-content;
    justify-self: center;
    border-radius: 10px;
    padding: .8rem;
}

#trips-banner button {
    --start-color: var(--accent1-color);
    --end-color: var(--accent2-color);
    --angle: 160deg;
    --shadow-color: var(--border-light);

    position: absolute;
    width: 150px;
    height: 40px;
    bottom: 1rem;
    left: calc(50% - 75px);
    background: linear-gradient(var(--angle), var(--start-color), var(--end-color));
    box-shadow: 0px 3px 7px var(--shadow-color);
    border-radius: 20px;
    border: none;
    transition:
        --start-color 0.6s ease,
        --end-color 0.6s ease,
        --angle 0.6s ease;
}

#trips-banner button:hover {
    --start-color: var(--accent1-color);
    --end-color: var(--accent2-color);
    --angle: 45deg;
    --shadow-color: var(--border-medium);
    transform: scale(2rem);
}

#trips-section {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

#trips-section h2 {
    flex-basis: 100%;
}

#trip-card-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.trip-card {
    padding: 25px;
    border-radius: 15px;
    transition: 1s ease;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 8px 0 var(--border-light);
}

.trip-card:hover {
    box-shadow: 0 8px 16px 0 var(--border-accent1-medium);
}

.trip-card figcaption {
    margin: 10px 0;
    font-size: 1rem;
    font-weight: 600;
}

.trip-card figure img {
    width: 100%;

}

.trip-card p {
    margin: 0;
    padding: 0;
}

#trips-details {
    padding: 1rem;
}

#trips-details table {
    color: #000;
    margin: 10px auto;
    width: 80%;
    border-radius: 5px;
}

#trips-details td {
    padding: 0.5rem 1rem;
}

#trips-details thead {
    background-color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 600;
}

#trips-details table tbody tr:nth-child(odd) {
    background-color: var(--accent2-color);
}

#trips-details table tbody tr:nth-child(even) {
    color: #FFF;
    background-color: var(--primary-color);
}