/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family-body);
    color: var(--color-text-main);
    line-height: 1.6;
    background-color: var(--color-white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    /* Rounded corners but not pill */
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    border: none;
    font-family: var(--font-family-heading);
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-light) 0%, #5a8c32 100%);
    color: var(--color-white);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a8c32 0%, var(--color-primary-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: var(--color-accent-green);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #5a8c32;
    /* darker green */
    transform: translateY(-2px);
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: var(--spacing-md);
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary-dark);
}

.btn-outline:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* Typography Utility */
.section-title {
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

/* Header Styles */
.main-header {
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-links ul {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

/* Navigation & Dropdowns */
.nav-links a {
    font-family: var(--font-family-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-main);
    display: block;
    padding: 10px;
}

.nav-links a:hover {
    color: var(--color-primary-light);
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-white);
    min-width: 200px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 1000;
    top: 100%;
    left: 0;
    border-radius: 4px;
}

.dropdown-content a {
    color: var(--color-text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--color-light-grey);
    color: var(--color-primary-light);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Mobile Dropdown */
@media (max-width: 768px) {
    .dropdown {
        display: block;
        width: 100%;
        text-align: center;
    }

    .dropdown-content {
        position: static;
        display: none;
        /* JS or Hover needed for mobile, but simple hover works on some, usually needs JS toggle */
        box-shadow: none;
        background-color: var(--color-light-grey);
        width: 100%;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary-dark);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background-color: var(--color-primary-dark);
    background-image: linear-gradient(rgba(238, 246, 251, 0.75) 0%, rgba(200, 230, 201, 0.7) 100%), url('hero-bg.jpg');
    background-size: cover;
    background-position: center 35%;
    color: var(--color-primary-dark);
    padding: var(--spacing-xl) 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    /* Centering content */
    align-items: center;
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-family-heading);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 255, 255, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 255, 255, 0.7), 0 0 30px rgba(255, 255, 255, 0.5);
}

/* Intro Section */
.section-padding {
    padding: var(--spacing-lg) 0;
}

.section-subtitle {
    text-align: center;
    color: var(--color-primary-light);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.mission-callout {
    border-left: 4px solid var(--color-primary-dark);
    background-color: var(--color-light-grey);
    padding: 2rem;
    border-radius: 0 8px 8px 0;
    margin-top: 2.5rem;
    text-align: center;
}

.mission-callout p {
    font-style: italic;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        border-top: 1px solid #eee;
        padding: var(--spacing-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-fast);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-links ul {
        flex-direction: column;
        align-items: center;
        /* Center on mobile */
        gap: var(--spacing-md);
    }

    .hero h1 {
        font-size: 2rem;
    }
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Service Flip Cards */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px;
    /* Fixed height for consistency */
    perspective: 1000px;
    /* Remove if you don't want 3D effect */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    will-change: transform;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
    box-sizing: border-box;
    overflow: hidden;
}

.flip-card-front {
    background-color: white;
    color: black;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    filter: brightness(0.7);
    /* Darken slightly to make text readable */
}

.flip-card-front h3 {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}

.flip-card-back {
    background-color: var(--color-primary-dark);
    color: white;
    transform: rotateY(180deg) translateZ(1px);
    padding: var(--spacing-md);
}

.flip-card-back p {
    font-size: 1rem;
    line-height: 1.5;
}

.service-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform var(--transition-fast);
}

.icon-box {
    color: var(--color-primary-light);
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    font-family: var(--font-family-heading);
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.service-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-main);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.service-card p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
}

.learn-more {
    color: var(--color-accent-green);
    font-weight: 600;
    font-size: 0.9rem;
}

.learn-more:hover {
    text-decoration: underline;
}

/* Footer Styles */
.main-footer {
    background-color: var(--color-light-grey);
    color: var(--color-text-main);
    padding: var(--spacing-lg) 0;
}

.footer-col h4 {
    font-family: var(--font-family-heading);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary-dark);
}

.footer-col ul {
    list-style: none;
    padding-left: 0;
    opacity: 0.8;
    font-size: 0.9rem;
    line-height: 2;
}

.footer-col a {
    color: var(--color-text-main);
    text-decoration: none;
}

.footer-col p {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
    .footer-logo {
        filter: brightness(0) invert(1);
    }
}

.main-footer .copyright {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.6;
}

