<?php
/*
 Theme Name:   Astra Child PSE2026
 Theme URI:    [http://wpastra.com/](http://wpastra.com/)
 Description:  Astra Child Theme for PSE 2026 Project
 Author:       Admin
 Author URI:   [http://wpastra.com/](http://wpastra.com/)
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child-pse2026
*/

/* Anda bisa menambahkan CSS kustom tambahan di sini jika diperlukan */
function child_enqueue_styles() {
	// Mengambil stylesheet dari tema induk
	wp_enqueue_style( 'astra-child-theme-css', get_stylesheet_directory_uri() . '/style.css', array('astra-theme-css'), '1.0.0', 'all' );
}

add_action( 'wp_enqueue_scripts', 'child_enqueue_styles', 15 );

/**
 * Menambahkan dukungan Font Awesome dan Google Fonts secara global 
 * agar desain Bento berjalan sempurna di Astra.
 */
function pse2026_additional_scripts() {
    // Font Awesome 6
    wp_enqueue_style( 'font-awesome-6', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css', array(), '6.4.0' );
    
    // Google Fonts: Space Grotesk
    wp_enqueue_style( 'google-font-space-grotesk', 'https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap', array(), null );
}
add_action( 'wp_enqueue_scripts', 'pse2026_additional_scripts' );

/**
 * Opsional: Menambahkan setting kustom ke WordPress Customizer
 * agar teks di beranda bisa diubah melalui menu 'Appearance > Customize'.
 */
function pse2026_customize_register( $wp_customize ) {
    // Section Hero
    $wp_customize->add_section( 'pse2026_hero_section' , array(
        'title'      => __( 'PSE2026 Hero Settings', 'astra-child' ),
        'priority'   => 30,
    ) );

    // Setting Judul Hero
    $wp_customize->add_setting( 'hero_title' , array(
        'default'   => "Engineering for \n Sustainable Future",
        'transport' => 'refresh',
    ) );

    $wp_customize->add_control( 'hero_title_control', array(
        'label'    => __( 'Judul Hero (Gunakan \n untuk baris baru)', 'astra-child' ),
        'section'  => 'pse2026_hero_section',
        'settings' => 'hero_title',
        'type'     => 'textarea',
    ) );
}
add_action( 'customize_register', 'pse2026_customize_register' );