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

:root {
    --primary-color: #2c5282;
    --secondary-color: #3182ce;
    --accent-color: #4299e1;
    --success-color: #38a169;
    --text-dark: #2d3748;
    --text-light: #4a5568;
    --text-lighter: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --header-height: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    display: block;
    line-height: 0;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.nav-menu a.nav-cta {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
}

.nav-menu a.nav-cta:hover {
    background-color: var(--primary-color);
    color: white;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

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

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.btn-primary:hover {
    background-color: #2f855a;
    border-color: #2f855a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

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

.btn-outline {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.mission {
    background-color: var(--bg-light);
    padding: 4rem 0;
    text-align: center;
}

.mission-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.mission-content p {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto 1rem;
    color: var(--text-light);
}

.mission-highlight {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 2rem;
}

.services-overview {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.service-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Service cards WITHOUT images (old style - for backward compatibility) */
.service-card:not(:has(.service-image-container)) {
    padding: 2.5rem;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.service-features {
    list-style: none;
    margin-bottom: 2rem;
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.service-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p,
.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 1rem;
    text-align: center;
    color: #cbd5e0;
}

.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-hero .lead {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto;
}

.content-section {
    padding: 4rem 0;
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
}

.intro-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.checkmarks {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.check-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.checkmark {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.highlight-text {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-align: center;
    margin-top: 2rem;
}

.about-therapy {
    background-color: var(--bg-light);
    padding: 4rem 0;
}

.about-therapy h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-therapy p {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto 2rem;
    color: var(--text-light);
    text-align: center;
}

.mission-box {
    background-color: white;
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.mission-box h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mission-box p {
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: left;
}

.services-detail {
    padding: 5rem 0;
}

.service-detail-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.service-detail-card h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-detail-card p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-detail-card ul {
    list-style: none;
    padding-left: 0;
}

.service-detail-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

.service-detail-card ul li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.5rem;
}

.why-choose {
    background-color: var(--bg-light);
    padding: 5rem 0;
    text-align: center;
}

.why-choose h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.why-choose .intro {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto 3rem;
    color: var(--text-light);
}

.value-promise {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.value-promise h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.promise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.promise-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 1.1rem;
    color: var(--text-light);
}

.closing-statement {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.did-you-know {
    background-color: var(--bg-light);
    padding: 4rem 0;
}

.did-you-know h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.info-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-left: 4px solid var(--secondary-color);
}

.info-card p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.program-benefits {
    padding: 5rem 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.benefit-icon {
    width: 50px;
    height: 50px;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.benefit-icon svg {
    width: 100%;
    height: 100%;
}

.benefit-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.benefit-card ul {
    list-style: none;
}

.benefit-card ul li {
    padding: 0.4rem 0;
    padding-left: 1.2rem;
    position: relative;
    color: var(--text-light);
}

.benefit-card ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

.what-we-offer {
    background-color: var(--bg-light);
    padding: 5rem 0;
}

.what-we-offer h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.offerings-list {
    max-width: 900px;
    margin: 0 auto;
}

.offering-item {
    display: flex;
    align-items: flex-start;
    background-color: white;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.offering-icon {
    color: var(--success-color);
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.offering-item p {
    font-size: 1.1rem;
    color: var(--text-light);
}

.testimonials {
    padding: 5rem 0;
}

.data-highlights {
    text-align: center;
    margin-bottom: 3rem;
}

.data-highlights h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.data-card {
    background: linear-gradient(135deg, var(--success-color) 0%, #2f855a 100%);
    padding: 2rem;
    border-radius: 10px;
    color: white;
}

.data-change {
    font-size: 2rem;
    font-weight: bold;
}

.data-note {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.testimonial-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.testimonial-card .quote {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.testimonial-card .author {
    font-weight: 600;
    color: var(--primary-color);
}

.nurse-reports {
    max-width: 900px;
    margin: 3rem auto 0;
}

.nurse-reports h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.report-card {
    background-color: var(--bg-light);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
}

.report-card p {
    font-size: 1.1rem;
    color: var(--text-light);
    font-style: italic;
}

.about-content {
    padding: 4rem 0;
}

.about-intro {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.about-intro h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-intro p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.mission-statement {
    background-color: var(--bg-light);
    padding: 3rem;
    margin: 4rem 0;
    text-align: center;
    border-radius: 10px;
}

.mission-statement h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.highlight-large {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.expertise-section {
    max-width: 1100px;
    margin: 0 auto 4rem;
}

.expertise-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.expertise-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.expertise-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.expertise-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.approach-section {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.approach-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.approach-section p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.approach-list {
    list-style: none;
    margin-top: 2rem;
}

.approach-list li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.1rem;
    color: var(--text-light);
}

.approach-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.3rem;
}

.values-section {
    background-color: var(--bg-light);
    padding: 4rem;
    border-radius: 10px;
}

.values-section h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value-item {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.value-item h4 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.value-item p {
    color: var(--text-light);
    line-height: 1.6;
}

.contact-section {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.contact-method h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-method p {
    margin-bottom: 0.5rem;
}

.contact-method a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-method a:hover {
    text-decoration: underline;
}

.contact-form-container h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.contact-form {
    background-color: var(--bg-light);
    padding: 2.5rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background-color: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
    display: block;
}

.form-message.error {
    background-color: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
    display: block;
}

@media (max-width: 768px) {
    .nav-brand .logo {
        height: 40px;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .services-grid,
    .info-cards,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta,
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-brand .logo {
        height: 35px;
    }

    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .mission-content h2,
    .about-intro h2,
    .values-section h2 {
        font-size: 1.8rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 1.5rem;
    }
}

/* ========================================
   Modern Image Styling with Hover Effects
   ======================================== */

/* Hero Image Styling */
.hero-with-image {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.6s ease;
}

.hero-with-image:hover .hero-image {
    transform: scale(1.05);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 82, 130, 0.85) 0%, rgba(49, 130, 206, 0.75) 100%);
    z-index: 1;
}

.hero-with-image .container {
    position: relative;
    z-index: 2;
}

.hero-with-image .hero-content {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-with-image .hero-title,
.hero-with-image .hero-subtitle,
.hero-with-image .hero-description {
    color: white;
}

/* Page Hero Image Styling */
.page-hero-with-image {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.page-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.6s ease;
}

.page-hero-with-image:hover .page-hero-image {
    transform: scale(1.05);
}

.page-hero-with-image .container {
    position: relative;
    z-index: 2;
}

.page-hero-with-image h1,
.page-hero-with-image .lead {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Service Card Image Styling - Override for cards with images */
.service-card:has(.service-image-container) {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border: 2px solid #e3f2fd !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    background-color: white !important;
    padding: 0 !important;
}

.service-card:has(.service-image-container):hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
    border-color: #90caf9 !important;
}

.service-image-container {
    width: 100%;
    height: 250px;
    overflow: hidden;
    border-bottom: 3px solid #e3f2fd;
    flex-shrink: 0;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.services-overview .service-card:hover .service-image {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.service-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: white;
}

.service-content h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.8rem;
}

.service-content p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.service-content .btn {
    margin-top: auto;
}

/* Content with Image Layout */
.content-with-image {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.content-text {
    padding: 1rem;
}

.content-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 3px solid #e3f2fd;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.content-image-container:hover {
    transform: translateY(-6px) rotate(1deg);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    border-color: #90caf9;
}

.content-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.content-image-container:hover .content-image {
    transform: scale(1.08);
    filter: brightness(1.05);
}

/* Responsive adjustments for images */
@media (max-width: 768px) {
    .hero-with-image {
        min-height: 400px;
    }
    
    .page-hero-with-image {
        min-height: 300px;
    }
    
    .service-image-container {
        height: 200px;
    }
    
    .content-with-image {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-image-container {
        order: -1;
    }
}

@media (max-width: 480px) {
    .hero-with-image {
        min-height: 350px;
    }
    
    .page-hero-with-image {
        min-height: 250px;
    }
    
    .service-image-container {
        height: 180px;
    }
}

/* Enhanced responsive fixes for accessibility and mobile */
@media (max-width: 992px) {
    .hero-with-image,
    .page-hero-with-image {
        padding: 4rem 0;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(44, 82, 130, 0.90) 0%, rgba(49, 130, 206, 0.85) 100%);
    }
}

@media (max-width: 768px) {
    /* Ensure text is always readable on mobile */
    .hero-with-image {
        min-height: 450px;
        padding: 3rem 0;
    }
    
    .page-hero-with-image {
        min-height: 320px;
        padding: 3rem 0;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(44, 82, 130, 0.92) 0%, rgba(49, 130, 206, 0.88) 100%);
    }
    
    .hero-with-image .hero-content,
    .page-hero-with-image .container {
        position: relative;
        z-index: 10;
    }
    
    /* Disable hover transform on touch devices */
    .hero-with-image .hero-image,
    .page-hero-with-image .page-hero-image {
        transform: none;
    }
    
    /* Service card responsive fixes */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-card {
        flex-direction: column;
    }
    
    .service-image-container {
        height: 220px;
        width: 100%;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    /* Content with image stacking */
    .content-with-image {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .content-image-container {
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Disable rotation on mobile for better stability */
    .content-image-container:hover {
        transform: translateY(-6px) rotate(0deg);
    }
}

@media (max-width: 480px) {
    .hero-with-image {
        min-height: 400px;
        padding: 2.5rem 0;
    }
    
    .page-hero-with-image {
        min-height: 280px;
        padding: 2.5rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .service-image-container {
        height: 200px;
    }
    
    .service-content {
        padding: 1.25rem;
    }
    
    .hero-overlay {
        background: linear-gradient(135deg, rgba(44, 82, 130, 0.93) 0%, rgba(49, 130, 206, 0.90) 100%);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover transforms on touch devices */
    .hero-with-image:hover .hero-image,
    .page-hero-with-image:hover .page-hero-image,
    .service-card:hover .service-image,
    .content-image-container:hover .content-image {
        transform: none;
    }
    
    .service-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .content-image-container:hover {
        transform: none;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    }
}

/* Ensure minimum contrast for accessibility */
.hero-with-image h1,
.hero-with-image p,
.page-hero-with-image h1,
.page-hero-with-image p {
    position: relative;
    z-index: 10;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Fallback for browsers that don't support object-fit */
@supports not (object-fit: cover) {
    .hero-image,
    .page-hero-image,
    .service-image,
    .content-image {
        max-width: 100%;
        height: auto;
    }
}