@media (prefers-color-scheme: dark) {
    .main-footer .copyright {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Footer Grid */
.footer-grid {
    display: grid;
    /* Default to auto-fit for adaptability, but specifically override for desktop below */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

@media (min-width: 1200px) {
    .footer-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    max-width: 200px;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.footer-col a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

/* Footer After Hours */
.footer-after-hours {
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
    line-height: 1.4;
    background-color: var(--color-white);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    /* Shadow box effect */
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.footer-after-hours i {
    color: var(--color-accent-green);
    margin-right: 4px;
}

.footer-after-hours a {
    color: var(--color-primary-dark);
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

.footer-after-hours a:hover {
    color: var(--color-primary-light);
    text-decoration: underline;
}

/* Services Page Styles */
@media (min-width: 769px) {
    #therapeutic img {
        object-position: center 25%;
    }

    #medical-social img {
        object-position: center 45%;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent-green) 100%);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-family-heading);
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.service-detail-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.form-container .service-detail-item {
    text-align: center;
    flex-direction: column;
}

.form-container .service-detail-item ul {
    list-style-position: outside;
    padding-left: 1.25rem;
    display: inline-block;
    text-align: left;
    max-width: 800px;
    /* Prevent it from being too wide on large screens if desired, or leave partial width */
}

/* Fix for Service Features Grid inside Form Container (Skilled Nursing/Daily Living) */
.form-container .service-detail-item .service-features {
    display: grid;
    width: 100%;
    max-width: 100%;
    text-align: center;
    padding-left: 0;
}

/* Health and Safety Section */
.safety-section {
    background-color: var(--color-white);
    position: relative;
    z-index: 1;
    /* Ensure it sits above anything else if needed */
}

/* Service Process Section (Roadmap View) */
.process-section {
    background-color: var(--color-white);
    text-align: center;
}

.process-steps {
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: var(--spacing-lg) auto 0;
    position: relative;
    padding: var(--spacing-md) 0;
}

/* Vertical connecting line */
.process-steps::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--color-primary-light);
    transform: translateX(-50%);
    border-radius: 2px;
}

.process-step {
    position: relative;
    width: 50%;
    padding: 0 40px;
    margin-bottom: var(--spacing-lg);
    box-sizing: border-box;
    text-align: right;
}

/* Alternate sides */
.process-step:nth-child(odd) {
    align-self: flex-start;
    text-align: right;
}

.process-step:nth-child(even) {
    align-self: flex-end;
    text-align: left;
}

/* The actual numbering node */
.step-number {
    position: absolute;
    top: 0;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary-dark);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 4px solid var(--color-white);
    box-shadow: 0 0 0 4px var(--color-primary-light);
    z-index: 1;
}

/* Position nodes on the timeline */
.process-step:nth-child(odd) .step-number {
    right: -25px;
    /* Half of width */
}

.process-step:nth-child(even) .step-number {
    left: -25px;
}

/* Google Translate Customization */
#google_translate_element {
    visibility: hidden;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    top: 0;
    left: 0;
}

.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

/* Custom Language Dropdown */
.lang-btn {
    background-color: transparent;
    border: 2px solid var(--color-primary-dark);
    color: var(--color-primary-dark);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-white);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-radius: 4px;
    right: 0;
    /* Align right since it's on the right side */
}

.lang-dropdown-content a {
    color: var(--color-text-main);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    cursor: pointer;
}

.lang-dropdown-content a:hover {
    background-color: #f1f1f1;
    color: var(--color-primary-light);
}

/* Emoji Translate Grid */
.nav-links .translate {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-left: 10px;
}

.nav-links .horizontal {
    display: flex;
    gap: 8px;
}

.nav-links .translate a {
    text-decoration: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s;
}

.nav-links .translate a:hover {
    transform: scale(1.2);
}

.translate-wrapper {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 10px;
    border: 1px solid #ccc;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 2000;
    min-width: 200px;

    /* New Hiding Mechanism */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.translate-wrapper.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.translate-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
}

/* Ensure the google widget inside is visible enough to be functional if displayed */
.translate-wrapper #google_translate_element {
    visibility: visible;
    position: static;
    width: auto;
    height: auto;
}

.translate-wrapper .goog-te-combo {
    width: 100%;
    padding: 5px;
    margin-bottom: 5px;
}

