/* Basic styling */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif; /* Refined font stack */
    margin: 0;
    padding: 0;
    background-color: var(--background-main); /* Updated background */
    color: var(--text-main);
    line-height: 1.65; /* Slightly increased line height for readability */
    -webkit-font-smoothing: antialiased; /* Smoother fonts on WebKit */
    -moz-osx-font-smoothing: grayscale; /* Smoother fonts on Firefox */
}

/* Color Palette - Refined and Expanded */
:root {
    --primary-color: #0A2342; /* Deeper Blue */
    --secondary-color: #F8F9FA; /* Off-white/Very Light Gray - for backgrounds */
    --accent-color: #FFB600; /* Brighter Gold/Amber */
    --accent-hover: #E0A000; /* Darker Gold for hover */
    --accent-color-rgb: 255, 182, 0; /* For #FFB600, used in focus shadow */

    --text-main: #212529; /* Dark Gray for body text - good contrast on light bg */
    --text-light: #FFFFFF; /* White for text on dark backgrounds */
    --text-muted: #6C757D; /* Muted gray for less important text */

    --background-main: #FFFFFF; /* White main background */
    --background-card: #FFFFFF; /* White for cards, can be same as main or slightly off */
    --border-color: #DEE2E6; /* Light gray for borders */

    --success-color: #28A745;
    --error-color: #DC3545;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.09);

    --border-radius-sm: 0.2rem;
    --border-radius-md: 0.375rem; /* 6px */
    --border-radius-lg: 0.5rem;
}

/* Global Transitions for Hover Effects */
a, button, .service-item, .benefit {
    transition: all 0.3s ease-in-out;
}


/* Header and Navigation - Polished */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 0.75rem 0; /* Slightly reduced padding */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md); /* Refined shadow */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav .logo {
    font-size: 1.6em; /* Slightly larger logo */
    font-weight: bold;
    color: var(--text-light); /* Ensure logo text is light */
}

nav ul.nav-links li a { /* Targeting .nav-links specifically */
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500; /* Medium weight for nav links */
    padding: 8px 12px; /* Adjusted padding */
    border-radius: var(--border-radius-md);
}

nav ul.nav-links li a:hover,
nav ul.nav-links li a.active {
    color: var(--primary-color);
    background-color: var(--accent-color);
    box-shadow: var(--shadow-sm);
}

/* Hero Section - Visual Impact */
#hero, .page-hero {
    background-color: var(--secondary-color);
    color: var(--text-main); /* Main text color for hero content */
    text-align: center;
    padding: 140px 20px 80px; /* Increased top/bottom padding */
    position: relative;
    background-size: cover; /* For actual image later */
    background-position: center; /* For actual image later */
}
/* Example of adding a subtle overlay if a background image were present */
/* #hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(10, 35, 66, 0.1); /* Subtle dark blue overlay */
/* z-index: 1;
} */
/* #hero .hero-content, .page-hero .hero-content {
    position: relative;
    z-index: 2; /* Ensure content is above overlay */
/* } */

#hero .hero-content h1, .page-hero .hero-content h1 {
    font-size: 2.8rem; /* Larger hero headline */
    margin-bottom: 0.75em;
    color: var(--primary-color);
    font-weight: 700; /* Bolder */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1); /* Subtle text shadow */
}

#hero .sub-headline, .page-hero p {
    font-size: 1.25rem; /* Slightly larger sub-headline */
    margin-bottom: 1.75em;
    color: var(--text-muted); /* Muted text for sub-headline */
    max-width: 750px; /* Slightly reduced max-width for readability */
    margin-left: auto;
    margin-right: auto;
}

#hero .hero-image-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    margin-bottom: 25px;
    box-shadow: var(--shadow-lg);
}

/* Buttons - Refined Styling */
.cta-button {
    background-color: var(--accent-color);
    color: var(--primary-color); /* Removed !important */
    padding: 14px 30px; /* Increased padding */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    text-transform: uppercase; /* Optional: for CTA emphasis */
    letter-spacing: 0.5px; /* Optional */
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px) scale(1.03); /* More pronounced hover */
    box-shadow: var(--shadow-md);
}
.cta-button:active {
    transform: translateY(-1px) scale(1);
    box-shadow: var(--shadow-sm);
}


/* Key Benefits & Content Sections - Enhanced Visuals */
#key-benefits, .content-section {
    padding: 50px 20px;
    text-align: left;
    background-color: var(--background-main); /* Use main background for sections */
    max-width: 960px; /* Increased max-width */
    margin: 40px auto;
    border-radius: var(--border-radius-lg); /* Larger border radius */
    box-shadow: var(--shadow-md); /* Softer shadow for content blocks */
}
#services-cta { /* Specific CTA section */
    background-color: var(--secondary-color); /* Light background for this CTA */
}


#key-benefits h2, .content-section h2 {
    font-size: 2.2rem; /* Slightly larger section titles */
    margin-bottom: 40px;
    color: var(--primary-color);
    text-align: center;
    font-weight: 600;
}

.benefits-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 25px; /* Added gap for benefits */
}

