<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout 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:background="@color/bg_base"
    tools:context=".ui.news.NewsDetailFragment">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/transparent"
        app:elevation="0dp">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:layout_width="match_parent"
            android:layout_height="250dp"
            app:contentScrim="@color/bg_surface"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <ImageView
                android:id="@+id/img_news_detail"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:scaleType="centerCrop"
                app:layout_collapseMode="parallax"
                app:layout_collapseParallaxMultiplier="0.7"
                tools:src="@drawable/ic_menu_gallery" />
                
            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#66000000" />

        </com.google.android.material.appbar.CollapsingToolbarLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:id="@+id/scroll_detail"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

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

            <TextView
                android:id="@+id/text_news_detail_date"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:fontFamily="@font/font_ibm_plex_mono"
                android:text="Data"
                android:textColor="@color/text_3"
                android:textSize="11sp"
                android:textStyle="bold"
                android:textAllCaps="true"
                android:letterSpacing="0.05" />

            <TextView
                android:id="@+id/text_news_detail_title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fontFamily="@font/font_ibm_plex_sans"
                android:text="Título Completo da Notícia"
                android:textColor="@color/text_1"
                android:textSize="22sp"
                android:textStyle="bold"
                android:lineSpacingExtra="4dp" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginVertical="16dp"
                android:background="@color/border" />

            <TextView
                android:id="@+id/text_news_detail_body"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="100dp"
                android:fontFamily="@font/font_ibm_plex_sans"
                android:text="Corpo da notícia completo..."
                android:textColor="@color/text_2"
                android:textSize="14sp"
                android:lineSpacingExtra="6dp" />

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

    <!-- Bottom Navigation Bar with dark background -->
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:orientation="vertical">

        <View
            android:layout_width="match_parent"
            android:layout_height="1dp"
            android:background="@color/border" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="12dp"
            android:background="@color/bg_surface">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_prev_news"
                style="@style/Widget.MaterialComponents.Button.TextButton"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:fontFamily="@font/font_ibm_plex_sans"
                android:text="Anterior"
                android:textColor="@color/brand"
                app:icon="@android:drawable/ic_media_previous"
                app:iconTint="@color/brand" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/btn_next_news"
                style="@style/Widget.MaterialComponents.Button.TextButton"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:fontFamily="@font/font_ibm_plex_sans"
                android:text="Próxima"
                android:textColor="@color/brand"
                app:icon="@android:drawable/ic_media_next"
                app:iconTint="@color/brand"
                app:iconGravity="end" />

        </LinearLayout>
    </LinearLayout>

</androidx.coordinatorlayout.widget.CoordinatorLayout>