/* Hide the "Powered by" text if messy or keep it if required */
.translate-wrapper .goog-logo-link {
    display: none;
}

@media (max-width: 768px) {
    .process-steps::before {
        left: 30px;
    }

    .process-step {
        width: 100%;
        padding-left: 80px;
        text-align: left;
        margin-bottom: var(--spacing-md);
    }

    .process-step:nth-child(odd) {
        text-align: left;
    }

    .process-step:nth-child(odd) .step-number,
    .process-step:nth-child(even) .step-number {
        left: 5px;
    }
}

.process-step h3 {
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

.process-step p {
    color: var(--color-text-main);
    font-size: 1rem;
    line-height: 1.5;
}

/* Health and Safety Section */
/* Health and Safety Section */
.safety-section {
    background: var(--color-pale-blue);
    /* Light blue tint to distinguish from white */
    padding: var(--spacing-xl) 0;
}

/* Wider grid to match Services and How It Works visually */
.safety-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-top: var(--spacing-xl);
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    .safety-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .safety-grid {
        grid-template-columns: 1fr;
    }
}

/* Updated card style: larger, cleaner, consistent with other sections */
.safety-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    min-height: 260px;
    /* Creates consistent height like your other cards */
}

.safety-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* Larger, cleaner icons to remove “awkward” look */
.safety-icon {
    font-size: 2.4rem;
    margin-bottom: var(--spacing-md);
    color: var(--color-accent-green);
    display: inline-block;
}

.safety-icon i {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* Improved heading to match site style */
.safety-card h3 {
    margin-bottom: 0.5rem;
    color: var(--color-primary-dark);
    font-size: 1.15rem;
    font-weight: 600;
}

/* More readable paragraph */
.safety-card p {
    color: var(--color-text-main);
    font-size: 0.95rem;
    line-height: 1.45;
}

.service-detail-item.reverse {
    flex-direction: row-reverse;
}

.service-text {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: var(--color-text-main);
}

.service-text h2 {
    font-family: var(--font-family-heading);
    color: var(--color-primary-dark);
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.service-text h3 {
    color: var(--color-primary-dark);
    font-family: var(--font-family-heading);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.professional-highlight {
    font-weight: 700;
    color: var(--color-primary-dark);
    background-color: rgba(28, 116, 196, 0.1);
    padding: 0 4px;
    border-radius: 4px;
}

.service-text h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-primary-light);
    /* Green accent */
    border-radius: 2px;
}

.service-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--color-text-main);
}

/* Service Features Grid */
.service-features {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Explicitly 2 columns */
    gap: 1.5rem;
}

.service-features li {
    position: relative;
    padding: 1.5rem;
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    width: auto;
    /* Remove any width overrides */
    text-align: center;
    /* Center content including headers */
}

/* Orphan center logic: Last item if odd */
.service-features li:last-child:nth-child(odd) {
    grid-column: span 2;
    width: 60%;
    /* Reasonable width for centered item */
    margin: 0 auto;
}

/* Tablet and Mobile Responsiveness */
@media (max-width: 600px) {
    .service-features {
        grid-template-columns: 1fr;
    }

    .service-features li:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

.service-features li:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--color-accent-green);
}

.service-features li::before {
    display: none;
}

.service-features li i {
    font-size: 2.5rem;
    color: var(--color-primary-light);
    margin-bottom: 1rem;
    display: block;
}

.service-features li strong {
    color: var(--color-primary-dark);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
}

.service-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: var(--spacing-lg) 0;
}

/* Responsive adjustments for Services Page */
@media (max-width: 768px) {

    .service-detail-item,
    .service-detail-item.reverse {
        flex-direction: column;
        text-align: left;
    }
}

/* Form Styles */
.form-container {
    background-color: var(--color-light-grey);
    padding: var(--spacing-md);
    border-radius: 8px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: var(--font-family-body);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 2px rgba(0, 174, 239, 0.2);
}

/* Bootstrap-like Accordion Flush Styles */
.accordion-flush .accordion-item {
    border: none;
    border-bottom: 1px solid #ddd;
    background: transparent;
}

.accordion-flush .accordion-item:last-child {
    border-bottom: 0;
}

.accordion-header {
    margin: 0;
}

