/* ==============================
   Variables
============================== */
:root {
    --primary-blue: #212C58;
    --primary-blue-dark: #1a336a;
    --light-gray: #f4f4f4;
    --dark-gray: #333;
    --text-color: #555;
    --border-color: #ddd;
    --white: #fff;

    --shadow-sm: 0 1px 5px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);

    --font-family-sans: Arial, sans-serif;
    --font-family-serif: Georgia, serif;
    --heading-font: 'Playfair Display', Georgia, serif;

    --radius-sm: 5px;
    --radius-md: 8px;
    --spacing-section: 40px;
}

/* ==============================
   Base
============================== */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-family-sans);
    line-height: 1.6;
    margin: 0;
    color: var(--text-color);
    background-color: var(--light-gray);
    padding-top: 40px; /* Adjusted based on new header height */
}

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

/* ==============================
   Typography
============================== */
h1, h2, h3, h4 {
    color: var(--primary-blue);
    font-family: var(--font-family-serif);
    margin: 0 0 5px;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.2em; }

p { margin-bottom: 1em; }
strong { font-weight: bold; }

/* ==============================
   Links
============================== */
a {
    color: var(--primary-blue);
    text-decoration: none;
}
a:hover,
a:focus { text-decoration: underline; }

/* ==============================
   Lists
============================== */
ul {
    list-style: disc;
    margin: 0 0 1em 20px;
    padding: 0;
}
ul li { margin-bottom: 0.5em; }

/* ==============================
   Buttons
============================== */
.button {
    background: var(--primary-blue);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.button:hover,
.button:focus { background: var(--primary-blue-dark); }

/* ==============================
   Utilities
============================== */
.hidden { display: none; }
.center { text-align: center; }
.page-content { padding: var(--spacing-section) 0; }
hr {
    border: 0;
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

/* Card Component */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 15px;
}

/* ==============================
   Header
============================== */
.site-header {
    background: var(--primary-blue);
    color: var(--white);
    padding: 5px 0; /* Further reduced padding */
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    min-height: 30px; /* Further reduced min-height */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
    .logo img {
    height: 100%; /* Make logo as tall as its parent */
    width: auto; /* Maintain aspect ratio */
    max-height: 50px; /* Slightly larger logo height */
}

/* Navigation */
/* Navigation */
.main-nav {
    display: block; /* Show by default on larger screens */
}
.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0; padding: 0;
}
.main-nav ul li { position: relative; margin-left: 30px; }
.main-nav a {
    color: var(--white);
    padding: 10px 0;
    display: block;
    white-space: nowrap;
}
.main-nav a:hover,
.main-nav a:focus { text-decoration: underline; }

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    background: var(--primary-blue);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    padding: 0; /* Removed padding */
    margin: 0; /* Removed margin */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    list-style: none;
    display: flex; /* Enable flexbox */
    flex-direction: column; /* Stack items vertically */
}
.main-nav li:hover > .submenu {
    display: block;
    opacity: 1;
    visibility: visible;
}
.submenu a {
    padding: 0; /* No padding */
    color: var(--white);
    text-align: left; /* Ensure left alignment */
    width: 100%; /* Make the clickable area span the full width */
    height: 100%; /* Make anchor fill the li */
    box-sizing: border-box; /* Include padding in the width calculation */
    display: flex; /* Use flex to center content if needed */
    align-items: center; /* Vertically center content */
}
.submenu a:hover { background: var(--primary-blue-dark); }

.submenu li {
    /* flex: 1; /* Make each li take equal vertical space */
    margin: 0; /* Remove margin */
    padding: 0; /* Remove padding */
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hide by default on larger screens */
    font-size: 2em;
    cursor: pointer;
    color: var(--white);
}

/* ==============================
   Main Content
============================== */
main { }

/* ==============================
   Footer
============================== */
.site-footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9em;
}

/* ==============================
   Contact Page
============================== */

