<?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"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white_smoke"
    android:overScrollMode="never"
    android:fillViewport="true">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="32dp">

        <!-- Modern Header with Weather -->
        <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <!-- Gradient Background -->
            <View
                android:layout_width="match_parent"
                android:layout_height="220dp"
                android:background="@drawable/bg_header_gradient" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                android:paddingHorizontal="24dp"
                android:paddingTop="48dp"
                android:paddingBottom="24dp">

                <!-- Top Row: Logo/Title -->
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:gravity="center_vertical">
                    
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Bem+"
                        android:textColor="@color/white"
                        android:textSize="24sp"
                        android:textStyle="bold" />
                        
                    <View
                        android:layout_width="0dp"
                        android:layout_height="1dp"
                        android:layout_weight="1"/>
                        
                     <TextView
                        android:id="@+id/textGreeting"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="Bom dia"
                        android:textColor="@color/white"
                        android:alpha="0.9"
                        android:textSize="16sp" />
                </LinearLayout>

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="2dp"
                    android:text="O seu assistente diário"
                    android:textColor="@color/white"
                    android:alpha="0.8"
                    android:textSize="14sp" />

                <!-- Weather Card -->
                <androidx.cardview.widget.CardView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="24dp"
                    app:cardCornerRadius="20dp"
                    app:cardElevation="8dp"
                    app:cardBackgroundColor="@color/white">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:padding="20dp">

                        <LinearLayout
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:orientation="horizontal"
                            android:gravity="center_vertical">

                            <LinearLayout
                                android:layout_width="0dp"
                                android:layout_height="wrap_content"
                                android:layout_weight="1"
                                android:orientation="vertical">

                                <TextView
                                    android:id="@+id/textTemperature"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="--°C"
                                    android:textColor="@color/neutral_dark"
                                    android:textSize="36sp"
                                    android:textStyle="bold" />

                                <TextView
                                    android:id="@+id/textCondition"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text=""
                                    android:textColor="@color/neutral_medium"
                                    android:textSize="14sp" />
                                    
                                 <LinearLayout
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:layout_marginTop="8dp"
                                    android:gravity="center_vertical"
                                    android:orientation="horizontal">
                                    
                                    <ImageView
                                        android:layout_width="14dp"
                                        android:layout_height="14dp"
                                        android:src="@android:drawable/ic_menu_mylocation"
                                        android:tint="@color/primary"/>
                                        
                                    <TextView
                                        android:id="@+id/textLocation"
                                        android:layout_width="wrap_content"
                                        android:layout_height="wrap_content"
                                        android:layout_marginStart="4dp"
                                        android:text="Localização"
                                        android:textColor="@color/primary"
                                        android:textSize="14sp"
                                        android:textStyle="bold"/>
                                 </LinearLayout>
                            </LinearLayout>

                            <ImageView
                                android:id="@+id/imageWeatherIcon"
                                android:layout_width="64dp"
                                android:layout_height="64dp"
                                android:src="@android:drawable/ic_menu_view" 
                                android:tint="@color/accent"
                                android:alpha="0.8"/> 
                                <!-- Placeholder icon, logic can swap this drawable or hide tint if real image -->

                        </LinearLayout>

                    </LinearLayout>
                </androidx.cardview.widget.CardView>
            </LinearLayout>
        </FrameLayout>

        <!-- Content Area -->
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:paddingHorizontal="24dp"
            android:paddingTop="8dp">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:layout_marginBottom="12dp"
                android:text="Sugestões do Dia"
                android:textColor="@color/neutral_dark"
                android:textSize="18sp"
                android:textStyle="bold" />

            <!-- Daily Tip 1 -->
            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="16dp"
                app:cardCornerRadius="16dp"
                app:cardElevation="2dp"
                app:cardBackgroundColor="@color/white">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:padding="16dp"
                    android:gravity="center_vertical">

                    <View
                        android:layout_width="4dp"
                        android:layout_height="40dp"
                        android:background="@drawable/bg_pill_accent"
                        android:backgroundTint="@color/accent"/>

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:layout_marginStart="16dp"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/textTipTitle1"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="Clima"
                            android:textColor="@color/neutral_dark"
                            android:textSize="16sp"
                            android:textStyle="bold" />

                        <TextView
                            android:id="@+id/textTipDesc1"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:text=""
                            android:textColor="@color/neutral_medium"
                            android:lineSpacingExtra="2dp"
                            android:textSize="14sp" />
                    </LinearLayout>
                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <!-- Daily Tip 2 -->
            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="16dp"
                app:cardCornerRadius="16dp"
                app:cardElevation="2dp"
                app:cardBackgroundColor="@color/white">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:orientation="horizontal"
                    android:padding="16dp"
                    android:gravity="center_vertical">

                    <View
                        android:layout_width="4dp"
                        android:layout_height="40dp"
                        android:background="@drawable/bg_pill_accent"
                        android:backgroundTint="@color/primary"/>

                    <LinearLayout
                        android:layout_width="0dp"
                        android:layout_height="wrap_content"
                        android:layout_weight="1"
                        android:layout_marginStart="16dp"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/textTipTitle2"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="Saúde"
                            android:textColor="@color/neutral_dark"
                            android:textSize="16sp"
                            android:textStyle="bold" />

                        <TextView
                            android:id="@+id/textTipDesc2"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:text="Mantenha-se hidratado."
                            android:textColor="@color/neutral_medium"
                            android:lineSpacingExtra="2dp"
                            android:textSize="14sp" />
                    </LinearLayout>
                </LinearLayout>
            </androidx.cardview.widget.CardView>
            
            <!-- Default "Safe" Message -->
            <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:gravity="center"
                 android:layout_marginTop="12dp"
                 android:orientation="vertical">
                 
                 <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Tenha um excelente dia!"
                    android:textSize="14sp"
                    android:textColor="@color/text_hint"/>
            </LinearLayout>

        </LinearLayout>

    </LinearLayout>
</androidx.core.widget.NestedScrollView>