/* Cards/Content Blocks - Refined (Benefit & Service Items) */
.benefit, .service-item {
    background-color: var(--background-card); /* Card background */
    padding: 30px; /* Increased padding */
    margin: 0; /* Margin handled by gap in flex/grid container */
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: left;
}

.benefit:hover, .service-item:hover { /* Consistent hover for cards */
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}


.benefit h3, .service-item h3 {
    font-size: 1.6rem; /* Larger card titles */
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.benefit p, .service-item p {
    font-size: 1rem; /* Standardized paragraph font size */
    color: var(--text-main); /* Main text color for paragraphs */
    line-height: 1.7; /* Improved line height for card content */
}

.content-section p {
    font-size: 1.1rem;
    line-height: 1.75; /* Consistent line height */
    margin-bottom: 1.25rem; /* Consistent paragraph spacing */
    color: var(--text-main);
}

.content-section strong {
    color: var(--primary-color);
    font-weight: 600; /* Bolder strong text */
}

/* Content-Image Container for Why Us page */
.content-img-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: center;
    gap: 30px;
    margin-top: 20px;
}
.content-img-container .content-image {
    flex: 1 1 300px; /* Flex properties for image */
    max-width: 100%; /* Ensure image is responsive */
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}
.content-img-container div { /* Text container */
    flex: 2 1 300px; /* Text takes more space */
}

.service-icon {
    margin-bottom: 15px; /* Space below icon */
    color: var(--primary-color); /* Icon color */
    text-align: center; /* Center icon if it's smaller than container */
}

.service-icon svg {
    width: 48px; /* Control icon size */
    height: 48px;
    opacity: 0.9;
}


/* Services Page Specific Styles - Grid refinement */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger minmax */
    gap: 30px; /* Increased gap */
    margin-top: 25px;
}


/* Owner Portal Page Specific Styles - Refined */
#owner-portal-content .page-hero .hero-content h1 .accent-text {
    color: var(--accent-color);
}

#portal-info ul {
    list-style: none;
    padding: 0;
    margin: 25px auto;
    max-width: 650px;
    text-align: left;
}

#portal-info ul li {
    padding: 10px 0; /* Increased padding */
    font-size: 1.1rem; /* Standardized font size */
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color); /* Use theme border color */
}
#portal-info ul li:last-child {
    border-bottom: none; /* Remove border from last item */
}

#portal-info ul li::before {
    content: '✓';
    color: var(--accent-color);
    margin-right: 12px; /* Increased spacing */
    font-weight: bold;
}

#portal-info .placeholder-icon {
    margin: 35px 0;
    color: var(--primary-color);
}

#portal-info .placeholder-icon svg {
    margin: 0 12px;
    opacity: 0.85;
}

/* Contact Page Specific Styles - Form Elegance */
#contact-details .contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px; /* Increased gap */
    justify-content: space-between;
}

#contact-details .contact-info,
#contact-details .contact-form-section {
    flex-basis: calc(50% - 25px);
    min-width: 300px;
}

#contact-details .contact-info h2,
#contact-details .contact-form-section h2 {
    text-align: left;
    margin-bottom: 25px;
    font-weight: 600;
}

#contact-details .contact-info ul {
    list-style: none;
    padding: 0;
}

#contact-details .contact-info ul li {
    padding: 10px 0; /* Consistent padding */
    font-size: 1.1rem;
    color: var(--text-main);
    border-bottom: 1px dotted var(--border-color); /* Dotted for info list */
}
#contact-details .contact-info ul li:last-child {
    border-bottom: none;
}

#contact-details .contact-info ul li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.map-placeholder {
    margin-top: 25px;
    padding: 15px;
    background-color: var(--secondary-color);
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 1px solid var(--border-color);
}
.map-placeholder img {
    border-radius: var(--border-radius-md); /* Rounded corners for placeholder image */
}


.contact-form .form-group {
    margin-bottom: 25px; /* Increased spacing */
}

.contact-form label {
    display: block;
    margin-bottom: 10px; /* Increased spacing */
    font-weight: 600; /* Bolder labels */
    color: var(--primary-color);
    font-size: 1.05rem; /* Slightly larger label */
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 14px; /* Increased padding */
    border: 1px solid var(--border-color); /* Theme border color */
    border-radius: var(--border-radius-md);
    box-sizing: border-box;
    font-size: 1rem;
    color: var(--text-main); /* Ensure input text color is readable */
    background-color: var(--background-main); /* Ensure background is light */
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form textarea:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(var(--accent-color-rgb), 0.25);
}

.contact-form textarea {
    resize: vertical;
    min-height: 140px; /* Increased min-height */
}

.contact-form .cta-button {
    display: inline-block;
    width: auto;
    cursor: pointer;
}


/* Footer - Cleaned Up */
footer {
    background-color: var(--primary-color);
    color: var(--text-light);
    text-align: center;
    padding: 25px 0; /* Increased padding */
    margin-top: 50px; /* Increased margin */
    border-top: 3px solid var(--accent-color); /* Accent border top */
}

footer p {
    margin: 0;
    font-size: 0.95rem; /* Slightly larger footer text */
    font-weight: 500;
}