.contact-hero-section {
    position: relative;
    height: 1000px; /* hero height on page */
    overflow: hidden;
}

.contact-hero-section img {
    position: fixed; /* keeps it in place while you scroll */
    top: 0;
    left: 0;
    width: 100%;
    height: 1000px; /* match section height */
    object-fit: cover;
    object-position: right top;
    z-index: -1; /* push behind content */
}

@media (max-width: 992px) {
    .contact-hero-section {
        min-height: 600px; /* Adjust minimum height for tablets/smaller laptops */
    }
    .contact-hero-section img {
        object-position: center; /* Center the image */
        object-fit: cover; /* Cover the area, allowing some cropping */
        top: 0; /* Reset top, as min-height will handle spacing */
        height: 100%; /* Make image fill the container's height */
    }
}

.fixed-contact-container {
    position: fixed;
    top: 95px;
    left: 20px;
    padding: 15px;
    border-radius: var(--radius-md);
    z-index: 1000;
}

.contact-flyout-section {
    margin-bottom: 5px;
}

.contact-toggle {
    cursor: pointer;
    color: var(--white);
    font-size: 1.5em;
    margin: 0;
}

.contact-details.hidden,
.get-in-touch-details.hidden {
    display: none;
}

.contact-cards-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.contact-card {
    background-color: var(--primary-blue);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.contact-card h4 {
    color: var(--white);
    margin: 0 0 5px;
    font-size: 1em;
}

.contact-card p,
.contact-card a {
    color: var(--light-gray);
    font-size: 0.9em;
    margin: 0;
}

.get-in-touch-details {
    margin-top: 10px;
    color: var(--light-gray);
    background-color: var(--primary-blue);
    padding: 10px;
    border-radius: var(--radius-sm);
    max-width: 350px;
}

/* Parallax Contact Section */
.parallax-contact-section {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.parallax-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.contact-info-item h4 {
    color: var(--white);
}

.contact-info-item p,
.contact-info-item a {
    color: var(--light-gray);
}

.get-in-touch-text {
    font-size: 1.1em;
}

/* Contact Dropdown */
.contact-dropdown-container {
    position: absolute;
    top: 60px; /* Adjusted to be closer to the header */
    right: 10px; /* Reduced right spacing */
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 10px 15px; /* Reduced padding */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-width: 250px; /* Reduced max-width */
}

.contact-dropdown-container.hidden {
    display: none;
}

.contact-dropdown-container p,
.contact-dropdown-container a {
    font-size: 0.8em; /* Reduced font size */
}

.contact-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Reduced gap between items */
}

/* ==============================
   Attorney Profiles
============================== */
.attorney-profile {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.attorney-photo-column {
    width: 50%;
    height: 100vh;
    position: sticky;
    top: 0;
}

.attorney-details-column {
    width: 50%;
    padding: 20px 40px;
    box-sizing: border-box;
}

.attorney-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.christine-photo {
    object-position: top;
}

.harrington-photo {
    height: auto;
    max-width: 500px; /* Set a max-width for the image */
    margin: 0 auto; /* Center the image */
    display: block; /* Ensure margin auto works */
}

.attorney-details-column h1 {
    font-size: 36px;
    color: #000;
    text-align: center;
    font-family: var(--heading-font);
    font-weight: 700;
}

.attorney-details-column p { color: #000; }

.attorney-details-column h2 { text-align: center; }

.attorney-details-column hr { border-color: #39406d; }

/* ==============================
   Home Page
============================== */
.full-bleed-hero {
    width: 100%;
    height: 600px;
    object-fit: cover;
    object-position: center 70%;
    display: block;
}
.intro-section {
    text-align: center;
    padding: 20px 20px 0;
}
.promo-banner {
    background: none;
    color: var(--primary-blue);
    text-align: center;
}
.promo-banner h3 { font-size: 1.2em; }
.practice-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    padding: 0 0 10px;
}
.practice-area-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.practice-area-card h4 {
    min-height: 70px; /* Adjust as needed to fit the tallest heading */
}
.practice-area-card .button {
    margin-top: auto;
}
.page-content h2 { text-align: center; }

/* ==============================
   Practice Area Pages
============================== */
.scales-hero {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center;
    display: block;
}
.practice-area-content {
    padding: var(--spacing-section) 20px;
    max-width: 900px;
    margin: 0 auto;
}

/* ==============================
   About Page
============================== */
.hero {
    background-color: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
    margin-bottom: var(--spacing-section);
}
.obituary,
.bio,
.practice-areas,
.education-bar,
.published-works {
    padding: var(--spacing-section) 0;
    background-color: var(--light-gray);
    margin-bottom: var(--spacing-section);
}
.two-column {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
}
.photo { flex: 0 0 300px; text-align: center; }
.bio-text { flex: 1; min-width: 400px; }

/* ==============================
   Policy Pages
============================== */
.hero-image {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin-bottom: 20px;
}
.policy-text,
.terms-text {
    padding: var(--spacing-section) 0;
    max-width: 900px;
    margin: 0 auto;
}

/* ==============================
   Contact Banner
============================== */
.contact-banner {
    background: var(--primary-blue);
    color: var(--white);
    padding: 15px 20px;
    text-align: center;
}
.contact-grid {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    padding: 10px;
}
.contact-column {
    text-align: center;
    flex: 1;
    padding: 5px;
}
.contact-column h4,
.contact-column p,
.contact-column a { color: var(--white); }
.contact-column a { text-decoration: none; font-size: 0.9em; }

/* ==============================
   Responsive
============================== */
@media (max-width: 992px) {
    .contact-dropdown-container {
        max-width: 220px; /* Even smaller */
        padding: 8px 12px; /* Reduced padding */
        top: 55px; /* Adjust position */
    }
    .contact-dropdown-container p,
    .contact-dropdown-container a {
        font-size: 0.75em; /* Smaller font size */
    }
    .contact-dropdown-content {
        gap: 6px; /* Reduced gap */
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 5px 0; /* Further reduced header padding for mobile */
    }
    .site-header .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo {
        margin-bottom: 8px; /* Reduced margin */
    }
    .main-nav {
        display: none; /* Hidden by default */
        width: 100%;
        text-align: center;
    }
    .main-nav.active {
        display: block; /* Use block to contain the horizontal ul */
    }
    .main-nav ul {
        display: flex; /* Make main items horizontal */
        flex-direction: row; /* Explicitly set to row */
        justify-content: center; /* Center the horizontal items */
        width: 100%;
        flex-wrap: wrap; /* Allow items to wrap if too many */
    }
    .main-nav ul li {
        position: relative; /* Keep for submenu positioning */
        margin: 0 8px; /* Reduced horizontal spacing */
        border-bottom: none; /* Remove border for horizontal layout */
    }
    .main-nav a {
        padding: 5px 0; /* Reduced link padding */
        font-size: 0.9em; /* Slightly smaller font for links */
    }
    .submenu {
        /* These properties are already defined outside the media query and should apply */
        /* if position: absolute is maintained. Only override if necessary. */
        /* display: none; */
        /* position: absolute; */
        /* background: var(--primary-blue); */
        /* min-width: 200px; */
        /* box-shadow: var(--shadow-lg); */
        /* padding: 10px 0; */
        /* opacity: 0; */
        /* visibility: hidden; */
        /* transition: opacity 0.3s ease; */
        /* list-style: none; */
        /* Remove border, box-shadow, padding-left, background from here if they conflict with desktop */
    }
    .main-nav li:hover > .submenu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        right: 20px;
        top: 50%; /* Vertically center the toggle */
        transform: translateY(-50%); /* Adjust for vertical centering */
    }

    /* Adjustments for submenu links within mobile view if needed */
    .submenu a {
        padding: 0;
        color: var(--white);
    }
    .submenu a:hover {
        background: var(--primary-blue-dark);
    }
}

