/*--- Rob Collins ---*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex; /* Vertical layout of main elements */
    flex-direction: column;
    align-items: center;
    line-height: 1.5; /* Make default line height more accessible */
    font-family: sans-serif; 
    text-align: center;
}

header {
    text-align: center;
}

main {
    width: 100%;
    max-width: 960px;
    padding-left: 2em;
    padding-right: 2em;
}

p {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Table styling */
table {
    align-items: center;
	width: 100%;
	max-width: 600px;
	margin: 1.5em auto;
	border-collapse: collapse;
	font-family: inherit;
	color: #102542;
}

th, td {
	border: 1px solid black;
	padding: 0.5em 1em;
	text-align: left;
}

th {
    background-color: #F3C300;
}

tr:nth-child(even) {
	background-color: white;
}

tr:nth-child(odd) {
	background-color: white;
}

/* Form styling */

form {
    max-width: 80em;
    border: 3px solid black;
    border-radius: 5px;
    padding: 1.5em;
    margin: 2em auto;
    text-align: left;
}

label {
    font-size: 0.9em;
}

input[type='text'], input[type='email'], textarea {
    border-style: solid;
    border-width: 1px;
    border-color: #b3b3b3;
    width: 100%;
    margin-bottom: 1em;
    padding: 0.3em;
}

textarea {
    resize: none;
}

input[type='submit'] {
    width: auto;
    padding: 0.5em 2em;
    background-color: #1A3D6D;
    color: white;
    border-style: none;
    border-radius: 0.3em;
    margin: 1.5em 0 0 0;
}

.form-header {
    margin-top: 0;
}

.form-description {
    margin-bottom: 1.5em;
}

/* Logo */
.logo {
  max-width: 600px;
  width: 100%;    /* Allows it to scale down on small screens */
  height: auto;
  margin-top: 20px;
}


/* Navigation */
nav ul {
    list-style: none;
    margin: 2em auto; 
    display: flex;
    justify-content: center; /* Centers the whole group */
    gap: 30px;               /* Adds exactly 30px between each button */
    max-width: 1000px;       /* Keeps the nav from stretching too wide on big screens */
}

nav ul li a {
	display: block;
	text-decoration: none;
	color: #1A3D6D;
	background-color: #F3C300;
	padding: 0.5em 1em;
	border-radius: 10px;
	font-weight: bold;
	text-transform: lowercase;
	transition: background-color 0.3s ease, color 0.3s ease;
	text-align: center;
}

nav ul li a:hover,
nav ul li a.active,
nav ul li#active > a {
	background-color: #1A3D6D;
	color: #F0E6D2;
}

/* Images */
.hero-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 100%; /* Or whatever width looks best */
    object-fit: cover;
    border-radius: 10px;
}

.gallery-image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 10px;
    border-radius: 10px;
    width: 100%; 
    object-fit: cover;
}

/* Main */
main {
    width: 100%;
    max-width: 960px;
    padding: 0 2em;
    margin-bottom: 3em; /* Creates a gap between content and footer */
}

main ul {
    text-align: left;
}

#align-left {
    text-align: left;
    margin-left: 20px;
}

/* Footer */
footer {
    flex-wrap: wrap;   
    justify-content: center; 
    gap: 1.5rem;          
    width: 100%;
    background-color: white;
    color: #1A3D6D;        
    text-align: center;
    padding: 2em 10px;
    box-sizing: border-box;
}

footer a {
    display: inline-block; 
    text-decoration: none;
    color: #1A3D6D;
    background-color: white;
    padding: 0.5em 1em;
    border-radius: 10px;
    font-weight: bold;
    text-transform: lowercase;
    transition: background-color 0.3s ease, color 0.3s ease;
}

footer ul {
    list-style: none;
}

footer .pipe {
    display: flex;
    justify-content: center;
}

footer ul.pipe li:not(:last-child)::after {
    content: "|"
}

footer a:hover,
nav ul li a.active,
nav ul li#active > a {
    background-color: #1A3D6D;
    color: #F0E6D2;
}

/* Media query */

@media (max-width: 600px) {
 
nav ul {
    flex-direction: column ;
    align-items: stretch ;
    gap: 0.5rem ;
    text-align: center;
  }
 
  /* Make each link full width and on its own line */
  nav ul li a {
    display: block;
    width: 100% ;    /* overrides width:140px */
  }
 
header {
        flex-direction: column;   /* stack logo + heading */
        justify-content: center;
        text-align: center;
        gap: 0.5em;
        font-size: 1.2em;         /* slightly smaller heading */
    }
 
    .header-logo {
        width: 70px;              /* smaller logo on mobile */
        margin: 0 auto;           /* center it */
    }

    footer ul.pipe li:not(:last-child)::after {
        content: ""; /* Remove pipe */
    }
    footer ul.pipe {
        flex-direction: column;
        align-items: center;
    }

}
/* End media query */
/* End CSS */
