/* --- General Styles --- */
body {
    font-family: 'Old Standard TT', serif;
    margin: 0;
    padding: 0;
    line-height: 1.8;
    background-color: #fdfdfd;
    color: #333;
}

/* --- Header Styling (Consistent across all pages) --- */
header {
    text-align: center;
    padding: 2rem 1rem;
    border-bottom: 1px solid #eee;
}

.content-page header h1 {
    margin: 0;
    font-weight: 400;
    font-size: 34px; /* Increased size for better visibility */
}

h1 a {
    color: #333;
    text-decoration: none;
    font-weight: normal;
}

/* --- Navigation Styling --- */
nav {
    margin-top: 1rem;
}

nav ul {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 1.5rem;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s ease;
    position: relative; /* For the underline pseudo-element */
    padding-bottom: 3px; /* Space for the underline */
}

nav ul li a:hover {
    color: #000;
}

/* Underline animation on hover */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: #000;
    transform-origin: center;
    transition: transform 0.3s ease-out;
}

nav ul li a:hover::after {
    transform: scaleX(1);
}

/* --- Homepage Specific Styling --- */
body.homepage {
    /* Add a dark, semi-transparent gradient over the image for better text contrast */
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2)), url('wave.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    height: 100vh;
    text-align: center;
}

.homepage header {
    /* Use absolute positioning for precise placement on top of the background */
    position: absolute;
    top: 3vh;
    left: 0;
    width: 100%;
    padding: 0;
    border-bottom: none; /* No border on homepage header */
}

.homepage .site-title, .homepage nav {
    opacity: 0; /* Start hidden for animation */
    animation: fadeInUp 1s ease-out forwards;
}

.homepage header h1 {
    /* A slightly larger, but still small, explicit size for the homepage */
    font-size: 40px; /* Made slightly larger as requested */
}

.homepage h1 a {
    color: white;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5); /* Soften shadow as overlay adds contrast */
}

.homepage nav {
    animation-delay: 0.4s; /* Stagger the nav animation */
}

.homepage nav a {
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5); /* Soften shadow */
}

.homepage nav a:hover {
    color: #ddd;
}

.homepage nav ul li a::after {
    background-color: white;
}

.homepage footer {
    position: absolute;
    bottom: 2vh; /* A little space from the very bottom */
    left: 0;
    width: 100%;
    border-top: none; /* No border on homepage footer */
    color: white;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    margin-top: 0; /* Override default margin */
    padding: 1rem;
    opacity: 0; /* For animation */
    animation: fadeInUp 1s ease-out 0.8s forwards; /* Staggered animation */
}


/* --- Content Page Styling (About, Services, etc.) --- */
.content-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-page header {
    position: -webkit-sticky; /* For Safari */
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(253, 253, 253, 0.95); /* Slight transparency for effect */
    -webkit-backdrop-filter: blur(5px); /* Frosted glass effect for Safari */
    backdrop-filter: blur(5px); /* Frosted glass effect */
}

.content-page main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 2rem;
    flex-grow: 1; /* This makes the main content expand to push the footer down */
}

h2 {
    /* A default style for subheadings */
    font-size: 2.5em;
    font-weight: normal;
    text-align: center;
    margin-bottom: 1rem;
}

.content-page main p { /* Scoped this rule to 'main' to prevent it from affecting the footer */
    font-size: 1.2em;
    text-align: justify;
}

/* --- Contact Page Specifics --- */
.contact-details {
    margin-top: 1.5rem; /* Adds space between a heading and the contact info */
}

main .contact-details p {
    /* Increased specificity to override the general 'justify' alignment */
    text-align: center;
    margin: 0.25rem 0; /* Reduces the default paragraph spacing to group them visually */
}

/* --- Who We Are & What We Do Page Specifics --- */
.who-we-are-section,
.what-we-do-section {
    text-align: center;
}

main .who-we-are-section p,
main .what-we-do-section p {
    /* Overrides the general 'justify' alignment for this specific section */
    text-align: center;
}

.what-we-do-section ul {
    /* To center the list block itself */
    display: inline-block;
    padding: 0; /* Remove default browser padding */
    list-style: none; /* Remove bullets */
}

/* --- Footer Styling --- */
footer {
    text-align: center; /* Centers the copyright text */
    padding: 20px;
    margin-top: 50px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #777;
}

footer p {
    /* Explicitly center the paragraph inside the footer and remove default margin */
    text-align: center;
    margin: 0;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}