/* Basic Reset & Body Styling */

html {
	/* Forces the scroll bar to stop the page resizing width when scrollbar appears */
	overflow-y: scroll;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    /* This background color will now apply to the entire page,
       including behind header if it doesn't have its own background. */
    background-color: rgb(71, 90, 123); /* Equivalent to #475A7B */
    min-height: 100vh; /* Ensure the grid takes at least the full viewport height */
}

/* --- Image Styling --- */
img#LogoImg {
    max-width: 100%;
    height: auto;
    max-height: 20vh; /* Optional, to cap the maximum height */
    object-fit: contain;
    /* border: 3px solid black; */
}


img#Hannah {
	max-width: 100%;
	height: auto; /* Ensure aspect ratio is maintained */
	border: 4px solid #475a7b;
	border-radius: 12px;
	object-fit: cover;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

img#Hannah:hover {
  box-shadow: 0 4px 12px rgba(71, 90, 123, 0.4);
  transition: box-shadow 0.3s ease;
}



/* --- Grid Layout for the Overall Page Structure --- */
body { /* This block defines the grid layout. It should come after basic body styles. */
    display: grid;
    grid-template-areas:
        "header header"
        "nav    nav"
        "body   sidebar"
        "footer footer";
    grid-template-columns: 3fr 1fr; /* 3 parts for body, 1 part for sidebar */
    grid-template-rows: auto auto 1fr auto; /* Header, Nav, Body (fills remaining space), Footer */
}

section a{
	color: #475a7b;
}

/* --- General Styling for Layout Elements --- */
.site-header {
    grid-area: header;
    /* Background color removed here; it will inherit from body or be explicitly set if different desired */
    color: white;
    padding: 25px 20px; /* Top/bottom padding, left/right padding */
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Subtle shadow */
}

.site-header h1 {
    margin: 0 0 5px 0; /* Remove default margin, add small bottom margin */
    font-size: 2.5em;
    color: white; /* Ensure heading is visible on the dark background */
    font-family: sans-serif; /* Choose a readable font */
}

.site-header p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.site-nav {
    grid-area: nav;
    background-color: #333; /* Dark background for the nav bar */
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.site-nav ul {
    list-style: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
    display: flex; /* Use flexbox for horizontal navigation items */
    justify-content: center; /* Center items horizontally */
    flex-wrap: wrap; /* Allow items to wrap to the next line on smaller screens */
}

.site-nav li {
    margin: 0 20px; /* Space between navigation items */
}

.site-nav a {
    color: white;
    text-decoration: none; /* Remove underline */
    padding: 8px 15px; /* Padding inside links for better click area */
    transition: background-color 0.3s ease, border-radius 0.3s ease; /* Smooth hover effect */
    display: block; /* Make the entire padding area clickable */
}

.site-nav a:hover {
    background-color: #555; /* Darker grey on hover */
    border-radius: 5px; /* Slightly rounded corners on hover */
}

/* Styling for the active navigation link */
.site-nav a.active-nav {
    background-color: #475a7b; /* Changed from #0056b3 to match your body color slightly */
    border-radius: 5px;
    font-weight: bold;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2); /* Inner shadow for active link */
}

.site-body {
    grid-area: body;
    padding: 30px; /* Inner padding for main content */
    background-color: #f0f2f5; /* Very light grey background for content area */
}

/* --- Styling for content sections within the main body --- */
.content-section {
    padding: 25px;
    margin-bottom: 30px; /* Space between sections if multiple were shown (though typically only one is visible) */
    background-color: #ffffff; /* White background for each content section */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* More pronounced shadow for content blocks */
    text-align: left; /* Ensure text within sections is left-aligned */
}

.content-section.hidden {
    display: none; /* Hides the section completely from layout and accessibility tree */
}

.site-sidebar {
    grid-area: sidebar;
    background-color: #e9ecef; /* Light grey for sidebar */
    padding: 30px;
    border-left: 1px solid #dcdcdc; /* Separator line */
    text-align: left; /* Ensure sidebar content is left-aligned */
}

