/* Global Styles */
:root {
    --primary-color: #3f47cb;
    --secondary-color: #3f47cb;
    --light-color: #f9f9f9;
    --dark-color: #333;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
    background-image: linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01)),
    linear_gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01));
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    padding-right: 20px; /* Removed to prevent horizontal scroll on modal */
    padding-left: 20px; /* Removed to prevent horizontal scroll on modal */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.services-list {
    list-style-type: disc;
    padding-left: 20px;
    text-align: left;
    margin-top: 20px;
}

.services-list li {
    margin-bottom: 5px;
}

.container {
    margin: 0 auto;
}

section {
    padding: 80px 0;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    transition: var(--transition);
    cursor: pointer;
    font-weight: 600;
}

.button-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
}

.button-primary:hover {
    background-color: white;
    color: blue;
    border: 1px solid var(--primary-color);
    transform: translateY(-2px);
}

.button-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

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

.button-emergency {
    background-color: #e74c3c;
    color: white;
    border: none;
    animation: pulsate-red 3s infinite ease-in-out;
}

.button-emergency:hover {
    background-color: #c0392b;
    color: white;
}

/* Pulsating Red Animation */
@keyframes pulsate-red {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

/* Header */
header {
    background-color: #f5f5f5;
    background-image: linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01)),
    linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01));
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    color: var(--dark-color);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    animation: fadeInLeft 2s ease-out forwards;
}

.logo img {
    width: 50px;
    height: auto;
    transition: transform 0.3s ease;
}

nav ul {
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 500;
    transition: var(--transition);
    color: var(--dark-color);
    font-family: 'Playfair Display', serif;
}

nav ul li a:hover {
    color: var(--primary-color);
}

nav ul li a.active {
    color: var(--primary-color);
}

.mobile-menu-button {
    display: none;
}

@keyframes pulsate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.logo:hover img {
    animation: pulsate 1.6s ease-in-out infinite;
}

/* Hero Section */
.hero {
    color: white;
    text-align: center;
    padding: 200px 0;
    position: relative;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin: 20px auto;
    max-width: 100%;
    padding: 150px 20px; /* Increased top/bottom padding */
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('public/hero_image.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    border-radius: inherit;
}

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

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services {
    text-align: center;
    background-color: white;
    background-image: linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01)),
    linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01));
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    max-width: 100%;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 40px; /* Reduced top padding */
    padding-bottom: 40px; /* Reduced bottom padding */
}

.services h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center; /* Centered header */
}

.services > .container {
    padding: 0;
}

.services > .container > p {
    max-width: 100%;
    margin: 0 auto 0px;
    text-align: center; /* Centered sub-header */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(63, 71, 203, 0.2) 0%, rgba(63, 71, 203, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
    z-index: 0;
}

.service-card:hover::before {
    width: 300%;
    height: 300%;
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(63, 71, 203, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    transform: scale(1.2) translateY(-5px) rotate(5deg);
}

.service-icon i {
    color: var(--primary-color);
    font-size: 24px;
    transition: color 0.3s ease;
}

.service-card h3,
.service-card p {
    position: relative;
    z-index: 1;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Compassionate Care Section */
.compassionate-care {
    background-color: #ffff;
    background-image: linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01)),
    linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01));
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    padding: 20px;
    max-width: 100%;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

.compassionate-care-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
    background-color: #ffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.compassionate-care-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compassionate-care-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.compassionate-care-content .badge {
    display: inline-block;
    background-color: #3f47cb;
    color: white;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 20px;
    text-transform: uppercase;
    align-self: flex-start;
    opacity: 0;
    animation: revealBadge 1.6s ease-out 0.5s forwards;
}

.compassionate-care-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.compassionate-care-content p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.compassionate-care-content .learn-more {
    color: #3f47cb;
    font-weight: bold;
    display: inline-block;
    margin-top: auto;
    align-self: flex-start;
    transition: var(--transition);
}

.compassionate-care-content .learn-more:hover {
    color: #3f47cb;
    text-decoration: underline;
}

