:root {
    --primary: #1D3557; /* Deeper Corporate Blue */
    --secondary: #E63946; /* Refined Red */
    --accent: #F4A261; /* Professional Orange/Gold */
    --light: #ecf0f1;
    --dark: #14213d; /* Adjusted dark for harmony */
    --text: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    padding: 15px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 40px; 
    width: auto; 
    margin-left: 10px;
    display: block;
}

.logo-text h1 {
    font-size: 1.2rem; 
    margin: 0;
    line-height: 1.2;
    color: white;
}

.logo-text .tagline {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1;
    color: var(--accent);
    font-weight: 400;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.1);
}

/* Active Navigation Link Style */
nav ul li a.active {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 2px solid var(--accent);
}

.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    /* Ensure you have a 'hero-background.jpg' file or update the URL here */
    background: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.9)), 
        url('images/legal-bg.jpg'); 
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #c0392b; 
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Button press down effect */
.btn:active {
    background: #a93226; 
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s, box-shadow 0.1s, background 0.1s;
}

/* Services Section */
.services {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding: 30px 20px;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15); 
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
    transition: transform 0.6s ease-in-out; 
}

/* Service Icon Spin on hover */
.service-card:hover .service-icon {
    transform: rotate(360deg);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--light);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Combined Contact & Why Choose Us Section */
.contact {
    padding: 80px 0;
    background: white;
}

/* Container for both contact info and why choose us */
.contact-and-choices-container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap; 
    margin-top: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.business-hours {
    margin-top: 30px;
}

.business-hours h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Why Choose Us Content Styling within the Contact Section */
.why-choose-us-content {
    flex: 1;
    min-width: 300px;
}

.why-choose-us-content h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.choices-grid-small {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.choice-card-small {
    background: var(--light);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    text-align: left;
    transition: transform 0.2s;
    display: flex;
    align-items: center; 
}

.choice-card-small:hover {
    transform: translateY(-5px); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.choice-icon-small {
    font-size: 1.8rem;
    color: var(--secondary);
    margin-right: 15px;
    flex-shrink: 0;
}

/* New: Ensure text content takes available space */
.choice-text-content {
    flex-grow: 1; 
}

.choice-card-small h4 {
    font-size: 1.1rem;
    color: var(--primary);
    margin: 0 0 5px 0; /* Adjusted margin */
}

.choice-card-small p {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.4;
    margin: 0; /* Ensure no extra paragraph margin */
}


/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #aaa;
}

/* Back to Top Button Styles */
#backToTopBtn {
    display: none; 
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 999;
    border: none;
    outline: none;
    background-color: var(--secondary);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, opacity 0.3s;
}

#backToTopBtn:hover {
    background-color: #c0392b;
}


/* Responsive Design */
@media (max-width: 992px) {
    .about-content, .contact-and-choices-container {
        flex-direction: column;
    }
    .contact-and-choices-container {
        gap: 30px; 
    }
    .contact-info, .why-choose-us-content {
        min-width: unset; 
        width: 100%;
    }
    .choices-grid-small {
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    .logo {
        margin-bottom: 15px;
    }
    
    .mobile-menu {
        display: block;
        margin-top: 15px;
    }
    
    /* Mobile Menu Show/Hide Styling */
    nav ul {
        display: none; 
        width: 100%;
        background: var(--dark);
        padding: 10px 0;
        position: absolute;
        top: 60px;
        left: 0;
    }

    nav ul.show {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        position: absolute;
    }
    
    nav ul li {
        margin: 10px 0;
    }

    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
}