.site-sidebar h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #ccc;
    padding-bottom: 10px;
}

.site-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center; /* NEW: This will center the inline-block <li> children */
}

.site-sidebar li {
    display: inline-block; /* MODIFIED: Allows list items to sit side-by-side */
    margin: 0 8px 10px; /* MODIFIED: Adjust margins for horizontal spacing between icons */
}

.site-sidebar a { /* Existing rule, no change needed here directly for the icons themselves */
    color: #475a7b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-sidebar a:hover { /* Existing rule */
    color: #475a7b;
    text-decoration: underline;
}

/* --- Social Media Icons in Sidebar --- */
.site-sidebar .social-icon {
    width: 30px; /* MODIFIED: Smaller size */
    height: 30px; /* MODIFIED: Smaller size */
    object-fit: contain; /* Ensures the image scales down without cropping */
    vertical-align: middle; /* Helps align icons with surrounding text/elements */
    transition: transform 0.2s ease; /* Smooth hover effect */
}

.site-sidebar .social-icon:hover {
    transform: scale(1.1); /* Slightly enlarge icon on hover */
}

.site-footer {
    grid-area: footer;
    background-color: #333;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1); /* Subtle shadow above footer */
}

/* --- Form Styling Enhancements --- */
.contact-form {
    max-width: 600px; /* Limits the width of the form for better readability */
    margin: 40px auto; /* Centers the form horizontally on the page with top/bottom margin */
    padding: 30px; /* Inner spacing within the form container */
    background-color: #fff; /* White background for the form area */
    border: 1px solid #e0e0e0; /* Subtle border */
    border-radius: 10px; /* Slightly rounded corners for the form container */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); /* Soft shadow for depth */
    text-align: left; /* Ensure form content is left-aligned within the form container */
}

/* Headings within the form */
.contact-form h3 {
    text-align: center; /* Center form heading */
    color: #2c3e50; /* Darker, professional blue/grey */
    margin-bottom: 25px; /* Space below the main heading */
    font-size: 2em; /* Larger heading */
    font-weight: 600; /* Slightly bolder */
}

/* Introductory paragraph */
.contact-form p {
    text-align: center; /* Center intro paragraph */
    color: #666;
    margin-bottom: 35px; /* More space below the introductory text */
    line-height: 1.5;
}

/* Group for label + input/textarea */
.form-group {
    margin-bottom: 25px; /* Creates consistent vertical space between form fields */
}

/* Labels for inputs */
.form-group label {
    display: block; /* Makes the label take up its own line, pushing input below it */
    margin-bottom: 10px; /* Space between the label and its input field */
    font-weight: 600; /* Bolder text for labels */
    color: #333; /* Darker label text */
    font-size: 1.05em; /* Slightly larger label text */
}

/* --- Styling for all text-based input fields (text, email, tel) and textareas --- */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"], /* Corrected: Added tel type */
.form-group textarea {
    width: 100%; /* Make them take full width of their container */
    padding: 12px 15px; /* Generous inner padding */
    border: 1px solid #ccc; /* Standard border */
    border-radius: 6px; /* Slightly rounded input fields */
    font-size: 1rem; /* Consistent font size */
    color: #444;
    background-color: #fff; /* White background for input fields */
    box-sizing: border-box; /* IMPORTANT: Ensures padding and border are included in the 100% width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for focus effect */
}

/* Focus state for input fields */
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus, /* Corrected: Added tel type */
.form-group textarea:focus {
    border-color: #007bff; /* Highlight border color on focus */
    outline: none; /* Removes the default browser outline */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Adds a soft glow on focus */
}

/* Specific styling for the textarea */
.form-group textarea {
    min-height: 120px; /* Minimum height for the message box */
    resize: vertical; /* Allows users to resize only vertically, prevents horizontal layout breaks */
}