.testimonials {
    padding-left: 20px;
    padding-right: 20px;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    text-align: center;
    background-color: var(--light-color);
    background-image: linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01)),
    linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01));
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    border-radius: 15px;
}

.testimonials h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.testimonials > .container > p {
    max-width: 1000px;
    margin: 0 auto 40px;
}

.testimonial-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-left: 45px;
    padding-right: 45px;
    box-sizing: border-box;
}

.testimonial-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px 0;
    margin-bottom: 20px;
}

.testimonial-card {
    width: 300px;
    max-width: 100%;
    flex-shrink: 0;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.blog-content-card {
    background-color: #fff;
    padding: 40px;
    padding-left: 40px;
    padding-right: 40px;
    margin: 20px 0;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.blog-content-card p {
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 1.1rem;
}

.blog-content-card h2 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.testimonial-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(63, 71, 203, 0.7);
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    color: white;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    line-height: 1;
}

.testimonial-arrow:hover {
    background-color: rgba(63, 71, 203, 1);
}

.testimonial-arrow.prev {
    left: 10px;
}

.testimonial-arrow.next {
    right: 10px;
}

.testimonial-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    background-color: rgba(100, 100, 100, 0.5);
}

@media (max-width: 768px) {
    .testimonial-card {
        padding: 25px;
    }
    .testimonial-slider {
        padding-left: 35px;
        padding-right: 35px;
    }
    .testimonial-arrow {
        padding: 8px 10px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        padding: 20px;
    }
    .testimonial-slider {
        padding-left: 15px;
        padding-right: 15px;
    }
    .testimonial-arrow {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    .testimonial-arrow.prev {
        left: 5px;
    }
    .testimonial-arrow.next {
        right: 5px;
    }
}

/* Testimonial Cards Container */
.testimonial-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-left: 40px;
    padding-right: 40px;
}

.testimonial-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.testimonial-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.testimonial-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    color: var(--dark-color);
    transition: background-color 0.3s ease;
}

.testimonial-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
}

.testimonial-arrow.prev {
    left: 10px;
}

.testimonial-arrow.next {
    right: 10px;
}

.testimonial-card {
    flex: 0 0 300px; /* Set a fixed width for each card */
    scroll-snap-align: start;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    position: relative;
    margin-bottom: 20px;
}

.testimonial-container {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.testimonials {
    text-align: center; /* Center the content */
}

/* Individual Testimonial Card */
.testimonial-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    text-align: left;
    position: relative;
    width: 100%;
    max-width: 350px;
    margin-bottom: 20px;
}

.testimonial-profile-pic {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 0 15px 0;
    position: relative;
    z-index: 2;
}

.testimonial-google-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    z-index: 3;
}

.testimonial-stars {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 10px;
    color: #FFD700;
}

.testimonial-stars i {
    margin-right: 3px;
    font-size: 1.1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    color: #555;
}

.testimonial-author {
    font-weight: 600;
    margin-top: auto;
}

.google-review-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.google-review-badge:hover {
    background-color: #d35400;
}

/* Media Queries */
/* Contact Section */
.contact {
    background-color: white;
    background-image: linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01)),
    linear-gradient(45deg, rgba(0,0,0,0.01) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.01) 75%, rgba(0,0,0,0.01));
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    padding: 60px;
    
border-radius: 15px;
}