.accordion-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.25rem 0;
    font-size: 1.1rem;
    color: var(--color-primary-dark);
    text-align: left;
    background-color: transparent;
    border: 0;
    border-radius: 0;
    overflow-anchor: none;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, box-shadow .15s ease-in-out, border-radius .15s ease;
    cursor: pointer;
    font-family: var(--font-family-heading);
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    color: var(--color-primary-light);
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
}

.accordion-button::after {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    content: "";
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    transition: transform .2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230daef0'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-180deg);
}

.accordion-collapse {
    border: none;
}

.accordion-collapse.collapse:not(.show) {
    display: none;
}

.accordion-body {
    padding: 1rem 0 2rem 0;
    color: var(--color-text-main);
    line-height: 1.6;
}

.faq-container {
    max-width: 100%;
    margin: 0 auto;
}

.faq-section {
    max-width: 100%;
    margin: 0 auto;
}

/* Dark Mode Overrides for Footer and Specific Elements */
@media (prefers-color-scheme: dark) {
    .footer-logo {
        filter: brightness(0) invert(1);
        opacity: 0.8;
    }

    /* Fix invisible border in copyright due to inline styles */
    .copyright {
        border-top-color: rgba(255, 255, 255, 0.1) !important;
    }
}

/* =========================================
   How to Pay Page Styles
   ========================================= */

.payment-section {
    max-width: 1000px;
    margin: 0 auto;
}

.notice-box {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
}

.notice-box p {
    margin: 0;
    font-size: 1.05rem;
}

.payment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .payment-options {
        grid-template-columns: 1fr;
    }
}

