/* Global Styles */
:root {
    --primary-color: #673ab7; /* purple from logo */
    --secondary-color: #2196f3; /* blue from logo */
    --accent-color: #00bfa5; /* teal accent from hand */
}
html {
    font-size: 16px;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

/* Default link styling: use secondary blue from the logo for inline links */
a {
    color: var(--secondary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation */
/* Container for navigation that holds the logo, hamburger and nav links */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

/* Logo sizing within navigation */
.nav-container img.logo {
    height: 60px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-weight: 500;
    padding: 0.5rem;
    color: #222;
    transition: color 0.2s ease;
}

/* Hover state for navigation */
.nav-links a:hover {
    color: var(--primary-color);
}

/* Top information bar appearing above the header */
.top-bar {
    background-color: var(--secondary-color);
    color: #ffffff;
    font-size: 0.875rem;
    text-align: center;
    padding: 0.25rem 0;
}

/* Hamburger icon (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
}
.hamburger span {
    height: 3px;
    background-color: #222;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Intake form card overlay on hero */
.intake-form-card {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    max-width: 350px;
    width: 100%;
    z-index: 2;
}
.intake-form-card h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}
.intake-form-card form label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    color: #555;
}
.intake-form-card form input,
.intake-form-card form select {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}
.intake-form-card form button {
    width: 100%;
    font-size: 1rem;
}

/* Hero Section */
/* Hero section with background image and gradient overlay
   Default hero background now uses a real photo of caregivers assisting a senior
   to align with the brand’s mission and values. Individual pages can override
   this via an inline style attribute on the <section> tag. */
.hero {
    position: relative;
    /* Use a real photo as the default hero background */
    background-image: url('assets/caregiver2.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 6rem 0;
    text-align: center;
}

/* Add a semi-transparent overlay tinted with primary and secondary colors */
.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.65;
}

.hero .hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

/* Hero text styles */
.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.hero p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Primary button styles */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
}

/* Sections */
section {
    padding: 3rem 0;
    background-color: #f9f9f9;
}

section:nth-of-type(even) {
    background-color: #ffffff;
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.service-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Service card title */
.service-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
}

.service-card a {
    display: inline-block;
    margin-top: 1rem;
    /* Use secondary color for service card links */
    color: var(--secondary-color);
    font-weight: 600;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Mission */
/* Mission section uses a real photo to convey warmth and connection */
.mission {
    background-image: url('assets/caregiver3.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.mission::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
}

.mission .mission-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}

.mission h2 {
    color: #fff;
}

.mission p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    /* Use the secondary blue from the logo for the footer background */
    background-color: var(--secondary-color);
    color: #fff;
    padding: 2rem 0;
}

footer .footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: space-between;
}

footer h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer ul li a {
    color: #fff;
    font-weight: 300;
}

footer .contact-info p {
    margin: 0.25rem 0;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    /* Show the hamburger on small screens */
    .hamburger {
        display: flex;
    }
    /* Position navigation links off‑canvas by default */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background-color: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding-top: 4rem;
        padding-left: 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 4px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    /* When the nav is open slide it into view */
    .nav-links.open {
        right: 0;
    }
    /* Increase nav link size for easy tapping */
    .nav-links a {
        font-size: 1rem;
        color: #222;
    }
    .nav-links a:hover {
        color: var(--primary-color);
    }
    /* Adjust service image height on mobile */
    .service-card img {
        height: 140px;
    }
    /* Stack intake form below hero on mobile */
    .intake-form-card {
        position: relative;
        transform: none;
        margin: 2rem auto 0;
        right: 0px;
        width: 90%;
        top: -80px;
    }
}