:root {
    --primary-color: #2D6A4F;
    /* Deep healing green */
    --secondary-color: #40916C;
    /* Softer green */
    --accent-color: #D8F3DC;
    /* Light green accent */
    --text-color: #1B4332;
    /* Dark green text */
    --bg-color: #F7FFF7;
    /* Off-white mint background */
    --card-bg: #FFFFFF;
    --footer-bg: #1B4332;
    --input-bg: #FFFFFF;
    --input-border: #ddd;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Responsive spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 5rem;

    /* Container widths */
    --container-padding: 5%;
}

body.dark-theme {
    --primary-color: #74c69d;
    --secondary-color: #95d5b2;
    --accent-color: #2D6A4F;
    --text-color: #e8f5e9;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --footer-bg: #000000;
    --input-bg: #2d2d2d;
    --input-border: #444;
}

/* Light theme - explicitly set when user manually chooses light mode (overrides system dark preference) */
body.light-theme {
    --primary-color: #2D6A4F;
    --secondary-color: #40916C;
    --accent-color: #D8F3DC;
    --text-color: #1B4332;
    --bg-color: #F7FFF7;
    --card-bg: #FFFFFF;
    --footer-bg: #1B4332;
    --input-bg: #FFFFFF;
    --input-border: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ========================= */
/* HEADER & NAVIGATION       */
/* ========================= */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

body.dark-theme header {
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    white-space: nowrap;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--secondary-color);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================= */
/* BUTTONS                   */
/* ========================= */
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background-color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* ========================= */
/* HERO SECTION              */
/* ========================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--container-padding);
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--accent-color) 100%);
    padding-top: 100px;
    gap: 2rem;
}

.hero-content {
    max-width: 50%;
    flex: 1;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: -webkit-linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
    color: #555;
}

.hero-image {
    max-width: 45%;
    position: relative;
    flex: 1;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ========================= */
/* SERVICES SECTION          */
/* ========================= */
.services {
    padding: var(--spacing-xxl) var(--container-padding);
    background-color: var(--card-bg);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.section-header p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.dark-theme .service-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-img {
    height: 200px;
    background-color: #eee;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.05);
}

.service-content {
    padding: 1.5rem;
}

.service-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.service-content p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.service-price {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 1rem;
}

.service-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.service-actions .btn-primary,
.service-actions .btn-outline {
    flex: 1;
    min-width: 100px;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.service-actions .read-more {
    font-size: 0.85rem;
}

/* ========================= */
/* FEATURES SECTION          */
/* ========================= */
.features {
    padding: var(--spacing-xxl) var(--container-padding);
    background: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* ========================= */
/* FORMS                     */
/* ========================= */
.form-container {
    width: 100%;
    max-width: 500px;
    margin: 8rem auto 4rem;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    /* Prevents iOS zoom on focus */
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px var(--accent-color);
}

/* ========================= */
/* FOOTER                    */
/* ========================= */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding: var(--spacing-xxl) var(--container-padding) 1rem;
    font-size: 0.95rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-bottom: 3rem;
    text-align: left;
}

.footer-column h3 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-family: var(--font-heading);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.footer-social a {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    margin-top: 2rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

footer p {
    opacity: 0.8;
}

/* ========================= */
/* THEME TOGGLE              */
/* ========================= */
.theme-toggle-btn {
    background: none;
    border: 1px solid transparent;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    line-height: 1;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.theme-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: rotate(15deg);
}

body.dark-theme .theme-toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========================= */
/* CONTACT PAGE              */
/* ========================= */
.contact-hero {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--accent-color) 100%);
    padding: 8rem var(--container-padding) 4rem;
    text-align: center;
}

.contact-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem var(--container-padding);
}

.contact-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.contact-text {
    color: var(--text-color);
    font-size: 1.1rem;
    word-break: break-word;
}

/* ========================= */
/* UTILITIES                 */
/* ========================= */
.text-center {
    text-align: center;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================= */
/* RESPONSIVE BREAKPOINTS    */
/* ========================= */

/* Large tablets & small laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    :root {
        --container-padding: 4%;
    }

    .hero {
        gap: 1.5rem;
    }

    .hero-content {
        max-width: 55%;
    }

    .hero-image {
        max-width: 40%;
    }

    nav ul {
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (max-width: 900px) */
@media (max-width: 900px) {
    :root {
        --container-padding: 3%;
        --spacing-xxl: 4rem;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--card-bg);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        padding: 5rem 2rem 2rem;
        z-index: 999;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
    }

    nav ul li {
        width: 100%;
    }

    nav a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
    }

    nav a.btn-primary {
        margin-top: 1rem;
        text-align: center;
    }

    /* Mobile overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
    }

    .nav-overlay.active {
        display: block;
    }

    /* Hero responsive */
    .hero {
        flex-direction: column;
        padding-top: 100px;
        text-align: center;
        min-height: auto;
        padding-bottom: 4rem;
    }

    .hero-content,
    .hero-image {
        max-width: 100%;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        margin-top: 1rem;
        max-width: 80%;
    }

    .hero-content .btn-primary,
    .hero-content .btn-outline {
        margin: 0.5rem 0.25rem;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 1.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Phones (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --spacing-xxl: 3rem;
        --spacing-xl: 2rem;
    }

    html {
        font-size: 15px;
    }

    header {
        padding: 0.75rem 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Hero adjustments */
    .hero {
        padding-top: 80px;
        padding-bottom: 3rem;
    }

    .hero-content h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-image {
        max-width: 100%;
    }

    .hero-image img {
        border-radius: 15px;
    }

    /* Buttons */
    .btn-primary,
    .btn-outline {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
    }

    /* Forms */
    .form-container {
        margin: 6rem 1rem 2rem;
        padding: 1.5rem;
        border-radius: 15px;
    }

    .form-container h2 {
        font-size: 1.5rem;
    }

    /* Services */
    .services {
        padding: var(--spacing-xxl) var(--container-padding);
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-img {
        height: 180px;
    }

    .service-content {
        padding: 1.25rem;
    }

    .service-actions {
        flex-direction: column;
    }

    .service-actions .btn-primary,
    .service-actions .btn-outline {
        width: 100%;
        padding: 0.75rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links li {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    footer {
        padding: 3rem var(--container-padding) 1rem;
    }

    /* Contact grid */
    .contact-grid {
        grid-template-columns: 1fr;
        padding: 2rem var(--container-padding);
    }

    .contact-hero {
        padding: 6rem var(--container-padding) 2rem;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --container-padding: 0.75rem;
    }

    html {
        font-size: 14px;
    }

    header {
        padding: 0.5rem 0.75rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .mobile-menu-toggle span {
        width: 22px;
        height: 2px;
        margin: 4px 0;
    }

    nav {
        width: 100%;
        max-width: none;
        padding: 4rem 1.5rem 1.5rem;
    }

    .hero {
        padding-top: 70px;
    }

    .hero-content h1 {
        font-size: 1.75rem;
    }

    .btn-primary,
    .btn-outline {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        margin: 0.25rem 0;
    }

    .form-container {
        margin: 5rem 0.5rem 1.5rem;
        padding: 1.25rem;
    }

    .service-card {
        border-radius: 12px;
    }

    .service-img {
        height: 160px;
    }

    .service-content {
        padding: 1rem;
    }

    .service-content h3 {
        font-size: 1.1rem;
    }

    .contact-card {
        padding: 1.5rem;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .footer-column h3 {
        font-size: 1.15rem;
    }

    .footer-social a {
        width: 36px;
        height: 36px;
    }
}

/* Landscape phones (max-height: 500px) and (orientation: landscape) */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px var(--container-padding) 2rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-content p {
        margin-bottom: 1rem;
    }

    .hero-image {
        max-width: 35%;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    nav a {
        padding: 0.75rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .btn-primary,
    .btn-outline {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .service-card:hover {
        transform: none;
    }

    .service-card:active {
        transform: scale(0.98);
    }

    .contact-card:hover {
        transform: none;
    }

    .footer-social a:hover {
        transform: none;
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .hero-image img,
    .service-img img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-image img {
        animation: none;
    }
}

/* Dark mode preference - only applies if user hasn't manually chosen a theme */
@media (prefers-color-scheme: dark) {
    body:not(.light-theme):not(.dark-theme) {
        --primary-color: #74c69d;
        --secondary-color: #95d5b2;
        --accent-color: #2D6A4F;
        --text-color: #e8f5e9;
        --bg-color: #121212;
        --card-bg: #1e1e1e;
        --footer-bg: #000000;
        --input-bg: #2d2d2d;
        --input-border: #444;
    }

    body:not(.light-theme):not(.dark-theme) header {
        background: rgba(30, 30, 30, 0.95);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    body:not(.light-theme):not(.dark-theme) .service-card {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    body:not(.light-theme):not(.dark-theme) .theme-toggle-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Print styles */
@media print {

    header,
    footer,
    .mobile-menu-toggle,
    nav {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        min-height: auto;
        padding: 1rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}