.payment-card {
    background: var(--color-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-top: 5px solid var(--color-primary-dark);
    height: 100%;
    transition: transform 0.3s ease;
}

.payment-card:hover {
    transform: translateY(-5px);
}

.payment-card h3 {
    color: var(--color-primary-dark);
    font-family: var(--font-family-heading);
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.payment-card p {
    color: var(--color-text-main);
    margin-bottom: 2rem;
}

/* Steps Visualization */
.steps {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background-color: var(--color-accent-green);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-main);
}

/* Fixed Side Contact Button */
/* Fixed Side Contact Button */
.side-contact-btn {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 50px;
    height: auto;
    min-height: 220px;
    padding: 20px 0;

    /* Theme Gradient - Lighter Green (Hero Overlay Style) */
    background: linear-gradient(to bottom, var(--color-pale-blue), #c8e6c9);
    color: var(--color-primary-dark);
    /* Dark text for contrast */

    /* Flex alignment */
    display: flex;
    flex-direction: row;
    /* row = vertical main axis in vertical-rl */
    align-items: center;
    /* Cross axis (Horizontal) center */
    justify-content: center;
    /* Main axis (Vertical) center */
    gap: 12px;

    /* Vertical Text */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-align: center;

    /* Styling */
    font-weight: 700;
    font-family: var(--font-family-heading);
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    text-decoration: none;

    /* Borders */
    border: 2px solid var(--color-white);
    border-right: none;

    /* Radius */
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;

    /* Shadow */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);

    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.side-contact-btn:hover {
    transform: translateY(-50%) translateX(-5px);
    background: linear-gradient(to bottom, #dbeff9, #b0e0b3);
    /* Slightly darker on hover */
    color: var(--color-primary-dark);
    box-shadow: -6px 0 20px rgba(0, 0, 0, 0.15);
}

.side-contact-btn i {
    transform: rotate(90deg);
    font-size: 1.2rem;
}

/* Adjust mobile layout */
@media (max-width: 768px) {
    .side-contact-btn {
        width: 40px;
        min-height: 180px;
        font-size: 0.8rem;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
}

/* =========================================
   Testimonials Section Styles
   ========================================= */
.testimonials {
    background-color: var(--color-light-grey);
    /* Distinct background color */
    position: relative;
    overflow: hidden;
    /* Ensure no scrollbars */
}

/* Center Title and Subtitle */
.testimonials .section-subtitle,
.testimonials .section-title {
    text-align: center;
}

.testimonials-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem 0 3rem;
    /* Padding for spacing */
}

.carousel-container {
    overflow: hidden;
    position: relative;
    margin: 0 60px;
    /* Space for arrows */
}

.carousel-track {
    display: flex;
    /* Flexbox for row layout */
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    /* Smooth eased transition */
}

.testimonial-slide {
    min-width: 100%;
    /* Each slide takes full width */
    flex: 0 0 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 0 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-content {
    text-align: center;
    max-width: 800px;
    padding: 1rem;
    position: relative;
}

/* Add decorative quote icon */
.testimonial-content::before {
    content: '\201C';
    /* Big quote mark */
    font-family: serif;
    font-size: 5rem;
    color: var(--color-primary-light);
    opacity: 0.3;
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    line-height: 1;
}

.testimonial-text {
    font-family: var(--font-family-body);
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-text-main);
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.testimonial-attribution {
    font-family: var(--font-family-heading);
    font-size: 0.95rem;
    color: var(--color-primary-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1rem;
    border-top: 2px solid var(--color-accent-green);
    display: inline-block;
    padding-top: 0.5rem;
}

/* Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-white);
    border: 1px solid var(--color-dark-grey);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    color: var(--color-primary-dark);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.carousel-btn:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
    /* Thicker icons */
}

.carousel-btn-prev {
    left: 0;
}

.carousel-btn-next {
    right: 0;
}

/* Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #cbd5e0;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator:hover {
    background-color: var(--color-primary-light);
}

.indicator.active {
    background-color: var(--color-primary-dark);
    transform: scale(1.2);
}

/* Responsive */
@media (max-width: 768px) {
    .carousel-container {
        margin: 0 0px;
        /* Remove side margins on mobile */
        padding: 0 40px;
        /* Use padding for arrow space */
    }

    .testimonial-text {
        font-size: 1.1rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        background-color: rgba(255, 255, 255, 0.8);
        /* Translucent on mobile */
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* Testimonials Section - Side by Side Layout with Carousel */
.testimonials-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 500px;
    /* Widened form column */
    gap: var(--spacing-lg);
    align-items: center;
    /* Center left side vertically */
}

/* Ensure Carousel fits in the grid column */
.testimonials-carousel {
    max-width: 100%;
    /* Take full width of the grid column */
    margin: 0;
    /* Remove auto margins */
    padding: 0 0 3rem;
    /* Keep bottom padding for indicators */
}

.carousel-container {
    margin: 0 50px;
    /* Keep space for arrows */
}

/* Sidebar Form Styling */
.form-sidebar {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent-green) 100%);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(28, 116, 196, 0.15);
    position: sticky;
    top: calc(var(--header-height) + 2rem);
    z-index: 10;
}

.form-sidebar h3 {
    font-family: var(--font-family-heading);
    color: var(--color-white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-sidebar p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.simple-form-group {
    margin-bottom: 1.25rem;
}

.simple-form-group label {
    display: block;
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-family: var(--font-family-heading);
}

.simple-form-group input,
.simple-form-group select,
.simple-form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-family: var(--font-family-body);
    font-size: 0.95rem;
    background: var(--color-white);
    color: var(--color-text-main);
    transition: box-shadow var(--transition-fast);
}

.simple-form-group input:focus,
.simple-form-group select:focus,
.simple-form-group textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.simple-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Rating Stars */
.rating-stars {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.star-option {
    position: relative;
}

.star-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.star-label {
    display: block;
    width: auto;
    /* Remove fixed width to allow natural scaling */
    height: auto;
    cursor: pointer;
    font-size: 2.5rem;
    /* Increased size */
    text-align: center;
    line-height: 1;
    /* Tighter line height */
    /* CSS Star Rating Visuals handled by JS */
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.4);
}

.star-option:hover .star-label {
    transform: scale(1.2);
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.consent-check input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary-light);
}

.consent-check label {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    line-height: 1.4;
    cursor: pointer;
    font-weight: 400;
}

.submit-btn {
    width: 100%;
    padding: 0.9rem;
    margin-top: 1.5rem;
    background: var(--color-white);
    color: var(--color-primary-dark);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-family-heading);
    text-transform: uppercase;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
    transform: translateY(0);
}

.success-notice {
    display: none;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--color-white);
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1rem;
}

.success-notice h4 {
    color: var(--color-white);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-family: var(--font-family-heading);
}

.success-notice p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
    margin: 0;
}

.required {
    color: #ffcccc;
}

/* Mobile Responsiveness for Testimonials */
@media (max-width: 968px) {
    .testimonials-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .carousel-container {
        margin: 0 0px;
        padding: 0 40px;
    }
}

@media (max-width: 640px) {
    .rating-stars {
        justify-content: space-between;
    }
}