<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fillViewport="true"
    tools:context=".views.HospitalSearchFragment">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView
            android:id="@+id/textView6"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="응급 병원 검색"
            android:textColor="@color/white"
            android:textSize="40sp"
            android:textStyle="bold"
            android:layout_marginTop="20dp"
            app:layout_constraintBottom_toTopOf="@+id/cardView2"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.cardview.widget.CardView
            android:id="@+id/cardView2"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginLeft="10dp"
            android:layout_marginTop="130dp"
            android:layout_marginRight="10dp"
            android:layout_marginBottom="10dp"
            android:background="@color/white"
            app:cardCornerRadius="16dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="vertical">

                <com.google.android.material.tabs.TabLayout
                    android:id="@+id/tabLayout"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    app:tabGravity="start"
                    app:tabMode="scrollable"
                    app:tabIndicatorColor="@android:color/holo_blue_light"
                    app:tabTextColor="@android:color/black"
                    app:tabSelectedTextColor="@android:color/holo_blue_dark"
                    android:layout_weight="8">

                </com.google.android.material.tabs.TabLayout>
                <!-- ViewPager2 (탭 변경 시 Fragment 변경) -->
                <androidx.viewpager2.widget.ViewPager2
                    android:id="@+id/viewPager"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="8dp"
                    android:layout_weight="1"/>
            </LinearLayout>

        </androidx.cardview.widget.CardView>

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.core.widget.NestedScrollView>