/* Styling for the small help text */
.form-group small {
    display: block; /* Ensures help text is on its own line */
    margin-top: 8px; /* Space above the help text */
    color: #888; /* Lighter color for less emphasis */
    font-size: 0.9em; /* Smaller font size for help text */
}

/* --- Submit Button Styling --- */
.contact-form button[type="submit"] {
    display: block; /* Makes the button take up the full width available */
    width: 100%; /* Ensures it spans the entire width of its container */
    padding: 15px 25px; /* Generous inner space, making it easy to click */
    background-color: #475a7b; /* Primary button color (a vibrant blue) */
    color: white; /* White text for contrast */
    border: none; /* Removes the default button border for a cleaner look */
    border-radius: 8px; /* Rounded corners, giving a modern, soft appearance */
    font-size: 1.2rem; /* Larger font size for readability and emphasis */
    font-weight: 600; /* Makes the text bold */
    cursor: pointer; /* Changes cursor to a pointer on hover, indicating it's clickable */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth animation for hover effects */
}

.contact-form button[type="submit"]:hover {
    background-color: #475A7B; /* Corrected: Added # for hex code */
    transform: translateY(-2px); /* Slight lift effect on hover, making it feel responsive */
}

.contact-form button[type="submit"]:active {
    transform: translateY(0); /* Returns to original position on click, giving a "pressed" feel */
    background-color: #004085; /* Even darker blue when active/clicked */
}

/* --- Responsive Adjustments for Smaller Screens --- */
@media (max-width: 768px) { /* Adjust this breakpoint as needed for your design */
    body {
        /* Redefine grid areas for mobile layout (sidebar under body) */
        grid-template-areas:
            "header"
            "nav"
            "body"
            "sidebar"
            "footer";
        /* Change to a single column layout */
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto auto; /* All rows auto-height */
    }

	/* make the profile picture smaller */
	img#Hannah {
		width: 50%;
		max-width: 300px;
		height: auto;
		display: block;
		margin: 0 auto 20px;
	}

	.side_contact {
	  font-size: 0.85rem;
	  word-break: break-word;
	  overflow-wrap: anywhere;
	  text-align: center;
	  padding: 0 10px;
	}

    /* Adjust padding for elements on smaller screens */
    .site-header,
    .site-nav,
    .site-sidebar,
    .site-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Adjust .site-body padding for mobile to allow sections to center inside it */
    .site-body {
        padding: 20px 15px; /* Ensures content has some space from screen edges */
    }

    /* Stack navigation items vertically */
    .site-nav ul {
        flex-direction: column;
        align-items: center; /* Center items when stacked */
    }

    .site-nav li {
        margin: 5px 0; /* Adjust vertical margin for stacked items */
        width: 100%; /* Make list items take full width for better touch targets */
        text-align: center;
    }

    .site-nav a {
        padding: 10px; /* More padding for touch targets */
    }

    /* --- Centering .content-section elements on mobile --- */
    .content-section {
        max-width: 500px; /* Limits the width of the content section */
        margin: 20px auto; /* Centers the content section horizontally */
        padding: 20px; /* Adjust padding for inner content on mobile */
        /* Other styles like background-color, border, shadow are inherited from global .content-section */
    }

    /* Adjustments for forms on smaller screens (and centering if it's a .content-section too) */
    .contact-form {
        max-width: 500px; /* Match max-width of content-section for consistency and centering */
        margin: 20px auto; /* Ensures it centers */
        padding: 25px; /* Existing padding for forms */
    }

    .form-group {
        margin-bottom: 20px; /* Slightly less space between form groups */
    }

    .form-group label {
        margin-bottom: 8px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"], /* Make sure tel is included here */
    .form-group textarea {
        padding: 10px 12px;
    }

    .contact-form button[type="submit"] {
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

.form-error {
  color: red;
  font-weight: bold;
  margin-bottom: 1em;
}
.hidden {
  display: none;
}
input.invalid, textarea.invalid {
  border: 3px solid red !important;
}

.form-success {
  font-size: 1.2em;
  color: green;
  padding: 1em;
  text-align: center;
}