.contact h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info h3 {
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    margin-bottom: 20px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(63, 71, 203, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.info-icon i {
    color: var(--primary-color);
}

.info-content h4 {
    margin-bottom: 5px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px;
    border-top-left-radius: 15px;
border-top-right-radius: 15px;
}

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

.footer-about h3 {
    color: white;
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-links h4, .footer-hours h4, .footer-contact h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.footer-hours p, .footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.footer-hours p i, .footer-contact p i {
    margin-right: 10px;
    margin-top: 4px;
    width: 1em;
}

.footer-contact a {
    color: white;
    text-decoration: none;
}

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

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes revealBadge {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .testimonial-scroller .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    header .container {
        flex-direction: column;
        padding: 15px 20px;
        position: relative;
    }

    .logo {
        margin-bottom: 15px;
    }

    .mobile-menu-button {
        display: block !important;
        background: none;
        border: none;
        color: var(--primary-color);
        font-size: 1.5rem;
        cursor: pointer;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 110;
    }

    nav {
        display: none;
        width: 100%;
        background-color: white;
        position: absolute;
        top: 100%;
        left: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 105;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }

    nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        padding: 10px;
        display: block;
    }

    nav ul li .button-emergency {
        margin-top: 10px;
    }

    .hero {
        padding: 60px 0;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons a {
        width: 80%;
        max-width: 300px;
        margin-bottom: 10px;
        text-align: center;
    }

    .compassionate-care-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .compassionate-care-image {
        order: -1;
        max-height: 300px;
    }

    .compassionate-care-content {
        padding: 30px;
    }

    .testimonial-scroller-wrapper {
        overflow: visible;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .testimonial-scroller {
        width: 100%;
        animation: none;
        flex-direction: column;
    }

    .testimonial-scroller .testimonial-grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 20px;
    }

    .testimonial-scroller .testimonial-grid:nth-child(2) {
        display: none;
    }

    .testimonial-card {
        width: 100%;
        margin-bottom: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .footer-about .social-links {
        justify-content: center;
    }

    .footer-hours p, .footer-contact p {
        justify-content: flex-start; /* Align items (icon and text) to the left */
        text-align: left;
        max-width: 300px; /* Retain for nice width on small screens */
        margin-left: 0; /* Align block to the left */
        margin-right: 0; /* Align block to the left */
    }

    .footer-hours p i, .footer-contact p i {
        margin-top: 5px;
    }

    .section-padding {
        padding: 0 20px;
    }
    /* Style for emergency contact in footer on mobile */
    .footer-contact p.footer-emergency-label {
        /* Retain existing styles for the label paragraph if any, or add new ones */
        /* For example, ensure the icon and "Emergency:" text are aligned as before */
        margin-bottom: 0; /* Remove bottom margin if it creates too much space */
    }

    .footer-contact p.footer-emergency-number {
        margin-top: 2px; /* Small space above each number */
        margin-bottom: 2px; /* Small space below each number */
        padding-left: 26px; /* Indent numbers to align with text after icon */
        line-height: 1.4;
    }

    .footer-contact p.footer-emergency-number:last-of-type {
        margin-bottom: 10px; /* Add some space after the last number if needed */
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .section-padding {
        padding: 0 20px;
    }

    .hero p {
        font-size: 1rem;
    }

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

    .testimonial-card {
        padding: 20px;
        padding-top: 40px;
    }
    
    .section-padding {
        padding: 0 20px;
    }

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

/* Timeline Services Section */
.timeline-container {
    position: relative;
    padding: 40px 0;
    margin-top: 40px;
    overflow: hidden;
}

.timeline {
    display: flex;
    position: relative;
    padding: 50px 0;
    align-items: center;
    margin: 0 auto;
    max-width: var(--max-width);
}

.timeline::before {
    content: '';
    position: absolute;
    height: 4px;
    background-color: var(--primary-color);
    opacity: 0.3;
    top: 50%;
    transform: translateY(-50%);
    left: 5%;
    right: 5%;
    z-index: 1;
    border-radius: 2px;
}

.timeline::after {
    content: '';
    position: absolute;
    height: 4px;
    background-color: var(--primary-color);
    top: 50%;
    transform: translateY(-50%);
    left: 5%;
    width: 0;
    z-index: 2;
    border-radius: 2px;
    animation: timeline-fill 2s ease-out forwards;
}

@keyframes timeline-fill {
    to {
        width: 90%;
    }
}

.timeline-item {
    flex: 1;
    position: relative;
    padding: 20px;
    text-align: center;
    z-index: 3;
    opacity: 0;
    transform: translateY(20px);
    animation: timeline-item-appear 0.5s ease-out forwards;
}

.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.4s; }
.timeline-item:nth-child(4) { animation-delay: 0.6s; }
.timeline-item:nth-child(5) { animation-delay: 0.8s; }

@keyframes timeline-item-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-content {
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-bottom: 70px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-top: 70px;
}

.timeline-circle {
    width: 50px;
    height: 50px;
    background-color: white;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s ease;
}

.timeline-circle i {
    font-size: 20px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.timeline-circle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(63, 71, 203, 0.4);
}

.timeline-circle:hover i {
    transform: rotate(10deg);
}

.service-details {
    background-color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    width: 200px;
    position: absolute;
    left: 50%;
    /* transform: translateX(-50%); - Replaced by animation */
    opacity: 0;
    animation: fade-in 0.5s ease-out forwards, infiniteJump 1.5s ease-in-out infinite; /* Added jump animation */
    animation-delay: 1s, 1s; /* Keep fade-in delay, start jump after fade-in */
}

@keyframes infiniteJump {
  0%, 100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -5px); /* Adjust jump height as needed */
  }
}

@keyframes fade-in {
    to {
        opacity: 1;
    }
}

.timeline-item:nth-child(odd) .service-details {
    top: 100%;
    margin-top: 10px;
}

.timeline-item:nth-child(even) .service-details {
    bottom: 100%;
    margin-bottom: 10px;
}

.service-details h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.service-details p {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

@media screen and (max-width: 768px) {
    .timeline {
        overflow-x: auto;
        padding: 50px 20px;
    }

    .timeline-item {
        flex: 0 0 200px;
    }
}

/* Responsive adjustments - REMOVED old styles. Add new ones if needed */
/*
@media screen and (max-width: 768px) {
    ... New horizontal responsive styles would go here ...
    e.g., make .timeline scroll horizontally, or stack vertically again
}
*/

/* Badges Section */
.badges {
    padding: 40px 0; /* Reduced padding */
    background-color: var(--light-color); /* Match testimonials background */
    text-align: center;
    border-radius: 15px; /* Match other sections */
    margin-top: 20px; /* Add space above */
    margin-bottom: 20px; /* Add space below */
    padding-left: 20px;
    padding-right: 20px;
}

.badges-container {
    display: flex;
    justify-content: center; /* Center badges horizontally */
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping */
    gap: 15px; /* Space between badges */
}

.badge-pill {
    display: inline-block;
    background-color: var(--primary-color); /* Use primary color from variable */
    color: white;
    padding: 6px 15px; /* Adjust padding for pill shape */
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 5px; /* Make it pill-shaped */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.badge-pill:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* Responsive Google Map */
.map-responsive {
    overflow:hidden;
    padding-bottom:85%; /* Adjust this value to change the aspect ratio */
    position:relative;
    height:0;
    border-radius: 10px; /* Optional: if you want rounded corners for the map container */
}

.map-responsive iframe {
    left:0;
    top:0;
    height:100%;
    width:100%;
    position:absolute;
    border:0; /* Ensure border is explicitly set to 0 */
}

/* Facebook Post Popup Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 20px; /* Adjusted padding for smaller screens */
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto; /* Reduced margin for more screen usage */
    padding: 20px;
    border: 1px solid #888;
    width: 95%; /* Adjusted for better mobile responsiveness */
    border-radius: 10px;
    text-align: center;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.facebook-embed-container {
    margin-top: 20px;
    width: 100%; /* Ensure the container takes full width of modal-content */
    overflow: hidden; /* Hide parts of iframe that might overflow */
}

.facebook-embed-container iframe {
    max-width: 100%; /* Make iframe responsive */
    display: block; /* Remove extra space below iframe */
    margin: 0 auto; /* Center iframe if its width is less than container */
}

/* Responsive adjustments for smaller screens */
@media screen and (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 15px;
    }

    .modal-content h2 {
        font-size: 1.2rem;
    }
}

/* Facebook Post Popup Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 550px; /* Max width for the modal */
    border-radius: 10px;
    text-align: center;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.facebook-embed-container {
    margin-top: 20px;
}

/* Responsive padding for blog content card on desktop */
@media screen and (min-width: 1025px) {
    .blog-content-card {
        padding-left: 150px;
        padding-right: 150px;
    }
}
