<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('partners', function (Blueprint $table) {
            $table->id();
            $table->string('name');             // TESO, Coca-Cola, UNITEL...
            $table->string('logo')->nullable();
            $table->string('website')->nullable();
            $table->integer('sort_order')->default(0);
            $table->boolean('is_featured')->default(true);   // нүүрэн дээр гарах эсэх
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });

        Schema::create('heroes', function (Blueprint $table) {
            $table->id();
            $table->string('title_line_1');     // "БРЭНДИЙГ ХӨГЖҮҮЛЖ,"
            $table->string('title_line_2');     // "БИЗНЕСИЙГ ӨСГӨЖ," (улаан)
            $table->string('title_line_3');     // "ҮР ДҮН БҮТЭЭНЭ."
            $table->text('description')->nullable();
            $table->string('button_text')->default('Үйлчилгээ үзэх');
            $table->string('button_link')->default('/services');
            $table->string('video_url')->nullable();
            $table->json('side_images')->nullable();      // 3-4 зурагнууд
            $table->boolean('is_active')->default(true);
            $table->integer('sort_order')->default(0);
            $table->timestamps();
        });

        Schema::create('work_steps', function (Blueprint $table) {
            $table->id();
            $table->string('step_number', 2);    // "01", "02", ...
            $table->string('title');             // "Сонс - Дүгнэ"
            $table->text('description')->nullable();
            $table->string('icon')->nullable();
            $table->integer('sort_order')->default(0);
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('partners');
        Schema::dropIfExists('heroes');
        Schema::dropIfExists('work_steps');
    }
};
