/* --- Global Styles & Variables --- */
:root {
    --primary-color: #f26522; /* Orange from Logo */
    --secondary-color: #f4f4f4; /* Light Grey */
    --text-color: #333;
    --heading-font: 'Merriweather', serif;
    --body-font: 'Lato', sans-serif;
    
    /* Define header height for content offset */
    --header-height: 92px; 
}

* {
    scroll-behavior: smooth;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: var(--body-font);
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
}

/* Added for mobile menu scroll lock */
body.no-scroll {
    overflow: hidden;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--primary-color); text-decoration: none; }
ul { list-style: none; }

/* --- Header & Navigation --- */
.main-header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    
    /* CHANGE 1: Use 'fixed' position to stick to viewport */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; /* Required for fixed position */
    
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    
    /* Calculate height: 1rem(16px) top + 60px logo + 1rem(16px) bottom = 92px */
    /* This confirms our --header-height variable is correct */
}

.logo {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo img {
    height: 60px; /* Adjust this value as needed */
    width: auto;
}

.main-nav .nav-links {
    display: flex;
}

.main-nav .nav-links li {
    margin-left: 1.5rem;
}

.main-nav .nav-links a {
    color: var(--text-color);
    font-weight: 700;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-nav .nav-links a:hover,
.main-nav .nav-links a.active {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* --- Main Content Offset --- */
/* This padding is now applied to .page-content directly */
main {
    /* padding-top: var(--header-height); */ /* REMOVED from here */
}


/* --- Hero Section --- */
.hero {
    /* Blended background image with color overlay */
    /* 1. Orange overlay, 2. Brightness overlay, 3. Image */
    background: linear-gradient(rgba(242, 101, 34, 0.45), rgba(242, 101, 34, 0.45)), linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.2)), url('../images/BridgeCityscape.png') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    
    /* Make hero section fill the viewport height (minus the header) */
    /* This works because the homepage <main> has no padding-top */
    min-height: calc(100svh - var(--header-height)); 
    
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero h1 { color: #fff; }
.hero .tagline {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 1rem auto 2rem auto;
}
.btn {
    display: inline-block;
    background: #fff;
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.hero .btn {
    background: #fff;
    color: var(--primary-color);
    border: 2px solid #fff;
}
.hero .btn:hover {
    background: transparent;
    color: #fff;
}

/* --- Why Us Section --- */
.why-us {
    padding: 4rem 0 6rem 0; /* Increased bottom padding to prevent shadow clipping */
    background: #fff;
}
.why-us h2 { text-align: center; margin-bottom: 3rem; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.feature-card {
    background: #fff;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
    border-radius: 5px;
}
.feature-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* --- General Page Content --- */
.page-content {
    /* padding: 4rem 0; */ /* REPLACED this line */
    
    /* ADDED: calc() to add header offset + desired page padding */
    padding-top: calc(var(--header-height) + 4rem); 
    padding-bottom: 4rem;
}
.page-content .intro {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 2rem;
}

.breadcrumb {
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: bold;
}

/* --- Legal Pages (Terms, Privacy) --- */
.legal-page h1 {
    text-align: center;
    margin-bottom: 3rem;
}
.legal-page h2 {
    font-size: 1.2rem; /* Slightly larger than body text */
    /* Capitalization is handled in the HTML content */
}

/* --- What We Do Page --- */
.practice-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.area-card {
    background: var(--secondary-color);
    padding: 2rem;
    text-align: center;
    font-family: var(--heading-font);
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s ease;
}
.area-card:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
}

/* --- Content List Bullet Styling --- */
/* Selects lists that follow h3s, ps, or are in the legal page */
.page-content h3 + ul,
.page-content p + ul,
.legal-page .page-content ul {
    list-style: disc; /* Re-enable bullet points */
    padding-left: 20px; /* Add indentation for the bullets */
    margin-bottom: 1rem; /* Add space after the whole list */
}

.page-content h3 + ul li,
.page-content p + ul li,
.legal-page .page-content ul li {
    margin-bottom: 1rem; /* Adds space after each bullet point */
}

/* Override for the 'other-practices' nav list */
.other-practices ul {
    list-style: none;
    padding-left: 0;
}
.other-practices ul li {
    margin-bottom: 0; /* Reset spacing */
}


/* --- Service Sub-Pages --- */
.other-practices {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ddd;
}
.other-practices ul {
    list-style: none;
    padding-left: 0;
}
.other-practices li {
    display: inline-block;
    margin-right: 1.5rem;
}

/* --- About Page --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: center;
}
.about-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 5px;
    margin-bottom: 1rem;
}
.about-image .btn {
    display: block;
    text-align: center;
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.about-image .btn:hover {
    background: #fff;
    color: var(--primary-color);
}

.contact-details {
    margin-top: 1rem;
    text-align: left;
}

.contact-details h3 {
    margin-bottom: 0.5rem;
}

.contact-details p {
    margin-bottom: 0.25rem;
}

.connect-view {
    margin-top: 1rem;
    display: flex;
    align-items: center;
}

.connect-view h4 {
    margin-bottom: 0;
    margin-right: 1rem;
}

/* --- Unified Icon Button Styles (VCard, LinkedIn) --- */
.icon-link {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    position: relative;
    margin-bottom: 0.25rem; /* Consistent space between icon and label */
    transition: all 0.3s ease;
}

.vcard-btn {
    background-color: var(--primary-color);
}
.vcard-btn:hover {
    background-color: var(--primary-color); /* Use variable */
    filter: brightness(0.9); /* Darken on hover */
}

/* Person silhouette for vCard */
.vcard-btn::before { /* Head */
    content: '';
    position: absolute;
    background-color: white;
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    top: 8px;
    width: 12px;
    height: 12px;
}
.vcard-btn::after {
    content: '';
    position: absolute;
    background-color: white;
    top: 22px;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 0 0;
    left: 50%;
    transform: translateX(-50%);
}

.linkedin-btn img {
    width: 100%;
    height: 100%;
    display: block;
}
.linkedin-btn:hover {
    opacity: 0.8;
}

/* --- Shared Styles for Icon Components --- */
.icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-right: 1rem;
}
.icon-label {
    font-size: 0.75rem;
    font-weight: bold;
    color: var(--text-color);
}

/* Specific style for the multi-line vCard label */
.icon-label.vcard-label {
    width: 70px; /* Forces line breaks */
    line-height: 1.2; /* Tighter spacing for stacked text */
}

/* --- About Section on Homepage --- */
.about-homepage {
    padding: 4rem 0 6rem 0;
    /* Add background image with a light grey overlay */
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url('../images/laptopcafe.jpg') no-repeat center center/cover;
}

.about-homepage ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1rem;
}
.about-homepage .container {
    background: #fff; /* White background for the content box */
    padding: 3rem;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.about-homepage h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* --- Contact Page (New Styles) --- */
.other-contact-methods {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid #ddd;
    text-align: center;
}
.other-contact-methods h2 {
    margin-bottom: 3rem;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.contact-card {
    background: #fff;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0,0,0,0.08);
}
.contact-card h3 {
    color: var(--primary-color);
}
.contact-card p {
    min-height: 50px; /* Align text vertically */
}
.contact-card .btn {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.contact-card .btn:hover {
    background: #fff;
    color: var(--primary-color);
}
/* Re-center connect-view from .about-image */
.contact-card .connect-view {
    justify-content: center;
}


/* --- Footer --- */
.main-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 3rem 0 1rem 0;
}
.main-footer a { color: #fff; }

.footer-content {
    display: flex;
    /* justify-content: space-between; */ /* CHANGED */
    justify-content: center; /* To center the links */
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #d9641e;
}

/* HIDE the contact info block in the footer */
.footer-content .contact-info {
    display: none;
}

.footer-links a { 
    /* margin-left: 1.5rem; */ /* CHANGED */
    margin: 0 0.75rem; /* Add spacing on both sides */
    text-decoration: underline;
}
.footer-links a:hover {
    text-decoration: none;
}

/* Footer Contact Info Update - No longer needed */
/*
.contact-info p {
    margin-bottom: 0.5rem;
}
.contact-info a {
    text-decoration: underline;
}
.contact-info a:hover {
    text-decoration: none;
}
*/

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}
.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* --- Responsive Styles --- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        
        /* FIX: Change animation from transform to max-height */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        /* END FIX */
    }
    .main-nav.active {
        /* FIX: Animate max-height to show */
        max-height: 500px; /* Set to a value larger than your menu's content */
    }
    
    .main-nav .nav-links {
        flex-direction: column;
        padding: 1rem 0;
    }
    .main-nav .nav-links li {
        margin: 0;
        text-align: center;
    }
    .main-nav .nav-links a {
        display: block;
        padding: 1rem;
    }
    .hamburger {
        display: block;
    }

    /* Added hamburger 'X' animation */
    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        /* text-align: center; */ /* MOVED to .about-image */
    }
    
    /* FIX: Re-order 'Our Story' section for mobile */
    .about-text {
        order: 1; /* Show story text first */
    }
    .about-image {
        order: 2; /* Show image/contact details second */
        margin-bottom: 2rem;
        text-align: center; /* Center-align this block */
    }
    /* END FIX */

    /* Contact Page Responsive */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-card p {
        min-height: 0; /* Remove height alignment */
    }


    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    /* .contact-info no longer needs margin-bottom as it's hidden */
    /* .contact-info { margin-bottom: 1.5rem; } */
    
    .footer-links a { 
        margin: 0 0.5rem; /* This was already here and is good */
    }
}