/* Animations - Smoothness */
/* Default state of fade-in-elements is visible (opacity 1, transform Y 0) */
.fade-in-element {
    transition: opacity 0.65s ease-out, transform 0.65s ease-out;
    /* By default, elements are opacity: 1 and transform: translateY(0) unless overridden elsewhere */
}

/* State applied by JS to prepare for animation */
.js-fade-in-ready {
    opacity: 0;
    transform: translateY(25px);
}

/* State applied by JS when element is visible */
.fade-in-element.is-visible { /* Keep .fade-in-element for the transition property */
    opacity: 1;
    transform: translateY(0);
}

/* Responsive adjustments */

/* General Typography & Spacing Adjustments */
html {
    font-size: 100%;
}

body {
    font-size: 1rem;
}

/* Base heading sizes for desktop, will be adjusted in media queries */
h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }


/* Mobile Navigation Styles */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1100;
}

.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    transition: background-color 0s 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-light);
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.nav-open .hamburger {
    background-color: transparent;
}

.nav-open .hamburger::before {
    transform: rotate(45deg);
    top: 0;
    transition: top 0.3s ease-in-out, transform 0.3s ease-in-out 0.3s;
}

.nav-open .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
    transition: top 0.3s ease-in-out, transform 0.3s ease-in-out 0.3s;
}


@media (max-width: 768px) {
    nav .logo {
        font-size: 1.4em; /* Adjusted for mobile */
    }
    .nav-toggle {
        display: block;
    }

    nav ul.nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 56px; /* Approximate height of header, adjust if needed */
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        padding: 20px 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    nav ul.nav-links.nav-open {
        display: flex;
    }

    nav ul.nav-links li { /* Targeting .nav-links specifically */
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    nav ul.nav-links li a { /* Targeting .nav-links specifically */
        padding: 10px 15px;
        display: block;
        width: 100%;
    }
    nav ul.nav-links li a:hover, /* Targeting .nav-links specifically */
    nav ul.nav-links li a.active {
        background-color: var(--accent-color);
        color: var(--primary-color);
    }
    header {
        padding: 0.6rem 0;
    }
    nav {
        padding: 0 15px;
    }


    /* Hero Section Adjustments */
    #hero, .page-hero {
        padding: 90px 15px 50px;
    }
    #hero .hero-content h1, .page-hero .hero-content h1 {
        font-size: 2.2rem;
    }
    #hero .sub-headline, .page-hero p {
        font-size: 1.1rem;
    }
    .cta-button {
        font-size: 1rem;
        padding: 12px 24px;
    }

    /* Key Benefits / Content Sections Adjustments */
    #key-benefits, .content-section {
        padding: 30px 15px;
        margin: 25px auto;
    }
    #key-benefits h2, .content-section h2 {
        font-size: 1.9rem;
        margin-bottom: 25px;
    }
    .benefit h3, .service-item h3, .content-section h3 {
        font-size: 1.4rem;
    }
    .content-section p, .benefit p, .service-item p {
        font-size: 1rem;
        line-height: 1.65;
    }
    .benefits-container, #contact-details .contact-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .benefit, #contact-details .contact-info, #contact-details .contact-form-section {
        flex-basis: 90%;
        margin: 0; /* Margin handled by gap */
        padding: 20px;
    }


    /* Services Grid Adjustments */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .service-item {
        padding: 20px;
    }

    /* Contact Form Adjustments */
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form input[type="tel"],
    .contact-form textarea {
        padding: 12px;
        font-size: 1rem;
    }
    .contact-form label {
        font-size: 1rem;
    }


    /* Footer Adjustments */
    footer {
        padding: 20px 0;
        margin-top: 30px;
    }
    footer p {
        font-size: 0.9rem;
    }

    /* Adjusting heading sizes for mobile */
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.9rem; }
    h3 { font-size: 1.4rem; }

    .content-img-container { /* Stack image and text on mobile */
        flex-direction: column;
    }
    .content-img-container .content-image {
        margin-bottom: 20px; /* Add space below image when stacked */
    }
}

/* Tablet Breakpoint - Refinements */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Refine typography for tablets */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    #key-benefits, .content-section {
        padding: 40px 20px;
    }
    .benefit {
        flex-basis: calc(50% - 12.5px); /* Adjust based on gap */
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
     #hero .hero-content h1, .page-hero .hero-content h1 {
        font-size: 2.5rem;
    }
    #hero .sub-headline, .page-hero p {
        font-size: 1.2rem;
    }
    .content-img-container { /* Ensure proper spacing on tablets if not wrapping yet */
        gap: 25px;
    }
}

/* Subtle pulse animation for hero CTA */
@keyframes pulse {
    0% {
        transform: scale(1) translateY(0); /* ensure translateY is part of base */
        box-shadow: var(--shadow-sm);
    }
    50% {
        transform: scale(1.03) translateY(-3px); /* combine with existing hover effect */
        box-shadow: var(--shadow-md);
    }
    100% {
        transform: scale(1) translateY(0);
        box-shadow: var(--shadow-sm);
    }
}

.hero-cta-pulse {
    animation: pulse 1.75s 2 ease-in-out; /* Pulse twice, slightly slower */
}
