/* --- SECTION CONTAINER --- */
.services-section {
    max-width: 1100px;
    margin: 120px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: var(--dark);
}

.section-header p {
    max-width: 800px;
    margin: 0 auto;
    color: var(--gray);
    font-size: 1.1rem;
}

/* --- LAYOUT GRID (Left Nav + Right Content) --- */
.services-container {
    display: flex;
    gap: 40px;
    min-height: 600px;
}

/* --- LEFT SIDE: VERTICAL NAV --- */
.services-nav {
    flex: 0 0 320px; /* Fixed width for sidebar */
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f0f0f0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-left: 5px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    color: #444;
    position: relative;
}

.nav-item i {
    margin-right: 15px;
    font-size: 1.2rem;
    color: var(--primary);
    width: 25px;
    text-align: center;
}

/* Hover State */
.nav-item:hover {
    background-color: #f9f9f9;
    padding-left: 25px; /* Slight movement effect */
}

/* Active State */
.nav-item.active {
    border-left-color: var(--primary);
    background-color: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    color: var(--primary);
    padding-left: 25px;
}

/* Progress Bar for Auto Loop (Optional visual cue) */
.nav-item::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--primary);
    width: 0%;
    transition: width 5s linear; /* Matches JS interval */
}

/* Only animate width when active and auto-playing */
.nav-item.active.auto-playing::after {
    width: 100%;
}

/* --- RIGHT SIDE: CONTENT DISPLAY --- */
.services-content {
    flex: 1;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.service-panel {
    display: none; /* Hidden by default */
    animation: fadeIn 0.6s ease-out;
}
.service-panel p {
    margin-bottom: 10px;
}

.service-panel.active {
    display: block; /* Show when active */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Typography */
.service-panel h3 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: #777;
    margin-bottom: 25px;
    display: block;
}

.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.panel-section h4 {
    font-size: 1.1rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

ul.styled-list {
    list-style: none;
}

ul.styled-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    font-size: 0.95rem;
    color: #555;
}

ul.styled-list li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

.impact-box {
    background: #eef5ff;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin-top: 30px;
}
/* --- NEW BUTTON STYLES --- */
.btn-container {
    margin-top: 30px;
    text-align: left; /* Aligns button to the left */
    border-top: 1px solid #eee; /* Optional separator line */
    padding-top: 20px;
}

.book-appointment-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--primary); /* Uses your existing Blue */
    color: #ffffff;
    padding: 14px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.2);
}

.book-appointment-btn:hover {
    border: 2px solid #000000;
    background-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #000000;
}

.book-appointment-btn i {
    font-size: 0.9rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .services-container {
        flex-direction: column;
    }

    .services-nav {
        flex: none;
        flex-direction: row;
        overflow-x: auto; /* Horizontal scroll on mobile */
        padding-bottom: 10px;
        width: 100%;
    }

    .nav-item {
        flex: 0 0 auto;
        border-left: 1px solid var(--border);
        border-bottom: 5px solid transparent;
        border-radius: 8px;
        min-width: 200px;
    }

    .nav-item.active {
        border-left-color: var(--border);
        border-bottom-color: var(--primary);
        padding-left: 20px; /* Reset desktop padding */
    }

    .panel-grid {
        grid-template-columns: 1fr;
    }
}
