/* Font Face Definition */
/* Cormorant Garamond font is loaded from Google Fonts */

/* Global Styles */
:root {
    --primary-color: #000000; /* Pure black instead of dark green */
    --secondary-color: #333333; /* Dark gray variation of black */
    --accent-color: #e0e0e0;
    --text-color: #333;
    --light-text: #fff;
    --background-color: #fff;
    --section-bg: #f8f9fa;
    --border-color: #ddd;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --animation-duration: 0.8s;
    --animation-delay-increment: 0.2s;
    --custom-font: 'Cormorant Garamond', sans-serif; /* Default font that can be overridden */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 19px;
}
body {
    font-family: var(--custom-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--custom-font);
    font-weight: 700;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    font-size: 2.5rem;
    color: var(--primary-color);
    font-family: var(--custom-font);
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 1rem auto;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

.btn-outline {
    display: inline-block;
    background-color: transparent;
    color: var(--primary-color);
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-align: center;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--light-text);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.rounded-image {
    border-radius: 8px;
    overflow: hidden;
}

/* Header Styles */
header {
    background-color: white;
    color: var(--primary-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--border-color);
}

header .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.header-main {
    display: flex;
    align-items: center;
}

.logo a {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: var(--custom-font);
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
}

nav {
    display: flex;
    align-items: center;
}

.desktop-menu {
    display: flex;
    list-style: none;
}

.desktop-menu li {
    margin-left: 2rem;
    position: relative;
}

.desktop-menu a {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.desktop-menu a:hover {
    color: var(--secondary-color);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 280px;
    box-shadow: var(--shadow);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--primary-color);
    padding: 12px 16px;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: var(--section-bg);
    color: var(--secondary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.mobile-menu-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    margin-left: auto;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 1rem 0;
    z-index: 999;
    box-shadow: var(--shadow);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li {
    padding: 0.5rem 2rem;
}

.mobile-menu a {
    color: var(--primary-color);
    font-weight: 500;
    display: block;
    padding: 0.5rem 0;
}

.mobile-dropdown-content {
    display: none;
    padding-left: 1rem;
    width: 100%; /* Ensure full width for mobile dropdown items */
}

.mobile-dropdown-content a {
    padding: 0.5rem 0;
}

.mobile-dropdown.active .mobile-dropdown-content {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-main.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    padding: 0 1rem;
    margin-top: 70px;
    overflow: hidden;
}

/* Page-specific hero backgrounds */
.hero-home {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('../images/stock/hero-home.jpg') no-repeat center center/cover;
}

.hero-services {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-services.jpg') no-repeat center center/cover;
}

.hero-people {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-people.jpg') no-repeat center center/cover;
}

.hero-contact {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-contact.jpg') no-repeat center center/cover;
}

.hero-residential {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-residential.jpg') no-repeat center center/cover;
}

.hero-commercial {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-commercial.jpg') no-repeat center center/cover;
}

.hero-family {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-family.jpg') no-repeat center center/cover;
}

.hero-immigration {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-immigration.jpg') no-repeat center center/cover;
}

.hero-about {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-about.jpg') no-repeat center center/cover;
}

.hero-transactions {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/stock/hero-transactions.jpg') no-repeat center center/cover;
}

/* Main Hero Banner - for main menu items */
.main-hero {
    height: calc(100vh - 70px);
}

/* Sub Hero Banner - for sub-menu items */
.sub-hero {
    height: 40vh;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease forwards;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease forwards;
    animation-delay: var(--animation-delay-increment);
}

.hero .btn {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp var(--animation-duration) ease forwards;
    animation-delay: calc(var(--animation-delay-increment) * 2);
}

/* About Home Section */
.about-home {
    padding: 5rem 0;
    background-color: var(--background-color);
}

.about-home-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
}

.about-home-text {
    flex: 1.5;
    min-width: 300px;
}

.about-home-image {
    flex: 1;
    min-width: 300px;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.about-home-image:hover {
    transform: translateY(-10px);
}

.about-home-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 5rem 0;
    background-color: var(--section-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Practice Areas Section */
.practice-areas {
    padding: 5rem 0;
    background-color: var(--background-color);
}

.practice-areas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.practice-area-card {
    background-color: var(--section-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.practice-area-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.practice-area-image {
    height: 200px;
    overflow: hidden;
}

.practice-area-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.practice-area-card:hover .practice-area-image img {
    transform: scale(1.1);
}

.practice-area-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.practice-area-card p {
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.practice-area-card .btn-outline {
    margin: 0 1.5rem 1.5rem;
    align-self: flex-start;
}

.view-all-services {
    text-align: center;
    margin-top: 2rem;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background-color: var(--background-color);
}

.service-item {
    margin-bottom: 5rem;
    position: relative;
    overflow: hidden;
}

.service-item h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.service-item h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.service-content {
    position: relative;
    overflow: hidden;
    display: block; /* Ensure block display for proper float behavior */
}

.service-text {
    position: relative;
    z-index: 2;
}

.service-image {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 40%;
    float: right;
    margin: 0 0 20px 30px;
    shape-margin: 20px;
    shape-outside: margin-box;
}

.service-image::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: -15px;
    bottom: -15px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    z-index: -1;
    transition: all 0.4s ease;
}

.service-item:hover .service-image {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-item:hover .service-image::before {
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
}

.service-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.service-image img:hover {
    transform: scale(1.05);
}

/* Alternate layout for even service items */
.service-item:nth-child(even) .service-image {
    float: left;
    margin: 0 30px 20px 0;
}

.service-item:nth-child(even) .service-image::before {
    left: -15px;
    right: 15px;
}

.service-item:nth-child(even):hover .service-image::before {
    left: -20px;
    right: 20px;
}

/* Clear floats after each service item */
.service-item::after {
    content: "";
    display: table;
    clear: both;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background-color: var(--section-bg);
}

.testimonial-slider {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.testimonial-item {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
}

.testimonial-content {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s ease;
}

.testimonial-content:hover {
    transform: translateY(-10px);
}

.testimonial-content::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.1;
    line-height: 1;
}

.testimonial-author {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.testimonial-author h4 {
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.testimonial-author p {
    font-size: 0.9rem;
    margin-bottom: 0;
    color: #666;
}

/* Call to Action Section */
.cta {
    padding: 5rem 0;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/stock/hero-home.jpg') no-repeat center center/cover;
    color: var(--light-text);
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta .btn {
    background-color: var(--light-text);
    color: var(--primary-color);
    font-weight: 600;
}

.cta .btn:hover {
    background-color: var(--accent-color);
}

/* Service Detail Page */
.service-detail {
    padding: 5rem 0;
    margin-top: 70px;
    background-color: var(--background-color);
    position: relative;
}


.service-detail .service-content {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 60% 38%;
    gap: 2%;
    padding-right: 15px; /* Add padding to prevent right side cut-off */
}

.service-detail .service-text {
    position: relative;
    z-index: 2;
}

.service-detail .service-features {
    position: relative;
    z-index: 2;
    background-color: var(--section-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: fit-content;
    width: 100%; /* Ensure full width within its grid cell */
    box-sizing: border-box; /* Include padding in width calculation */
}

.service-detail ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
    list-style-type: none;
}

.service-detail ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-detail ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
}

.service-detail h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.service-detail h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.service-detail .service-features h3:first-child {
    margin-top: 0;
}

.service-detail .cta-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--primary-color);
    color: var(--light-text);
    border-radius: 8px;
    text-align: center;
}

.service-detail .cta-box p {
    margin-bottom: 1rem;
}

.service-detail .cta-box .btn {
    background-color: var(--light-text);
    color: var(--primary-color);
}

.service-detail .cta-box .btn:hover {
    background-color: var(--accent-color);
}

/* Clear floats after service detail content */
.service-detail .service-content::after {
    content: "";
    display: table;
    clear: both;
}

/* About Section */
.about {
    padding: 5rem 0;
    margin: 50px 0 0 0;
    background-color: var(--section-bg);
    position: relative;
}

.about-content {
    position: relative;
    overflow: hidden;
}

.about-text {
    position: relative;
    z-index: 2;
}

.about-text h3 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.about-text h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.about-image {
    position: relative;
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    width: 40%;
    float: right;
    margin: 0 0 20px 30px;
    shape-margin: 20px;
    shape-outside: margin-box;
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: -20px;
    right: 20px;
    bottom: -20px;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    z-index: -1;
    transition: all 0.4s ease;
}

.about:hover .about-image {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.about:hover .about-image::before {
    top: 25px;
    left: -25px;
    right: 25px;
    bottom: -25px;
}

.about-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image img:hover {
    transform: scale(1.03);
}

.about ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Clear floats after about content */
.about-content::after {
    content: "";
    display: table;
    clear: both;
}

/* People Section */
.people {
    padding: 5rem 0;
    margin-top: 70px;
    background-color: var(--background-color);
}

.people-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns on desktop */
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.person-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.person-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.person-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    z-index: 1;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.person-card:hover:before {
    transform: scaleX(1);
}

.person-image {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.person-image:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.person-card:hover .person-image:after {
    opacity: 1;
}

.person-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.person-card:hover .person-image img {
    transform: scale(1.08);
}

.person-card h3 {
    padding: 1.2rem 1.5rem 0.5rem;
    font-size: 1.6rem;
    color: var(--primary-color);
    position: relative;
}

.person-title {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.person-title:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 1.5rem;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    opacity: 0.7;
}

.person-bar-admission {
    color: #555;
    font-style: italic;
    font-size: 0.95rem;
    padding: 0 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 4px;
    padding: 0.3rem 1.5rem;
}

.person-detail {
    padding: 0.5rem 1.5rem;
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.7;
}

.person-contact {
    padding: 1rem 1.5rem 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

.person-contact a {
    color: var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.person-contact a:after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.person-contact a:hover:after {
    transform: scaleX(1);
    transform-origin: left;
}

.team-description {
    margin-top: 4rem;
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.team-description h3 {
    color: var(--primary-color);
    margin-top: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    display: inline-block;
}

.team-description h3:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.team-description h3:first-child {
    margin-top: 0;
}

.team-description p {
    line-height: 1.8;
    color: #555;
}

.team-description .btn {
    margin-top: 1rem;
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    margin-top: 70px;
    background-color: var(--section-bg);
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.contact-form-container {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
    width: 30px;
    text-align: center;
}

.contact-hours, .contact-directions, .contact-note {
    margin-top: 1.5rem;
}

.contact-hours h3, .contact-directions h3, .contact-note h3, .contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Contact Form Styles */
.contact-form {
    padding: 1.5rem;
    background-color: var(--background-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 100%;
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.contact-form h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

textarea.form-control {
    min-height: 120px;
}

.text-danger {
    color: #dc3545;
    font-size: 1rem;
    margin-top: 5px;
    display: block;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Full width map */
.full-width-map {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 1rem;
}

/* Map Container Styles */
.map-container {
    flex: 1;
    min-width: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
}

/* Footer */
footer {
    background-color: white;
    color: var(--text-color);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.footer-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.footer-contact .contact-item {
    display: flex;
    align-items: center;
}

.footer-contact .contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.footer-contact .contact-item p {
    margin-bottom: 0;
}

.footer-contact .contact-item a {
    color: var(--primary-color);
}

.footer-contact .contact-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.footer-links {
    flex: 2;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--primary-color);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Animation Styles */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
}

.animate-fade-in.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
}

.animate-scale-in.animated {
    opacity: 1;
    transform: scale(1);
}

.animate-fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
}

.animate-fade-in-left.animated {
    opacity: 1;
    transform: translateX(0);
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(30px);
}

.animate-fade-in-right.animated {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Responsive Styles */
@media (max-width: 992px) {
    /* Fix for service detail page right sidebar */
    .service-detail .service-content {
        padding-right: 0; /* Remove right padding at this breakpoint */
    }
    
    .desktop-menu {
        display: none;
    }

    .mobile-menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    header .container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .header-main {
        width: 100%;
        justify-content: space-between;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-home-content {
        display: flex;
        flex-direction: column;
    }
    
    .service-content {
        grid-template-columns: 1fr;
        display: block; /* Ensure block display for proper float behavior */
        overflow: hidden; /* Ensure floats are contained */
    }
    
    /* Direct targeting of service items */
    .service-item:nth-of-type(1) .service-image,
    .service-item:nth-of-type(3) .service-image,
    .service-item:nth-of-type(5) .service-image {
        width: 40%;
        float: right;
        margin: 0 0 20px 30px;
        shape-margin: 20px;
        shape-outside: margin-box;
    }
    
    .service-item:nth-of-type(2) .service-image,
    .service-item:nth-of-type(4) .service-image {
        width: 40%;
        float: left;
        margin: 0 30px 20px 0;
        shape-margin: 20px;
        shape-outside: margin-box;
    }
    
    .service-image::before {
        top: 15px;
        left: 15px;
        right: 15px;
        bottom: -15px;
    }
    
    .service-item:nth-child(even) .service-image::before {
        left: 15px;
        right: 15px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        margin-top: 3rem;
    }
    
    .service-detail .service-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-detail .service-features {
        margin-top: 2rem;
    }
    
    .about-home-image {
        margin-top: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .practice-areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-slider {
        flex-direction: column;
        align-items: center;
    }
    
    .testimonial-item {
        width: 100%;
        max-width: 500px;
        margin-bottom: 2rem;
    }
    
    .cta h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    header .container {
        padding: 0.5rem 15px;
    }
    
    .logo a {
        font-size: 1.5rem;
    }
    
    .main-hero {
        height: calc(100vh - 70px);
        padding: 2rem 1rem; /* Added padding for better spacing */
    }
    
    .sub-hero {
        height: auto; /* Changed to auto height to accommodate content */
        min-height: 30vh; /* Minimum height */
        padding: 3rem 1rem; /* Added padding for better spacing */
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem; /* Reduced margin for tighter layout */
    }
    
    .hero p {
        margin-bottom: 1.5rem; /* Adjusted margin for better spacing */
    }

    .section-title {
        font-size: 2rem;
    }

    .service-item h3 {
        font-size: 1.5rem;
    }
    
    /* For smaller screens, make images full width and stack them above the text */
    .service-item .service-image,
    .service-item:nth-child(even) .service-image,
    .service-item:nth-child(odd) .service-image,
    .service-detail .service-image,
    .about-image {
        width: 100%;
        float: none;
        margin: 0 0 2rem 0; /* Changed to put margin at the bottom */
        shape-margin: 0;
        shape-outside: none;
    }
    
    /* Ensure service content displays as a block with proper stacking */
    .service-content, .about-content {
        display: flex;
        flex-direction: column;
    }
    
    /* Place image above text */
    .service-image, .about-image {
        order: 0;
    }
    
    .service-text, .about-text {
        order: 1;
    }
    
    /* Move "Why Choose Us" section to the bottom on mobile */
    .service-features {
        order: 2;
        margin-top: 2rem;
    }
    
    .feature-icon {
        font-size: 2rem;
    }
    
    .practice-area-card h3 {
        font-size: 1.2rem;
    }
    
    .cta h2 {
        font-size: 1.8rem;
    }
    
    .cta p {
        font-size: 1.1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-contact {
        text-align: center;
        margin-right: 0;
    }
    
    .footer-contact .contact-item {
        justify-content: center;
    }
    
    .footer-links ul {
        justify-content: center;
    }
    
    .map-container iframe {
        height: 350px;
    }
}

@media (max-width: 768px) {
    /* People grid - 1 column on mobile */
    .people-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}

@media (max-width: 576px) {
    header .container {
        padding: 0.5rem 10px;
    }
    
    .logo a {
        font-size: 1.1rem;
    }
    
    .logo img, .footer-logo img {
        max-height: 40px;
    }
    
    .main-hero {
        height: calc(100vh - 70px); /* Adjusted to account for header height */
        padding: 3rem 1.5rem; /* Increased padding for better spacing */
    }
    
    .sub-hero {
        height: auto; /* Changed to auto height to accommodate content */
        min-height: 25vh; /* Minimum height */
        padding: 2.5rem 1.5rem; /* Increased padding for better spacing */
    }

    .hero h1 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem; /* Reduced margin for tighter layout */
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 1.2rem; /* Adjusted margin for better spacing */
    }

    .btn {
        padding: 10px 20px;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .about-home, .why-choose-us, .practice-areas, .testimonials, .cta {
        padding: 3rem 0;
    }
    
    .feature-card {
        padding: 1.2rem;
    }
    
    .feature-icon {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
    }
    
    .practice-areas-grid {
        grid-template-columns: 1fr;
    }
    
    .practice-area-image {
        height: 180px;
    }
    
    .testimonial-content {
        padding: 1.5rem;
    }
    
    .testimonial-content::before {
        font-size: 3rem;
    }
    
    .cta h2 {
        font-size: 1.6rem;
    }
    
    .cta p {
        font-size: 1rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
    
    .footer-links ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .footer-links li {
        margin-bottom: 0.25rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.9rem;
    }
}
